diff --git a/litellm/proxy/_experimental/out/404/index.html b/litellm/proxy/_experimental/out/404.html similarity index 95% rename from litellm/proxy/_experimental/out/404/index.html rename to litellm/proxy/_experimental/out/404.html index c9df4fb9145..13c7263f936 100644 --- a/litellm/proxy/_experimental/out/404/index.html +++ b/litellm/proxy/_experimental/out/404.html @@ -1 +1 @@ -404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.LiteLLM Dashboard

404

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 77d5f6f4cec..6110a9e13b1 100644 --- a/litellm/proxy/_experimental/out/__next.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/__next.__PAGE__.txt @@ -1,28 +1,28 @@ 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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/e627c7aa5ead52b3.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/99d715502d5069f4.js","/litellm-asset-prefix/_next/static/chunks/53a707a5829899ed.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","/litellm-asset-prefix/_next/static/chunks/9606513e20bc3d4f.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","/litellm-asset-prefix/_next/static/chunks/e1e3f652dbc5be03.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","/litellm-asset-prefix/_next/static/chunks/8c13023d89b01566.js","/litellm-asset-prefix/_next/static/chunks/338e84191fe615bf.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","/litellm-asset-prefix/_next/static/chunks/99109c78121231a0.js","/litellm-asset-prefix/_next/static/chunks/5929da573d876909.js","/litellm-asset-prefix/_next/static/chunks/58461a445becf104.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/6b2bc4046c4cbfc8.js","/litellm-asset-prefix/_next/static/chunks/5400ee883dfa8c43.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1da362a651d209bd.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0b8ec8bf90ea9721.js"],"default"] +3:I[952683,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/e627c7aa5ead52b3.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/995220c77ab93732.js","/litellm-asset-prefix/_next/static/chunks/7834a5efb7b5f959.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","/litellm-asset-prefix/_next/static/chunks/f97945b5e61da683.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","/litellm-asset-prefix/_next/static/chunks/4fc5bd834120bcc4.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","/litellm-asset-prefix/_next/static/chunks/4fc2d71e511309ab.js","/litellm-asset-prefix/_next/static/chunks/6e0ab2908f7cc2a6.js","/litellm-asset-prefix/_next/static/chunks/f19a24d7e7fafd09.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/adfb239c02cec598.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/6b2bc4046c4cbfc8.js","/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/169b34fe8aeee0c7.js","/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/db0ac43a898048e2.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/b69db537c2cf883e.js"],"default"] 18:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 19:"$Sreact.suspense" :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/e627c7aa5ead52b3.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.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/99d715502d5069f4.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/53a707a5829899ed.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/403c4d96324c23a6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/9606513e20bc3d4f.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/e1e3f652dbc5be03.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/8c13023d89b01566.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/338e84191fe615bf.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/99109c78121231a0.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/5929da573d876909.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/58461a445becf104.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16"],"$L17"]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/e627c7aa5ead52b3.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.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/995220c77ab93732.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7834a5efb7b5f959.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/403c4d96324c23a6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/f97945b5e61da683.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4fc5bd834120bcc4.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/4fc2d71e511309ab.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/6e0ab2908f7cc2a6.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/f19a24d7e7fafd09.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16"],"$L17"]}],"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/d0d828f9a0668699.js","async":true}] -7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true}] +7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/adfb239c02cec598.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/6b2bc4046c4cbfc8.js","async":true}] -a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/5400ee883dfa8c43.js","async":true}] +a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","async":true}] b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true}] c:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}] -d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}] +d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/169b34fe8aeee0c7.js","async":true}] e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","async":true}] -f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}] +f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true}] 10:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","async":true}] 11:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","async":true}] -12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","async":true}] -13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}] -14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/1da362a651d209bd.js","async":true}] -15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}] -16:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/0b8ec8bf90ea9721.js","async":true}] +12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/db0ac43a898048e2.js","async":true}] +13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}] +14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true}] +15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}] +16:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/b69db537c2cf883e.js","async":true}] 17:["$","$L18",null,{"children":["$","$19",null,{"name":"Next.MetadataOutlet","children":"$@1a"}]}] 1a:null diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt index ab78aa2c6cf..cfc0650a0b1 100644 --- a/litellm/proxy/_experimental/out/__next._full.txt +++ b/litellm/proxy/_experimental/out/__next._full.txt @@ -1,16 +1,16 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[952683,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/e627c7aa5ead52b3.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/99d715502d5069f4.js","/litellm-asset-prefix/_next/static/chunks/53a707a5829899ed.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","/litellm-asset-prefix/_next/static/chunks/9606513e20bc3d4f.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","/litellm-asset-prefix/_next/static/chunks/e1e3f652dbc5be03.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","/litellm-asset-prefix/_next/static/chunks/8c13023d89b01566.js","/litellm-asset-prefix/_next/static/chunks/338e84191fe615bf.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","/litellm-asset-prefix/_next/static/chunks/99109c78121231a0.js","/litellm-asset-prefix/_next/static/chunks/5929da573d876909.js","/litellm-asset-prefix/_next/static/chunks/58461a445becf104.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/6b2bc4046c4cbfc8.js","/litellm-asset-prefix/_next/static/chunks/5400ee883dfa8c43.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1da362a651d209bd.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0b8ec8bf90ea9721.js"],"default"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/e627c7aa5ead52b3.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/995220c77ab93732.js","/litellm-asset-prefix/_next/static/chunks/7834a5efb7b5f959.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","/litellm-asset-prefix/_next/static/chunks/f97945b5e61da683.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","/litellm-asset-prefix/_next/static/chunks/4fc5bd834120bcc4.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","/litellm-asset-prefix/_next/static/chunks/4fc2d71e511309ab.js","/litellm-asset-prefix/_next/static/chunks/6e0ab2908f7cc2a6.js","/litellm-asset-prefix/_next/static/chunks/f19a24d7e7fafd09.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/adfb239c02cec598.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/6b2bc4046c4cbfc8.js","/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/169b34fe8aeee0c7.js","/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/db0ac43a898048e2.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/b69db537c2cf883e.js"],"default"] 2f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.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":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","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/e627c7aa5ead52b3.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.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/99d715502d5069f4.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/53a707a5829899ed.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/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/9606513e20bc3d4f.js","async":true,"nonce":"$undefined"}],"$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"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","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/e627c7aa5ead52b3.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.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/995220c77ab93732.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7834a5efb7b5f959.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/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/f97945b5e61da683.js","async":true,"nonce":"$undefined"}],"$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"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} 30:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 31:"$Sreact.suspense" 33:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -18,38 +18,38 @@ a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}] b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","async":true,"nonce":"$undefined"}] -d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/e1e3f652dbc5be03.js","async":true,"nonce":"$undefined"}] +d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4fc5bd834120bcc4.js","async":true,"nonce":"$undefined"}] e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}] 10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] 11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/8c13023d89b01566.js","async":true,"nonce":"$undefined"}] -13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/338e84191fe615bf.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","async":true,"nonce":"$undefined"}] +13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] 14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}] -15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true,"nonce":"$undefined"}] -17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/99109c78121231a0.js","async":true,"nonce":"$undefined"}] -18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/5929da573d876909.js","async":true,"nonce":"$undefined"}] -19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/58461a445becf104.js","async":true,"nonce":"$undefined"}] +15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","async":true,"nonce":"$undefined"}] +17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/4fc2d71e511309ab.js","async":true,"nonce":"$undefined"}] +18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/6e0ab2908f7cc2a6.js","async":true,"nonce":"$undefined"}] +19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/f19a24d7e7fafd09.js","async":true,"nonce":"$undefined"}] 1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] 1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] 1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","async":true,"nonce":"$undefined"}] -1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}] +1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/adfb239c02cec598.js","async":true,"nonce":"$undefined"}] 1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] 1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/6b2bc4046c4cbfc8.js","async":true,"nonce":"$undefined"}] -20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/5400ee883dfa8c43.js","async":true,"nonce":"$undefined"}] +20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","async":true,"nonce":"$undefined"}] 21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true,"nonce":"$undefined"}] 22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] -23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] +23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/169b34fe8aeee0c7.js","async":true,"nonce":"$undefined"}] 24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}] 26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","async":true,"nonce":"$undefined"}] 27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","async":true,"nonce":"$undefined"}] -28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] -2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/1da362a651d209bd.js","async":true,"nonce":"$undefined"}] -2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] -2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/0b8ec8bf90ea9721.js","async":true,"nonce":"$undefined"}] +28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/db0ac43a898048e2.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true,"nonce":"$undefined"}] +2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] +2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/b69db537c2cf883e.js","async":true,"nonce":"$undefined"}] 2d:["$","$L30",null,{"children":["$","$31",null,{"name":"Next.MetadataOutlet","children":"$@32"}]}] 2e:["$","$1","h",{"children":[null,["$","$L33",null,{"children":"$L34"}],["$","div",null,{"hidden":true,"children":["$","$L35",null,{"children":["$","$31",null,{"name":"Next.Metadata","children":"$L36"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:{} diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/__next._head.txt +++ b/litellm/proxy/_experimental/out/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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 d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/__next._index.txt +++ b/litellm/proxy/_experimental/out/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt index 69000b52c80..4437fcc091f 100644 --- a/litellm/proxy/_experimental/out/__next._tree.txt +++ b/litellm/proxy/_experimental/out/__next._tree.txt @@ -2,4 +2,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.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:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/Hp-LQxDEAEt-JSJFExm-i/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/IzkoIVgvfXHyOBVGLH_aI/_buildManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/Hp-LQxDEAEt-JSJFExm-i/_buildManifest.js rename to litellm/proxy/_experimental/out/_next/static/IzkoIVgvfXHyOBVGLH_aI/_buildManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/Hp-LQxDEAEt-JSJFExm-i/_clientMiddlewareManifest.json b/litellm/proxy/_experimental/out/_next/static/IzkoIVgvfXHyOBVGLH_aI/_clientMiddlewareManifest.json similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/Hp-LQxDEAEt-JSJFExm-i/_clientMiddlewareManifest.json rename to litellm/proxy/_experimental/out/_next/static/IzkoIVgvfXHyOBVGLH_aI/_clientMiddlewareManifest.json diff --git a/litellm/proxy/_experimental/out/_next/static/Hp-LQxDEAEt-JSJFExm-i/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/IzkoIVgvfXHyOBVGLH_aI/_ssgManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/Hp-LQxDEAEt-JSJFExm-i/_ssgManifest.js rename to litellm/proxy/_experimental/out/_next/static/IzkoIVgvfXHyOBVGLH_aI/_ssgManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/02158aed2f4518e2.js b/litellm/proxy/_experimental/out/_next/static/chunks/02158aed2f4518e2.js deleted file mode 100644 index fe9c1844506..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/02158aed2f4518e2.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56567,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(109799),i=e.i(907308),l=e.i(764205),r=e.i(500330),n=e.i(11751),o=e.i(708347),d=e.i(751904),m=e.i(827252),c=e.i(987432),u=e.i(530212),g=e.i(389083),h=e.i(304967),x=e.i(350967),p=e.i(599724),_=e.i(779241),b=e.i(629569),f=e.i(464571),j=e.i(808613),y=e.i(311451),v=e.i(199133),S=e.i(790848),T=e.i(653496),N=e.i(592968),w=e.i(888259),C=e.i(678784),k=e.i(118366),I=e.i(271645),M=e.i(9314),z=e.i(552130),D=e.i(127952);function F({className:e,value:a,onChange:s}){return(0,t.jsxs)(v.Select,{className:e,value:a,onChange:s,children:[(0,t.jsx)(v.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(v.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(v.Select.Option,{value:"30d",children:"Monthly"})]})}var P=e.i(844565),B=e.i(355619),A=e.i(643449),L=e.i(75921),O=e.i(390605),R=e.i(162386),V=e.i(727749),U=e.i(384767),E=e.i(435451),K=e.i(916940),$=e.i(183588),G=e.i(276173),W=e.i(91979),q=e.i(269200),H=e.i(942232),J=e.i(977572),Q=e.i(427612),Y=e.i(64848),X=e.i(496020),Z=e.i(536916),ee=e.i(21548);let et={"/key/generate":"Member can generate a virtual key for this team","/key/service-account/generate":"Member can generate a service account key (not belonging to any user) for this team","/key/update":"Member can update a virtual key belonging to this team","/key/delete":"Member can delete a virtual key belonging to this team","/key/info":"Member can get info about a virtual key belonging to this team","/key/regenerate":"Member can regenerate a virtual key belonging to this team","/key/{key_id}/regenerate":"Member can regenerate a virtual key belonging to this team","/key/list":"Member can list virtual keys belonging to this team","/key/block":"Member can block a virtual key belonging to this team","/key/unblock":"Member can unblock a virtual key belonging to this team","/team/daily/activity":"Member can view all team usage data (not just their own)"},ea=({teamId:e,accessToken:a,canEditTeam:s})=>{let[i,r]=(0,I.useState)([]),[n,o]=(0,I.useState)([]),[d,m]=(0,I.useState)(!0),[u,g]=(0,I.useState)(!1),[x,_]=(0,I.useState)(!1),j=async()=>{try{if(m(!0),!a)return;let t=await (0,l.getTeamPermissionsCall)(a,e),s=t.all_available_permissions||[];r(s);let i=t.team_member_permissions||[];o(i),_(!1)}catch(e){V.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,I.useEffect)(()=>{j()},[e,a]);let y=async()=>{try{if(!a)return;g(!0),await (0,l.teamPermissionsUpdateCall)(a,e,n),V.default.success("Permissions updated successfully"),_(!1)}catch(e){V.default.fromBackend("Failed to update permissions"),console.error("Error updating permissions:",e)}finally{g(!1)}};if(d)return(0,t.jsx)("div",{className:"p-6 text-center",children:"Loading permissions..."});let v=i.length>0;return(0,t.jsxs)(h.Card,{className:"bg-white shadow-md rounded-md p-6",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b pb-4 mb-6",children:[(0,t.jsx)(b.Title,{className:"mb-2 sm:mb-0",children:"Member Permissions"}),s&&x&&(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(f.Button,{icon:(0,t.jsx)(W.ReloadOutlined,{}),onClick:()=>{j()},children:"Reset"}),(0,t.jsx)(f.Button,{onClick:y,loading:u,type:"primary",icon:(0,t.jsx)(c.SaveOutlined,{}),children:"Save Changes"})]})]}),(0,t.jsx)(p.Text,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),v?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(q.Table,{className:" min-w-full",children:[(0,t.jsx)(Q.TableHead,{children:(0,t.jsxs)(X.TableRow,{children:[(0,t.jsx)(Y.TableHeaderCell,{children:"Method"}),(0,t.jsx)(Y.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(Y.TableHeaderCell,{children:"Description"}),(0,t.jsx)(Y.TableHeaderCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:"Allow Access"})]})}),(0,t.jsx)(H.TableBody,{children:i.map(e=>{let a=(e=>{let t=e.includes("/info")||e.includes("/list")||e.includes("/activity")?"GET":"POST",a=et[e];if(!a){for(let[t,s]of Object.entries(et))if(e.includes(t)){a=s;break}}return a||(a=`Access ${e}`),{method:t,endpoint:e,description:a,route:e}})(e);return(0,t.jsxs)(X.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${"GET"===a.method?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"}`,children:a.method})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:a.endpoint})}),(0,t.jsx)(J.TableCell,{className:"text-gray-700",children:a.description}),(0,t.jsx)(J.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(Z.Checkbox,{checked:n.includes(e),onChange:t=>{o(t.target.checked?[...n,e]:n.filter(t=>t!==e)),_(!0)},disabled:!s})})]},e)})})]})}):(0,t.jsx)("div",{className:"py-12",children:(0,t.jsx)(ee.Empty,{description:"No permissions available"})})]})},es="overview",ei="virtual-keys",el="members",er="member-permissions",en="settings",eo={[es]:"Overview",[ei]:"Virtual Keys",[el]:"Members",[er]:"Member Permissions",[en]:"Settings"};var ed=e.i(292639),em=e.i(770914),ec=e.i(898586),eu=e.i(294612);function eg({teamData:e,canEditTeam:s,handleMemberDelete:i,setSelectedEditMember:l,setIsEditMemberModalVisible:n,setIsAddMemberModalVisible:d}){let c=e=>{if(null==e)return"0";if("number"==typeof e){let t=Number(e);return t===Math.floor(t)?t.toString():(0,r.formatNumberWithCommas)(t,8).replace(/\.?0+$/,"")}return"0"},{data:u}=(0,ed.useUISettings)(),{userId:g,userRole:h}=(0,a.default)(),x=!!u?.values?.disable_team_admin_delete_team_user,p=(0,o.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,g||""),_=(0,o.isProxyAdminRole)(h||""),b=[{title:(0,t.jsxs)(em.Space,{direction:"horizontal",children:["Team Member Spend (USD)",(0,t.jsx)(N.Tooltip,{title:"This is the amount spent by a user in the team.",children:(0,t.jsx)(m.InfoCircleOutlined,{})})]}),key:"spend",render:(a,s)=>(0,t.jsxs)(ec.Typography.Text,{children:["$",(0,r.formatNumberWithCommas)((t=>{if(!t)return 0;let a=e.team_memberships.find(e=>e.user_id===t);return a?.spend||0})(s.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",render:(a,s)=>{let i=(t=>{if(!t)return null;let a=e.team_memberships.find(e=>e.user_id===t),s=a?.litellm_budget_table?.max_budget;return null==s?null:c(s)})(s.user_id);return(0,t.jsx)(ec.Typography.Text,{children:i?`$${(0,r.formatNumberWithCommas)(Number(i),4)}`:"No Limit"})}},{title:(0,t.jsxs)(em.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(N.Tooltip,{title:"Rate limits for this member's usage within this team.",children:(0,t.jsx)(m.InfoCircleOutlined,{})})]}),key:"rate_limits",render:(a,s)=>(0,t.jsx)(ec.Typography.Text,{children:(t=>{if(!t)return"No Limits";let a=e.team_memberships.find(e=>e.user_id===t),s=a?.litellm_budget_table?.rpm_limit,i=a?.litellm_budget_table?.tpm_limit,l=[s?`${c(s)} RPM`:null,i?`${c(i)} TPM`:null].filter(Boolean);return l.length>0?l.join(" / "):"No Limits"})(s.user_id)})}];return(0,t.jsx)(eu.default,{members:e.team_info.members_with_roles,canEdit:s,onEdit:t=>{let a=e.team_memberships.find(e=>e.user_id===t.user_id);l({...t,max_budget_in_team:a?.litellm_budget_table?.max_budget||null,tpm_limit:a?.litellm_budget_table?.tpm_limit||null,rpm_limit:a?.litellm_budget_table?.rpm_limit||null}),n(!0)},onDelete:i,onAddMember:()=>d(!0),roleColumnTitle:"Team Role",roleTooltip:"This role applies only to this team and is independent from the user's proxy-level role.",extraColumns:b,showDeleteForMember:()=>_||s&&!p||p&&!x})}var eh=e.i(207082),ex=e.i(871943),ep=e.i(502547),e_=e.i(360820),eb=e.i(94629),ef=e.i(152990),ej=e.i(682830),ey=e.i(994388),ev=e.i(752978),eS=e.i(282786),eT=e.i(981339),eN=e.i(969550),ew=e.i(20147),eC=e.i(266027),ek=e.i(633627);function eI({teamId:e,teamAlias:s,organization:i}){let{accessToken:l}=(0,a.default)(),[n,o]=(0,I.useState)(null),[d,c]=(0,I.useState)([{id:"created_at",desc:!0}]),[u,h]=(0,I.useState)({pageIndex:0,pageSize:50}),[x,_]=(0,I.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),b=d.length>0?d[0].id:"created_at",f=d.length>0?d[0].desc?"desc":"asc":"desc",j=u.pageIndex,y=u.pageSize,{data:v,isPending:S,isFetching:T,refetch:w}=(0,eh.useKeys)(j+1,y,{teamID:e,organizationID:x["Organization ID"]?.trim()||void 0,selectedKeyAlias:x["Key Alias"]?.trim()||void 0,userID:x["User ID"]?.trim()||void 0,sortBy:b||void 0,sortOrder:f||void 0,expand:"user"}),C=(0,I.useMemo)(()=>{let e=v?.keys||[],t=i?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[v?.keys,i?.organization_id]),k=v?.total_pages??0,[M,z]=(0,I.useState)({}),D=(0,I.useMemo)(()=>({team_id:e,team_alias:s||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:i?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,s,i]),F=(0,eC.useQuery)({queryKey:["teamFilterOptions",e,l],queryFn:async()=>(0,ek.fetchTeamFilterOptions)(l,e),enabled:!!l&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},P=(0,I.useCallback)(()=>{w?.()},[w]);(0,I.useEffect)(()=>(window.addEventListener("storage",P),()=>window.removeEventListener("storage",P)),[P]);let A=(0,I.useCallback)((e,t=!1)=>{_(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||h(e=>({...e,pageIndex:0}))},[]),L=(0,I.useCallback)(()=>{_({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),h(e=>({...e,pageIndex:0}))},[]),O=(0,I.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=F;if(!t.length)return[];let a=e.toLowerCase();return(a?t.filter(e=>e.toLowerCase().includes(a)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=F,a=e.toLowerCase();return(a?t.filter(e=>e.toLowerCase().includes(a)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=F,a=e.toLowerCase();return(a?t.filter(e=>e.id.toLowerCase().includes(a)||e.email.toLowerCase().includes(a)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[F]),R=(0,I.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let a=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:a,children:(0,t.jsx)(ey.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:s,overflow:"hidden"},onClick:()=>o(e.row.original),children:a??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let a=e.getValue(),s=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:a??"-"})})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"organization_id",accessorKey:"organization_id",header:"Organization ID",size:140,enableSorting:!1,cell:e=>e.getValue()?e.renderValue():"-"},{id:"user_email",accessorKey:"user",header:"User Email",size:160,enableSorting:!1,cell:e=>{let a=e.getValue(),s=a?.user_email,i=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:70,enableSorting:!1,cell:e=>{let a=e.getValue(),s="default_user_id"===a?"Default Proxy Admin":a,i=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:s??"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:70,enableSorting:!1,cell:e=>{let a=e.getValue(),s="default_user_id"===a?"Default Proxy Admin":a,i=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:s??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(eS.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(m.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let a=e.getValue();if(!a)return"Unknown";let s=new Date(a);return(0,t.jsx)(N.Tooltip,{title:s.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:s.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,r.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,r.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let a=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(a)?(0,t.jsx)("div",{className:"flex flex-col",children:0===a.length?(0,t.jsx)(g.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[a.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(ev.Icon,{icon:M[e.row.id]?ex.ChevronDownIcon:ep.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>z(t=>({...t,[e.row.id]:!t[e.row.id]}))})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[a.slice(0,3).map((e,a)=>"all-proxy-models"===e?(0,t.jsx)(g.Badge,{size:"xs",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})},a):(0,t.jsx)(g.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(p.Text,{children:e.length>30?`${(0,B.getModelDisplayName)(e).slice(0,30)}...`:(0,B.getModelDisplayName)(e)})},a)),a.length>3&&!M[e.row.id]&&(0,t.jsx)(g.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(p.Text,{children:["+",a.length-3," ",a.length-3==1?"more model":"more models"]})}),M[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.slice(3).map((e,a)=>"all-proxy-models"===e?(0,t.jsx)(g.Badge,{size:"xs",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})},a+3):(0,t.jsx)(g.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(p.Text,{children:e.length>30?`${(0,B.getModelDisplayName)(e).slice(0,30)}...`:(0,B.getModelDisplayName)(e)})},a+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==a.tpm_limit?a.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==a.rpm_limit?a.rpm_limit:"Unlimited"]})]})}}],[M]),V=(0,I.useCallback)(e=>{let t="function"==typeof e?e(d):e;if(c(t),t?.length>0){let e=t[0];A({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[d,A]),U=(0,ef.useReactTable)({data:C,columns:R,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:u},onSortingChange:V,onPaginationChange:h,getCoreRowModel:(0,ej.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:k});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:n?(0,t.jsx)(ew.default,{keyId:n.token,onClose:()=>o(null),keyData:n,teams:[D],onDelete:w}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eN.default,{options:O,onApplyFilters:A,initialValues:x,onResetFilters:L})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[S||T?(0,t.jsx)(eT.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",j+1," of ",U.getPageCount()]}),S||T?(0,t.jsx)(eT.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>U.previousPage(),disabled:S||T||!U.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),S||T?(0,t.jsx)(eT.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>U.nextPage(),disabled:S||T||!U.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(q.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:U.getCenterTotalSize()},children:[(0,t.jsx)(Q.TableHead,{children:U.getHeaderGroups().map(e=>(0,t.jsx)(X.TableRow,{children:e.headers.map(e=>(0,t.jsx)(Y.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,ef.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(e_.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ex.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eb.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${U.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(H.TableBody,{children:S||T?(0,t.jsx)(X.TableRow,{children:(0,t.jsx)(J.TableCell,{colSpan:R.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):C.length>0?U.getRowModel().rows.map(e=>(0,t.jsx)(X.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(J.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,ef.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(X.TableRow,{children:(0,t.jsx)(J.TableCell,{colSpan:R.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:W,accessToken:q,is_team_admin:H,is_proxy_admin:J,is_org_admin:Q=!1,userModels:Y,editTeam:X,premiumUser:Z=!1,onUpdate:ee})=>{let[et,ed]=(0,I.useState)(null),[em,ec]=(0,I.useState)(!0),[eu,eh]=(0,I.useState)(!1),[ex]=j.Form.useForm(),[ep,e_]=(0,I.useState)(!1),[eb,ef]=(0,I.useState)(null),[ej,ey]=(0,I.useState)(!1),[ev,eS]=(0,I.useState)([]),[eT,eN]=(0,I.useState)(!1),[ew,eC]=(0,I.useState)({}),[ek,eM]=(0,I.useState)([]),[ez,eD]=(0,I.useState)([]),[eF,eP]=(0,I.useState)({}),[eB,eA]=(0,I.useState)(!1),[eL,eO]=(0,I.useState)(null),[eR,eV]=(0,I.useState)(!1),[eU,eE]=(0,I.useState)(!1),[eK,e$]=(0,I.useState)(!1),[eG,eW]=(0,I.useState)(null),{userRole:eq,userId:eH}=(0,a.default)(),{data:eJ=[]}=(0,s.useOrganizations)(),eQ=(0,I.useMemo)(()=>{let e=et?.team_info?.organization_id;if(!e||!eH)return!1;let t=eJ.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===eH&&"org_admin"===e.user_role)??!1},[et,eJ,eH]),eY=H||J||Q||eQ,eX=(0,I.useMemo)(()=>{let e;return e=[es,ei],eY?[...e,el,er,en]:e},[eY]),eZ=(0,I.useMemo)(()=>X&&eY?en:es,[X,eY]),e0=async()=>{try{if(ec(!0),!q)return;let t=await (0,l.teamInfoCall)(q,e);ed(t)}catch(e){V.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{ec(!1)}};(0,I.useEffect)(()=>{e0()},[e,q]),(0,I.useEffect)(()=>{(async()=>{if(!q||!et?.team_info?.organization_id)return eW(null);try{let e=await (0,l.organizationInfoCall)(q,et.team_info.organization_id);eW(e)}catch(e){console.error("Error fetching organization info:",e),eW(null)}})()},[q,et?.team_info?.organization_id]),(0,I.useMemo)(()=>{let e;return e=[],e=eG?eG.models.includes("all-proxy-models")?Y:eG.models.length>0?eG.models:Y:Y,(0,B.unfurlWildcardModelsInList)(e,Y)},[eG,Y]),(0,I.useEffect)(()=>{let e=async()=>{try{if(!q)return;let e=(await (0,l.getPoliciesList)(q)).policies.map(e=>e.policy_name);eD(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(!q)return;let e=(await (0,l.getGuardrailsList)(q)).guardrails.map(e=>e.guardrail_name);eM(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[q]),(0,I.useEffect)(()=>{(async()=>{if(!q||!et?.team_info?.policies||0===et.team_info.policies.length)return;eA(!0);let e={};try{await Promise.all(et.team_info.policies.map(async t=>{try{let a=await (0,l.getPolicyInfoWithGuardrails)(q,t);e[t]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${t}:`,a),e[t]=[]}})),eP(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eA(!1)}})()},[q,et?.team_info?.policies]);let e1=async t=>{try{if(null==q)return;let a={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,l.teamMemberAddCall)(q,e,a),V.default.success("Team member added successfully"),eh(!1),ex.resetFields();let s=await (0,l.teamInfoCall)(q,e);ed(s),ee(s)}catch(t){let e="Failed to add team member";t?.raw?.detail?.error?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),V.default.fromBackend(e),console.error("Error adding team member:",t)}},e4=async t=>{try{if(null==q)return;let a={user_email:t.user_email,user_id:t.user_id,role:t.role,max_budget_in_team:t.max_budget_in_team,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit};w.default.destroy(),await (0,l.teamMemberUpdateCall)(q,e,a),V.default.success("Team member updated successfully"),e_(!1);let s=await (0,l.teamInfoCall)(q,e);ed(s),ee(s)}catch(t){let e="Failed to update team member";t?.raw?.detail?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),e_(!1),w.default.destroy(),V.default.fromBackend(e),console.error("Error updating team member:",t)}},e2=async()=>{if(eL&&q){eE(!0);try{await (0,l.teamMemberDeleteCall)(q,e,eL),V.default.success("Team member removed successfully");let t=await (0,l.teamInfoCall)(q,e);ed(t),ee(t)}catch(e){V.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{eE(!1),eV(!1),eO(null)}}},e3=async t=>{try{let a;if(!q)return;e$(!0);let s={};try{let{soft_budget_alerting_emails:e,...a}=t.metadata?JSON.parse(t.metadata):{};s=a}catch(e){V.default.fromBackend("Invalid JSON in metadata field");return}if("string"==typeof t.secret_manager_settings&&t.secret_manager_settings.trim().length>0)try{a=JSON.parse(t.secret_manager_settings)}catch(e){V.default.fromBackend("Invalid JSON in secret manager settings");return}let i=e=>null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&Number.isNaN(e)?null:e,r={team_id:e,team_alias:t.team_alias,models:t.models,tpm_limit:i(t.tpm_limit),rpm_limit:i(t.rpm_limit),max_budget:t.max_budget,soft_budget:i(t.soft_budget),budget_duration:t.budget_duration,metadata:{...s,...t.guardrails?.length>0?{guardrails:t.guardrails}:{},...t.logging_settings?.length>0?{logging:t.logging_settings}:{},disable_global_guardrails:t.disable_global_guardrails||!1,soft_budget_alerting_emails:"string"==typeof t.soft_budget_alerting_emails?t.soft_budget_alerting_emails.split(",").map(e=>e.trim()).filter(e=>e.length>0):t.soft_budget_alerting_emails||[],...void 0!==a?{secret_manager_settings:a}:{}},...t.policies?.length>0?{policies:t.policies}:{},organization_id:t.organization_id};r.max_budget=(0,n.mapEmptyStringToNull)(r.max_budget),r.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(r.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(r.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(r.team_member_tpm_limit=i(t.team_member_tpm_limit),r.team_member_rpm_limit=i(t.team_member_rpm_limit));let{servers:o,accessGroups:d}=t.mcp_servers_and_groups||{servers:[],accessGroups:[]},m=new Set(o||[]),c=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>m.has(e)));r.object_permission={},o&&(r.object_permission.mcp_servers=o),d&&(r.object_permission.mcp_access_groups=d),c&&(r.object_permission.mcp_tool_permissions=c),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:u,accessGroups:g}=t.agents_and_groups||{agents:[],accessGroups:[]};u&&u.length>0&&(r.object_permission.agents=u),g&&g.length>0&&(r.object_permission.agent_access_groups=g),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(r.object_permission.vector_stores=t.vector_stores),void 0!==t.access_group_ids&&(r.access_group_ids=t.access_group_ids),await (0,l.teamUpdateCall)(q,r),V.default.success("Team settings updated successfully"),ey(!1),e0()}catch(e){console.error("Error updating team:",e)}finally{e$(!1)}};if(em)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!et?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:e5}=et,e6=async(e,t)=>{await (0,r.copyToClipboard)(e)&&(eC(e=>({...e,[t]:!0})),setTimeout(()=>{eC(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Button,{type:"text",icon:(0,t.jsx)(u.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:W,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(b.Title,{children:e5.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(p.Text,{className:"text-gray-500 font-mono",children:e5.team_id}),(0,t.jsx)(f.Button,{type:"text",size:"small",icon:ew["team-id"]?(0,t.jsx)(C.CheckIcon,{size:12}):(0,t.jsx)(k.CopyIcon,{size:12}),onClick:()=>e6(e5.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${ew["team-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsx)(T.Tabs,{defaultActiveKey:eZ,className:"mb-4",items:[{key:es,label:eo[es],children:(0,t.jsxs)(x.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(b.Title,{children:["$",(0,r.formatNumberWithCommas)(e5.spend,4)]}),(0,t.jsxs)(p.Text,{children:["of ",null===e5.max_budget?"Unlimited":`$${(0,r.formatNumberWithCommas)(e5.max_budget,4)}`]}),e5.budget_duration&&(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Reset: ",e5.budget_duration]}),(0,t.jsx)("br",{}),e5.team_member_budget_table&&(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,r.formatNumberWithCommas)(e5.team_member_budget_table.max_budget,4)]})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(p.Text,{children:["TPM: ",e5.tpm_limit||"Unlimited"]}),(0,t.jsxs)(p.Text,{children:["RPM: ",e5.rpm_limit||"Unlimited"]}),e5.max_parallel_requests&&(0,t.jsxs)(p.Text,{children:["Max Parallel Requests: ",e5.max_parallel_requests]})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===e5.models.length?(0,t.jsx)(g.Badge,{color:"red",children:"All proxy models"}):e5.models.map((e,a)=>(0,t.jsx)(g.Badge,{color:"red",children:e},a))})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(p.Text,{children:["User Keys: ",et.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(p.Text,{children:["Service Account Keys: ",et.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Total: ",et.keys.length]})]})]}),(0,t.jsx)(U.default,{objectPermission:e5.object_permission,variant:"card",accessToken:q}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900 mb-3",children:"Guardrails"}),e5.guardrails&&e5.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e5.guardrails.map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(p.Text,{className:"text-gray-500",children:"No guardrails configured"}),e5.metadata?.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(g.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),e5.policies&&e5.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:e5.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Badge,{color:"purple",children:e}),eB&&(0,t.jsx)(p.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!eB&&eF[e]&&eF[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(p.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eF[e].map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(p.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:e5.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:ei,label:eo[ei],children:(0,t.jsx)(eI,{teamId:e,teamAlias:e5.team_alias,organization:eG})},{key:el,label:eo[el],children:(0,t.jsx)(eg,{teamData:et,canEditTeam:eY,handleMemberDelete:e=>{eO(e),eV(!0)},setSelectedEditMember:ef,setIsEditMemberModalVisible:e_,setIsAddMemberModalVisible:eh})},{key:er,label:eo[er],children:(0,t.jsx)(ea,{teamId:e,accessToken:q,canEditTeam:eY})},{key:en,label:eo[en],children:(0,t.jsxs)(h.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Title,{children:"Team Settings"}),eY&&!ej&&(0,t.jsx)(f.Button,{icon:(0,t.jsx)(d.EditOutlined,{className:"h-4 w-4"}),onClick:()=>ey(!0),children:"Edit Settings"})]}),ej?(0,t.jsxs)(j.Form,{form:ex,onFinish:e3,initialValues:{...e5,team_alias:e5.team_alias,models:e5.models,tpm_limit:e5.tpm_limit,rpm_limit:e5.rpm_limit,max_budget:e5.max_budget,soft_budget:e5.soft_budget,budget_duration:e5.budget_duration,team_member_tpm_limit:e5.team_member_budget_table?.tpm_limit,team_member_rpm_limit:e5.team_member_budget_table?.rpm_limit,team_member_budget:e5.team_member_budget_table?.max_budget,team_member_budget_duration:e5.team_member_budget_table?.budget_duration,guardrails:e5.metadata?.guardrails||[],policies:e5.policies||[],disable_global_guardrails:e5.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(e5.metadata?.soft_budget_alerting_emails)?e5.metadata.soft_budget_alerting_emails.join(", "):"",metadata:e5.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:a,...s})=>s)(e5.metadata),null,2):"",logging_settings:e5.metadata?.logging||[],secret_manager_settings:e5.metadata?.secret_manager_settings?JSON.stringify(e5.metadata.secret_manager_settings,null,2):"",organization_id:e5.organization_id,vector_stores:e5.object_permission?.vector_stores||[],mcp_servers:e5.object_permission?.mcp_servers||[],mcp_access_groups:e5.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:e5.object_permission?.mcp_servers||[],accessGroups:e5.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e5.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e5.object_permission?.agents||[],accessGroups:e5.object_permission?.agent_access_groups||[]},access_group_ids:e5.access_group_ids||[]},layout:"vertical",children:[(0,t.jsx)(j.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(y.Input,{type:""})}),(0,t.jsx)(j.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(R.ModelSelect,{value:ex.getFieldValue("models")||[],onChange:e=>ex.setFieldValue("models",e),teamID:e,organizationID:et?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!et?.team_info?.organization_id,showAllProxyModelsOverride:(0,o.isProxyAdminRole)(eq)&&!et?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(j.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(E.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(E.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:"Soft Budget Alerting Emails",name:"soft_budget_alerting_emails",tooltip:"Comma-separated email addresses to receive alerts when the soft budget is reached",children:(0,t.jsx)(y.Input,{placeholder:"example1@test.com, example2@test.com"})}),(0,t.jsx)(j.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(E.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:"Team Member Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(F,{onChange:e=>ex.setFieldValue("team_member_budget_duration",e),value:ex.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(j.Form.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,t.jsx)(_.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(j.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"Default tokens per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,t.jsx)(E.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(j.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"Default requests per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,t.jsx)(E.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})}),(0,t.jsx)(j.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(v.Select,{placeholder:"n/a",children:[(0,t.jsx)(v.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(v.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(v.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(j.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(E.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(E.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(N.Tooltip,{title:"Setup your first guardrail",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(v.Select,{mode:"tags",placeholder:"Select or enter guardrails",options:ek.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails",(0,t.jsx)(N.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(S.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(N.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",help:"Select existing policies or enter new ones",children:(0,t.jsx)(v.Select,{mode:"tags",placeholder:"Select or enter policies",options:ez.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(N.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(K.default,{onChange:e=>ex.setFieldValue("vector_stores",e),value:ex.getFieldValue("vector_stores"),accessToken:q||"",placeholder:"Select vector stores"})}),(0,t.jsx)(j.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(P.default,{onChange:e=>ex.setFieldValue("allowed_passthrough_routes",e),value:ex.getFieldValue("allowed_passthrough_routes"),accessToken:q||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(j.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(L.default,{onChange:e=>ex.setFieldValue("mcp_servers_and_groups",e),value:ex.getFieldValue("mcp_servers_and_groups"),accessToken:q||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(y.Input,{type:"hidden"})}),(0,t.jsx)(j.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(O.default,{accessToken:q||"",selectedServers:ex.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:ex.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ex.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(j.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(z.default,{onChange:e=>ex.setFieldValue("agents_and_groups",e),value:ex.getFieldValue("agents_and_groups"),accessToken:q||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:"Organization ID",name:"organization_id",children:(0,t.jsx)(y.Input,{type:"",disabled:!0})}),(0,t.jsx)(j.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)($.default,{value:ex.getFieldValue("logging_settings"),onChange:e=>ex.setFieldValue("logging_settings",e)})}),(0,t.jsx)(j.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:Z?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(y.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!Z})}),(0,t.jsx)(j.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(y.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(f.Button,{onClick:()=>ey(!1),disabled:eK,children:"Cancel"}),(0,t.jsx)(f.Button,{icon:(0,t.jsx)(c.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:eK,children:"Save Changes"})]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team Name"}),(0,t.jsx)("div",{children:e5.team_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"font-mono",children:e5.team_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:new Date(e5.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:e5.models.map((e,a)=>(0,t.jsx)(g.Badge,{color:"red",children:e},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",e5.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",e5.rpm_limit||"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team Budget"}),(0,t.jsxs)("div",{children:["Max Budget:"," ",null!==e5.max_budget?`$${(0,r.formatNumberWithCommas)(e5.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==e5.soft_budget&&void 0!==e5.soft_budget?`$${(0,r.formatNumberWithCommas)(e5.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",e5.budget_duration||"Never"]}),e5.metadata?.soft_budget_alerting_emails&&Array.isArray(e5.metadata.soft_budget_alerting_emails)&&e5.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",e5.metadata.soft_budget_alerting_emails.join(", ")]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(p.Text,{className:"font-medium",children:["Team Member Settings"," ",(0,t.jsx)(N.Tooltip,{title:"These are limits on individual team members",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),(0,t.jsxs)("div",{children:["Max Budget: ",e5.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",e5.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",e5.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",e5.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",e5.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Organization ID"}),(0,t.jsx)("div",{children:e5.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(g.Badge,{color:e5.blocked?"red":"green",children:e5.blocked?"Blocked":"Active"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)("div",{children:e5.metadata?.disable_global_guardrails===!0?(0,t.jsx)(g.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(g.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsx)(U.default,{objectPermission:e5.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:q}),(0,t.jsx)(A.default,{loggingConfigs:e5.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),e5.metadata?.secret_manager_settings&&(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Secret Manager Settings"}),(0,t.jsx)("pre",{className:"mt-2 bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(e5.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>eX.includes(e.key))}),(0,t.jsx)(G.default,{visible:ep,onCancel:()=>e_(!1),onSubmit:e4,initialData:eb,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Admin",value:"admin"},{label:"User",value:"user"}],additionalFields:[{name:"max_budget_in_team",label:(0,t.jsxs)("span",{children:["Team Member Budget (USD)"," ",(0,t.jsx)(N.Tooltip,{title:"Maximum amount in USD this member can spend within this team. This is separate from any global user budget limits",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(N.Tooltip,{title:"Maximum tokens per minute this member can use within this team. This is separate from any global user TPM limit",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Tokens per minute limit for this member in this team"},{name:"rpm_limit",label:(0,t.jsxs)("span",{children:["Team Member RPM Limit"," ",(0,t.jsx)(N.Tooltip,{title:"Maximum requests per minute this member can make within this team. This is separate from any global user RPM limit",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Requests per minute limit for this member in this team"}]}}),(0,t.jsx)(i.default,{isVisible:eu,onCancel:()=>eh(!1),onSubmit:e1,accessToken:q,teamId:e}),(0,t.jsx)(D.default,{isOpen:eR,title:"Delete Team Member",alertMessage:"Removing team members will also delete any keys created by or created for this member.",message:"Are you sure you want to remove this member from the team? This action cannot be undone.",resourceInformationTitle:"Team Member Information",resourceInformation:[{label:"User ID",value:eL?.user_id,code:!0},{label:"Email",value:eL?.user_email},{label:"Role",value:eL?.role}],onCancel:()=>{eV(!1),eO(null)},onOk:e2,confirmLoading:eU})]})}],56567)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2793ac912badcf02.js b/litellm/proxy/_experimental/out/_next/static/chunks/03a89a64d082af20.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/2793ac912badcf02.js rename to litellm/proxy/_experimental/out/_next/static/chunks/03a89a64d082af20.js index a8a9fe03e6b..cd38bd0691f 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/2793ac912badcf02.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/03a89a64d082af20.js @@ -390,7 +390,7 @@ audio_file = open("path/to/your/audio/file.mp3", "rb") response = client.audio.transcriptions.create( model="${C}", file=audio_file${n?`, - prompt="${n.replace(/"/g,'\\"')}"`:""} + prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} ) print(response.text) diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/065cbe2de8230973.js b/litellm/proxy/_experimental/out/_next/static/chunks/065cbe2de8230973.js deleted file mode 100644 index a1da1a10d09..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/065cbe2de8230973.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,214541,e=>{"use strict";var t=e.i(271645),l=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,s]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:n}=(0,l.default)();return(0,t.useEffect)(()=>{(async()=>{s(await (0,a.fetchTeams)(r,i,n,null))})()},[r,i,n]),{teams:e,setTeams:s}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let s=t(e);return isNaN(a)?l(e,NaN):(a&&s.setDate(s.getDate()+a),s)}function s(e,a){let s=t(e);if(isNaN(a))return l(e,NaN);if(!a)return s;let r=s.getDate(),i=l(e,s.getTime());return(i.setMonth(s.getMonth()+a+1,0),r>=i.getDate())?i:(s.setFullYear(i.getFullYear(),i.getMonth(),r),s)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>l],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>s],497245)},891547,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,s.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:r,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);function r(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let l=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${l} (${a})${e.description?` — ${e.description}`:""}`,value:"production"===a?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(o){g(!0);try{let e=await (0,s.getPoliciesList)(o);e.policies&&(m(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{g(!1)}}})()},[o,d]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:h,className:n,allowClear:!0,options:r(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>r])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ClockCircleOutlined",0,r],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ArrowLeftOutlined",0,r],447566)},954616,e=>{"use strict";var t=e.i(271645),l=e.i(114272),a=e.i(540143),s=e.i(915823),r=e.i(619273),i=class extends s.Subscribable{#e;#t=void 0;#l;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,r.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#l,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#l?.state.status==="pending"&&this.#l.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#l?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#l?.removeObserver(this),this.#l=void 0,this.#s(),this.#r()}mutate(e,t){return this.#a=t,this.#l?.removeObserver(this),this.#l=this.#e.getMutationCache().build(this.#e,this.options),this.#l.addObserver(this),this.#l.execute(e)}#s(){let e=this.#l?.state??(0,l.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#r(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,l=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,l,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,l,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,l){let s=(0,n.useQueryClient)(l),[o]=t.useState(()=>new i(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(c.error&&(0,r.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(529681),s=e.i(908286),r=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,s,r;return(0,l.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(s={},d.forEach(l=>{s[`${e}-align-${l}`]=t.align===l}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s)),(r={},c.forEach(l=>{r[`${e}-justify-${l}`]=t.justify===l}),r)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:l,paddingLG:a}=e,s=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:l,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(s),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(s),(e=>{let{componentCls:t}=e,l={};return o.forEach(e=>{l[`${t}-wrap-${e}`]={flexWrap:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return d.forEach(e=>{l[`${t}-align-${e}`]={alignItems:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return c.forEach(e=>{l[`${t}-justify-${e}`]={justifyContent:e}}),l})(s)]},()=>({}),{resetStyle:!1});var h=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let g=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:g,gap:p,vertical:f=!1,component:x="div",children:y}=e,w=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:b,getPrefixCls:S}=t.default.useContext(r.ConfigContext),j=S("flex",n),[_,N,C]=m(j),k=null!=f?f:null==v?void 0:v.vertical,z=(0,l.default)(c,o,null==v?void 0:v.className,j,N,C,u(j,e),{[`${j}-rtl`]:"rtl"===b,[`${j}-gap-${p}`]:(0,s.isPresetSize)(p),[`${j}-vertical`]:k}),O=Object.assign(Object.assign({},null==v?void 0:v.style),d);return g&&(O.flex=g),p&&!(0,s.isPresetSize)(p)&&(O.gap=p),_(t.default.createElement(x,Object.assign({ref:i,className:z,style:O},(0,a.default)(w,["justify","wrap","align"])),y))});e.s(["Flex",0,g],525720)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let s of e){let e=s?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=s?.organization_id??s?.org_id;r&&"string"==typeof r&&l.add(r.trim());let i=s?.user_id;if(i&&"string"==typeof i){let e=s?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let s=new Set,r=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;l(o,s,r,i);let d=Math.min(c,10)-1;if(d>0){let n=Array.from({length:d},(l,s)=>(0,t.keyListCall)(e,null,a,null,null,null,s+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],s,r,i)}return{keyAliases:Array.from(s).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},s=async(e,l)=>{if(!e)return[];try{let a=[],s=1,r=!0;for(;r;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],s{if(!e)return[];try{let l=[],a=1,s=!0;for(;s;){let r=await (0,t.organizationListCall)(e);l=[...l,...r],a{"use strict";var t=e.i(843476),l=e.i(271645);let a=l.forwardRef(function(e,t){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var s=e.i(464571),r=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:d={},buttonLabel:u="Filters"})=>{let[m,h]=(0,l.useState)(!1),[g,p]=(0,l.useState)(d),[f,x]=(0,l.useState)({}),[y,w]=(0,l.useState)({}),[v,b]=(0,l.useState)({}),[S,j]=(0,l.useState)({}),_=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){w(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);x(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{w(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!S[e.name]){w(t=>({...t,[e.name]:!0})),j(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{w(t=>({...t,[e.name]:!1}))}}},[S]);(0,l.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!S[e.name]&&N(e)})},[m,e,N,S]);let C=(e,t)=>{let l={...g,[e]:t};p(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(s.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:u}),(0,t.jsx)(s.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(l=>{let a,s=e.find(e=>e.label===l||e.name===l);return s?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:s.label||s.name}),s.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),onOpenChange:e=>{e&&s.isSearchable&&!S[s.name]&&N(s)},onSearch:e=>{b(t=>({...t,[s.name]:e})),s.searchFn&&_(e,s)},filterOption:!1,loading:y[s.name],options:f[s.name]||[],allowClear:!0,notFoundContent:y[s.name]?"Loading...":"No results found"}):s.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),allowClear:!0,children:s.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):s.customComponent?(a=s.customComponent,(0,t.jsx)(a,{value:g[s.name]||void 0,onChange:e=>C(s.name,e??""),placeholder:`Select ${s.label||s.name}...`})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${s.label||s.name}...`,value:g[s.name]||"",onChange:e=>C(s.name,e.target.value),allowClear:!0})]},s.name):null})})]})}],969550)},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,s,r)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,s?.organization_id||null,l):await (0,t.teamListCall)(e,s?.organization_id||null),console.log(`givenTeams: ${i}`),r(i)};e.s(["fetchTeams",0,l])},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function p(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var f=e.i(175712),x=e.i(808613),y=e.i(311451),w=e.i(898586);function v({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=x.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(f.Card,{children:[(0,t.jsx)(w.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(w.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(w.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(x.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(x.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(x.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:f,isError:x}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:y,isPending:w}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),b=g?.token?(0,s.jwtDecode)(g.token):null,S=b?.user_email??"",j=b?.user_id??null,_=b?.key??null,N=g?.token??null;return f?(0,t.jsx)(m,{}):x?(0,t.jsx)(p,{}):(0,t.jsx)(v,{variant:e,userEmail:S,isPending:w,claimError:u,onSubmit:e=>{_&&N&&j&&d&&(h(null),y({accessToken:_,inviteId:d,userId:j,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,r.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function S(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function j(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(S,{})})}e.s(["default",()=>j],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:p=!1})=>{let[f,x]=(0,d.useState)(""),[y,w]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:b,hasNextPage:S,isFetchingNextPage:j,isLoading:_}=((e=50,t)=>{let{accessToken:a}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(a,l,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[v]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:p,showSearch:!0,filterOption:!1,onSearch:e=>{x(e),w(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&S&&!j&&b()},loading:_,notFoundContent:_?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:N,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,j&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),p=e.i(500330),f=e.i(871943),x=e.i(502547),y=e.i(360820),w=e.i(94629),v=e.i(152990),b=e.i(682830),S=e.i(389083),j=e.i(994388),_=e.i(752978),N=e.i(269200),C=e.i(942232),k=e.i(977572),z=e.i(427612),O=e.i(64848),I=e.i(496020),D=e.i(599724),E=e.i(827252),T=e.i(772345),M=e.i(464571),P=e.i(282786),A=e.i(981339),R=e.i(592968),L=e.i(355619),$=e.i(633627),U=e.i(374009),K=e.i(700514),F=e.i(135214),B=e.i(50882),V=e.i(969550),H=e.i(304911),G=e.i(20147);function W({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,W]=o.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[q,J]=o.default.useState({pageIndex:0,pageSize:50}),Q=m.length>0?m[0].id:null,Y=m.length>0?m[0].desc?"desc":"asc":null,{data:Z,isPending:X,isFetching:ee,isError:et,refetch:el}=(0,h.useKeys)(q.pageIndex+1,q.pageSize,{sortBy:Q||void 0,sortOrder:Y||void 0,expand:"user"}),[ea,es]=(0,o.useState)({}),{filters:er,filteredKeys:ei,filteredTotalCount:en,allTeams:eo,allOrganizations:ec,handleFilterChange:ed,handleFilterReset:eu}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,F.default)(),[r,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[p,f]=(0,o.useState)(null),x=(0,o.useRef)(0),y=(0,o.useCallback)((0,U.default)(async e=>{if(!s)return;let t=Date.now();x.current=t;try{let l=await (0,u.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,K.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===x.current&&l&&(g(l.keys),f(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,$.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,$.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...r,...e})},handleFilterReset:()=>{i(a),f(null),y(a)}}}({keys:Z?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(ee),eh=(ee||em)&&!et,eg=en??Z?.total_count??0;(0,o.useEffect)(()=>{if(el){let e=()=>{el()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[el]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(j.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(P.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||s||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:i}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||s?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(H.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=s||i||l,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:s},{label:"User Email",value:i},{label:"User ID",value:l}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||i?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(H.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(P.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(E.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(R.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,p.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,p.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(l)?(0,t.jsx)("div",{className:"flex flex-col",children:0===l.length?(0,t.jsx)(S.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(_.Icon,{icon:ea[e.row.id]?f.ChevronDownIcon:x.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{es(t=>({...t,[e.row.id]:!t[e.row.id]}))}})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,L.getModelDisplayName)(e).slice(0,30)}...`:(0,L.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(S.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(D.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.slice(3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,L.getModelDisplayName)(e).slice(0,30)}...`:(0,L.getModelDisplayName)(e)})},l+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==l.tpm_limit?l.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==l.rpm_limit?l.rpm_limit:"Unlimited"]})]})}}],[e,n]),ef=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>eo&&0!==eo.length?eo.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:B.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ex=(0,v.useReactTable)({data:ei,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:q},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(W(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";ed({...er,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:J,getCoreRowModel:(0,b.getCoreRowModel)(),getSortedRowModel:(0,b.getSortedRowModel)(),getPaginationRowModel:(0,b.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(eg/q.pageSize)});o.default.useEffect(()=>{s&&W([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:ey,pageSize:ew}=ex.getState().pagination,ev=Math.min((ey+1)*ew,eg),eb=`${ey*ew+1} - ${ev}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(G.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:eo,onDelete:el}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(V.default,{options:ef,onApplyFilters:ed,initialValues:er,onResetFilters:eu})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[X?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",eb," of ",eg," results"]}),(0,t.jsx)(M.Button,{type:"default",icon:(0,t.jsx)(T.SyncOutlined,{spin:eh}),onClick:()=>{el()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[X?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ey+1," of ",ex.getPageCount()]}),X?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ex.previousPage(),disabled:X||!ex.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),X?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ex.nextPage(),disabled:X||!ex.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ex.getCenterTotalSize()},children:[(0,t.jsx)(z.TableHead,{children:ex.getHeaderGroups().map(e=>(0,t.jsx)(I.TableRow,{children:e.headers.map(e=>(0,t.jsx)(O.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,v.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(f.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(w.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ex.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:X?(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):ei.length>0?ex.getRowModel().rows.map(e=>(0,t.jsx)(I.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:p,setUserRole:f,userEmail:x,setUserEmail:y,setTeams:w,setKeys:v,premiumUser:b,organizations:S,addKey:j,createClicked:_,autoOpenCreate:N,prefillData:C})=>{let k,[z,O]=(0,o.useState)(null),[I,D]=(0,o.useState)(null),E=(0,n.useSearchParams)(),T=(console.log("COOKIES",document.cookie),(k=document.cookie.split("; ").find(e=>e.startsWith("token=")))?k.split("=")[1]:null),M=E.get("invitation_id"),[P,A]=(0,o.useState)(null),[R,L]=(0,o.useState)(null),[$,U]=(0,o.useState)([]),[K,F]=(0,o.useState)(null),[B,V]=(0,o.useState)(null);if((0,o.useEffect)(()=>{let e=()=>{sessionStorage.clear()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(T){let e=(0,i.jwtDecode)(T);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),A(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role);console.log("Decoded user_role:",t),f(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&P&&h&&!z){let t=sessionStorage.getItem("userModels"+e);t?U(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(I)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(P);F(t);let l=await (0,u.userGetInfoV2)(P,e);O(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(P,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),U(a),console.log("userModels:",$),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&H()}})(),(0,d.fetchTeams)(P,e,h,I,w))}},[e,T,P,h]),(0,o.useEffect)(()=>{P&&(async()=>{try{let e=await (0,u.keyInfoCall)(P,[P]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&H()}})()},[P]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(I)}, accessToken: ${P}, userID: ${e}, userRole: ${h}`),P&&(console.log("fetching teams"),(0,d.fetchTeams)(P,e,h,I,w))},[I]),(0,o.useEffect)(()=>{if(null!==p&&null!=B&&null!==B.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(p)}`),p))B.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===B.team_id&&(e+=t.spend);console.log(`sum: ${e}`),L(e)}else if(null!==p){let e=0;for(let t of p)e+=t.spend;L(e)}},[B]),null!=M)return(0,t.jsx)(c.default,{});function H(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==T)return console.log("All cookies before redirect:",document.cookie),H(),null;try{let e=(0,i.jwtDecode)(T);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),H(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),H(),null}if(null==P)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&f("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=r.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",B),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:B,teams:g,data:p,addKey:j,autoOpenCreate:N,prefillData:C},B?B.team_id:null),(0,t.jsx)(W,{teams:g,organizations:S})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0883597e31423b5b.js b/litellm/proxy/_experimental/out/_next/static/chunks/0883597e31423b5b.js new file mode 100644 index 00000000000..79044ab9e5c --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0883597e31423b5b.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),p=e.i(72713),g=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:k}=s.Typography;function N({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:N,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(k,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(p.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),l=e.i(477386),r=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var i;let n=(i=e.callback_name,Object.entries(r.callback_map).find(([e,t])=>t===i)?.[0]||i),o=r.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=r.reverse_callback_map[e]||e,n=r.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),p=e.i(808613),g=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),k=e.i(237016),N=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=p.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),N.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),N.default.fromBackend(e),C(!1)}}},E=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:E,footer:_?[(0,n.jsx)(o.Button,{onClick:E,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:E,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(k.CopyToClipboard,{text:_,onCopy:()=>N.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(p.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(p.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(p.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(g.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(p.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),p=e.i(653824),g=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),k=e.i(784647),N=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),E=e.i(190702),B=e.i(891547),O=e.i(109799),P=e.i(921511),K=e.i(827252),z=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[p,g]=(0,N.useState)([]),[h,j]=(0,N.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,N.useState)([]),[v,k]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,N.useState)(e.organization_id||null),[A,M]=(0,N.useState)(e.auto_rotate||!1),[R,D]=(0,N.useState)(e.rotation_interval||""),[E,el]=(0,N.useState)(!e.expires),[er,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,N.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let ep=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,N.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,N.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}E&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(z.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(B.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:p.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{k((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:E,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:B,teams:O,onKeyDataUpdate:P,onDelete:K,backButtonText:z="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,er]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[ep,eg]=(0,N.useState)(B),[eh,ej]=(0,N.useState)(null),[e_,ey]=(0,N.useState)(!1),[eb,ef]=(0,N.useState)({}),[ev,ek]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{B&&eg(B)},[B]),(0,N.useEffect)(()=>{(async()=>{let e=ep?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;ek(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ek(!1)}})()},[U,ep?.metadata?.policies]),(0,N.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!ep)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:z}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ep.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...ep.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);eg(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,ep.token||ep.token_id),F.default.success("Key deleted successfully"),K&&K(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"")||$===ep.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(k.KeyInfoHeader,{data:{keyName:ep.key_alias||"Virtual Key",keyId:ep.token_id||ep.token,userId:ep.user_id||"",userEmail:ep.user_email||"",createdBy:ep.user_email||ep.user_id||"",createdAt:ep.created_at?ew(ep.created_at):"",lastUpdated:ep.updated_at?ew(ep.updated_at):"",lastActive:ep.last_active?ew(ep.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:z,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:ep,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ep?.key_alias||"-"},{label:"Key ID",value:ep?.token_id||ep?.token||"-",code:!0},{label:"Team ID",value:ep?.team_id||"-",code:!0},{label:"Spend",value:ep?.spend?`$${(0,i.formatNumberWithCommas)(ep.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:ep?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(ep.token||ep.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ep?.key_alias||ep?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(p.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ep.metadata?.guardrails)&&ep.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ep.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ep.metadata?.disable_global_guardrails&&!0===ep.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ep.metadata?.policies)&&ep.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ep.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:ep,onCancel:()=>Z(!1),onSubmit:eN,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.token_id||ep.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:ep.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:ep.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:ep.project_id?(V=J?.find(e=>e.project_id===ep.project_id),V?.project_alias?`${V.project_alias} (${ep.project_id})`:ep.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(ep.organization_id??ep.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(ep.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:ep.expires?ew(ep.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.metadata?.tags)&&ep.metadata.tags.length>0?ep.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.prompts)&&ep.metadata.prompts.length>0?ep.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.allowed_routes)&&ep.allowed_routes.length>0?ep.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.allowed_passthrough_routes)&&ep.metadata.allowed_passthrough_routes.length>0?ep.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:ep.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==ep.max_parallel_requests?ep.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",ep.metadata?.model_tpm_limit?JSON.stringify(ep.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",ep.metadata?.model_rpm_limit?JSON.stringify(ep.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(ep.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0b8ec8bf90ea9721.js b/litellm/proxy/_experimental/out/_next/static/chunks/0b8ec8bf90ea9721.js deleted file mode 100644 index 72c51f29c27..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/0b8ec8bf90ea9721.js +++ /dev/null @@ -1,72 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),Object.defineProperty(l,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(562901),a=e.i(343794),s=e.i(914949),r=e.i(529681),i=e.i(242064),n=e.i(829672),o=e.i(285781),c=e.i(836938),d=e.i(920228),u=e.i(62405),m=e.i(408850),h=e.i(87414),g=e.i(310730);let x=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:l,antCls:a,zIndexPopup:s,colorText:r,colorWarning:i,marginXXS:n,marginXS:o,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:s,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:o,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${l}`]:{color:i,fontSize:c,lineHeight:1,marginInlineEnd:o},[`${t}-title`]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:n,color:r}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:o}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var p=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let f=e=>{let{prefixCls:a,okButtonProps:s,cancelButtonProps:r,title:n,description:g,cancelText:x,okText:p,okType:f="primary",icon:b=t.createElement(l.default,null),showCancel:y=!0,close:j,onConfirm:v,onCancel:w,onPopupClick:_}=e,{getPrefixCls:N}=t.useContext(i.ConfigContext),[k]=(0,m.useLocale)("Popconfirm",h.default.Popconfirm),C=(0,c.getRenderPropValue)(n),S=(0,c.getRenderPropValue)(g);return t.createElement("div",{className:`${a}-inner-content`,onClick:_},t.createElement("div",{className:`${a}-message`},b&&t.createElement("span",{className:`${a}-message-icon`},b),t.createElement("div",{className:`${a}-message-text`},C&&t.createElement("div",{className:`${a}-title`},C),S&&t.createElement("div",{className:`${a}-description`},S))),t.createElement("div",{className:`${a}-buttons`},y&&t.createElement(d.default,Object.assign({onClick:w,size:"small"},r),x||(null==k?void 0:k.cancelText)),t.createElement(o.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,u.convertLegacyProps)(f)),s),actionFn:v,close:j,prefixCls:N("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},p||(null==k?void 0:k.okText))))};var b=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let y=t.forwardRef((e,o)=>{var c,d;let{prefixCls:u,placement:m="top",trigger:h="click",okType:g="primary",icon:p=t.createElement(l.default,null),children:y,overlayClassName:j,onOpenChange:v,onVisibleChange:w,overlayStyle:_,styles:N,classNames:k}=e,C=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:S,className:T,style:I,classNames:E,styles:A}=(0,i.useComponentConfig)("popconfirm"),[P,D]=(0,s.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(d=e.defaultOpen)?d:e.defaultVisible}),B=(e,t)=>{D(e,!0),null==w||w(e),null==v||v(e,t)},M=S("popconfirm",u),O=(0,a.default)(M,T,j,E.root,null==k?void 0:k.root),F=(0,a.default)(E.body,null==k?void 0:k.body),[R]=x(M);return R(t.createElement(n.default,Object.assign({},(0,r.default)(C,["title"]),{trigger:h,placement:m,onOpenChange:(t,l)=>{let{disabled:a=!1}=e;a||B(t,l)},open:P,ref:o,classNames:{root:O,body:F},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},A.root),I),_),null==N?void 0:N.root),body:Object.assign(Object.assign({},A.body),null==N?void 0:N.body)},content:t.createElement(f,Object.assign({okType:g,icon:p},e,{prefixCls:M,close:e=>{B(!1,e)},onConfirm:t=>{var l;return null==(l=e.onConfirm)?void 0:l.call(void 0,t)},onCancel:t=>{var l;B(!1,t),null==(l=e.onCancel)||l.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:l,placement:s,className:r,style:n}=e,o=p(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(i.ConfigContext),d=c("popconfirm",l),[u]=x(d);return u(t.createElement(g.default,{placement:s,className:(0,a.default)(d,r),style:n,content:t.createElement(f,Object.assign({prefixCls:d},o))}))},e.s(["Popconfirm",0,y],883552)},292335,122520,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},l={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function a(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,l,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?l.SSE:t&&e!==l.STDIO?l.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>a],122520)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={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-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["StopOutlined",0,r],724154)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["MinusCircleOutlined",0,r],564897)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["MessageOutlined",0,r],264843)},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var l=e.i(546467);e.s(["ExternalLinkIcon",()=>l.default],634831);let a=(0,e.i(475254).default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);e.s(["KeyIcon",()=>a],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["SaveOutlined",0,r],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},446891,836991,153472,e=>{"use strict";var t,l,a=e.i(843476),s=e.i(464571),r=e.i(326373),i=e.i(94629),n=e.i(360820),o=e.i(871943),c=e.i(271645);let d=c.forwardRef(function(e,t){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,d],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let l=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(d,{className:"h-4 w-4"})}];return(0,a.jsx)(r.Dropdown,{menu:{items:l,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(s.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(i.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var u=e.i(266027),m=e.i(954616),h=e.i(243652),g=e.i(135214),x=e.i(764205),p=((t={}).GENERAL_SETTINGS="general_settings",t),f=((l={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",l);let b=async(e,t)=>{try{let l=x.proxyBaseUrl?`${x.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(l,{method:"GET",headers:{[(0,x.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,x.deriveErrorMessage)(e);throw(0,x.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},y=(0,h.createQueryKeys)("proxyConfig"),j=async(e,t)=>{try{let l=x.proxyBaseUrl?`${x.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(l,{method:"POST",headers:{[(0,x.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,x.deriveErrorMessage)(e);throw(0,x.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>p,"GeneralSettingsFieldName",()=>f,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,g.default)();return(0,m.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await j(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,g.default)();return(0,u.useQuery)({queryKey:y.list({filters:{configType:e}}),queryFn:async()=>await b(t,e),enabled:!!t})}],153472)},418371,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:s="w-4 h-4"})=>{let[r,i]=(0,l.useState)(!1),{logo:n}=(0,a.getProviderLogoAndName)(e);return r||!n?(0,t.jsx)("div",{className:`${s} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:n,alt:`${e} logo`,className:s,onError:()=>i(!0)})}])},149121,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(152990),s=e.i(682830),r=e.i(269200),i=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:h,renderChildRows:g,getRowCanExpand:x,isLoading:p=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:y=!1}){let j=!!(h||g)&&!!x,[v,w]=(0,l.useState)([]),_=(0,a.useReactTable)({data:e,columns:u,...y&&{state:{sorting:v},onSortingChange:w,enableSortingRemoval:!1},...j&&{getRowCanExpand:x},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,s.getCoreRowModel)(),...y&&{getSortedRowModel:(0,s.getSortedRowModel)()},...j&&{getExpandedRowModel:(0,s.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(r.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(i.TableHead,{children:_.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let l=y&&e.column.getCanSort(),s=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${l?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:l?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),l&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===s?"↑":"desc"===s?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:p?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),j&&e.getIsExpanded()&&g&&g({row:e}),j&&e.getIsExpanded()&&h&&!g&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>u])},37091,e=>{"use strict";var t=e.i(290571),l=e.i(95779),a=e.i(444755),s=e.i(673706),r=e.i(271645);let i=r.default.forwardRef((e,i)=>{let{color:n,children:o,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return r.default.createElement("p",Object.assign({ref:i,className:(0,a.tremorTwMerge)(n?(0,s.getColorClassNames)(n,l.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),o)});i.displayName="Subtitle",e.s(["Subtitle",()=>i],37091)},571303,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(115504);function s({className:e="",...s}){var r,i;let n=(0,l.useId)();return r=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===n),l=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==n);t&&l&&(t.currentTime=l.currentTime)},i=[n],(0,l.useLayoutEffect)(r,i),(0,t.jsxs)("svg",{"data-spinner-id":n,className:(0,a.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...s,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>s],571303)},936578,e=>{"use strict";var t=e.i(843476),l=e.i(115504),a=e.i(571303);function s(){return(0,t.jsxs)("div",{className:(0,l.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(a.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>s])},902739,e=>{"use strict";var t=e.i(843476),l=e.i(111672),a=e.i(764205),s=e.i(135214),r=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:i,sidebarCollapsed:n})=>{let{accessToken:o}=(0,s.default)(),[c,d]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),[x,p]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[y,j]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(!o)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,a.getUISettings)(o);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),d(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&m(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&p(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&j(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[o]),(0,t.jsx)(l.default,{setPage:e,defaultSelectedKey:i,collapsed:n,enabledPagesInternalUsers:c,enableProjectsUI:u,disableAgentsForInternalUsers:h,allowAgentsForTeamAdmins:x,disableVectorStoresForInternalUsers:f,allowVectorStoresForTeamAdmins:y})}])},208075,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),s=e.i(629569),r=e.i(599724),i=e.i(779241),n=e.i(994388),o=e.i(275144),c=e.i(764205),d=e.i(727749);e.s(["default",0,({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:h,setLogoUrl:g,faviconUrl:x,setFaviconUrl:p}=(0,o.useTheme)(),[f,b]=(0,l.useState)(""),[y,j]=(0,l.useState)(""),[v,w]=(0,l.useState)(!1);(0,l.useEffect)(()=>{m&&_()},[m]);let _=async()=>{try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",l=await fetch(t,{method:"GET",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();b(e.values?.logo_url||""),j(e.values?.favicon_url||""),g(e.values?.logo_url||null),p(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},N=async()=>{w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:f||null,favicon_url:y||null})})).ok)d.default.success("Theme settings updated successfully!"),g(f||null),p(y||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),d.default.fromBackend("Failed to update theme settings")}finally{w(!1)}},k=async()=>{b(""),j(""),g(null),p(null),w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)d.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),d.default.fromBackend("Failed to reset theme settings")}finally{w(!1)}};return m?(0,t.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(s.Title,{className:"text-2xl font-bold mb-2",children:"UI Theme Customization"}),(0,t.jsx)(r.Text,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(a.Card,{className:"shadow-sm p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,t.jsx)(i.TextInput,{placeholder:"https://example.com/logo.png",value:f,onValueChange:e=>{b(e),g(e||null)},className:"w-full"}),(0,t.jsx)(r.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Favicon URL"}),(0,t.jsx)(i.TextInput,{placeholder:"https://example.com/favicon.ico",value:y,onValueChange:e=>{j(e),p(e||null)},className:"w-full"}),(0,t.jsx)(r.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom favicon (.ico, .png, or .svg) or leave empty for default"})]}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,t.jsx)(n.Button,{onClick:N,loading:v,disabled:v,color:"indigo",children:"Save Changes"}),(0,t.jsx)(n.Button,{onClick:k,loading:v,disabled:v,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}])},662316,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(464571),s=e.i(166406),r=e.i(629569),i=e.i(764205),n=e.i(727749);e.s(["default",0,({accessToken:e})=>{let[o,c]=(0,l.useState)(`{ - "model": "openai/gpt-4o", - "messages": [ - { - "role": "system", - "content": "You are a helpful assistant." - }, - { - "role": "user", - "content": "Explain quantum computing in simple terms" - } - ], - "temperature": 0.7, - "max_tokens": 500, - "stream": true -}`),[d,u]=(0,l.useState)(""),[m,h]=(0,l.useState)(!1),g=async()=>{h(!0);try{let s;try{s=JSON.parse(o)}catch(e){n.default.fromBackend("Invalid JSON in request body"),h(!1);return}let r={call_type:"completion",request_body:s};if(!e){n.default.fromBackend("No access token found"),h(!1);return}let c=await (0,i.transformRequestCall)(e,r);if(c.raw_request_api_base&&c.raw_request_body){var t,l,a;let e,s,r=(t=c.raw_request_api_base,l=c.raw_request_body,a=c.raw_request_headers||{},e=JSON.stringify(l,null,2).split("\n").map(e=>` ${e}`).join("\n"),s=Object.entries(a).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ - ${t} \\ - ${s?`${s} \\ - `:""}-H 'Content-Type: application/json' \\ - -d '{ -${e} - }'`);u(r),n.default.success("Request transformed successfully")}else{let e="string"==typeof c?c:JSON.stringify(c);u(e),n.default.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),n.default.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(r.Title,{children:"Playground"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,t.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(a.Button,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:m,children:[(0,t.jsx)("span",{children:"Transform"}),(0,t.jsx)("span",{children:"→"})]})})]}),(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,t.jsx)("br",{}),(0,t.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,t.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:d||`curl -X POST \\ - https://api.openai.com/v1/chat/completions \\ - -H 'Authorization: Bearer sk-xxx' \\ - -H 'Content-Type: application/json' \\ - -d '{ - "model": "gpt-4", - "messages": [ - { - "role": "system", - "content": "You are a helpful assistant." - } - ], - "temperature": 0.7 - }'`}),(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(s.CopyOutlined,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(d||""),n.default.success("Copied to clipboard")}})]})]})]}),(0,t.jsx)("div",{className:"mt-4 text-right w-full",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}])},673709,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(678784);let s=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var r=e.i(650056);let i={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:n})=>{let[o,c]=(0,l.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:o?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(s,{size:16})}),(0,t.jsx)(r.Prism,{language:n,style:i,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},778917,e=>{"use strict";var t=e.i(546467);e.s(["ExternalLink",()=>t.default])},646050,e=>{"use strict";var t=e.i(843476),l=e.i(994388),a=e.i(304967),s=e.i(197647),r=e.i(653824),i=e.i(269200),n=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),m=e.i(881073),h=e.i(404206),g=e.i(723731),x=e.i(599724),p=e.i(271645),f=e.i(650056),b=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(764205),w=e.i(779241),_=e.i(677667),N=e.i(898667),k=e.i(130643),C=e.i(464571),S=e.i(212931),T=e.i(808613),I=e.i(28651),E=e.i(199133);let A=({isModalVisible:e,accessToken:l,setIsModalVisible:a,setBudgetList:s})=>{let[r]=T.Form.useForm(),i=async e=>{if(null!=l&&void 0!=l)try{j.default.info("Making API Call");let t=await (0,v.budgetCreateCall)(l,e);console.log("key create Response:",t),s(e=>e?[...e,t]:[t]),j.default.success("Budget Created"),r.resetFields()}catch(e){console.error("Error creating the key:",e),j.default.fromBackend(`Error creating the key: ${e}`)}};return(0,t.jsx)(S.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{a(!1),r.resetFields()},onCancel:()=>{a(!1),r.resetFields()},children:(0,t.jsxs)(T.Form,{form:r,onFinish:i,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(w.TextInput,{placeholder:""})}),(0,t.jsx)(T.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(I.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(T.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(I.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(_.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(N.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(k.AccordionBody,{children:[(0,t.jsx)(T.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(I.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(T.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(E.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(E.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(E.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(E.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(C.Button,{htmlType:"submit",children:"Create Budget"})})]})})},P=({isModalVisible:e,accessToken:l,setIsModalVisible:a,setBudgetList:s,existingBudget:r,handleUpdateCall:i})=>{console.log("existingBudget",r);let[n]=T.Form.useForm();(0,p.useEffect)(()=>{n.setFieldsValue(r)},[r,n]);let o=async e=>{if(null!=l&&void 0!=l)try{j.default.info("Making API Call"),a(!0);let t=await (0,v.budgetUpdateCall)(l,e);s(e=>e?[...e,t]:[t]),j.default.success("Budget Updated"),n.resetFields(),i()}catch(e){console.error("Error creating the key:",e),j.default.fromBackend(`Error creating the key: ${e}`)}};return(0,t.jsx)(S.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{a(!1),n.resetFields()},onCancel:()=>{a(!1),n.resetFields()},children:(0,t.jsxs)(T.Form,{form:n,onFinish:o,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:r,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(w.TextInput,{placeholder:""})}),(0,t.jsx)(T.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(I.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(T.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(I.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(_.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(N.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(k.AccordionBody,{children:[(0,t.jsx)(T.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(I.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(T.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(E.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(E.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(E.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(E.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(C.Button,{htmlType:"submit",children:"Save"})})]})})},D=` -curl -X POST --location '/end_user/new' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE - -`,B=` -curl -X POST --location '/chat/completions' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{ - "model": "gpt-3.5-turbo', - "messages":[{"role": "user", "content": "Hey, how's it going?"}], - "user": "my-customer-id" -}' # 👈 KEY CHANGE - -`,M=`from openai import OpenAI -client = OpenAI( - base_url="", - api_key="" -) - -completion = client.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Hello!"} - ], - user="my-customer-id" -) - -print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[w,_]=(0,p.useState)(!1),[N,k]=(0,p.useState)(!1),[C,S]=(0,p.useState)(null),[T,I]=(0,p.useState)([]),[E,O]=(0,p.useState)(!1),[F,R]=(0,p.useState)(!1);(0,p.useEffect)(()=>{e&&(0,v.getBudgetList)(e).then(e=>{I(e)})},[e]);let L=async t=>{null!=e&&(S(t),k(!0))},z=async()=>{if(C&&null!=e){O(!0);try{await (0,v.budgetDeleteCall)(e,C.budget_id),j.default.success("Budget deleted."),await U()}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{O(!1),R(!1),S(null)}}},U=async()=>{null!=e&&(0,v.getBudgetList)(e).then(e=>{I(e)})};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>_(!0),children:"+ Create Budget"}),(0,t.jsxs)(r.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(s.Tab,{children:"Budgets"}),(0,t.jsx)(s.Tab,{children:"Examples"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(A,{accessToken:e,isModalVisible:w,setIsModalVisible:_,setBudgetList:I}),C&&(0,t.jsx)(P,{accessToken:e,isModalVisible:N,setIsModalVisible:k,setBudgetList:I,existingBudget:C,handleUpdateCall:U}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(x.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(i.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(d.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(d.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(d.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(n.TableBody,{children:T.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map((e,l)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>L(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{S(e),R(!0)},dataTestId:"delete-budget-button"})]},l))})]})]}),(0,t.jsx)(b.default,{isOpen:F,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:C?.budget_id,code:!0},{label:"Max Budget",value:C?.max_budget},{label:"TPM",value:C?.tpm_limit},{label:"RPM",value:C?.rpm_limit}],onCancel:()=>{R(!1)},onOk:z,confirmLoading:E})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(x.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(r.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(s.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(s.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(s.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:D})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:B})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"python",children:M})})]})]})]})})]})]})]})}],646050)},704308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(994388),s=e.i(212931),r=e.i(764205),i=e.i(808613),n=e.i(311451),o=e.i(199133),c=e.i(888259),d=e.i(209261);let{TextArea:u}=n.Input,{Option:m}=o.Select,h=["Development","Productivity","Learning","Security","Data & Analytics","Integration","Testing","Documentation"],g=({visible:e,onClose:g,accessToken:x,onSuccess:p})=>{let[f]=i.Form.useForm(),[b,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)("github"),w=async e=>{if(!x)return void c.default.error("No access token available");if(!(0,d.validatePluginName)(e.name))return void c.default.error("Plugin name must be kebab-case (lowercase letters, numbers, and hyphens only)");if(e.version&&!(0,d.isValidSemanticVersion)(e.version))return void c.default.error("Version must be in semantic versioning format (e.g., 1.0.0)");if(e.authorEmail&&!(0,d.isValidEmail)(e.authorEmail))return void c.default.error("Invalid email format");if(e.homepage&&!(0,d.isValidUrl)(e.homepage))return void c.default.error("Invalid homepage URL format");if(("url"===j||"git-subdir"===j)&&e.url&&!(0,d.isValidUrl)(e.url))return void c.default.error("Invalid git URL format");y(!0);try{let t={name:e.name.trim(),source:"github"===j?{source:"github",repo:e.repo.trim()}:"git-subdir"===j?{source:"git-subdir",url:e.url.trim(),path:e.path.trim()}:{source:"url",url:e.url.trim()}};e.version&&(t.version=e.version.trim()),e.description&&(t.description=e.description.trim()),(e.authorName||e.authorEmail)&&(t.author={},e.authorName&&(t.author.name=e.authorName.trim()),e.authorEmail&&(t.author.email=e.authorEmail.trim())),e.homepage&&(t.homepage=e.homepage.trim()),e.category&&(t.category=e.category),e.keywords&&(t.keywords=(0,d.parseKeywords)(e.keywords)),await (0,r.registerClaudeCodePlugin)(x,t),c.default.success("Plugin registered successfully"),f.resetFields(),v("github"),p(),g()}catch(e){console.error("Error registering plugin:",e),c.default.error("Failed to register plugin")}finally{y(!1)}},_=()=>{f.resetFields(),v("github"),g()};return(0,t.jsx)(s.Modal,{title:"Add New Claude Code Plugin",open:e,onCancel:_,footer:null,width:700,className:"top-8",children:(0,t.jsxs)(i.Form,{form:f,layout:"vertical",onFinish:w,className:"mt-4",children:[(0,t.jsx)(i.Form.Item,{label:"Plugin Name",name:"name",rules:[{required:!0,message:"Please enter plugin name"},{pattern:/^[a-z0-9-]+$/,message:"Name must be kebab-case (lowercase, numbers, hyphens only)"}],tooltip:"Unique identifier in kebab-case format (e.g., my-awesome-plugin)",children:(0,t.jsx)(n.Input,{placeholder:"my-awesome-plugin",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Source Type",name:"sourceType",initialValue:"github",rules:[{required:!0,message:"Please select source type"}],children:(0,t.jsxs)(o.Select,{onChange:e=>{v(e),f.setFieldsValue({repo:void 0,url:void 0,path:void 0})},className:"rounded-lg",children:[(0,t.jsx)(m,{value:"github",children:"GitHub"}),(0,t.jsx)(m,{value:"url",children:"Git URL"}),(0,t.jsx)(m,{value:"git-subdir",children:"Git Subdir"})]})}),"github"===j&&(0,t.jsx)(i.Form.Item,{label:"GitHub Repository",name:"repo",rules:[{required:!0,message:"Please enter repository"},{pattern:/^[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+$/,message:"Repository must be in format: org/repo"}],tooltip:"Format: organization/repository (e.g., anthropics/claude-code)",children:(0,t.jsx)(n.Input,{placeholder:"anthropics/claude-code",className:"rounded-lg"})}),("url"===j||"git-subdir"===j)&&(0,t.jsx)(i.Form.Item,{label:"Git URL",name:"url",rules:[{required:!0,message:"Please enter git URL"}],tooltip:"Full git URL to the repository",children:(0,t.jsx)(n.Input,{type:"url",placeholder:"https://github.com/org/repo.git",className:"rounded-lg"})}),"git-subdir"===j&&(0,t.jsx)(i.Form.Item,{label:"Subdirectory Path",name:"path",rules:[{required:!0,message:"Please enter subdirectory path"},{pattern:/^[a-zA-Z0-9][a-zA-Z0-9._-]*(\/[a-zA-Z0-9][a-zA-Z0-9._-]*)*$/,message:"Path must be relative segments (alphanumeric, dots, hyphens, underscores), e.g. plugins/plugin-name"}],tooltip:"Path to the plugin directory within the repository (e.g., plugins/plugin-name)",children:(0,t.jsx)(n.Input,{placeholder:"plugins/plugin-name",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Version (Optional)",name:"version",tooltip:"Semantic version (e.g., 1.0.0)",children:(0,t.jsx)(n.Input,{placeholder:"1.0.0",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Description (Optional)",name:"description",tooltip:"Brief description of what the plugin does",children:(0,t.jsx)(u,{rows:3,placeholder:"A plugin that helps with...",maxLength:500,className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Category (Optional)",name:"category",tooltip:"Select a category or enter a custom one",children:(0,t.jsx)(o.Select,{placeholder:"Select or type a category",allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"rounded-lg",children:h.map(e=>(0,t.jsx)(m,{value:e,children:e},e))})}),(0,t.jsx)(i.Form.Item,{label:"Keywords (Optional)",name:"keywords",tooltip:"Comma-separated list of keywords for search",children:(0,t.jsx)(n.Input,{placeholder:"search, web, api",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Author Name (Optional)",name:"authorName",tooltip:"Name of the plugin author or organization",children:(0,t.jsx)(n.Input,{placeholder:"Your Name or Organization",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Author Email (Optional)",name:"authorEmail",rules:[{type:"email",message:"Please enter a valid email"}],tooltip:"Contact email for the plugin author",children:(0,t.jsx)(n.Input,{type:"email",placeholder:"author@example.com",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Homepage (Optional)",name:"homepage",rules:[{type:"url",message:"Please enter a valid URL"}],tooltip:"URL to the plugin's homepage or documentation",children:(0,t.jsx)(n.Input,{type:"url",placeholder:"https://example.com",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{className:"mb-0 mt-6",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:_,disabled:b,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",loading:b,children:b?"Registering...":"Register Plugin"})]})})]})})};var x=e.i(166406),p=e.i(871943),f=e.i(360820),b=e.i(94629),y=e.i(68155),j=e.i(152990),v=e.i(682830),w=e.i(389083),_=e.i(269200),N=e.i(942232),k=e.i(977572),C=e.i(427612),S=e.i(64848),T=e.i(496020),I=e.i(790848),E=e.i(592968),A=e.i(727749);let P=({pluginsList:e,isLoading:s,onDeleteClick:i,accessToken:n,onPluginUpdated:o,isAdmin:c,onPluginClick:u})=>{let[m,h]=(0,l.useState)([{id:"created_at",desc:!0}]),[g,P]=(0,l.useState)(null),D=async e=>{if(n){P(e.id);try{e.enabled?(await (0,r.disableClaudeCodePlugin)(n,e.name),A.default.success(`Plugin "${e.name}" disabled`)):(await (0,r.enableClaudeCodePlugin)(n,e.name),A.default.success(`Plugin "${e.name}" enabled`)),o()}catch(e){A.default.error("Failed to toggle plugin status")}finally{P(null)}}},B=[{header:"Plugin Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,s=l.name||"";return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(E.Tooltip,{title:s,children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[150px] justify-start",onClick:()=>u(l.id),children:s})}),(0,t.jsx)(E.Tooltip,{title:"Copy Plugin ID",children:(0,t.jsx)(x.CopyOutlined,{onClick:e=>{var t;e.stopPropagation(),t=l.id,navigator.clipboard.writeText(t),A.default.success("Copied to clipboard!")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Version",accessorKey:"version",cell:({row:e})=>{let l=e.original.version||"N/A";return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:l})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original.description||"No description";return(0,t.jsx)(E.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"text-xs text-gray-600 block max-w-[300px] truncate",children:l})})}},{header:"Category",accessorKey:"category",cell:({row:e})=>{let l=e.original.category;if(!l)return(0,t.jsx)(w.Badge,{color:"gray",className:"text-xs font-normal",size:"xs",children:"Uncategorized"});let a=(0,d.getCategoryBadgeColor)(l);return(0,t.jsx)(w.Badge,{color:a,className:"text-xs font-normal",size:"xs",children:l})}},{header:"Enabled",accessorKey:"enabled",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Badge,{color:l.enabled?"green":"gray",className:"text-xs font-normal",size:"xs",children:l.enabled?"Yes":"No"}),c&&(0,t.jsx)(E.Tooltip,{title:l.enabled?"Disable plugin":"Enable plugin",children:(0,t.jsx)(I.Switch,{size:"small",checked:l.enabled,loading:g===l.id,onChange:()=>D(l)})})]})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{var l;let a=e.original;return(0,t.jsx)(E.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:(l=a.created_at)?new Date(l).toLocaleString():"-"})})}},...c?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(E.Tooltip,{title:"Delete plugin",children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),i(l.name,l.name)},icon:y.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],M=(0,j.useReactTable)({data:e,columns:B,state:{sorting:m},onSortingChange:h,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(_.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(C.TableHead,{children:M.getHeaderGroups().map(e=>(0,t.jsx)(T.TableRow,{children:e.headers.map(e=>(0,t.jsx)(S.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(f.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(b.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(N.TableBody,{children:s?(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:B.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e&&e.length>0?M.getRowModel().rows.map(e=>(0,t.jsx)(T.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:B.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No plugins found. Add one to get started."})})})})})]})})})};var D=e.i(708347),B=e.i(530212),M=e.i(434626),O=e.i(304967),F=e.i(350967),R=e.i(599724),L=e.i(629569),z=e.i(482725);let U=({pluginId:e,onClose:s,accessToken:i,isAdmin:n,onPluginUpdated:o})=>{let[c,u]=(0,l.useState)(null),[m,h]=(0,l.useState)(!0),[g,p]=(0,l.useState)(!1);(0,l.useEffect)(()=>{f()},[e,i]);let f=async()=>{if(i){h(!0);try{let t=await (0,r.getClaudeCodePluginDetails)(i,e);u(t.plugin)}catch(e){console.error("Error fetching plugin info:",e),A.default.error("Failed to load plugin information")}finally{h(!1)}}},b=async()=>{if(i&&c){p(!0);try{c.enabled?(await (0,r.disableClaudeCodePlugin)(i,c.name),A.default.success(`Plugin "${c.name}" disabled`)):(await (0,r.enableClaudeCodePlugin)(i,c.name),A.default.success(`Plugin "${c.name}" enabled`)),o(),f()}catch(e){A.default.error("Failed to toggle plugin status")}finally{p(!1)}}},y=e=>{navigator.clipboard.writeText(e),A.default.success("Copied to clipboard!")};if(m)return(0,t.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,t.jsx)(z.Spin,{size:"large"})});if(!c)return(0,t.jsxs)("div",{className:"p-8 text-center text-gray-500",children:[(0,t.jsx)("p",{children:"Plugin not found"}),(0,t.jsx)(a.Button,{className:"mt-4",onClick:s,children:"Go Back"})]});let j=(0,d.formatInstallCommand)(c),v=(0,d.getSourceLink)(c.source),_=(0,d.getCategoryBadgeColor)(c.category);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,t.jsx)(B.ArrowLeftIcon,{className:"h-5 w-5 cursor-pointer text-gray-500 hover:text-gray-700",onClick:s}),(0,t.jsx)("h2",{className:"text-2xl font-bold",children:c.name}),c.version&&(0,t.jsxs)(w.Badge,{color:"blue",size:"xs",children:["v",c.version]}),c.category&&(0,t.jsx)(w.Badge,{color:_,size:"xs",children:c.category}),(0,t.jsx)(w.Badge,{color:c.enabled?"green":"gray",size:"xs",children:c.enabled?"Enabled":"Disabled"})]}),(0,t.jsx)(O.Card,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs mb-2",children:"Install Command"}),(0,t.jsx)("div",{className:"font-mono bg-gray-100 px-3 py-2 rounded text-sm",children:j})]}),(0,t.jsx)(E.Tooltip,{title:"Copy install command",children:(0,t.jsx)(a.Button,{size:"xs",variant:"secondary",icon:x.CopyOutlined,onClick:()=>y(j),className:"ml-4",children:"Copy"})})]})}),(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Plugin Details"}),(0,t.jsxs)(F.Grid,{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Plugin ID"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)(R.Text,{className:"font-mono text-xs",children:c.id}),(0,t.jsx)(x.CopyOutlined,{className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs",onClick:()=>y(c.id)})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Name"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:c.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Version"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:c.version||"N/A"})]}),(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Source"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)(R.Text,{className:"font-semibold",children:(0,d.getSourceDisplayText)(c.source)}),v&&(0,t.jsx)("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700",children:(0,t.jsx)(M.ExternalLinkIcon,{className:"h-4 w-4"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Category"}),(0,t.jsx)("div",{className:"mt-1",children:c.category?(0,t.jsx)(w.Badge,{color:_,size:"xs",children:c.category}):(0,t.jsx)(R.Text,{className:"text-gray-400",children:"Uncategorized"})})]}),n&&(0,t.jsxs)("div",{className:"col-span-3",children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Status"}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[(0,t.jsx)(I.Switch,{checked:c.enabled,loading:g,onChange:b}),(0,t.jsx)(R.Text,{className:"text-sm",children:c.enabled?"Plugin is enabled and visible in marketplace":"Plugin is disabled and hidden from marketplace"})]})]})]})]}),c.description&&(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Description"}),(0,t.jsx)(R.Text,{className:"mt-2",children:c.description})]}),c.keywords&&c.keywords.length>0&&(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Keywords"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:c.keywords.map((e,l)=>(0,t.jsx)(w.Badge,{color:"gray",size:"xs",children:e},l))})]}),c.author&&(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Author Information"}),(0,t.jsxs)(F.Grid,{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-4",children:[c.author.name&&(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Name"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:c.author.name})]}),c.author.email&&(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Email"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:(0,t.jsx)("a",{href:`mailto:${c.author.email}`,className:"text-blue-500 hover:text-blue-700",children:c.author.email})})]})]})]}),c.homepage&&(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Homepage"}),(0,t.jsxs)("a",{href:c.homepage,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 flex items-center gap-2 mt-2",children:[c.homepage,(0,t.jsx)(M.ExternalLinkIcon,{className:"h-4 w-4"})]})]}),(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Metadata"}),(0,t.jsxs)(F.Grid,{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Created At"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:(0,d.formatDateString)(c.created_at)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Updated At"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:(0,d.formatDateString)(c.updated_at)})]}),c.created_by&&(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Created By"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:c.created_by})]})]})]})]})};e.s(["default",0,({accessToken:e,userRole:i})=>{let[n,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[h,x]=(0,l.useState)(!1),[p,f]=(0,l.useState)(null),[b,y]=(0,l.useState)(null),j=!!i&&(0,D.isAdminRole)(i),v=async()=>{if(e){m(!0);try{let t=await (0,r.getClaudeCodePluginsList)(e,!1);console.log(`Claude Code plugins: ${JSON.stringify(t)}`),o(t.plugins)}catch(e){console.error("Error fetching Claude Code plugins:",e)}finally{m(!1)}}};(0,l.useEffect)(()=>{v()},[e]);let w=async()=>{if(p&&e){x(!0);try{await (0,r.deleteClaudeCodePlugin)(e,p.name),A.default.success(`Plugin "${p.displayName}" deleted successfully`),v()}catch(e){console.error("Error deleting plugin:",e),A.default.error("Failed to delete plugin")}finally{x(!1),f(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Claude Code Plugins"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Manage Claude Code marketplace plugins. Add, enable, disable, or delete plugins that will be available in your marketplace catalog. Enabled plugins will appear in the public marketplace at"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"/claude-code/marketplace.json"}),"."]}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(a.Button,{onClick:()=>{b&&y(null),d(!0)},disabled:!e||!j,children:"+ Add New Plugin"})})]}),b?(0,t.jsx)(U,{pluginId:b,onClose:()=>y(null),accessToken:e,isAdmin:j,onPluginUpdated:v}):(0,t.jsx)(P,{pluginsList:n,isLoading:u,onDeleteClick:(e,t)=>{f({name:e,displayName:t})},accessToken:e,onPluginUpdated:v,isAdmin:j,onPluginClick:e=>y(e)}),(0,t.jsx)(g,{visible:c,onClose:()=>{d(!1)},accessToken:e,onSuccess:()=>{v()}}),p&&(0,t.jsxs)(s.Modal,{title:"Delete Plugin",open:null!==p,onOk:w,onCancel:()=>{f(null)},confirmLoading:h,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete plugin:"," ",(0,t.jsx)("strong",{children:p.displayName}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],704308)},345244,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(752978),s=e.i(994388),r=e.i(309426),i=e.i(599724),n=e.i(350967),o=e.i(278587),c=e.i(304967),d=e.i(629569),u=e.i(389083),m=e.i(677667),h=e.i(898667),g=e.i(130643),x=e.i(808613),p=e.i(311451),f=e.i(199133),b=e.i(592968),y=e.i(827252),j=e.i(702597),v=e.i(355619),w=e.i(764205),_=e.i(727749),N=e.i(435451),k=e.i(860585),C=e.i(500330),S=e.i(678784),T=e.i(118366),I=e.i(464571);let E=({tagId:e,onClose:a,accessToken:r,is_admin:n,editTag:o})=>{let[E]=x.Form.useForm(),[A,P]=(0,l.useState)(null),[D,B]=(0,l.useState)(o),[M,O]=(0,l.useState)([]),[F,R]=(0,l.useState)({}),L=async(e,t)=>{await (0,C.copyToClipboard)(e)&&(R(e=>({...e,[t]:!0})),setTimeout(()=>{R(e=>({...e,[t]:!1}))},2e3))},z=async()=>{if(r)try{let t=(await (0,w.tagInfoCall)(r,[e]))[e];t&&(P(t),o&&E.setFieldsValue({name:t.name,description:t.description,models:t.models,max_budget:t.litellm_budget_table?.max_budget,budget_duration:t.litellm_budget_table?.budget_duration}))}catch(e){console.error("Error fetching tag details:",e),_.default.fromBackend("Error fetching tag details: "+e)}};(0,l.useEffect)(()=>{z()},[e,r]),(0,l.useEffect)(()=>{r&&(0,j.fetchUserModels)("dummy-user","Admin",r,O)},[r]);let U=async e=>{if(r)try{await (0,w.tagUpdateCall)(r,{name:e.name,description:e.description,models:e.models,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,budget_duration:e.budget_duration}),_.default.success("Tag updated successfully"),B(!1),z()}catch(e){console.error("Error updating tag:",e),_.default.fromBackend("Error updating tag: "+e)}};return A?(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Button,{onClick:a,className:"mb-4",children:"← Back to Tags"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Tag Name:"}),(0,t.jsx)("span",{className:"font-mono px-2 py-1 bg-gray-100 rounded text-sm border border-gray-200",children:A.name}),(0,t.jsx)(I.Button,{type:"text",size:"small",icon:F["tag-name"]?(0,t.jsx)(S.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>L(A.name,"tag-name"),className:`transition-all duration-200 ${F["tag-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsx)(i.Text,{className:"text-gray-500",children:A.description||"No description"})]}),n&&!D&&(0,t.jsx)(s.Button,{onClick:()=>B(!0),children:"Edit Tag"})]}),D?(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.Form,{form:E,onFinish:U,layout:"vertical",initialValues:A,children:[(0,t.jsx)(x.Form.Item,{label:"Tag Name",name:"name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(p.Input,{className:"rounded-md border-gray-300"})}),(0,t.jsx)(x.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(p.Input.TextArea,{rows:4})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process this type of data",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:M.map(e=>(0,t.jsx)(f.Select.Option,{value:e,children:(0,v.getModelDisplayName)(e)},e))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(N.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(k.default,{onChange:e=>E.setFieldValue("budget_duration",e)})}),(0,t.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-md border border-gray-200",children:(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["TPM/RPM limits for tags are not currently supported. If you need this feature, please"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"create a GitHub issue"}),"."]})})]})]}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(s.Button,{onClick:()=>B(!1),children:"Cancel"}),(0,t.jsx)(s.Button,{type:"submit",children:"Save Changes"})]})]})}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Tag Details"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Name"}),(0,t.jsx)(i.Text,{children:A.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Description"}),(0,t.jsx)(i.Text,{children:A.description||"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Allowed Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:A.models&&0!==A.models.length?A.models.map(e=>(0,t.jsx)(u.Badge,{color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:A.model_info?.[e]||e})},e)):(0,t.jsx)(u.Badge,{color:"red",children:"All Models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(i.Text,{children:A.created_at?new Date(A.created_at).toLocaleString():"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(i.Text,{children:A.updated_at?new Date(A.updated_at).toLocaleString():"-"})]})]})]}),A.litellm_budget_table&&(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[void 0!==A.litellm_budget_table.max_budget&&null!==A.litellm_budget_table.max_budget&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsxs)(i.Text,{children:["$",A.litellm_budget_table.max_budget]})]}),A.litellm_budget_table.budget_duration&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Budget Duration"}),(0,t.jsx)(i.Text,{children:A.litellm_budget_table.budget_duration})]}),void 0!==A.litellm_budget_table.tpm_limit&&null!==A.litellm_budget_table.tpm_limit&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"TPM Limit"}),(0,t.jsx)(i.Text,{children:A.litellm_budget_table.tpm_limit.toLocaleString()})]}),void 0!==A.litellm_budget_table.rpm_limit&&null!==A.litellm_budget_table.rpm_limit&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"RPM Limit"}),(0,t.jsx)(i.Text,{children:A.litellm_budget_table.rpm_limit.toLocaleString()})]})]})]})]})]}):(0,t.jsx)("div",{children:"Loading..."})};var A=e.i(871943),P=e.i(360820),D=e.i(591935),B=e.i(94629),M=e.i(68155),O=e.i(152990),F=e.i(682830),R=e.i(269200),L=e.i(942232),z=e.i(977572),U=e.i(427612),H=e.i(64848),V=e.i(496020);let $="This is just a spend tag that was passed dynamically in a request. It does not control any LLM models.",q=({data:e,onEdit:r,onDelete:n,onSelectTag:o})=>{let[c,d]=l.default.useState([{id:"created_at",desc:!0}]),m=[{header:"Tag Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,a=l.description===$;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(b.Tooltip,{title:a?"You cannot view the information of a dynamically generated spend tag":l.name,children:(0,t.jsx)(s.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5",onClick:()=>o(l.name),disabled:a,children:l.name})})})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(b.Tooltip,{title:l.description,children:(0,t.jsx)("span",{className:"text-xs",children:l.description||"-"})})}},{header:"Allowed Models",accessorKey:"models",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:l?.models?.length===0?(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:"All Models"}):l?.models?.map(e=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:(0,t.jsx)(i.Text,{children:l.model_info?.[e]||e})})},e))})}},{header:"Created",accessorKey:"created_at",sortingFn:"datetime",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:new Date(l.created_at).toLocaleDateString()})}},{id:"actions",header:"Actions",cell:({row:e})=>{let l=e.original,s=l.description===$;return(0,t.jsxs)("div",{className:"flex space-x-2",children:[s?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be edited",children:(0,t.jsx)(a.Icon,{icon:D.PencilAltIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Edit tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Edit tag",children:(0,t.jsx)(a.Icon,{icon:D.PencilAltIcon,size:"sm",onClick:()=>r(l),className:"cursor-pointer hover:text-blue-500"})}),s?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be deleted",children:(0,t.jsx)(a.Icon,{icon:M.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Delete tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Delete tag",children:(0,t.jsx)(a.Icon,{icon:M.TrashIcon,size:"sm",onClick:()=>n(l.name),className:"cursor-pointer hover:text-red-500"})})]})}}],h=(0,O.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:d,getCoreRowModel:(0,F.getCoreRowModel)(),getSortedRowModel:(0,F.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(R.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(U.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(V.TableRow,{children:e.headers.map(e=>(0,t.jsx)(H.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,O.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(P.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(A.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(B.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(L.TableBody,{children:h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(V.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(z.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,O.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(V.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No tags found"})})})})})]})})})};var K=e.i(779241),G=e.i(212931);let W=({visible:e,onCancel:l,onSubmit:a,availableModels:r})=>{let[i]=x.Form.useForm();return(0,t.jsx)(G.Modal,{title:"Create New Tag",open:e,width:800,footer:null,onCancel:()=>{i.resetFields(),l()},children:(0,t.jsxs)(x.Form,{form:i,onFinish:e=>{a(e),i.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(x.Form.Item,{label:"Tag Name",name:"tag_name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(x.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(p.Input.TextArea,{rows:4})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process requests from this tag",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_llms",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:r.map(e=>(0,t.jsx)(f.Select.Option,{value:e.model_info.id,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:e.model_name}),(0,t.jsxs)("span",{className:"text-gray-400 ml-2",children:["(",e.model_info.id,")"]})]})},e.model_info.id))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits (Optional)"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(x.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend. When reached, requests with this tag will be blocked",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(N.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(x.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(k.default,{onChange:e=>i.setFieldValue("budget_duration",e)})}),(0,t.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-md border border-gray-200",children:(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["TPM/RPM limits for tags are not currently supported. If you need this feature, please"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"create a GitHub issue"}),"."]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(s.Button,{type:"submit",children:"Create Tag"})})]})})};e.s(["default",0,({accessToken:e,userID:c,userRole:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1),[x,p]=(0,l.useState)(null),[f,b]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),[v,N]=(0,l.useState)(null),[k,C]=(0,l.useState)(""),[S,T]=(0,l.useState)([]),I=async()=>{if(e)try{let t=await (0,w.tagListCall)(e);console.log("List tags response:",t),m(Object.values(t))}catch(e){console.error("Error fetching tags:",e),_.default.fromBackend("Error fetching tags: "+e)}},A=async t=>{if(e)try{await (0,w.tagCreateCall)(e,{name:t.tag_name,description:t.description,models:t.allowed_llms,max_budget:t.max_budget,soft_budget:t.soft_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,budget_duration:t.budget_duration}),_.default.success("Tag created successfully"),g(!1),I()}catch(e){console.error("Error creating tag:",e),_.default.fromBackend("Error creating tag: "+e)}},P=async e=>{N(e),j(!0)},D=async()=>{if(e&&v){try{await (0,w.tagDeleteCall)(e,v),_.default.success("Tag deleted successfully"),I()}catch(e){console.error("Error deleting tag:",e),_.default.fromBackend("Error deleting tag: "+e)}j(!1),N(null)}};return(0,l.useEffect)(()=>{c&&d&&e&&(async()=>{try{let t=await (0,w.modelInfoCall)(e,c,d);t&&t.data&&T(t.data)}catch(e){console.error("Error fetching models:",e),_.default.fromBackend("Error fetching models: "+e)}})()},[e,c,d]),(0,l.useEffect)(()=>{I()},[e]),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:x?(0,t.jsx)(E,{tagId:x,onClose:()=>{p(null),b(!1)},accessToken:e,is_admin:"Admin"===d,editTag:f}):(0,t.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,t.jsx)("h1",{children:"Tag Management"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[k&&(0,t.jsxs)(i.Text,{children:["Last Refreshed: ",k]}),(0,t.jsx)(a.Icon,{icon:o.RefreshIcon,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{I(),C(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(i.Text,{className:"mb-4",children:["Click on a tag name to view and edit its details.",(0,t.jsxs)("p",{children:["You can use tags to restrict the usage of certain LLMs based on tags passed in the request. Read more about tag routing"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/tag_routing",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})]}),(0,t.jsx)(s.Button,{className:"mb-4",onClick:()=>g(!0),children:"+ Create New Tag"}),(0,t.jsx)(n.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,t.jsx)(r.Col,{numColSpan:1,children:(0,t.jsx)(q,{data:u,onEdit:e=>{p(e.name),b(!0)},onDelete:P,onSelectTag:p})})}),(0,t.jsx)(W,{visible:h,onCancel:()=>g(!1),onSubmit:A,availableModels:S}),y&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Tag"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this tag?"})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(s.Button,{onClick:D,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(s.Button,{onClick:()=>{j(!1),N(null)},children:"Cancel"})]})]})]})})]})})}],345244)},735042,e=>{"use strict";e.i(247167);var t=e.i(843476),l=e.i(584935),a=e.i(290571),s=e.i(271645),r=e.i(95779),i=e.i(444755),n=e.i(673706);let o=(0,n.makeClassName)("BarList");function c(e,t){let{data:l=[],color:c,valueFormatter:d=n.defaultValueFormatter,showAnimation:u=!1,onValueChange:m,sortOrder:h="descending",className:g}=e,x=(0,a.__rest)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),p=m?"button":"div",f=s.default.useMemo(()=>"none"===h?l:[...l].sort((e,t)=>"ascending"===h?e.value-t.value:t.value-e.value),[l,h]),b=s.default.useMemo(()=>{let e=Math.max(...f.map(e=>e.value),0);return f.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[f]);return s.default.createElement("div",Object.assign({ref:t,className:(0,i.tremorTwMerge)(o("root"),"flex justify-between space-x-6",g),"aria-sort":h},x),s.default.createElement("div",{className:(0,i.tremorTwMerge)(o("bars"),"relative w-full space-y-1.5")},f.map((e,t)=>{var l,a,d;let h=e.icon;return s.default.createElement(p,{key:null!=(l=e.key)?l:t,onClick:()=>{null==m||m(e)},className:(0,i.tremorTwMerge)(o("bar"),"group w-full flex items-center rounded-tremor-small",m?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},s.default.createElement("div",{className:(0,i.tremorTwMerge)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||c?[(0,n.getColorClassNames)(null!=(a=e.color)?a:c,r.colorPalette.background).bgColor,m?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!m||e.color||c?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===f.length-1?"mb-0":"",u?"duration-500":""),style:{width:`${b[t]}%`,transition:u?"all 1s":""}},s.default.createElement("div",{className:(0,i.tremorTwMerge)("absolute left-2 pr-4 flex max-w-full")},h?s.default.createElement(h,{className:(0,i.tremorTwMerge)(o("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?s.default.createElement("a",{href:e.href,target:null!=(d=e.target)?d:"_blank",rel:"noreferrer",className:(0,i.tremorTwMerge)(o("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",m?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):s.default.createElement("p",{className:(0,i.tremorTwMerge)(o("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),s.default.createElement("div",{className:o("labels")},f.map((e,t)=>{var l;return s.default.createElement("div",{key:null!=(l=e.key)?l:t,className:(0,i.tremorTwMerge)(o("labelWrapper"),"flex justify-end items-center","h-8",t===f.length-1?"mb-0":"mb-1.5")},s.default.createElement("p",{className:(0,i.tremorTwMerge)(o("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},d(e.value)))})))}c.displayName="BarList";let d=s.default.forwardRef(c);var u=e.i(304967),m=e.i(629569),h=e.i(269200),g=e.i(427612),x=e.i(64848),p=e.i(496020),f=e.i(977572),b=e.i(942232),y=e.i(37091),j=e.i(617802),v=e.i(144267),w=e.i(350967),_=e.i(309426),N=e.i(599724),k=e.i(404206),C=e.i(723731),S=e.i(653824),T=e.i(881073),I=e.i(197647),E=e.i(206929),A=e.i(35983),P=e.i(413990),D=e.i(476961),B=e.i(994388),M=e.i(621642),O=e.i(25080),F=e.i(764205),R=e.i(1023),L=e.i(500330);console.log("process.env.NODE_ENV","production");let z=e=>null!==e&&("Admin"===e||"Admin Viewer"===e);e.s(["default",0,({accessToken:e,token:a,userRole:r,userID:i,keys:n,premiumUser:o})=>{let c=new Date,[U,H]=(0,s.useState)([]),[V,$]=(0,s.useState)([]),[q,K]=(0,s.useState)([]),[G,W]=(0,s.useState)([]),[J,Y]=(0,s.useState)([]),[Q,X]=(0,s.useState)([]),[Z,ee]=(0,s.useState)([]),[et,el]=(0,s.useState)([]),[ea,es]=(0,s.useState)([]),[er,ei]=(0,s.useState)([]),[en,eo]=(0,s.useState)({}),[ec,ed]=(0,s.useState)([]),[eu,em]=(0,s.useState)(""),[eh,eg]=(0,s.useState)(["all-tags"]),[ex,ep]=(0,s.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ef,eb]=(0,s.useState)(null),[ey,ej]=(0,s.useState)(0),ev=new Date(c.getFullYear(),c.getMonth(),1),ew=new Date(c.getFullYear(),c.getMonth()+1,0),e_=eI(ev),eN=eI(ew);function ek(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}console.log("keys in usage",n),console.log("premium user in usage",o);let eC=async()=>{if(e)try{let t=await (0,F.getProxyUISettings)(e);return console.log("usage tab: proxy_settings",t),t}catch(e){console.error("Error fetching proxy settings:",e)}};(0,s.useEffect)(()=>{eT(ex.from,ex.to)},[ex,eh]);let eS=async(t,l,a)=>{if(!t||!l||!e)return;console.log("uiSelectedKey",a);let s=await (0,F.adminTopEndUsersCall)(e,a,t.toISOString(),l.toISOString());console.log("End user data updated successfully",s),W(s)},eT=async(t,l)=>{if(!t||!l||!e)return;let a=await eC();a?.DISABLE_EXPENSIVE_DB_QUERIES||(X((await (0,F.tagsSpendLogsCall)(e,t.toISOString(),l.toISOString(),0===eh.length?void 0:eh)).spend_per_tag),console.log("Tag spend data updated successfully"))};function eI(e){let t=e.getFullYear(),l=e.getMonth()+1,a=e.getDate();return`${t}-${l<10?"0"+l:l}-${a<10?"0"+a:a}`}console.log(`Start date is ${e_}`),console.log(`End date is ${eN}`);let eE=async(e,t,l)=>{try{let l=await e();t(l)}catch(e){console.error(l,e)}},eA=(e,t,l,a)=>{let s=[],r=new Date(t),i=new Map(e.map(e=>{let t=(e=>{if(e.includes("-"))return e;{let[t,l]=e.split(" ");return new Date(new Date().getFullYear(),new Date(`${t} 01 2024`).getMonth(),parseInt(l)).toISOString().split("T")[0]}})(e.date);return[t,{...e,date:t}]}));for(;r<=l;){let e=r.toISOString().split("T")[0];if(i.has(e))s.push(i.get(e));else{let t={date:e,api_requests:0,total_tokens:0};a.forEach(e=>{t[e]||(t[e]=0)}),s.push(t)}r.setDate(r.getDate()+1)}return s},eP=async()=>{if(e)try{let t=await (0,F.adminSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),s=new Date(l.getFullYear(),l.getMonth()+1,0),r=eA(t,a,s,[]),i=Number(r.reduce((e,t)=>e+(t.spend||0),0).toFixed(2));ej(i),H(r)}catch(e){console.error("Error fetching overall spend:",e)}},eD=async()=>{e&&await eE(async()=>(await (0,F.adminTopKeysCall)(e)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),$,"Error fetching top keys")},eB=async()=>{e&&await eE(async()=>(await (0,F.adminTopModelsCall)(e)).map(e=>({key:e.model,spend:(0,L.formatNumberWithCommas)(e.total_spend,2)})),K,"Error fetching top models")},eM=async()=>{e&&await eE(async()=>{let t=await (0,F.teamSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),s=new Date(l.getFullYear(),l.getMonth()+1,0);return Y(eA(t.daily_spend,a,s,t.teams)),el(t.teams),t.total_spend_per_team.map(e=>({name:e.team_id||"",value:(0,L.formatNumberWithCommas)(e.total_spend||0,2)}))},es,"Error fetching team spend")},eO=async()=>{if(e)try{let t=await (0,F.adminGlobalActivity)(e,e_,eN),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),s=new Date(l.getFullYear(),l.getMonth()+1,0),r=eA(t.daily_data||[],a,s,["api_requests","total_tokens"]);eo({...t,daily_data:r})}catch(e){console.error("Error fetching global activity:",e)}},eF=async()=>{if(e)try{let t=await (0,F.adminGlobalActivityPerModel)(e,e_,eN),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),s=new Date(l.getFullYear(),l.getMonth()+1,0),r=t.map(e=>({...e,daily_data:eA(e.daily_data||[],a,s,["api_requests","total_tokens"])}));ed(r)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,s.useEffect)(()=>{(async()=>{if(e&&a&&r&&i){let t=await eC();!(t&&(eb(t),t?.DISABLE_EXPENSIVE_DB_QUERIES))&&(console.log("fetching data - valiue of proxySettings",ef),eP(),eE(()=>e&&a?(0,F.adminspendByProvider)(e,a,e_,eN):Promise.reject("No access token or token"),ei,"Error fetching provider spend"),eD(),eB(),eO(),eF(),z(r)&&(eM(),e&&eE(async()=>(await (0,F.allTagNamesCall)(e)).tag_names,ee,"Error fetching tag names"),e&&eE(()=>(0,F.tagsSpendLogsCall)(e,ex.from?.toISOString(),ex.to?.toISOString(),void 0),e=>X(e.spend_per_tag),"Error fetching top tags"),e&&eE(()=>(0,F.adminTopEndUsersCall)(e,null,void 0,void 0),W,"Error fetching top end users")))}})()},[e,a,r,i,e_,eN]),ef?.DISABLE_EXPENSIVE_DB_QUERIES)?(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Database Query Limit Reached"}),(0,t.jsxs)(N.Text,{className:"mt-4",children:["SpendLogs in DB has ",ef.NUM_SPEND_LOGS_ROWS," rows.",(0,t.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,t.jsx)(B.Button,{className:"mt-4",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/spending_monitoring",target:"_blank",children:"View Usage Guide"})})]})}):(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{className:"mt-2",children:[(0,t.jsx)(I.Tab,{children:"All Up"}),z(r)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.Tab,{children:"Team Based Usage"}),(0,t.jsx)(I.Tab,{children:"Customer Usage"}),(0,t.jsx)(I.Tab,{children:"Tag Based Usage"})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{})})]}),(0,t.jsxs)(C.TabPanels,{children:[(0,t.jsx)(k.TabPanel,{children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(I.Tab,{children:"Cost"}),(0,t.jsx)(I.Tab,{children:"Activity"})]}),(0,t.jsxs)(C.TabPanels,{children:[(0,t.jsx)(k.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[100vh] w-full",children:[(0,t.jsxs)(_.Col,{numColSpan:2,children:[(0,t.jsxs)(N.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 -"," ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,t.jsx)(j.default,{userSpend:ey,selectedTeam:null,userMaxBudget:null})]}),(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Monthly Spend"}),(0,t.jsx)(l.BarChart,{data:U,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$ ${(0,L.formatNumberWithCommas)(e,2)}`,yAxisWidth:100,tickGap:5})]})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(R.default,{topKeys:V,teams:null,topKeysLimit:5,setTopKeysLimit:()=>{}})]})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Models"}),(0,t.jsx)(l.BarChart,{className:"mt-4 h-40",data:q,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>`$${(0,L.formatNumberWithCommas)(e,2)}`})]})}),(0,t.jsx)(_.Col,{numColSpan:1}),(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Spend by Provider"}),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsx)(P.DonutChart,{className:"mt-4 h-40",variant:"pie",data:er,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>`$${(0,L.formatNumberWithCommas)(e,2)}`})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(x.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(x.TableHeaderCell,{children:"Spend"})]})}),(0,t.jsx)(b.TableBody,{children:er.map(e=>(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.provider}),(0,t.jsx)(f.TableCell,{children:1e-5>parseFloat(e.spend.toFixed(2))?"less than 0.00":(0,L.formatNumberWithCommas)(e.spend,2)})]},e.provider))})]})})]})})]})})]})}),(0,t.jsx)(k.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:1,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"All Up"}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",ek(en.sum_api_requests)]}),(0,t.jsx)(D.AreaChart,{className:"h-40",data:en.daily_data,valueFormatter:ek,index:"date",colors:["cyan"],categories:["api_requests"],onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",ek(en.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:en.daily_data,valueFormatter:ek,index:"date",colors:["cyan"],categories:["total_tokens"],onValueChange:e=>console.log(e)})]})]})]}),(0,t.jsx)(t.Fragment,{children:ec.map((e,a)=>(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:e.model}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",ek(e.sum_api_requests)]}),(0,t.jsx)(D.AreaChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:ek,onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",ek(e.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:ek,onValueChange:e=>console.log(e)})]})]})]},a))})]})})]})]})}),(0,t.jsx)(k.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(_.Col,{numColSpan:2,children:[(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Total Spend Per Team"}),(0,t.jsx)(d,{data:ea})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Daily Spend Per Team"}),(0,t.jsx)(l.BarChart,{className:"h-72",data:J,showLegend:!0,index:"date",categories:et,yAxisWidth:80,stack:!0})]})]}),(0,t.jsx)(_.Col,{numColSpan:2})]})}),(0,t.jsxs)(k.TabPanel,{children:[(0,t.jsxs)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",children:"docs here"})]}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{children:(0,t.jsx)(v.default,{value:ex,onValueChange:e=>{ep(e),eS(e.from,e.to,null)}})}),(0,t.jsxs)(_.Col,{children:[(0,t.jsx)(N.Text,{children:"Select Key"}),(0,t.jsxs)(E.Select,{defaultValue:"all-keys",children:[(0,t.jsx)(A.SelectItem,{value:"all-keys",onClick:()=>{eS(ex.from,ex.to,null)},children:"All Keys"},"all-keys"),n?.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,t.jsx)(A.SelectItem,{value:String(l),onClick:()=>{eS(ex.from,ex.to,e.token)},children:e.key_alias},l):null)]})]})]}),(0,t.jsx)(u.Card,{className:"mt-4",children:(0,t.jsxs)(h.Table,{className:"max-h-[70vh] min-h-[500px]",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(x.TableHeaderCell,{children:"Customer"}),(0,t.jsx)(x.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(x.TableHeaderCell,{children:"Total Events"})]})}),(0,t.jsx)(b.TableBody,{children:G?.map((e,l)=>(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.end_user}),(0,t.jsx)(f.TableCell,{children:(0,L.formatNumberWithCommas)(e.total_spend,2)}),(0,t.jsx)(f.TableCell,{children:e.total_count})]},l))})]})})]}),(0,t.jsxs)(k.TabPanel,{children:[(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsx)(v.default,{className:"mb-4",value:ex,onValueChange:e=>{ep(e),eT(e.from,e.to)}})}),(0,t.jsx)(_.Col,{children:o?(0,t.jsx)("div",{children:(0,t.jsxs)(M.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(O.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsx)(O.MultiSelectItem,{value:String(e),children:e},e))]})}):(0,t.jsx)("div",{children:(0,t.jsxs)(M.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(O.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsxs)(A.SelectItem,{value:String(e),disabled:!0,children:["✨ ",e," (Enterprise only Feature)"]},e))]})})})]}),(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full mb-4",children:[(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Spend Per Tag"}),(0,t.jsxs)(N.Text,{children:["Get Started by Tracking cost per tag"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",children:"here"})]}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Q,index:"name",categories:["spend"],colors:["cyan"]})]})}),(0,t.jsx)(_.Col,{numColSpan:2})]})]})]})]})})}],735042)},368670,e=>{"use strict";var t=e.i(764205),l=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,l.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),s=e.i(269200),r=e.i(427612),i=e.i(496020),n=e.i(389083),o=e.i(64848),c=e.i(977572),d=e.i(942232),u=e.i(599724),m=e.i(994388),h=e.i(752978),g=e.i(793130),x=e.i(404206),p=e.i(723731),f=e.i(653824),b=e.i(881073),y=e.i(197647),j=e.i(764205),v=e.i(28651),w=e.i(68155),_=e.i(220508),N=e.i(727749),k=e.i(158392);let C=({accessToken:e,userRole:a,userID:s,modelData:r})=>{let[i,n]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)({}),[h,g]=(0,l.useState)({});return((0,l.useEffect)(()=>{e&&a&&s&&((0,j.getCallbacksCall)(e,s,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy;let l=t.routing_strategy||null;n(e=>({...e,routerSettings:t,selectedStrategy:l}))}),(0,j.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),u(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&c(l.options),e.routing_strategy_descriptions&&g(e.routing_strategy_descriptions);let a=e.fields.find(e=>"enable_tag_filtering"===e.field_name);a?.field_value!==null&&a?.field_value!==void 0&&n(e=>({...e,enableTagFiltering:a.field_value}))}}))},[e,a,s]),e)?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(k.default,{value:i,onChange:n,routerFieldsMetadata:d,availableRoutingStrategies:o,routingStrategyDescriptions:h}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(m.Button,{variant:"secondary",size:"sm",onClick:()=>window.location.reload(),className:"text-sm",children:"Reset"}),(0,t.jsx)(m.Button,{size:"sm",onClick:()=>{if(!e)return;let t=i.routerSettings;console.log("router_settings",t);let l=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),a=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...t,enable_tag_filtering:i.enableTagFiltering}).map(([e,t])=>{if("routing_strategy_args"!==e&&"routing_strategy"!==e&&"enable_tag_filtering"!==e){let s=document.querySelector(`input[name="${e}"]`),r=((e,t,s)=>{if(void 0===t)return s;let r=t.trim();if("null"===r.toLowerCase())return null;if(l.has(e)){let e=Number(r);return Number.isNaN(e)?s:e}if(a.has(e)){if(""===r)return null;try{return JSON.parse(r)}catch{return s}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(e,s?.value,t);return[e,r]}if("routing_strategy"===e)return[e,i.selectedStrategy];if("enable_tag_filtering"===e)return[e,i.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===i.selectedStrategy){let e={},t=document.querySelector('input[name="lowest_latency_buffer"]'),l=document.querySelector('input[name="ttl"]');return t?.value&&(e.lowest_latency_buffer=Number(t.value)),l?.value&&(e.ttl=Number(l.value)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",s);try{(0,j.setCallbacksCall)(e,{router_settings:s})}catch(e){N.default.fromBackend("Failed to update router settings: "+e)}N.default.success("router settings updated successfully")},className:"text-sm font-medium",children:"Save Changes"})]})]}):null};e.i(247167);var S=e.i(368670);let T=l.forwardRef(function(e,t){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"}))});var I=e.i(122577),E=e.i(592968),A=e.i(898586),P=e.i(356449),D=e.i(127952),B=e.i(418371),M=e.i(464571),O=e.i(888259),F=e.i(689020),R=e.i(212931);let L=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function z({open:e,onCancel:l,children:a}){return(0,t.jsx)(R.Modal,{title:(0,t.jsx)("div",{className:"pb-4 border-b border-gray-100",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-800",children:[(0,t.jsx)("div",{className:"p-2 bg-indigo-50 rounded-lg",children:(0,t.jsx)(L,{className:"w-5 h-5 text-indigo-600"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-bold m-0",children:"Configure Model Fallbacks"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 font-normal m-0",children:"Manage multiple fallback chains for different models (up to 5 groups at a time)"})]})]})}),open:e,width:900,footer:null,onCancel:l,maskClosable:!1,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:a})})}e.s(["ArrowRight",()=>L],972520);var U=e.i(419470);function H({models:e,accessToken:a,value:s=[],onChange:r}){let[i,n]=(0,l.useState)(!1),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)(0),[h,g]=(0,l.useState)(!1),[x,p]=(0,l.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,l.useEffect)(()=>{i&&(p([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[i]),(0,l.useEffect)(()=>{let e=async()=>{try{let e=await (0,F.fetchAvailableModels)(a);console.log("Fetched models for fallbacks:",e),c(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};i&&e()},[a,i]);let f=Array.from(new Set(o.map(e=>e.model_group))).sort(),b=()=>{n(!1),p([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=x.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void O.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let t=[...s||[],...x.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(r){g(!0);try{await r(t),N.default.success(`${x.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{g(!1)}}else N.default.fromBackend("onChange callback not provided")};return(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Button,{className:"mx-auto",onClick:()=>n(!0),icon:()=>(0,t.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,t.jsxs)(z,{open:i,onCancel:b,children:[(0,t.jsx)(U.FallbackSelectionForm,{groups:x,onGroupsChange:p,availableModels:f,maxFallbacks:10,maxGroups:5},d),x.length>0&&(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 mt-6 border-t border-gray-100",children:[(0,t.jsx)(M.Button,{type:"default",onClick:b,disabled:h,children:"Cancel"}),(0,t.jsx)(M.Button,{type:"default",onClick:y,disabled:0===x.length||h,loading:h,children:h?"Saving Configuration...":"Save All Configurations"})]})]})]})}let V="inline-flex items-center gap-2 px-2.5 py-1 rounded-md border border-gray-200 bg-gray-50 text-sm font-medium text-gray-800 shrink-0";async function $(e,l){console.log=function(){};let a=window.location.origin,s=new P.default.OpenAI({apiKey:l,baseURL:a,dangerouslyAllowBrowser:!0});try{N.default.info("Testing fallback model response...");let l=await s.chat.completions.create({model:e,messages:[{role:"user",content:"Hi, this is a test message"}],mock_testing_fallbacks:!0});N.default.success((0,t.jsxs)("span",{children:["Test model=",(0,t.jsx)("strong",{children:e}),", received model=",(0,t.jsx)("strong",{children:l.model}),". See"," ",(0,t.jsx)("a",{href:"#",onClick:()=>window.open("https://docs.litellm.ai/docs/proxy/reliability","_blank"),style:{textDecoration:"underline",color:"blue"},children:"curl"})]}))}catch(e){N.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let q=({accessToken:e,userRole:a,userID:n,modelData:u})=>{let[m,g]=(0,l.useState)({}),[x,p]=(0,l.useState)(!1),[f,b]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),{data:_}=(0,S.useModelCostMap)(),k=e=>null!=_&&"object"==typeof _&&e in _?_[e].litellm_provider??"":"";(0,l.useEffect)(()=>{e&&a&&n&&(0,j.getCallbacksCall)(e,n,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)})},[e,a,n]);let C=e=>{b(e),v(!0)},P=async()=>{if(!f||!e)return;let t=Object.keys(f)[0];if(!t)return;p(!0);let l=m.fallbacks.map(e=>{let l={...e};return t in l&&Array.isArray(l[t])&&delete l[t],l}).filter(e=>Object.keys(e).length>0),a={...m,fallbacks:l};try{await (0,j.setCallbacksCall)(e,{router_settings:a}),g(a),N.default.success("Router settings updated successfully")}catch(e){N.default.fromBackend("Failed to update router settings: "+e)}finally{p(!1),v(!1),b(null)}};if(!e)return null;let M=async t=>{if(!e)return;let l={...m,fallbacks:t};try{await (0,j.setCallbacksCall)(e,{router_settings:l}),g(l)}catch(t){throw N.default.fromBackend("Failed to update router settings: "+t),e&&a&&n&&(0,j.getCallbacksCall)(e,n,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)}),t}},O=Array.isArray(m.fallbacks)&&m.fallbacks.length>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:M}),O?(0,t.jsxs)(s.Table,{children:[(0,t.jsx)(r.TableHead,{children:(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Model Name"}),(0,t.jsx)(o.TableHeaderCell,{children:"Fallbacks"}),(0,t.jsx)(o.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(d.TableBody,{children:m.fallbacks.map((a,s)=>Object.entries(a).map(([r,n])=>{let o;return(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(c.TableCell,{className:"align-top",children:(o=k?.(r)??r,(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(B.ProviderLogo,{provider:o,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:r})]}))}),(0,t.jsx)(c.TableCell,{className:"align-top",children:function(e,a,s){let r=Array.isArray(a)?a:[];if(0===r.length)return null;let i=({modelName:e})=>{let l=s?.(e)??e;return(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(B.ProviderLogo,{provider:l,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:e})]})};return(0,t.jsxs)("span",{className:"grid grid-cols-[auto_1fr] items-start gap-x-2 w-full min-w-0",children:[(0,t.jsx)("span",{className:"inline-flex items-center justify-center w-8 h-8 shrink-0 self-start text-blue-600","aria-hidden":!0,children:(0,t.jsx)(T,{className:"w-5 h-5 stroke-[2.5]"})}),(0,t.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:r.map((e,a)=>(0,t.jsxs)(l.default.Fragment,{children:[a>0&&(0,t.jsx)(h.Icon,{icon:T,size:"xs",className:"shrink-0 text-gray-400"}),(0,t.jsx)(i,{modelName:e})]},e))})]})}(0,Array.isArray(n)?n:[],k)}),(0,t.jsxs)(c.TableCell,{className:"align-top",children:[(0,t.jsx)(E.Tooltip,{title:"Test fallback",children:(0,t.jsx)(h.Icon,{icon:I.PlayIcon,size:"sm",onClick:()=>$(Object.keys(a)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(E.Tooltip,{title:"Delete fallback",children:(0,t.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>C(a),onKeyDown:e=>"Enter"===e.key&&C(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(h.Icon,{icon:w.TrashIcon,size:"sm",className:"hover:text-red-600"})})})]})]},s.toString()+r)}))})]}):(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-6 text-center",children:(0,t.jsx)(A.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,t.jsx)(D.default,{isOpen:y,title:"Delete Fallback?",message:"Are you sure you want to delete this fallback? This action cannot be undone.",resourceInformationTitle:"Fallback Information",resourceInformation:[{label:"Model Name",value:f?Object.keys(f)[0]:"",code:!0}],onCancel:()=>{v(!1),b(null)},onOk:P,confirmLoading:x})]})};e.s(["default",0,({accessToken:e,userRole:N,userID:k,modelData:S})=>{let[T,I]=(0,l.useState)([]);(0,l.useEffect)(()=>{e&&(0,j.getGeneralSettingsCall)(e).then(e=>{I(e)})},[e]);let E=(e,t)=>{I(T.map(l=>l.field_name===e?{...l,field_value:t}:l))};return e?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(f.TabGroup,{className:"h-[75vh] w-full",children:[(0,t.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,t.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,t.jsxs)(p.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(x.TabPanel,{children:(0,t.jsx)(C,{accessToken:e,userRole:N,userID:k,modelData:S})}),(0,t.jsx)(x.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:N,userID:k,modelData:S})}),(0,t.jsx)(x.TabPanel,{children:(0,t.jsx)(a.Card,{children:(0,t.jsxs)(s.Table,{children:[(0,t.jsx)(r.TableHead,{children:(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Setting"}),(0,t.jsx)(o.TableHeaderCell,{children:"Value"}),(0,t.jsx)(o.TableHeaderCell,{children:"Status"}),(0,t.jsx)(o.TableHeaderCell,{children:"Action"})]})}),(0,t.jsx)(d.TableBody,{children:T.filter(e=>"TypedDictionary"!==e.field_type).map((l,a)=>(0,t.jsxs)(i.TableRow,{children:[(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(u.Text,{children:l.field_name}),(0,t.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:l.field_description})]}),(0,t.jsx)(c.TableCell,{children:"Integer"==l.field_type?(0,t.jsx)(v.InputNumber,{step:1,value:l.field_value,onChange:e=>E(l.field_name,e)}):"Boolean"==l.field_type?(0,t.jsx)(g.Switch,{checked:!0===l.field_value||"true"===l.field_value,onChange:e=>E(l.field_name,e)}):null}),(0,t.jsx)(c.TableCell,{children:!0==l.stored_in_db?(0,t.jsx)(n.Badge,{icon:_.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==l.stored_in_db?(0,t.jsx)(n.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,t.jsx)(n.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(m.Button,{onClick:()=>((t,l)=>{if(!e)return;let a=T[l].field_value;if(null!=a&&void 0!=a)try{(0,j.updateConfigFieldSetting)(e,t,a);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:!0}:e);I(l)}catch(e){}})(l.field_name,a),children:"Update"}),(0,t.jsx)(h.Icon,{icon:w.TrashIcon,color:"red",onClick:()=>((t,l)=>{if(e)try{(0,j.deleteConfigFieldSetting)(e,t);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:null,field_value:null}:e);I(l)}catch(e){}})(l.field_name,0),children:"Reset"})]})]},a))})]})})})]})]})}):null}],226898)},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function x(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),f=e.i(808613),b=e.i(311451),y=e.i(898586);function j({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=f.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(y.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(y.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(y.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(b.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(b.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:p,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:b,isPending:y}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),v=g?.token?(0,s.jwtDecode)(g.token):null,w=v?.user_email??"",_=v?.user_id??null,N=v?.key??null,k=g?.token??null;return p?(0,t.jsx)(m,{}):f?(0,t.jsx)(x,{}):(0,t.jsx)(j,{variant:e,userEmail:w,isPending:y,claimError:u,onSubmit:e=>{N&&k&&_&&d&&(h(null),b({accessToken:N,inviteId:d,userId:_,password:e.password},{onSuccess:()=>{document.cookie=`token=${k}; path=/; SameSite=Lax`;let e=(0,r.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function w(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function _(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(w,{})})}e.s(["default",()=>_],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:x=!1})=>{let[p,f]=(0,d.useState)(""),[b,y]=(0,o.useDebouncedState)("",{wait:300}),{data:j,fetchNextPage:v,hasNextPage:w,isFetchingNextPage:_,isLoading:N}=((e=50,t)=>{let{accessToken:a}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(a,l,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!j?.pages)return[];let e=new Set,t=[];for(let l of j.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[j]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:x,showSearch:!0,filterOption:!1,onSearch:e=>{f(e),y(e)},searchValue:p,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&w&&!_&&v()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:k,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),x=e.i(500330),p=e.i(871943),f=e.i(502547),b=e.i(360820),y=e.i(94629),j=e.i(152990),v=e.i(682830),w=e.i(389083),_=e.i(994388),N=e.i(752978),k=e.i(269200),C=e.i(942232),S=e.i(977572),T=e.i(427612),I=e.i(64848),E=e.i(496020),A=e.i(599724),P=e.i(827252),D=e.i(772345),B=e.i(464571),M=e.i(282786),O=e.i(981339),F=e.i(592968),R=e.i(355619),L=e.i(633627),z=e.i(374009),U=e.i(700514),H=e.i(135214),V=e.i(50882),$=e.i(969550),q=e.i(304911),K=e.i(20147);function G({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,G]=o.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[W,J]=o.default.useState({pageIndex:0,pageSize:50}),Y=m.length>0?m[0].id:null,Q=m.length>0?m[0].desc?"desc":"asc":null,{data:X,isPending:Z,isFetching:ee,isError:et,refetch:el}=(0,h.useKeys)(W.pageIndex+1,W.pageSize,{sortBy:Y||void 0,sortOrder:Q||void 0,expand:"user"}),[ea,es]=(0,o.useState)({}),{filters:er,filteredKeys:ei,filteredTotalCount:en,allTeams:eo,allOrganizations:ec,handleFilterChange:ed,handleFilterReset:eu}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,H.default)(),[r,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[x,p]=(0,o.useState)(null),f=(0,o.useRef)(0),b=(0,o.useCallback)((0,z.default)(async e=>{if(!s)return;let t=Date.now();f.current=t;try{let l=await (0,u.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,U.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(g(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,L.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,L.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||b({...r,...e})},handleFilterReset:()=>{i(a),p(null),b(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(ee),eh=(ee||em)&&!et,eg=en??X?.total_count??0;(0,o.useEffect)(()=>{if(el){let e=()=>{el()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[el]);let ex=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(F.Tooltip,{title:l,children:(0,t.jsx)(_.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(M.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(P.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||s||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:i}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||s?(0,t.jsx)(M.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(M.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(q.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=s||i||l,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:s},{label:"User Email",value:i},{label:"User ID",value:l}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||i?(0,t.jsx)(M.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(M.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(q.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(M.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(P.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(F.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,x.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,x.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(l)?(0,t.jsx)("div",{className:"flex flex-col",children:0===l.length?(0,t.jsx)(w.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(A.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(N.Icon,{icon:ea[e.row.id]?p.ChevronDownIcon:f.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{es(t=>({...t,[e.row.id]:!t[e.row.id]}))}})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(A.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(A.Text,{children:e.length>30?`${(0,R.getModelDisplayName)(e).slice(0,30)}...`:(0,R.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(w.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(A.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.slice(3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(A.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(A.Text,{children:e.length>30?`${(0,R.getModelDisplayName)(e).slice(0,30)}...`:(0,R.getModelDisplayName)(e)})},l+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==l.tpm_limit?l.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==l.rpm_limit?l.rpm_limit:"Unlimited"]})]})}}],[e,n]),ep=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>eo&&0!==eo.length?eo.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ef=(0,j.useReactTable)({data:ei,columns:ex.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:W},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(G(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";ed({...er,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:J,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(eg/W.pageSize)});o.default.useEffect(()=>{s&&G([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:eb,pageSize:ey}=ef.getState().pagination,ej=Math.min((eb+1)*ey,eg),ev=`${eb*ey+1} - ${ej}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(K.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:eo,onDelete:el}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)($.default,{options:ep,onApplyFilters:ed,initialValues:er,onResetFilters:eu})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(O.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ev," of ",eg," results"]}),(0,t.jsx)(B.Button,{type:"default",icon:(0,t.jsx)(D.SyncOutlined,{spin:eh}),onClick:()=>{el()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(O.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",eb+1," of ",ef.getPageCount()]}),Z?(0,t.jsx)(O.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ef.previousPage(),disabled:Z||!ef.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Z?(0,t.jsx)(O.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ef.nextPage(),disabled:Z||!ef.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(k.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ef.getCenterTotalSize()},children:[(0,t.jsx)(T.TableHead,{children:ef.getHeaderGroups().map(e=>(0,t.jsx)(E.TableRow,{children:e.headers.map(e=>(0,t.jsx)(I.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(b.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(y.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ef.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:Z?(0,t.jsx)(E.TableRow,{children:(0,t.jsx)(S.TableCell,{colSpan:ex.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):ei.length>0?ef.getRowModel().rows.map(e=>(0,t.jsx)(E.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(S.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(E.TableRow,{children:(0,t.jsx)(S.TableCell,{colSpan:ex.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:x,setUserRole:p,userEmail:f,setUserEmail:b,setTeams:y,setKeys:j,premiumUser:v,organizations:w,addKey:_,createClicked:N,autoOpenCreate:k,prefillData:C})=>{let S,[T,I]=(0,o.useState)(null),[E,A]=(0,o.useState)(null),P=(0,n.useSearchParams)(),D=(console.log("COOKIES",document.cookie),(S=document.cookie.split("; ").find(e=>e.startsWith("token=")))?S.split("=")[1]:null),B=P.get("invitation_id"),[M,O]=(0,o.useState)(null),[F,R]=(0,o.useState)(null),[L,z]=(0,o.useState)([]),[U,H]=(0,o.useState)(null),[V,$]=(0,o.useState)(null);if((0,o.useEffect)(()=>{let e=()=>{sessionStorage.clear()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(D){let e=(0,i.jwtDecode)(D);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),O(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?b(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&M&&h&&!T){let t=sessionStorage.getItem("userModels"+e);t?z(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(E)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(M);H(t);let l=await (0,u.userGetInfoV2)(M,e);I(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(M,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),z(a),console.log("userModels:",L),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&q()}})(),(0,d.fetchTeams)(M,e,h,E,y))}},[e,D,M,h]),(0,o.useEffect)(()=>{M&&(async()=>{try{let e=await (0,u.keyInfoCall)(M,[M]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&q()}})()},[M]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(E)}, accessToken: ${M}, userID: ${e}, userRole: ${h}`),M&&(console.log("fetching teams"),(0,d.fetchTeams)(M,e,h,E,y))},[E]),(0,o.useEffect)(()=>{if(null!==x&&null!=V&&null!==V.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(x)}`),x))V.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===V.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==x){let e=0;for(let t of x)e+=t.spend;R(e)}},[V]),null!=B)return(0,t.jsx)(c.default,{});function q(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==D)return console.log("All cookies before redirect:",document.cookie),q(),null;try{let e=(0,i.jwtDecode)(D);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),q(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),q(),null}if(null==M)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&p("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=r.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",V),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:V,teams:g,data:x,addKey:_,autoOpenCreate:k,prefillData:C},V?V.team_id:null),(0,t.jsx)(G,{teams:g,organizations:w})]})})})}],693569)},559061,e=>{"use strict";var t=e.i(843476),l=e.i(584935),a=e.i(304967),s=e.i(309426),r=e.i(350967),i=e.i(752978),n=e.i(621642),o=e.i(25080),c=e.i(37091),d=e.i(197647),u=e.i(653824),m=e.i(881073),h=e.i(404206),g=e.i(723731),x=e.i(599724),p=e.i(271645),f=e.i(727749),b=e.i(144267),y=e.i(278587),j=e.i(764205),v=e.i(994388),w=e.i(220508),_=e.i(964306),N=e.i(551332);let k=({responseTimeMs:e})=>null==e?null:(0,t.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,t.jsxs)("span",{children:[e.toFixed(0),"ms"]})]}),C=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{}return t},S=({label:e,value:l})=>{let[a,s]=p.default.useState(!1),[r,i]=p.default.useState(!1),n=l?.toString()||"N/A",o=n.length>50?n.substring(0,50)+"...":n;return(0,t.jsx)("tr",{className:"hover:bg-gray-50",children:(0,t.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,t.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[(0,t.jsx)("button",{onClick:()=>s(!a),className:"text-gray-400 hover:text-gray-600 mr-2",children:a?"▼":"▶"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm text-gray-600",children:e}),(0,t.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:a?n:o})]})]}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(n),i(!0),setTimeout(()=>i(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,t.jsx)(N.ClipboardCopyIcon,{className:"h-4 w-4"})})]})})})},T=({response:e})=>{let l=null,a={},s={};try{if(e?.error)try{let t="string"==typeof e.error.message?JSON.parse(e.error.message):e.error.message;l={message:t?.message||"Unknown error",traceback:t?.traceback||"No traceback available",litellm_params:t?.litellm_cache_params||{},health_check_cache_params:t?.health_check_cache_params||{}},a=C(l.litellm_params)||{},s=C(l.health_check_cache_params)||{}}catch(t){console.warn("Error parsing error details:",t),l={message:String(e.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else a=C(e?.litellm_cache_params)||{},s=C(e?.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),a={},s={}}let r={redis_host:s?.redis_client?.connection_pool?.connection_kwargs?.host||s?.redis_async_client?.connection_pool?.connection_kwargs?.host||s?.connection_kwargs?.host||s?.host||"N/A",redis_port:s?.redis_client?.connection_pool?.connection_kwargs?.port||s?.redis_async_client?.connection_pool?.connection_kwargs?.port||s?.connection_kwargs?.port||s?.port||"N/A",redis_version:s?.redis_version||"N/A",startup_nodes:(()=>{try{if(s?.redis_kwargs?.startup_nodes)return JSON.stringify(s.redis_kwargs.startup_nodes);let e=s?.redis_client?.connection_pool?.connection_kwargs?.host||s?.redis_async_client?.connection_pool?.connection_kwargs?.host,t=s?.redis_client?.connection_pool?.connection_kwargs?.port||s?.redis_async_client?.connection_pool?.connection_kwargs?.port;return e&&t?JSON.stringify([{host:e,port:t}]):"N/A"}catch(e){return"N/A"}})(),namespace:s?.namespace||"N/A"};return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,t.jsxs)(u.TabGroup,{children:[(0,t.jsxs)(m.TabList,{className:"border-b border-gray-200 px-4",children:[(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-6",children:[e?.status==="healthy"?(0,t.jsx)(w.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}):(0,t.jsx)(_.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsxs)(x.Text,{className:`text-sm font-medium ${e?.status==="healthy"?"text-green-500":"text-red-500"}`,children:["Cache Status: ",e?.status||"unhealthy"]})]}),(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsxs)("tbody",{children:[l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,t.jsx)(S,{label:"Error Message",value:l.message}),(0,t.jsx)(S,{label:"Traceback",value:l.traceback})]}),(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,t.jsx)(S,{label:"Cache Configuration",value:String(a?.type)}),(0,t.jsx)(S,{label:"Ping Response",value:String(e.ping_response)}),(0,t.jsx)(S,{label:"Set Cache Response",value:e.set_cache_response||"N/A"}),(0,t.jsx)(S,{label:"litellm_settings.cache_params",value:JSON.stringify(a,null,2)}),a?.type==="redis"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,t.jsx)(S,{label:"Redis Host",value:r.redis_host||"N/A"}),(0,t.jsx)(S,{label:"Redis Port",value:r.redis_port||"N/A"}),(0,t.jsx)(S,{label:"Redis Version",value:r.redis_version||"N/A"}),(0,t.jsx)(S,{label:"Startup Nodes",value:r.startup_nodes||"N/A"}),(0,t.jsx)(S,{label:"Namespace",value:r.namespace||"N/A"})]})]})})]})}),(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let t={...e,litellm_cache_params:a,health_check_cache_params:s},l=JSON.parse(JSON.stringify(t,(e,t)=>{if("string"==typeof t)try{return JSON.parse(t)}catch{}return t}));return JSON.stringify(l,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},I=({accessToken:e,healthCheckResponse:l,runCachingHealthCheck:a,responseTimeMs:s})=>{let[r,i]=p.default.useState(null),[n,o]=p.default.useState(!1),c=async()=>{o(!0);let e=performance.now();await a(),i(performance.now()-e),o(!1)};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(v.Button,{onClick:c,disabled:n,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:n?"Running Health Check...":"Run Health Check"}),(0,t.jsx)(k,{responseTimeMs:r})]}),l&&(0,t.jsx)(T,{response:l})]})};var E=e.i(677667),A=e.i(898667),P=e.i(130643),D=e.i(206929),B=e.i(35983);let M=({redisType:e,redisTypeDescriptions:l,onTypeChange:a})=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Redis Type"}),(0,t.jsxs)(D.Select,{value:e,onValueChange:a,children:[(0,t.jsx)(B.SelectItem,{value:"node",children:"Node (Single Instance)"}),(0,t.jsx)(B.SelectItem,{value:"cluster",children:"Cluster"}),(0,t.jsx)(B.SelectItem,{value:"sentinel",children:"Sentinel"}),(0,t.jsx)(B.SelectItem,{value:"semantic",children:"Semantic"})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:l[e]||"Select the type of Redis deployment you're using"})]});var O=e.i(135214),F=e.i(620250),R=e.i(779241),L=e.i(199133),z=e.i(689020),U=e.i(435451);let H=({field:e,currentValue:l})=>{let[a,s]=(0,p.useState)([]),[r,i]=(0,p.useState)(l||""),{accessToken:n}=(0,O.default)();if((0,p.useEffect)(()=>{n&&(async()=>{try{let e=await (0,z.fetchAvailableModels)(n);console.log("Fetched models for selector:",e),e.length>0&&s(e)}catch(e){console.error("Error fetching model info:",e)}})()},[n]),"Boolean"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",name:e.field_name,defaultChecked:!0===l||"true"===l,className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.field_description})]})]});if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(U.default,{name:e.field_name,type:"number",defaultValue:l,placeholder:e.field_description}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("List"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)("textarea",{name:e.field_name,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l,placeholder:e.field_description,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500",rows:4}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("Models_Select"===e.field_type){let l=a.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(L.Select,{value:r,onChange:i,showSearch:!0,placeholder:"Search and select a model...",options:l,style:{width:"100%"},className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("input",{type:"hidden",name:e.field_name,value:r}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})}if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(F.NumberInput,{name:e.field_name,defaultValue:l,placeholder:e.field_description,step:"Float"===e.field_type?.01:1}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});let o="password"===e.field_name||e.field_name.includes("password")?"password":"text";return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(R.TextInput,{name:e.field_name,type:o,defaultValue:l,placeholder:e.field_description}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})},V=(e,t)=>e.find(e=>e.field_name===t),$=(e,t)=>{let l={type:"redis"};return e.forEach(e=>{if("redis_type"===e.field_name||null!==e.redis_type&&void 0!==e.redis_type&&e.redis_type!==t)return;let a=e.field_name,s=null;if("Boolean"===e.field_type){let e=document.querySelector(`input[name="${a}"]`);e?.checked!==void 0&&(s=e.checked)}else if("List"===e.field_type){let e=document.querySelector(`textarea[name="${a}"]`);if(e?.value)try{s=JSON.parse(e.value)}catch(e){console.error(`Invalid JSON for ${a}:`,e)}}else{let t=document.querySelector(`input[name="${a}"]`);if(t?.value){let l=t.value.trim();if(""!==l)if("Integer"===e.field_type){let e=Number(l);isNaN(e)||(s=e)}else if("Float"===e.field_type){let e=Number(l);isNaN(e)||(s=e)}else s=l}}null!=s&&(l[a]=s)}),l},q=({accessToken:e,userRole:l,userID:a})=>{let s,r,i,n,o,[c,d]=(0,p.useState)({}),[u,m]=(0,p.useState)([]),[h,g]=(0,p.useState)({}),[x,b]=(0,p.useState)("node"),[y,w]=(0,p.useState)(!1),[_,N]=(0,p.useState)(!1),k=(0,p.useCallback)(async()=>{try{let t=await (0,j.getCacheSettingsCall)(e);console.log("cache settings from API",t),t.fields&&m(t.fields),t.current_values&&(d(t.current_values),t.current_values.redis_type&&b(t.current_values.redis_type)),t.redis_type_descriptions&&g(t.redis_type_descriptions)}catch(e){console.error("Failed to load cache settings:",e),f.default.fromBackend("Failed to load cache settings")}},[e]);(0,p.useEffect)(()=>{e&&k()},[e,k]);let C=async()=>{if(e){w(!0);try{let t=$(u,x),l=await (0,j.testCacheConnectionCall)(e,t);"success"===l.status?f.default.success("Cache connection test successful!"):f.default.fromBackend(`Connection test failed: ${l.message||l.error}`)}catch(e){console.error("Test connection error:",e),f.default.fromBackend(`Connection test failed: ${e.message||"Unknown error"}`)}finally{w(!1)}}},S=async()=>{if(e){N(!0);try{let t=$(u,x);"semantic"===x&&(t.type="redis-semantic"),await (0,j.updateCacheSettingsCall)(e,t),f.default.success("Cache settings updated successfully"),await k()}catch(e){console.error("Failed to save cache settings:",e),f.default.fromBackend("Failed to update cache settings")}finally{N(!1)}}};if(!e)return null;let{basicFields:T,sslFields:I,cacheManagementFields:D,gcpFields:B,clusterFields:O,sentinelFields:F,semanticFields:R}=(s=["host","port","password","username"].map(e=>V(u,e)).filter(Boolean),r=["ssl","ssl_cert_reqs","ssl_check_hostname"].map(e=>V(u,e)).filter(Boolean),i=["namespace","ttl","max_connections"].map(e=>V(u,e)).filter(Boolean),n=["gcp_service_account","gcp_ssl_ca_certs"].map(e=>V(u,e)).filter(Boolean),o=u.filter(e=>"cluster"===e.redis_type),{basicFields:s,sslFields:r,cacheManagementFields:i,gcpFields:n,clusterFields:o,sentinelFields:u.filter(e=>"sentinel"===e.redis_type),semanticFields:u.filter(e=>"semantic"===e.redis_type)});return(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Cache Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure Redis cache for LiteLLM"})]}),(0,t.jsx)(M,{redisType:x,redisTypeDescriptions:h,onTypeChange:b}),(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Connection Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:T.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"cluster"===x&&O.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Cluster Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6",children:O.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"sentinel"===x&&F.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Sentinel Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:F.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"semantic"===x&&R.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Semantic Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:R.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),(0,t.jsxs)(E.Accordion,{className:"mt-4",children:[(0,t.jsx)(A.AccordionHeader,{children:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Advanced Settings"})}),(0,t.jsx)(P.AccordionBody,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[I.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"SSL Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:I.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),D.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"Cache Management"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:D.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),B.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"GCP Authentication"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:B.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]})]})})]})]}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(v.Button,{variant:"secondary",size:"sm",onClick:C,disabled:y,className:"text-sm",children:y?"Testing...":"Test Connection"}),(0,t.jsx)(v.Button,{size:"sm",onClick:S,disabled:_,className:"text-sm font-medium",children:_?"Saving...":"Save Changes"})]})]})},K=e=>{if(e)return e.toISOString().split("T")[0]};function G(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}e.s(["default",0,({accessToken:e,token:v,userRole:w,userID:_,premiumUser:N})=>{let[k,C]=(0,p.useState)([]),[S,T]=(0,p.useState)([]),[E,A]=(0,p.useState)([]),[P,D]=(0,p.useState)([]),[B,M]=(0,p.useState)("0"),[O,F]=(0,p.useState)("0"),[R,L]=(0,p.useState)("0"),[z,U]=(0,p.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[H,V]=(0,p.useState)(""),[$,W]=(0,p.useState)("");(0,p.useEffect)(()=>{e&&z&&((async()=>{D(await (0,j.adminGlobalCacheActivity)(e,K(z.from),K(z.to)))})(),V(new Date().toLocaleString()))},[e]);let J=Array.from(new Set(P.map(e=>e?.api_key??""))),Y=Array.from(new Set(P.map(e=>e?.model??"")));Array.from(new Set(P.map(e=>e?.call_type??"")));let Q=async(t,l)=>{t&&l&&e&&D(await (0,j.adminGlobalCacheActivity)(e,K(t),K(l)))};(0,p.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",P);let e=P;S.length>0&&(e=e.filter(e=>S.includes(e.api_key))),E.length>0&&(e=e.filter(e=>E.includes(e.model))),console.log("before processed data in cache dashboard",e);let t=0,l=0,a=0,s=e.reduce((e,s)=>{console.log("Processing item:",s),s.call_type||(console.log("Item has no call_type:",s),s.call_type="Unknown"),t+=(s.total_rows||0)-(s.cache_hit_true_rows||0),l+=s.cache_hit_true_rows||0,a+=s.cached_completion_tokens||0;let r=e.find(e=>e.name===s.call_type);return r?(r["LLM API requests"]+=(s.total_rows||0)-(s.cache_hit_true_rows||0),r["Cache hit"]+=s.cache_hit_true_rows||0,r["Cached Completion Tokens"]+=s.cached_completion_tokens||0,r["Generated Completion Tokens"]+=s.generated_completion_tokens||0):e.push({name:s.call_type,"LLM API requests":(s.total_rows||0)-(s.cache_hit_true_rows||0),"Cache hit":s.cache_hit_true_rows||0,"Cached Completion Tokens":s.cached_completion_tokens||0,"Generated Completion Tokens":s.generated_completion_tokens||0}),e},[]);M(G(l)),F(G(a));let r=l+t;r>0?L((l/r*100).toFixed(2)):L("0"),C(s),console.log("PROCESSED DATA IN CACHE DASHBOARD",s)},[S,E,z,P]);let X=async()=>{try{f.default.info("Running cache health check..."),W("");let t=await (0,j.cachingHealthCheckCall)(null!==e?e:"");console.log("CACHING HEALTH CHECK RESPONSE",t),W(t)}catch(t){let e;if(console.error("Error running health check:",t),t&&t.message)try{let l=JSON.parse(t.message);l.error&&(l=l.error),e=l}catch(l){e={message:t.message}}else e={message:"Unknown error occurred"};W({error:e})}};return(0,t.jsxs)(u.TabGroup,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,t.jsxs)(m.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(d.Tab,{children:"Cache Analytics"}),(0,t.jsx)(d.Tab,{children:"Cache Health"}),(0,t.jsx)(d.Tab,{children:"Cache Settings"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[H&&(0,t.jsxs)(x.Text,{children:["Last Refreshed: ",H]}),(0,t.jsx)(i.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{V(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(a.Card,{children:[(0,t.jsxs)(r.Grid,{numItems:3,className:"gap-4 mt-4",children:[(0,t.jsx)(s.Col,{children:(0,t.jsx)(n.MultiSelect,{placeholder:"Select Virtual Keys",value:S,onValueChange:T,children:J.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(s.Col,{children:(0,t.jsx)(n.MultiSelect,{placeholder:"Select Models",value:E,onValueChange:A,children:Y.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(s.Col,{children:(0,t.jsx)(b.default,{value:z,onValueChange:e=>{U(e),Q(e.from,e.to)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[R,"%"]})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:B})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:O})})]})]}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,t.jsx)(l.BarChart,{title:"Cache Hits vs API Requests",data:k,stack:!0,index:"name",valueFormatter:G,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,t.jsx)(l.BarChart,{className:"mt-6",data:k,stack:!0,index:"name",valueFormatter:G,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(I,{accessToken:e,healthCheckResponse:$,runCachingHealthCheck:X})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:w,userID:_})})]})]})}],559061)},601236,e=>{e.v(e=>Promise.resolve().then(()=>e(764205)))}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/112ad77f3dd2e3cd.js b/litellm/proxy/_experimental/out/_next/static/chunks/112ad77f3dd2e3cd.js deleted file mode 100644 index 8b26f294eb3..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/112ad77f3dd2e3cd.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,114272,t=>{"use strict";var e=t.i(540143),i=t.i(88587),s=t.i(936553),r=class extends i.Removable{#t;#e;#i;#s;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#i=t.mutationCache,this.#e=[],this.state=t.state||n(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#r({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=(0,s.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});let r="pending"===this.state.status,n=!this.#s.canStart();try{if(r)e();else{this.#r({type:"pending",variables:t,isPaused:n}),this.#i.config.onMutate&&await this.#i.config.onMutate(t,this,i);let e=await this.options.onMutate?.(t,i);e!==this.state.context&&this.#r({type:"pending",context:e,variables:t,isPaused:n})}let s=await this.#s.start();return await this.#i.config.onSuccess?.(s,t,this.state.context,this,i),await this.options.onSuccess?.(s,t,this.state.context,i),await this.#i.config.onSettled?.(s,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(s,null,t,this.state.context,i),this.#r({type:"success",data:s}),s}catch(e){try{await this.#i.config.onError?.(e,t,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,i)}catch(t){Promise.reject(t)}try{await this.#i.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,i)}catch(t){Promise.reject(t)}throw this.#r({type:"error",error:e}),e}finally{this.#i.runNext(this)}}#r(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),e.notifyManager.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#i.notify({mutation:this,type:"updated",action:t})})}};function n(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}t.s(["Mutation",()=>r,"getDefaultState",()=>n])},180166,t=>{"use strict";var e={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},i=new class{#n=e;#a=!1;setTimeoutProvider(t){this.#n=t}setTimeout(t,e){return this.#n.setTimeout(t,e)}clearTimeout(t){this.#n.clearTimeout(t)}setInterval(t,e){return this.#n.setInterval(t,e)}clearInterval(t){this.#n.clearInterval(t)}};function s(t){setTimeout(t,0)}t.s(["systemSetTimeoutZero",()=>s,"timeoutManager",()=>i])},619273,t=>{"use strict";var e=t.i(180166),i="u"=0&&t!==1/0}function a(t,e){return Math.max(t+(e||0)-Date.now(),0)}function o(t,e){return"function"==typeof t?t(e):t}function u(t,e){return"function"==typeof t?t(e):t}function h(t,e){let{type:i="all",exact:s,fetchStatus:r,predicate:n,queryKey:a,stale:o}=t;if(a){if(s){if(e.queryHash!==l(a,e.options))return!1}else if(!f(e.queryKey,a))return!1}if("all"!==i){let t=e.isActive();if("active"===i&&!t||"inactive"===i&&t)return!1}return("boolean"!=typeof o||e.isStale()===o)&&(!r||r===e.state.fetchStatus)&&(!n||!!n(e))}function c(t,e){let{exact:i,status:s,predicate:r,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(i){if(d(e.options.mutationKey)!==d(n))return!1}else if(!f(e.options.mutationKey,n))return!1}return(!s||e.state.status===s)&&(!r||!!r(e))}function l(t,e){return(e?.queryKeyHashFn||d)(t)}function d(t){return JSON.stringify(t,(t,e)=>v(e)?Object.keys(e).sort().reduce((t,i)=>(t[i]=e[i],t),{}):e)}function f(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(i=>f(t[i],e[i]))}var p=Object.prototype.hasOwnProperty;function y(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let i in t)if(t[i]!==e[i])return!1;return!0}function m(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function v(t){if(!g(t))return!1;let e=t.constructor;if(void 0===e)return!0;let i=e.prototype;return!!g(i)&&!!i.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function g(t){return"[object Object]"===Object.prototype.toString.call(t)}function b(t){return new Promise(i=>{e.timeoutManager.setTimeout(i,t)})}function C(t,e,i){return"function"==typeof i.structuralSharing?i.structuralSharing(t,e):!1!==i.structuralSharing?function t(e,i,s=0){if(e===i)return e;if(s>500)return i;let r=m(e)&&m(i);if(!r&&!(v(e)&&v(i)))return i;let n=(r?e:Object.keys(e)).length,a=r?i:Object.keys(i),o=a.length,u=r?Array(o):{},h=0;for(let c=0;ci?s.slice(1):s}function S(t,e,i=0){let s=[e,...t];return i&&s.length>i?s.slice(0,-1):s}var P=Symbol();function q(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==P?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function M(t,e){return"function"==typeof t?t(...e):!!t}function T(t,e,i){let s,r=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=e(),r||(r=!0,s.aborted?i():s.addEventListener("abort",i,{once:!0})),s)}),t}t.s(["addConsumeAwareSignal",()=>T,"addToEnd",()=>w,"addToStart",()=>S,"ensureQueryFn",()=>q,"functionalUpdate",()=>r,"hashKey",()=>d,"hashQueryKeyByOptions",()=>l,"isServer",()=>i,"isValidTimeout",()=>n,"keepPreviousData",()=>O,"matchMutation",()=>c,"matchQuery",()=>h,"noop",()=>s,"partialMatchKey",()=>f,"replaceData",()=>C,"resolveEnabled",()=>u,"resolveStaleTime",()=>o,"shallowEqualObjects",()=>y,"shouldThrowError",()=>M,"skipToken",()=>P,"sleep",()=>b,"timeUntilStale",()=>a])},540143,t=>{"use strict";let e,i,s,r,n,a;var o=t.i(180166).systemSetTimeoutZero,u=(e=[],i=0,s=t=>{t()},r=t=>{t()},n=o,{batch:t=>{let a;i++;try{a=t()}finally{let t;--i||(t=e,e=[],t.length&&n(()=>{r(()=>{t.forEach(t=>{s(t)})})}))}return a},batchCalls:t=>(...e)=>{a(()=>{t(...e)})},schedule:a=t=>{i?e.push(t):n(()=>{s(t)})},setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{r=t},setScheduler:t=>{n=t}});t.s(["notifyManager",()=>u])},915823,t=>{"use strict";var e=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};t.s(["Subscribable",()=>e])},175555,t=>{"use strict";var e=t.i(915823),i=t.i(619273),s=new class extends e.Subscribable{#o;#u;#h;constructor(){super(),this.#h=t=>{if(!i.isServer&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#u||this.setEventListener(this.#h)}onUnsubscribe(){this.hasListeners()||(this.#u?.(),this.#u=void 0)}setEventListener(t){this.#h=t,this.#u?.(),this.#u=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#o!==t&&(this.#o=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#o?this.#o:globalThis.document?.visibilityState!=="hidden"}};t.s(["focusManager",()=>s])},936553,814448,793803,t=>{"use strict";var e=t.i(175555),i=t.i(915823),s=t.i(619273),r=new class extends i.Subscribable{#c=!0;#u;#h;constructor(){super(),this.#h=t=>{if(!s.isServer&&window.addEventListener){let e=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#u||this.setEventListener(this.#h)}onUnsubscribe(){this.hasListeners()||(this.#u?.(),this.#u=void 0)}setEventListener(t){this.#h=t,this.#u?.(),this.#u=t(this.setOnline.bind(this))}setOnline(t){this.#c!==t&&(this.#c=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#c}};function n(){let t,e,i=new Promise((i,s)=>{t=i,e=s});function s(t){Object.assign(i,t),delete i.resolve,delete i.reject}return i.status="pending",i.catch(()=>{}),i.resolve=e=>{s({status:"fulfilled",value:e}),t(e)},i.reject=t=>{s({status:"rejected",reason:t}),e(t)},i}function a(t){return Math.min(1e3*2**t,3e4)}function o(t){return(t??"online")!=="online"||r.isOnline()}t.s(["onlineManager",()=>r],814448),t.s(["pendingThenable",()=>n],793803);var u=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function h(t){let i,h=!1,c=0,l=n(),d=()=>e.focusManager.isFocused()&&("always"===t.networkMode||r.isOnline())&&t.canRun(),f=()=>o(t.networkMode)&&t.canRun(),p=t=>{"pending"===l.status&&(i?.(),l.resolve(t))},y=t=>{"pending"===l.status&&(i?.(),l.reject(t))},m=()=>new Promise(e=>{i=t=>{("pending"!==l.status||d())&&e(t)},t.onPause?.()}).then(()=>{i=void 0,"pending"===l.status&&t.onContinue?.()}),v=()=>{let e;if("pending"!==l.status)return;let i=0===c?t.initialPromise:void 0;try{e=i??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(p).catch(e=>{if("pending"!==l.status)return;let i=t.retry??3*!s.isServer,r=t.retryDelay??a,n="function"==typeof r?r(c,e):r,o=!0===i||"number"==typeof i&&cd()?void 0:m()).then(()=>{h?y(e):v()}))})};return{promise:l,status:()=>l.status,cancel:e=>{if("pending"===l.status){let i=new u(e);y(i),t.onCancel?.(i)}},continue:()=>(i?.(),l),cancelRetry:()=>{h=!0},continueRetry:()=>{h=!1},canStart:f,start:()=>(f()?v():m().then(v),l)}}t.s(["CancelledError",()=>u,"canFetch",()=>o,"createRetryer",()=>h],936553)},88587,t=>{"use strict";var e=t.i(180166),i=t.i(619273),s=class{#l;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,i.isValidTimeout)(this.gcTime)&&(this.#l=e.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(i.isServer?1/0:3e5))}clearGcTimeout(){this.#l&&(e.timeoutManager.clearTimeout(this.#l),this.#l=void 0)}};t.s(["Removable",()=>s])},286491,t=>{"use strict";var e=t.i(619273),i=t.i(540143),s=t.i(936553),r=t.i(88587),n=class extends r.Removable{#d;#f;#p;#t;#s;#y;#m;constructor(t){super(),this.#m=!1,this.#y=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#t=t.client,this.#p=this.#t.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#d=u(this.options),this.state=t.state??this.#d,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#y,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=u(this.options);void 0!==t.data&&(this.setState(o(t.data,t.dataUpdatedAt)),this.#d=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#p.remove(this)}setData(t,i){let s=(0,e.replaceData)(this.state.data,t,this.options);return this.#r({data:s,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),s}setState(t,e){this.#r({type:"setState",state:t,setStateOptions:e})}cancel(t){let i=this.#s?.promise;return this.#s?.cancel(t),i?i.then(e.noop).catch(e.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#d)}isActive(){return this.observers.some(t=>!1!==(0,e.resolveEnabled)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===e.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,e.resolveStaleTime)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,e.timeUntilStale)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#p.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#s&&(this.#m?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#p.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(t,i){let r;if("idle"!==this.state.fetchStatus&&this.#s?.status()!=="rejected"){if(void 0!==this.state.data&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let n=new AbortController,a=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#m=!0,n.signal)})},o=()=>{let t,s=(0,e.ensureQueryFn)(this.options,i),r=(a(t={client:this.#t,queryKey:this.queryKey,meta:this.meta}),t);return(this.#m=!1,this.options.persister)?this.options.persister(s,r,this):s(r)},u=(a(r={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#t,state:this.state,fetchFn:o}),r);this.options.behavior?.onFetch(u,this),this.#f=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#r({type:"fetch",meta:u.fetchOptions?.meta}),this.#s=(0,s.createRetryer)({initialPromise:i?.initialPromise,fn:u.fetchFn,onCancel:t=>{t instanceof s.CancelledError&&t.revert&&this.setState({...this.#f,fetchStatus:"idle"}),n.abort()},onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{let t=await this.#s.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#p.config.onSuccess?.(t,this),this.#p.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof s.CancelledError){if(t.silent)return this.#s.promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#r({type:"error",error:t}),this.#p.config.onError?.(t,this),this.#p.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#r(t){let e=e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...a(e.data,this.options),fetchMeta:t.meta??null};case"success":let i={...e,...o(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#f=t.manual?i:void 0,i;case"error":let s=t.error;return{...e,error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),i.notifyManager.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#p.notify({query:this,type:"updated",action:t})})}};function a(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.canFetch)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function o(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function u(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,i=void 0!==e,s=i?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}t.s(["Query",()=>n,"fetchState",()=>a])},912598,t=>{"use strict";var e=t.i(271645),i=t.i(843476),s=e.createContext(void 0),r=t=>{let i=e.useContext(s);if(t)return t;if(!i)throw Error("No QueryClient set, use QueryClientProvider to set one");return i},n=({client:t,children:r})=>(e.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(s.Provider,{value:t,children:r}));t.s(["QueryClientProvider",()=>n,"useQueryClient",()=>r])},992571,t=>{"use strict";var e=t.i(619273);function i(t){return{onFetch:(i,n)=>{let a=i.options,o=i.fetchOptions?.meta?.fetchMore?.direction,u=i.state.data?.pages||[],h=i.state.data?.pageParams||[],c={pages:[],pageParams:[]},l=0,d=async()=>{let n=!1,d=(0,e.ensureQueryFn)(i.options,i.fetchOptions),f=async(t,s,r)=>{let a;if(n)return Promise.reject();if(null==s&&t.pages.length)return Promise.resolve(t);let o=(a={client:i.client,queryKey:i.queryKey,pageParam:s,direction:r?"backward":"forward",meta:i.options.meta},(0,e.addConsumeAwareSignal)(a,()=>i.signal,()=>n=!0),a),u=await d(o),{maxPages:h}=i.options,c=r?e.addToStart:e.addToEnd;return{pages:c(t.pages,u,h),pageParams:c(t.pageParams,s,h)}};if(o&&u.length){let t="backward"===o,e={pages:u,pageParams:h},i=(t?r:s)(a,e);c=await f(e,i,t)}else{let e=t??u.length;do{let t=0===l?h[0]??a.initialPageParam:s(a,c);if(l>0&&null==t)break;c=await f(c,t),l++}while(li.options.persister?.(d,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},n):i.fetchFn=d}}}function s(t,{pages:e,pageParams:i}){let s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,i[s],i):void 0}function r(t,{pages:e,pageParams:i}){return e.length>0?t.getPreviousPageParam?.(e[0],e,i[0],i):void 0}function n(t,e){return!!e&&null!=s(t,e)}function a(t,e){return!!e&&!!t.getPreviousPageParam&&null!=r(t,e)}t.s(["hasNextPage",()=>n,"hasPreviousPage",()=>a,"infiniteQueryBehavior",()=>i])},71195,t=>{"use strict";var e=t.i(843476),i=t.i(271645),s=t.i(698173),r=t.i(998573),n=t.i(727749),a=t.i(888259);function o({children:t}){let[o,u]=s.notification.useNotification(),[h,c]=r.message.useMessage(),l=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{l.current||((0,n.setNotificationInstance)(o),(0,a.setMessageInstance)(h),l.current=!0)},[o,h]),(0,e.jsxs)(e.Fragment,{children:[u,c,t]})}t.s(["default",()=>o])},867271,t=>{"use strict";var e=t.i(843476),i=t.i(619273),s=t.i(286491),r=t.i(540143),n=t.i(915823),a=class extends n.Subscribable{constructor(t={}){super(),this.config=t,this.#v=new Map}#v;build(t,e,r){let n=e.queryKey,a=e.queryHash??(0,i.hashQueryKeyByOptions)(n,e),o=this.get(a);return o||(o=new s.Query({client:t,queryKey:n,queryHash:a,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(n)}),this.add(o)),o}add(t){this.#v.has(t.queryHash)||(this.#v.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#v.get(t.queryHash);e&&(t.destroy(),e===t&&this.#v.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){r.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#v.get(t)}getAll(){return[...this.#v.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,i.matchQuery)(e,t))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(e=>(0,i.matchQuery)(t,e)):e}notify(t){r.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){r.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){r.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},o=t.i(114272),u=n,h=class extends u.Subscribable{constructor(t={}){super(),this.config=t,this.#g=new Set,this.#b=new Map,this.#C=0}#g;#b;#C;build(t,e,i){let s=new o.Mutation({client:t,mutationCache:this,mutationId:++this.#C,options:t.defaultMutationOptions(e),state:i});return this.add(s),s}add(t){this.#g.add(t);let e=c(t);if("string"==typeof e){let i=this.#b.get(e);i?i.push(t):this.#b.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#g.delete(t)){let e=c(t);if("string"==typeof e){let i=this.#b.get(e);if(i)if(i.length>1){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}else i[0]===t&&this.#b.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=c(t);if("string"!=typeof e)return!0;{let i=this.#b.get(e),s=i?.find(t=>"pending"===t.state.status);return!s||s===t}}runNext(t){let e=c(t);if("string"!=typeof e)return Promise.resolve();{let i=this.#b.get(e)?.find(e=>e!==t&&e.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){r.notifyManager.batch(()=>{this.#g.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#g.clear(),this.#b.clear()})}getAll(){return Array.from(this.#g)}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,i.matchMutation)(e,t))}findAll(t={}){return this.getAll().filter(e=>(0,i.matchMutation)(t,e))}notify(t){r.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return r.notifyManager.batch(()=>Promise.all(t.map(t=>t.continue().catch(i.noop))))}};function c(t){return t.options.scope?.id}var l=t.i(175555),d=t.i(814448),f=t.i(992571),p=class{#O;#i;#y;#w;#S;#P;#q;#M;constructor(t={}){this.#O=t.queryCache||new a,this.#i=t.mutationCache||new h,this.#y=t.defaultOptions||{},this.#w=new Map,this.#S=new Map,this.#P=0}mount(){this.#P++,1===this.#P&&(this.#q=l.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#O.onFocus())}),this.#M=d.onlineManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#O.onOnline())}))}unmount(){this.#P--,0===this.#P&&(this.#q?.(),this.#q=void 0,this.#M?.(),this.#M=void 0)}isFetching(t){return this.#O.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#i.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#O.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),s=this.#O.build(this,e),r=s.state.data;return void 0===r?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime((0,i.resolveStaleTime)(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#O.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){let r=this.defaultQueryOptions({queryKey:t}),n=this.#O.get(r.queryHash),a=n?.state.data,o=(0,i.functionalUpdate)(e,a);if(void 0!==o)return this.#O.build(this,r).setData(o,{...s,manual:!0})}setQueriesData(t,e,i){return r.notifyManager.batch(()=>this.#O.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,i)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#O.get(e.queryHash)?.state}removeQueries(t){let e=this.#O;r.notifyManager.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let i=this.#O;return r.notifyManager.batch(()=>(i.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let s={revert:!0,...e};return Promise.all(r.notifyManager.batch(()=>this.#O.findAll(t).map(t=>t.cancel(s)))).then(i.noop).catch(i.noop)}invalidateQueries(t,e={}){return r.notifyManager.batch(()=>(this.#O.findAll(t).forEach(t=>{t.invalidate()}),t?.refetchType==="none")?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e))}refetchQueries(t,e={}){let s={...e,cancelRefetch:e.cancelRefetch??!0};return Promise.all(r.notifyManager.batch(()=>this.#O.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,s);return s.throwOnError||(e=e.catch(i.noop)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(i.noop)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let s=this.#O.build(this,e);return s.isStaleByTime((0,i.resolveStaleTime)(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(i.noop).catch(i.noop)}fetchInfiniteQuery(t){return t.behavior=(0,f.infiniteQueryBehavior)(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(i.noop).catch(i.noop)}ensureInfiniteQueryData(t){return t.behavior=(0,f.infiniteQueryBehavior)(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return d.onlineManager.isOnline()?this.#i.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#O}getMutationCache(){return this.#i}getDefaultOptions(){return this.#y}setDefaultOptions(t){this.#y=t}setQueryDefaults(t,e){this.#w.set((0,i.hashKey)(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#w.values()],s={};return e.forEach(e=>{(0,i.partialMatchKey)(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#S.set((0,i.hashKey)(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#S.values()],s={};return e.forEach(e=>{(0,i.partialMatchKey)(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#y.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=(0,i.hashQueryKeyByOptions)(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===i.skipToken&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#y.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#O.clear(),this.#i.clear()}},y=t.i(912598);let m=new p;function v({children:t}){return(0,e.jsx)(y.QueryClientProvider,{client:m,children:t})}t.s(["default",()=>v],867271)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1488f40c80200d6a.js b/litellm/proxy/_experimental/out/_next/static/chunks/1488f40c80200d6a.js new file mode 100644 index 00000000000..485ae694757 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1488f40c80200d6a.js @@ -0,0 +1,38 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},954616,e=>{"use strict";var t=e.i(271645),i=e.i(114272),r=e.i(540143),s=e.i(915823),n=e.i(619273),a=class extends s.Subscribable{#e;#t=void 0;#i;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,n.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,n.hashKey)(t.mutationKey)!==(0,n.hashKey)(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#s(),this.#n()}mutate(e,t){return this.#r=t,this.#i?.removeObserver(this),this.#i=this.#e.getMutationCache().build(this.#e,this.options),this.#i.addObserver(this),this.#i.execute(e)}#s(){let e=this.#i?.state??(0,i.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#n(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,i=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,i,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,i,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,i,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,i,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(912598);function o(e,i){let s=(0,l.useQueryClient)(i),[o]=t.useState(()=>new a(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let u=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(r.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(n.noop)},[o]);if(u.error&&(0,n.shouldThrowError)(o.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:c,mutateAsync:u.mutate}}e.s(["useMutation",()=>o],954616)},902555,e=>{"use strict";var t=e.i(843476),i=e.i(591935),r=e.i(122577),s=e.i(278587),n=e.i(68155),a=e.i(360820),l=e.i(871943),o=e.i(434626),u=e.i(551332),c=e.i(592968),d=e.i(115504),h=e.i(752978);function m({icon:e,onClick:i,className:r,disabled:s,dataTestId:n}){return s?(0,t.jsx)(h.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":n}):(0,t.jsx)(h.Icon,{icon:e,size:"sm",onClick:i,className:(0,d.cx)("cursor-pointer",r),"data-testid":n})}let p={Edit:{icon:i.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:n.TrashIcon,className:"hover:text-red-600"},Test:{icon:r.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:s.RefreshIcon,className:"hover:text-green-600"},Up:{icon:a.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:l.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:u.ClipboardCopyIcon,className:"hover:text-blue-600"}};function b({onClick:e,tooltipText:i,disabled:r=!1,disabledTooltipText:s,dataTestId:n,variant:a}){let{icon:l,className:o}=p[a];return(0,t.jsx)(c.Tooltip,{title:r?s:i,children:(0,t.jsx)("span",{children:(0,t.jsx)(m,{icon:l,onClick:e,className:o,disabled:r,dataTestId:n})})})}e.s(["default",()=>b],902555)},122577,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,i],122577)},551332,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,i],551332)},434626,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,i],434626)},207670,e=>{"use strict";function t(){for(var e,t,i=0,r="",s=arguments.length;it,"default",0,t])},591935,e=>{"use strict";var t=e.i(271645);let i=t.forwardRef(function(e,i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:i},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,i],591935)},646050,e=>{"use strict";var t=e.i(843476),i=e.i(994388),r=e.i(304967),s=e.i(197647),n=e.i(653824),a=e.i(269200),l=e.i(942232),o=e.i(977572),u=e.i(427612),c=e.i(64848),d=e.i(496020),h=e.i(881073),m=e.i(404206),p=e.i(723731),b=e.i(599724),g=e.i(271645),x=e.i(650056),f=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(266027),T=e.i(954616),C=e.i(912598),w=e.i(243652),I=e.i(764205),M=e.i(135214);let O=(0,w.createQueryKeys)("budgets");var k=e.i(779241),E=e.i(677667),A=e.i(898667),B=e.i(130643),_=e.i(464571),F=e.i(212931),P=e.i(808613),S=e.i(28651),R=e.i(199133);let N=({isModalVisible:e,setIsModalVisible:i})=>{let[r]=P.Form.useForm(),s=(()=>{let{accessToken:e}=(0,M.default)(),t=(0,C.useQueryClient)();return(0,T.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,I.budgetCreateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:O.all})}})})(),n=async e=>{try{j.default.info("Making API Call"),await s.mutateAsync(e),j.default.success("Budget Created"),r.resetFields(),i(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,t.jsx)(F.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{i(!1),r.resetFields()},onCancel:()=>{i(!1),r.resetFields()},children:(0,t.jsxs)(P.Form,{form:r,onFinish:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(k.TextInput,{placeholder:""})}),(0,t.jsx)(P.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(S.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(P.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(S.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(E.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(A.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(B.AccordionBody,{children:[(0,t.jsx)(P.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(S.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(P.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(_.Button,{htmlType:"submit",children:"Create Budget"})})]})})},D=({isModalVisible:e,setIsModalVisible:i,existingBudget:r})=>{let[s]=P.Form.useForm(),n=(()=>{let{accessToken:e}=(0,M.default)(),t=(0,C.useQueryClient)();return(0,T.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,I.budgetUpdateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:O.all})}})})();(0,g.useEffect)(()=>{s.setFieldsValue(r)},[r,s]);let a=async e=>{try{j.default.info("Making API Call"),await n.mutateAsync(e),j.default.success("Budget Updated"),s.resetFields(),i(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,t.jsx)(F.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{i(!1),s.resetFields()},onCancel:()=>{i(!1),s.resetFields()},children:(0,t.jsxs)(P.Form,{form:s,onFinish:a,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:r,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,t.jsx)(k.TextInput,{placeholder:"",disabled:!0})}),(0,t.jsx)(P.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(S.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(P.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(S.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(E.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(A.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(B.AccordionBody,{children:[(0,t.jsx)(P.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(S.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(P.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(R.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(R.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(R.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(R.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(_.Button,{htmlType:"submit",children:"Save"})})]})})},H=` +curl -X POST --location '/end_user/new' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE + +`,L=` +curl -X POST --location '/chat/completions' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{ + "model": "gpt-3.5-turbo', + "messages":[{"role": "user", "content": "Hey, how's it going?"}], + "user": "my-customer-id" +}' # 👈 KEY CHANGE + +`,K=`from openai import OpenAI +client = OpenAI( + base_url="", + api_key="" +) + +completion = client.chat.completions.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Hello!"} + ], + user="my-customer-id" +) + +print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[w,k]=(0,g.useState)(!1),[E,A]=(0,g.useState)(!1),[B,_]=(0,g.useState)(null),[F,P]=(0,g.useState)(!1),{data:S=[]}=(()=>{let{accessToken:e}=(0,M.default)();return(0,v.useQuery)({queryKey:O.list({}),queryFn:async()=>(await (0,I.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),R=(()=>{let{accessToken:e}=(0,M.default)(),t=(0,C.useQueryClient)();return(0,T.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,I.budgetDeleteCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:O.all})}})})(),U=async t=>{null!=e&&(_(t),A(!0))},q=async()=>{if(B&&null!=e)try{await R.mutateAsync(B.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{P(!1),_(null)}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(i.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>k(!0),children:"+ Create Budget"}),(0,t.jsxs)(n.TabGroup,{children:[(0,t.jsxs)(h.TabList,{children:[(0,t.jsx)(s.Tab,{children:"Budgets"}),(0,t.jsx)(s.Tab,{children:"Examples"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsx)(m.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(N,{isModalVisible:w,setIsModalVisible:k}),B&&(0,t.jsx)(D,{isModalVisible:E,setIsModalVisible:A,existingBudget:B}),(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(b.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(d.TableRow,{children:[(0,t.jsx)(c.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(c.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(c.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(c.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(l.TableBody,{children:S.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,t.jsxs)(d.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>U(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{_(e),P(!0)},dataTestId:"delete-budget-button"})]},e.budget_id))})]})]}),(0,t.jsx)(f.default,{isOpen:F,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:B?.budget_id,code:!0},{label:"Max Budget",value:B?.max_budget},{label:"TPM",value:B?.tpm_limit},{label:"RPM",value:B?.rpm_limit}],onCancel:()=>{P(!1)},onOk:q,confirmLoading:R.isPending})]})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(b.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(n.TabGroup,{children:[(0,t.jsxs)(h.TabList,{children:[(0,t.jsx)(s.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(s.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(s.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(x.Prism,{language:"bash",children:H})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(x.Prism,{language:"bash",children:L})}),(0,t.jsx)(m.TabPanel,{children:(0,t.jsx)(x.Prism,{language:"python",children:K})})]})]})]})})]})]})]})}],646050)},267167,e=>{"use strict";var t=e.i(843476),i=e.i(646050),r=e.i(135214);e.s(["default",0,()=>{let{accessToken:e}=(0,r.default)();return(0,t.jsx)(i.default,{accessToken:e})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/99109c78121231a0.js b/litellm/proxy/_experimental/out/_next/static/chunks/169b34fe8aeee0c7.js similarity index 87% rename from litellm/proxy/_experimental/out/_next/static/chunks/99109c78121231a0.js rename to litellm/proxy/_experimental/out/_next/static/chunks/169b34fe8aeee0c7.js index c5ff8a170d2..1ab4b2aea8b 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/99109c78121231a0.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/169b34fe8aeee0c7.js @@ -1,3 +1,3 @@ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.default)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",()=>a],283086);let l=(0,s.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",()=>l],195116)},97859,e=>{"use strict";e.s(["AGENT_CALL_TYPES",0,["asend_message"],"ERROR_CODE_OPTIONS",0,[{label:"400 - Bad Request",value:"400"},{label:"401 - Invalid Authentication",value:"401"},{label:"403 - Permission Denied",value:"403"},{label:"404 - Not Found",value:"404"},{label:"408 - Request Timeout",value:"408"},{label:"422 - Unprocessable Entity",value:"422"},{label:"429 - Rate Limited",value:"429"},{label:"500 - Internal Server Error",value:"500"},{label:"502 - Bad Gateway",value:"502"},{label:"503 - Service Unavailable",value:"503"},{label:"529 - Overloaded",value:"529"}],"MCP_CALL_TYPES",0,["call_mcp_tool","list_mcp_tools"],"QUICK_SELECT_OPTIONS",0,[{label:"Last 15 Minutes",value:15,unit:"minutes"},{label:"Last Hour",value:1,unit:"hours"},{label:"Last 4 Hours",value:4,unit:"hours"},{label:"Last 24 Hours",value:24,unit:"hours"},{label:"Last 7 Days",value:7,unit:"days"}]])},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,m=e.i(755151),x=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(m.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,x.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,x.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,n]=(0,s.useState)({});return e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 cursor-pointer",onClick:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h4",{className:"font-medium",children:["Detected Entities (",e.length,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[s]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>{n(e=>({...e,[s]:!e[s]}))},children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsx)("span",{className:"font-medium mr-2",children:e.entity_type}),(0,t.jsxs)("span",{className:`font-mono ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Entity Type:"}),(0,t.jsx)("span",{children:e.entity_type})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Position:"}),(0,t.jsxs)("span",{children:["Characters ",e.start,"-",e.end]})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Confidence:"}),(0,t.jsx)("span",{className:l(e.score),children:e.score.toFixed(2)})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[e.recognition_metadata&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Recognizer:"}),(0,t.jsx)("span",{children:e.recognition_metadata.recognizer_name})]}),(0,t.jsxs)("div",{className:"flex overflow-hidden",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Identifier:"}),(0,t.jsx)("span",{className:"truncate text-xs font-mono",children:e.recognition_metadata.recognizer_identifier})]})]}),e.analysis_explanation&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Explanation:"}),(0,t.jsx)("span",{children:e.analysis_explanation})]})]})]})})]},s)})})]}):null},i=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,o]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>o(e=>!e),children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${n?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),m=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=e.usage&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)});return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{label:"Blocked Response:",children:(0,t.jsx)("span",{className:"italic",children:e.blockedResponse})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Outputs"}),(0,t.jsx)("div",{className:"space-y-2",children:s.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:e.text??(0,t.jsx)("em",{children:"(non-text output)"})})},s))})]})]}),e.assessments?.length?(0,t.jsx)("div",{className:"space-y-3",children:e.assessments.map((e,s)=>{let a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),children:[e.wordPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Word Policy"}),(e.wordPolicy.customWords?.length??0)>0&&(0,t.jsx)(o,{title:"Custom Words",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.customWords.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{title:"Managed Word Lists",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.managedWordLists.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(e.detected)]},s))})})]}),e.contentPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Content Policy"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Strength"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Confidence"})]})}),(0,t.jsx)("tbody",{children:e.contentPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.filterStrength??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.confidence??"—"})]},s))})]})})]}):null,e.contextualGroundingPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Contextual Grounding"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Score"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Threshold"})]})}),(0,t.jsx)("tbody",{children:e.contextualGroundingPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.score??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.threshold??"—"})]},s))})]})})]}):null,e.sensitiveInformationPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Sensitive Information"}),(e.sensitiveInformationPolicy.piiEntities?.length??0)>0&&(0,t.jsx)(o,{title:"PII Entities",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.piiEntities.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{title:"Custom Regexes",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.regexes.map((e,s)=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-2 bg-gray-50 rounded gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"regex"}),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.regex})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[n(e.detected),e.match&&(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]})]},s))})})]}),e.topicPolicy?.topics?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Topic Policy"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.topicPolicy.topics.map((e,s)=>(0,t.jsx)("div",{className:"px-3 py-1.5 bg-gray-50 rounded-md text-xs",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{title:"Invocation Metrics",defaultOpen:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`images ${e.invocationMetrics.guardrailCoverage.images.guarded??0}/${e.invocationMetrics.guardrailCoverage.images.total??0}`,"blue")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(d,{label:"Usage:",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.invocationMetrics.usage&&Object.entries(e.invocationMetrics.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)})})})]})}),e.automatedReasoningPolicy?.findings?.length?(0,t.jsx)(o,{title:"Automated Reasoning Findings",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.automatedReasoningPolicy.findings.map((e,s)=>(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},x=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>n(e=>!e),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({response:e})=>{if(!e||"string"==typeof e)return"string"==typeof e&&e?(0,t.jsx)("div",{className:"bg-white rounded-lg border border-red-200 p-4",children:(0,t.jsxs)("div",{className:"text-red-800",children:[(0,t.jsx)("h5",{className:"font-medium mb-2",children:"Error"}),(0,t.jsx)("p",{className:"text-sm",children:e})]})}):null;let s=Array.isArray(e)?e:[];if(0===s.length)return(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsx)("div",{className:"text-gray-600 text-sm",children:"No detections found"})});let a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=s.filter(e=>"MASK"===e.action).length,o=s.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&x(`${i} blocked`,"red"),n>0&&x(`${n} masked`,"blue"),0===i&&0===n&&x("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&x(`${a.length} patterns`,"slate"),l.length>0&&x(`${l.length} keywords`,"slate"),r.length>0&&x(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",count:a.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:a.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{title:"Blocked Words Detected",count:l.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:l.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",count:r.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:r.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:x(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M5 8l2 2 4-4",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),y=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M6 6l4 4M10 6l-4 4",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),j=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"animate-spin",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"#D1D5DB",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 2a6 6 0 0 1 6 6",stroke:"#6366F1",strokeWidth:"2",strokeLinecap:"round"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(0,t.jsx)("span",{className:"font-medium text-sm text-gray-900",children:e})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded text-[11px] font-medium bg-gray-100 text-gray-500 border border-gray-200",children:"UNAVAILABLE"}),(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${n?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:e.check_name}),(0,t.jsx)("span",{className:"text-[10px] font-mono text-gray-400",children:e.article})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:e.detail})]})]},s))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),m(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>m(!1))},[e,a]),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Regulatory Compliance"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(b,{title:"EU AI Act",data:l,loading:o,error:x}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(e,t)=>{if(null==e)return!1;if("string"==typeof e)return e===t;if(Array.isArray(e))return e.includes(t);if("object"==typeof e&&"default"in e){let s=e.default;if("string"==typeof s)return s===t;if(Array.isArray(s))return s.some(e=>"string"==typeof e&&e===t)}return!1},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(0,t.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,t.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"#EEF2FF"}),(0,t.jsx)("path",{d:"M20 10l8 4v6c0 5.25-3.4 10.15-8 11.5C15.4 30.15 12 25.25 12 20v-6l8-4z",stroke:"#6366F1",strokeWidth:"1.5",fill:"none"}),(0,t.jsx)("path",{d:"M16 20l3 3 5-6",stroke:"#6366F1",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}),T=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M7 11l3 3 5-6",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),L=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M8 8l6 6M14 8l-6 6",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),M=()=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#3B82F6",strokeWidth:"1.5",fill:"#EFF6FF"}),(0,t.jsx)("path",{d:"M9 7.5l6 3.5-6 3.5V7.5z",fill:"#3B82F6"})]}),A=()=>(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,t.jsx)("circle",{cx:"11",cy:"11",r:"5",fill:"#9CA3AF"})}),E=({expanded:e})=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${e?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),D=()=>(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3M3 12h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),I=({matchDetails:e})=>e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("h5",{className:"text-sm font-medium mb-2 text-gray-700",children:["Match Details (",e.length,")"]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-left text-gray-500",children:[(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Type"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Method"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Action"}),(0,t.jsx)("th",{className:"pb-2 font-medium",children:"Detail"})]})}),(0,t.jsx)("tbody",{children:e.map((e,s)=>(0,t.jsxs)("tr",{className:"border-b border-gray-100",children:[(0,t.jsx)("td",{className:"py-2 pr-4",children:e.type}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-700 rounded text-xs",children:e.detection_method??"-"})}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${"BLOCK"===e.action_taken?"bg-red-100 text-red-800":"bg-blue-50 text-blue-700"}`,children:e.action_taken??"-"})}),(0,t.jsxs)("td",{className:"py-2 font-mono text-xs text-gray-600 break-all",children:[e.category?`[${e.category}] `:"",e.snippet??"-"]})]},s))})]})})]}):null,O=({response:e})=>{let[a,l]=(0,s.useState)(!1);return(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>l(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(E,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},z=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Request Lifecycle"}),(0,t.jsx)("div",{className:"relative",children:l.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-3 relative",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),x=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(e=>{if(null==e)return null;if("string"==typeof e)return e;if(Array.isArray(e)){let t=e[0];return"string"==typeof t?t:null}if("object"==typeof e&&"default"in e){let t=e.default;if("string"==typeof t)return t;if(Array.isArray(t)){let e=t[0];return"string"==typeof e?e:null}}return null})(e.guardrail_mode))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} matched`:null;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm truncate",children:x}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),null!=e.confidence_score&&(0,t.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(E,{expanded:n})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[e.classification&&(0,t.jsxs)("div",{className:"mb-3 bg-gray-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Classification"}),e.classification.category&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Category:"}),(0,t.jsx)("span",{children:e.classification.category})]}),e.classification.article_reference&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reference:"}),(0,t.jsx)("span",{className:"font-mono",children:e.classification.article_reference})]}),null!=e.classification.confidence&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Confidence:"}),(0,t.jsxs)("span",{children:[(100*e.classification.confidence).toFixed(0),"%"]})]}),e.classification.reason&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reason:"}),(0,t.jsx)("span",{children:e.classification.reason})]})]}),e.match_details&&e.match_details.length>0&&(0,t.jsx)(I,{matchDetails:e.match_details}),c>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Masked Entities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.masked_entity_count||{}).map(([e,s])=>(0,t.jsxs)("span",{className:"px-2 py-1 bg-blue-50 text-blue-700 rounded text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(m,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(O,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm w-full max-w-full overflow-hidden mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(C,{}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Guardrails & Policy Compliance"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-500",children:[r.length," guardrail",1!==r.length?"s":""," evaluated"]}),(0,t.jsx)("span",{className:"text-gray-300",children:"|"}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M3 6l2.5 2.5L9 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,i," Passed"]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsx)("div",{className:"text-right",children:(0,t.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:["Total: ",o,"ms overhead"]})}),(0,t.jsxs)("button",{onClick:()=>{let e=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`guardrail-compliance-log-${new Date().toISOString().slice(0,10)}.json`,s.click(),URL.revokeObjectURL(t)},className:"inline-flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(D,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,logEntry:l})}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("div",{className:"w-[340px] flex-shrink-0 border-r border-gray-100 px-6 py-5",children:(0,t.jsx)(z,{entries:r})}),(0,t.jsxs)("div",{className:"flex-1 px-6 py-5 min-w-0",children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Evaluation Details"}),(0,t.jsx)("div",{className:"space-y-3",children:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o})=>{let d=o?.toLowerCase()==="true",c=void 0!==i||void 0!==n,m=e?.input_cost!==void 0||e?.output_cost!==void 0,x=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(m||c||x||e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount||void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount)))return null;let u=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),p=e&&(void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount),h=d?0:e?.input_cost,g=d?0:e?.output_cost,f=d?0:e?.original_cost,y=d?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Cost Breakdown"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mr-4",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Total:"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[l(a),d&&" (Cached)"]})]})]}),children:(0,t.jsxs)("div",{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2 max-w-2xl",children:[(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(h),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.toLocaleString()," prompt tokens)"]})]})]}),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Output Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(g),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.toLocaleString()," completion tokens)"]})]})]}),e?.tool_usage_cost!==void 0&&e.tool_usage_cost>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Tool Usage Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(e.tool_usage_cost)})]}),e?.additional_costs&&Object.entries(e.additional_costs).filter(([,e])=>null!=e&&0!==e).map(([e,s])=>(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-600 font-medium w-1/3",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-900",children:l(s)})]},e))]}),!d&&(0,t.jsx)("div",{className:"pt-2 border-t border-gray-100 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex text-sm font-semibold",children:[(0,t.jsx)("span",{className:"text-gray-900 w-1/3",children:"Original LLM Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(f)})]})}),(u||p)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[u&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.discount_percent&&0!==e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Discount (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]}),void 0!==e.discount_amount&&void 0===e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Discount Amount:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]})]}),p&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.margin_percent&&0!==e.margin_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Margin (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((e.margin_total_amount||0)-(e.margin_fixed_amount||0))]})]}),void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Margin:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l(e.margin_fixed_amount)]})]})]})]}),(0,t.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"font-bold text-sm text-gray-900 w-1/3",children:"Final Calculated Cost:"}),(0,t.jsxs)("span",{className:"text-sm font-bold text-gray-900",children:[l(y),d&&" (Cached)"]})]})})]})}]})})}])},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({show:e,onOpenSettings:s})=>e?(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start",children:[(0,t.jsx)("div",{className:"text-blue-500 mr-3 flex-shrink-0 mt-0.5",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,t.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Request/Response Data Not Available"}),(0,t.jsxs)("p",{className:"text-sm text-blue-700 mt-1",children:["To view request and response details, enable prompt storage in your LiteLLM configuration by adding the following to your ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded",children:"proxy_config.yaml"})," file",s&&(0,t.jsxs)(t.Fragment,{children:[" or"," ",(0,t.jsx)("button",{onClick:s,className:"text-blue-600 hover:text-blue-800 underline font-medium",children:"open the settings"})," ","to configure this directly."]})]}),(0,t.jsx)("pre",{className:"mt-2 bg-white p-3 rounded border border-blue-200 text-xs font-mono overflow-auto",children:`general_settings: store_model_in_db: true - store_prompts_in_spend_logs: true`}),(0,t.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),m=e.i(195116),x=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(70635),M=e.i(70969),A=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,t.jsx)("div",{className:"p-4",children:e.map((e,s)=>{var i,n;return(0,t.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,t.jsx)("span",{className:"font-mono",children:e.query})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,t.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,t.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:a}=(0,A.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,t.jsx)("span",{children:r(e.start_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,t.jsx)("span",{children:r(e.end_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,t.jsx)("span",{children:(i=e.start_time,n=e.end_time,`${((n-i)*1e3).toFixed(2)}ms`)})]})]})]})}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,t.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>{let e;return e=`${s}-${r}`,void l(t=>({...t,[e]:!t[e]}))},children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+1]}),(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,t.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var D=e.i(592968),I=e.i(207066);let{Text:O}=g.Typography;function z({value:e,maxWidth:s=I.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(D.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:I.FONT_FAMILY_MONO,fontSize:I.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:R}=g.Typography;function P({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(R,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let B=e=>!!e&&e instanceof Date,F=e=>"object"==typeof e&&null!==e,q=e=>!!e&&e instanceof Object&&"function"==typeof e;function H(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function $(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:m,outerRef:x,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},H(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!x.current)return;let s=x.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=x.current)?void 0:e.querySelector('[role=button][tabindex="0"]');s&&(s.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,s.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},(0,s.createElement)("span",{className:j,onClick:S,onKeyDown:w,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?y:void 0,ref:f,tabIndex:0===o?0:-1}),(t||""===t)&&(m?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},H(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},H(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(W,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function Y(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function K(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=B(l)?l.toISOString():q(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},H(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function W(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(K,Object.assign({},e)):!F(t)||B(t)||q(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(Y,Object.assign({},e))}let U={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},G=()=>!0,J=e=>{let{data:t,style:a=U,shouldExpandNode:l=G,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&F(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(W,{key:t,field:t,value:n,style:{...U,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(W,{value:t,style:{...U,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>J,"defaultStyles",()=>U],867612);let{Text:Q}=g.Typography;function X({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:I.JSON_MAX_HEIGHT,overflow:"auto",background:I.COLOR_BG_LIGHT,padding:I.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(J,{data:e,style:U,clickToExpandNode:!0})})}):(0,t.jsx)(Q,{type:"secondary",children:"No data"})}function Z(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function ee(e){return Array.isArray(e)?e:e?[e]:[]}function et(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var es=e.i(366308),ea=e.i(755151),el=e.i(291542);let{Text:er}=g.Typography;function ei({tool:e}){let s=Object.entries(e.parameters?.properties||{}).map(([t,s])=>({key:t,name:t,type:s.type||"any",description:s.description||"-",required:e.parameters?.required?.includes(t)||!1})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(er,{code:!0,children:[e,s.required&&(0,t.jsx)(er,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(er,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(er,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(er,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(el.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,t.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,t.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.callData.arguments,null,2)})})]})]})}function en({tool:e}){let s={type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}};return(0,t.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(s,null,2)})}let{Text:eo}=g.Typography;function ed({tool:e}){let[a,l]=(0,s.useState)("formatted");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,t.jsx)(eo,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(ei,{tool:e}):(0,t.jsx)(en,{tool:e})]})}let{Text:ec}=g.Typography;function em({tool:e}){let[a,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(es.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ec,{style:{fontSize:14},children:[e.index,". ",e.name]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(j.Tag,{color:e.called?"blue":"default",children:e.called?"called":"not called"}),a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ed,{tool:e})})]})}let{Text:ex}=g.Typography;function eu({log:e}){let s=function(e){let t,s=!(t=et(e.proxy_server_request||e.messages))||Array.isArray(t)?[]:"object"==typeof t&&t.tools&&Array.isArray(t.tools)?t.tools:[];if(0===s.length)return[];let a=function(e){let t=et(e.response);if(!t||"object"!=typeof t)return[];let s=t.choices;if(Array.isArray(s)&&s.length>0){let e=s[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}if(Array.isArray(t.content)){let e=t.content.filter(e=>"tool_use"===e.type);if(e.length>0)return e.map(e=>({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}}))}if(Array.isArray(t.tool_calls))return t.tool_calls;if(Array.isArray(t.results)){let e=[];for(let s of t.results)if("response.done"===s.type&&s.response?.output)for(let t of s.response.output)"function_call"===t.type&&e.push({id:t.call_id||"",type:"function",function:{name:t.name||"",arguments:t.arguments||"{}"}});if(e.length>0)return e}return[]}(e),l=new Set(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.set(t,{id:e.id,name:t,arguments:function(e){try{return JSON.parse(e)}catch{return{}}}(e.function?.arguments||"{}")})}),s.map((e,t)=>{let s=e.function?.name||e.name||`Tool ${t+1}`;return{index:t+1,name:s,description:e.function?.description||e.description||"",parameters:e.function?.parameters||e.input_schema||{},called:l.has(s),callData:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let ep=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eh=e.i(888259),eg=e.i(264843),ef=e.i(624001);let{Text:ey}=g.Typography;function ej({type:e,tokens:s,cost:l,onCopy:r,isCollapsed:n,onToggleCollapse:o,turnCount:d}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:n?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:o?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{o&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[o&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:n?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ey,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(D.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:eb}=g.Typography;function ev({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(eb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(eb,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(0,t.jsx)("div",{style:{maxHeight:r?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!r},children:(0,t.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:e_}=g.Typography;function eN({tool:e,compact:s=!1}){return(0,t.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:s?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,t.jsx)(e_,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:e.name}),Object.keys(e.arguments).length>0&&(0,t.jsx)("div",{children:Object.entries(e.arguments).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:2},children:[(0,t.jsxs)(e_,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(e_,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:ew}=g.Typography;function eS({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(ew,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(eN,{tool:e,compact:l},e.id||s))})]}):null}let{Text:ek}=g.Typography;function eC({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",e.length," message",1!==e.length?"s":"",")"]})]}),(0,t.jsx)("div",{style:{maxHeight:a?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!a},children:(0,t.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(eS,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eT({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=e.find(e=>"system"===e.role),o=e.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,c=o.slice(0,-1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eh.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(ev,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eC,{messages:c}),d&&(0,t.jsx)(eS,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eL}=g.Typography;function eM({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eh.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eS,{label:"ASSISTANT",content:e.content,toolCalls:e.toolCalls})})})]}):(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eL,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eA=e.i(782273),eE=e.i(313603),eD=e.i(793916);let{Text:eI}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(ez,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eR,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.length&&(0,t.jsx)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"16px",color:"#8c8c8c",fontStyle:"italic",fontSize:13},children:"No recognized realtime events found"})]})}function ez({session:e,turnCount:a}){let[l,r]=(0,s.useState)(!0);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)("div",{onClick:()=>r(!l),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:l?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:l?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(eI,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(eI,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eA.SoundOutlined,{})," ",e.voice]}),e.modalities&&(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.modalities.map(e=>(0,t.jsxs)(j.Tag,{style:{margin:0},children:["audio"===e?(0,t.jsx)(eD.AudioOutlined,{}):(0,t.jsx)(eg.MessageOutlined,{})," ",e]},e))})]})}),(0,t.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!l},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 24px",fontSize:13},children:[(0,t.jsx)(eq,{label:"Model",value:e.model}),(0,t.jsx)(eq,{label:"Voice",value:e.voice}),(0,t.jsx)(eq,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eq,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eq,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eq,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eq,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eq,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:4},children:"Instructions"}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"#595959",background:"#fafafa",padding:"8px 12px",borderRadius:4,border:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:120,overflowY:"auto"},children:e.instructions})]})]})})]})}function eR({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:l?.completion_tokens??n,cost:l?.output_cost,onCopy:()=>{let t=e.flatMap(e=>(e.output||[]).flatMap(e=>(e.content||[]).map(t=>`${e.role}: ${t.transcript||t.text||""}`))).join("\n");navigator.clipboard.writeText(t)},isCollapsed:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eP,{response:e,index:s},e.id||s))})})]})}function eP({response:e,index:s}){let a=e.output||[],l=e.usage;return(0,t.jsxs)("div",{style:{marginBottom:12,paddingBottom:12,borderBottom:"1px solid #f5f5f5"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)(j.Tag,{color:"completed"===e.status?"green":"orange",style:{margin:0},children:e.status||"unknown"}),l&&(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(D.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eB,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eF,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eF,{label:"Output",details:l.output_token_details})]})}function eB({output:e}){let s=e.content||[];return s.some(e=>e.transcript||e.text)?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eD.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})]},s):null})]}):null}function eF({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:[e," Token Breakdown"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:4},children:a.map(([e,s])=>"number"==typeof s?(0,t.jsxs)(j.Tag,{style:{margin:0},children:[e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),": ",s.toLocaleString()]},e):null)})]})}function eq({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function eH({request:e,response:s,metrics:a}){let l,r,i;if(s&&s.results&&Array.isArray(s.results)&&0!==s.results.length&&s.results.some(e=>"session.created"===e.type||"session.updated"===e.type||"response.done"===e.type))return(0,t.jsx)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{let t;l.push({role:e.role||"user",content:"string"==typeof(t=e.content)?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(t),toolCallId:e.tool_call_id})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:ep(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eT,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eM,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:e$}=g.Typography;function eY({logEntry:e,onOpenSettings:s,isLoadingDetails:a=!1,accessToken:l}){var r,i;let n=e.metadata||{},o="failure"===n.status,d=o?n.error_information:null,c=!!(r=e.messages)&&(Array.isArray(r)?r.length>0:"object"==typeof r&&Object.keys(r).length>0),m=!!(i=e.response)&&Object.keys(Z(i)).length>0,x=!c&&!m&&!o&&!a,u=n?.guardrail_information,p=ee(u),h=p.length>0,g=p.reduce((e,t)=>{let s=t?.masked_entity_count;return s?e+Object.values(s).reduce((e,t)=>"number"==typeof t?e+t:e,0):e},0),j=0===p.length?"-":1===p.length?p[0]?.guardrail_name??"-":`${p.length} guardrails`,b=n.vector_store_request_metadata&&Array.isArray(n.vector_store_request_metadata)&&n.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${I.DRAWER_CONTENT_PADDING} ${I.DRAWER_CONTENT_PADDING} 0`},children:[o&&d&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eK,{errorInfo:d}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(z,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(z,{value:e.api_base,maxWidth:I.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),h&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eW,{label:j,maskedCount:g})})]})})}),(0,t.jsx)(eU,{logEntry:e,metadata:n}),(0,t.jsx)(L.CostBreakdownViewer,{costBreakdown:n?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit}),(0,t.jsx)(eu,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(M.ConfigInfoMessage,{show:x,onOpenSettings:s})}),a?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eG,{hasResponse:m,hasError:o,getRawRequest:()=>Z(e.proxy_server_request||e.messages),getFormattedResponse:()=>o&&d?{error:{message:d.error_message||"An error occurred",type:d.error_class||"error",code:d.error_code||"unknown",param:null}}:Z(e.response),logEntry:e}),h&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:u,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),b&&(0,t.jsx)(E,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eQ,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:I.DRAWER_CONTENT_PADDING}})]})}function eK({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(e$,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:I.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eW({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:I.SPACING_MEDIUM,children:[(0,t.jsx)("a",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{cursor:"pointer"},children:e}),s>0&&(0,t.jsxs)(j.Tag,{color:"blue",children:[s," masked"]})]})}function eU({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default";return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(P,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.Descriptions.Item,{label:"Duration",children:[null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):"-"," s"]}),null!=l&&l>0&&(0,t.jsxs)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.Descriptions.Item,{label:"Retries",children:s?.attempted_retries!==void 0&&s?.attempted_retries!==null?s.attempted_retries>0?(0,t.jsxs)(t.Fragment,{children:[s.attempted_retries,void 0!==s.max_retries&&null!==s.max_retries?` / ${s.max_retries}`:""]}):(0,t.jsx)(j.Tag,{color:"green",children:"None"}):"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eG({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(I.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),m=i.spend??0,x=i.prompt_tokens||0,u=i.completion_tokens||0,p=x+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?m*x/p:0,y=g?h.output_cost??0:p>0?m*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(eH,{request:l(),response:r(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(n===I.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===I.TAB_RESPONSE&&!e&&!a}),items:[{key:I.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:(0,t.jsx)(X,{data:l(),mode:"formatted"})})},{key:I.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:e||a?(0,t.jsx)(X,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eJ({guardrailEntries:e}){let s=e.every(e=>{let t=e?.guardrail_status||e?.status;return"pass"===t||"passed"===t||"success"===t});return(0,t.jsx)("div",{style:{textAlign:"left",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:16,cursor:"pointer",fontSize:13,fontWeight:500,backgroundColor:s?"#f0fdf4":"#fef2f2",color:s?"#15803d":"#b91c1c",border:`1px solid ${s?"#bbf7d0":"#fecaca"}`},children:[s?"✓":"✗"," ",e.length," guardrail",1!==e.length?"s":""," evaluated",(0,t.jsx)("span",{style:{fontSize:11,opacity:.7},children:"↓"})]})})}function eQ({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:I.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:I.FONT_SIZE_SMALL,fontFamily:I.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eX=e.i(764205),eZ=e.i(266027),e0=e.i(135214);function e1({row:e,isSelected:s,onClick:a}){let l=x.MCP_CALL_TYPES.includes(e.call_type),r=x.AGENT_CALL_TYPES.includes(e.call_type),i=null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):e.startTime&&e.endTime?((Date.parse(e.endTime)-Date.parse(e.startTime))/1e3).toFixed(3):"-";return(0,t.jsxs)("button",{type:"button",className:`w-full text-left pl-8 pr-2 py-1 transition-colors ${s?"bg-blue-50":"hover:bg-slate-100"}`,onClick:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(m.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(0,t.jsxs)("div",{className:"text-[10px] text-slate-500 mt-0 flex items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{children:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.getSpendString)(e.spend)})]}):null,e.total_tokens?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[e.total_tokens," tok"]})]}):null]})]})}function e2({open:e,onClose:d,logEntry:c,sessionId:m,accessToken:u,onOpenSettings:g,allLogs:f=[],onSelectLog:y,startTime:j}){let b=!!m,[v,_]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),{data:T=[]}=(0,eZ.useQuery)({queryKey:["sessionLogs",m],queryFn:async()=>{if(!m||!u)return[];let e=await (0,eX.sessionSpendLogsCall)(u,m);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!x.MCP_CALL_TYPES.includes(e.call_type),a=+!!x.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&b&&m&&u)}),L=(0,s.useMemo)(()=>b?T.length?v?T.find(e=>e.request_id===v)||T[0]:c?.request_id&&T.find(e=>e.request_id===c.request_id)||T[0]:null:c,[b,c,v,T]);(0,s.useEffect)(()=>{b&&T.length&&(v&&T.some(e=>e.request_id===v)||_(c?.request_id&&T.some(e=>e.request_id===c.request_id)?c.request_id:T[0].request_id))},[b,c,v,T]),(0,s.useEffect)(()=>{e?w(!1):(b&&_(null),k(!1))},[e,b]);let{selectNextLog:M,selectPreviousLog:A}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:L,allLogs:b?T:f,onClose:d,onSelectLog:e=>{b&&_(e.request_id),y?.(e)}}),E=((e,t,s)=>{let{accessToken:a}=(0,e0.default)();return(0,eZ.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eX.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(L?.request_id,j,e&&!!L?.request_id),D=E.data,O=E.isLoading,z=(0,s.useMemo)(()=>L?{...L,messages:D?.messages||L.messages,response:D?.response||L.response,proxy_server_request:D?.proxy_server_request||L.proxy_server_request}:null,[L,D]),R=L?.metadata||{},P="failure"===R.status?"Failure":"Success",B="failure"===R.status?"error":"success",F=R?.user_api_key_team_alias||"default",q=T.reduce((e,t)=>e+(t.spend||0),0),H=T.length>0?new Date(Math.min(...T.map(e=>new Date(e.startTime).getTime()))):null,$=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&$?(($.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,W=T.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length,U=b?T:L?[L]:[],G=b?m||"":L?.request_id||"",J=G.length>14?`${G.slice(0,11)}...`:G,Q=async()=>{if(G)try{await navigator.clipboard.writeText(G),k(!0),setTimeout(()=>k(!1),1200)}catch{}};return L&&z?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:I.DRAWER_WIDTH,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:(0,t.jsxs)("div",{style:{height:"100%"},className:"flex relative",children:[N?(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>w(!1),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Expand trace sidebar"}):(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>w(!0),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Collapse trace sidebar"}),!N&&(0,t.jsxs)("div",{className:"border-r border-slate-200 bg-slate-50 flex flex-col",style:{width:224},children:[(0,t.jsxs)("div",{className:"pl-12 pr-3 py-2 border-b border-slate-200 bg-white",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:b?"Session":"Trace"}),(0,t.jsxs)("div",{className:"font-mono text-[12px] text-slate-900 leading-tight flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:J}),(0,t.jsx)("button",{type:"button",onClick:Q,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:S?(0,t.jsx)(r.CheckOutlined,{className:"text-[11px]"}):(0,t.jsx)(i.CopyOutlined,{className:"text-[11px]"})})]})]})}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500 font-mono",children:[U.length," req",[b?K:U.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?V:U.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?W:U.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),b?(0,C.getSpendString)(q):(0,C.getSpendString)(L.spend||0),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[ee(R?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eJ,{guardrailEntries:ee(R?.guardrail_information)})}),b?(0,t.jsx)("div",{className:"py-1",children:(0,t.jsxs)("div",{className:"relative pl-2",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1 bottom-1 border-l border-slate-300"}),U.map((e,s)=>{let a=s===U.length-1;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute left-4 top-3 w-3 border-t border-slate-300"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>{_(e.request_id),y?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:U.map(e=>(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>y?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:L,onClose:d,onPrevious:A,onNext:M,statusLabel:P,statusColor:B,environment:F}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eY,{logEntry:z,onOpenSettings:g,isLoadingDetails:O,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e2],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(207082),l=e.i(500330),r=e.i(871943),i=e.i(360820),n=e.i(94629),o=e.i(152990),d=e.i(682830),c=e.i(269200),m=e.i(942232),x=e.i(977572),u=e.i(427612),p=e.i(64848),h=e.i(496020),g=e.i(592968);function f({keys:e,totalCount:a,isLoading:f,isFetching:y,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,l.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,l.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,o.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,d.getCoreRowModel)(),getSortedRowModel:(0,d.getSortedRowModel)(),getPaginationRowModel:(0,d.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[f||y?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[f||y?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:f||y||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:f||y||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(u.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(h.TableRow,{children:e.headers.map(e=>(0,t.jsx)(p.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,o.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(r.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(m.TableBody,{children:f||y?(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(h.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(x.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,o.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function y(){let[e,l]=(0,s.useState)(0),[r]=(0,s.useState)(50),{data:i,isPending:n,isFetching:o}=(0,a.useDeletedKeys)(e+1,r);return(0,t.jsx)(f,{keys:i?.keys||[],totalCount:i?.total_count||0,isLoading:n,isFetching:o,pageIndex:e,pageSize:r,onPageChange:l})}e.s(["default",()=>y],93648);var j=e.i(785242),b=e.i(389083),v=e.i(599724),_=e.i(355619);function N({teams:e,isLoading:a,isFetching:f}){let[y,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),N=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,l.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,l.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(b.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(v.Text,{children:e.length>30?`${(0,_.getModelDisplayName)(e).slice(0,30)}...`:(0,_.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(b.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(v.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],w=(0,o.useReactTable)({data:e,columns:N,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:y},onSortingChange:j,getCoreRowModel:(0,d.getCoreRowModel)(),getSortedRowModel:(0,d.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||f?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:w.getCenterTotalSize()},children:[(0,t.jsx)(u.TableHead,{children:w.getHeaderGroups().map(e=>(0,t.jsx)(h.TableRow,{children:e.headers.map(e=>(0,t.jsx)(p.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,o.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(r.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${w.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(m.TableBody,{children:a||f?(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:N.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?w.getRowModel().rows.map(e=>(0,t.jsx)(h.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(x.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,o.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:N.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function w(){let{data:e,isPending:s,isFetching:a}=(0,j.useDeletedTeams)(1,100);return(0,t.jsx)(N,{teams:e||[],isLoading:s,isFetching:a})}e.s(["default",()=>w],245767);var S=e.i(625901),k=e.i(56456),C=e.i(152473),T=e.i(199133),L=e.i(770914);let{Text:M}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[m,x]=(0,C.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,S.useInfiniteModelInfo)(i,m||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(T.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),x(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(k.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(L.Space,{direction:"vertical",children:[(0,t.jsxs)(L.Space,{direction:"horizontal",children:[(0,t.jsx)(M,{strong:!0,children:"Model name:"}),(0,t.jsx)(M,{ellipsis:!0,children:s})]}),(0,t.jsxs)(M,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(M,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(k.LoadingOutlined,{spin:!0})})]})})}],291950)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),m=e.i(482725),x=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.jsx)("pre",{className:"p-3 bg-white text-xs font-mono overflow-auto max-h-96 whitespace-pre-wrap break-all m-0",children:JSON.stringify(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function E({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,E]=(0,s.useState)(""),[D,I]=(0,s.useState)(""),[O,z]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,D,O,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:D||void 0,action:O||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../ui/assets/audit-logs-preview.png",alt:"Audit Logs Preview",style:{maxWidth:"100%",maxHeight:"700px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",margin:"0 auto"},onError:e=>{e.target.style.display="none"}})]});let K=$.data?.audit_logs??[],V=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{E(e),_(1)},onChange:e=>{e.target.value||(E(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{z(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{label:"Keys",value:"LiteLLM_VerificationToken"},{label:"Teams",value:"LiteLLM_TeamTable"},{label:"Users",value:"LiteLLM_UserTable"},{label:"Organizations",value:"LiteLLM_OrganizationTable"},{label:"Models",value:"LiteLLM_ProxyModelTable"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(x.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:V,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(m.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>E],942161)},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.jsx)("path",{d:"M12 3l1.912 5.813a2 2 0 0 0 1.275 1.275L21 12l-5.813 1.912a2 2 0 0 0-1.275 1.275L12 21l-1.912-5.813a2 2 0 0 0-1.275-1.275L3 12l5.813-1.912a2 2 0 0 0 1.275-1.275L12 3z"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),m=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),x=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-violet-50 text-violet-700 border border-violet-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(m,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(x,{});let f=(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(m,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",m="Model",x="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[m]:"",[x]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[E,D]=(0,t.useState)({data:[],total:0,page:1,page_size:50,total_pages:0}),I=(0,t.useRef)(0),O=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[x]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[m]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&s.data&&D(s)}catch(e){console.error("Error searching users:",e)}},[y,j,b,_,v,k,C]),z=(0,t.useMemo)(()=>(0,i.default)((e,t)=>O(e,t),300),[O]);(0,t.useEffect)(()=>()=>z.cancel(),[z]);let R=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[x]||M[u]||M[g]||M[f]||M[m]),[M]);(0,t.useEffect)(()=>{R&&y&&(z.cancel(),O(M,T))},[k,C,T,j,b,_]);let P=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:50,total_pages:0};if(R)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[m]&&(t=t.filter(e=>e.model_id===M[m])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,R]),B=(0,t.useMemo)(()=>R?E&&E.data?E:e||{data:[],total:0,page:1,page_size:50,total_pages:0}:P,[R,E,P,e]),{data:F}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y});return{filters:M,filteredLogs:B,hasBackendFilters:R,allTeams:F,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),z(s,1)),s})},handleFilterReset:()=>{A(L),D({data:[],total:0,page:1,page_size:50,total_pages:0}),z(L,1)}}}e.s(["useLogFilterLogic",()=>y],504809)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(313603),o=e.i(772345),d=e.i(793130),c=e.i(197647),m=e.i(653824),x=e.i(881073),u=e.i(404206),p=e.i(723731),h=e.i(464571),g=e.i(708347),f=e.i(93648),y=e.i(245767),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var C=e.i(504809);e.i(3565);var T=e.i(502626),L=e.i(727749);e.i(867612);var M=e.i(153472),A=e.i(954616),E=e.i(135214);let D=async(e,t)=>{let s=(0,_.getProxyBaseUrl)(),a=s?`${s}/config/update`:"/config/update",l=await fetch(a,{method:"POST",headers:{[(0,_.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await l.json()};var I=e.i(190702),O=e.i(637235),z=e.i(808613),R=e.i(311451),P=e.i(212931),B=e.i(981339),F=e.i(770914),q=e.i(790848),H=e.i(898586);let $=({isVisible:e,onCancel:s,onSuccess:a})=>{let[l]=z.Form.useForm(),{mutateAsync:r,isPending:n}=(()=>{let{accessToken:e}=(0,E.default)();return(0,A.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await D(e,t)}})})(),{mutateAsync:o,isPending:d}=(0,M.useDeleteProxyConfigField)(),{data:c,isLoading:m,refetch:x}=(0,M.useProxyConfig)(M.ConfigType.GENERAL_SETTINGS),u=z.Form.useWatch("store_prompts_in_spend_logs",l);(0,i.useEffect)(()=>{e&&x()},[e,x]);let p=(0,i.useMemo)(()=>{if(!c)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=c.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=c.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[c]),g=async e=>{try{let t=e.maximum_spend_logs_retention_period;if(!t||"string"==typeof t&&""===t.trim())try{await o({config_type:M.ConfigType.GENERAL_SETTINGS,field_name:M.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let s={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...t&&"string"==typeof t&&""!==t.trim()&&{maximum_spend_logs_retention_period:t}};await r(s,{onSuccess:()=>{L.default.success("Spend logs settings updated successfully"),x(),a?.()},onError:e=>{L.default.fromBackend("Failed to save spend logs settings: "+(0,I.parseErrorMessage)(e))}})}catch(e){L.default.fromBackend("Failed to save spend logs settings: "+(0,I.parseErrorMessage)(e))}},f=()=>{l.resetFields(),s()};return(0,t.jsx)(P.Modal,{title:(0,t.jsx)(H.Typography.Title,{level:5,children:"Spend Logs Settings"}),open:e,footer:(0,t.jsxs)(F.Space,{children:[(0,t.jsx)(h.Button,{onClick:f,disabled:n||d||m,children:"Cancel"}),(0,t.jsx)(h.Button,{type:"primary",loading:n||d,disabled:m,onClick:()=>l.submit(),children:n||d?"Saving...":"Save Settings"})]}),onCancel:f,children:(0,t.jsxs)(z.Form,{form:l,layout:"horizontal",onFinish:g,initialValues:p,children:[(0,t.jsx)(z.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:c?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,t.jsx)("div",{children:m?(0,t.jsx)(B.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(q.Switch,{checked:u??!1,onChange:e=>l.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,t.jsx)(z.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:c?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:m?(0,t.jsx)(B.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(R.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(O.ClockCircleOutlined,{})})})]},c?JSON.stringify(p):"loading")})};var Y=e.i(149121);function K({accessToken:e,token:L,userRole:M,userID:A,allTeams:E,premiumUser:D}){let[I,O]=(0,i.useState)(""),[z,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),K=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),[U,G]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(null),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(""),[eb,ev]=(0,i.useState)(M&&g.internalUserRoles.includes(M)),[e_,eN]=(0,i.useState)("request logs"),[ew,eS]=(0,i.useState)(null),[ek,eC]=(0,i.useState)(!1),[eT,eL]=(0,i.useState)(null),[eM,eA]=(0,i.useState)(!1),[eE,eD]=(0,i.useState)("startTime"),[eI,eO]=(0,i.useState)("desc"),[ez,eR]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eP,eB]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eP))},[eP]);let[eF,eq]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{ep&&e&&eu({...(await (0,_.keyInfoV1Call)(e,ep)).info,token:ep,api_key:ep})})()},[ep,e]),(0,i.useEffect)(()=>{function e(e){K.current&&!K.current.contains(e.target)&&B(!1),V.current&&!V.current.contains(e.target)&&R(!1),W.current&&!W.current.contains(e.target)&&et(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{M&&g.internalUserRoles.includes(M)&&ev(!0)},[M]);let eH=(0,a.useQuery)({queryKey:["logs","table",F,H,U,J,ei,eo,eb?A:null,eg,ec,eE,eI],queryFn:async()=>{if(!e||!L||!M||!A)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=X?(0,r.default)(J).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:eo||void 0,team_id:ei||void 0,user_id:eb?A??void 0:void 0,end_user:ey||void 0,status_filter:eg||void 0,model_id:ec||void 0,sort_by:eE,sort_order:eI}})},enabled:!!e&&!!L&&!!M&&!!A&&"request logs"===e_&&ez,refetchInterval:!!eP&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),e$=(0,i.useDeferredValue)(eH.isFetching),eY=eH.isFetching||e$,eK=eH.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eV,filteredLogs:eW,hasBackendFilters:eU,allTeams:eG,handleFilterChange:eJ,handleFilterReset:eQ}=(0,C.useLogFilterLogic)({logs:eK,accessToken:e,startTime:U,endTime:J,pageSize:H,isCustomDate:X,setCurrentPage:q,userID:A,userRole:M,sortBy:eE,sortOrder:eI,currentPage:F}),eX=(0,i.useCallback)(()=>{eQ(),G((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),Z(!1),eq({value:24,unit:"hours"}),q(1)},[eQ]);if((0,i.useEffect)(()=>{eR(!eU)},[eU]),(0,i.useEffect)(()=>{e&&(eV["Team ID"]?en(eV["Team ID"]):en(""),ef(eV.Status||""),em(eV.Model||""),ej(eV["End User"]||""),ed(eV["Key Hash"]||""))},[eV,e]),!e||!L||!M||!A)return null;let eZ=eW.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),e0=eZ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),e1=new Map;for(let e of eZ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=e1.get(e.session_id);s&&(!s.isMcp||t)||e1.set(e.session_id,{requestId:e.request_id,isMcp:t})}let e2=eZ.map(e=>{let t=e.session_id?e0[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eh(e),onSessionClick:t=>{t&&(eL(t),eS(e),eC(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||e1.get(e.session_id)?.requestId===e.request_id)||[],e5=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>E&&0!==E.length?E.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e4=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eF.value&&e.unit===eF.unit),e6=X?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"minutes");if(i>=0&&i<2)return"Last 1 Minute";if(i>=2&&i<16)return"Last 15 Minutes";if(i>=16&&i<61)return"Last Hour";let n=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(X,U,J):e4?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(m.TabGroup,{defaultIndex:0,onIndexChange:e=>eN(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(c.Tab,{children:"Request Logs"}),(0,t.jsx)(c.Tab,{children:"Audit Logs"}),(0,t.jsx)(c.Tab,{children:"Deleted Keys"}),(0,t.jsx)(c.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsxs)(u.TabPanel,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"}),(0,t.jsx)(h.Button,{icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>eA(!0),title:"Spend Logs Settings"})]}),ex&&ep&&ex.api_key===ep?(0,t.jsx)(N.default,{keyId:ep,keyData:ex,teams:E,onClose:()=>eh(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e5,onApplyFilters:eJ,onResetFilters:eX}),(0,t.jsx)($,{isVisible:eM,onCancel:()=>eA(!1),onSuccess:()=>eA(!1)}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>O(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:W,children:[(0,t.jsxs)("button",{onClick:()=>et(!ee),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e6]}),ee&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e6===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),G((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eq({value:e.value,unit:e.unit}),Z(!1),et(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${X?"bg-blue-50 text-blue-600":""}`,onClick:()=>Z(!X),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(d.Switch,{color:"green",checked:eP,defaultChecked:!0,onChange:eB})]}),{}),(0,t.jsx)(h.Button,{type:"default",icon:(0,t.jsx)(o.SyncOutlined,{spin:eY}),onClick:()=>{eH.refetch()},disabled:eY,title:"Fetch data",children:eY?"Fetching":"Fetch"})]}),X&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:J,onChange:e=>{Q(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eH.isLoading?"...":eW?(F-1)*H+1:0," -"," ",eH.isLoading?"...":eW?Math.min(F*H,eW.total):0," ","of ",eH.isLoading?"...":eW?eW.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eH.isLoading?"...":F," of"," ",eH.isLoading?"...":eW?eW.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eH.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(eW.total_pages||1,e+1)),disabled:eH.isLoading||F===(eW.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eP&&1===F&&ez&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eB(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(Y.DataTable,{columns:(0,S.createColumns)({sortBy:eE,sortOrder:eI,onSortChange:(e,t)=>{eD(e),eO(t),q(1)}}),data:e2,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eL(e.session_id),eS(e),eC(!0);return}eL(null),eS(e),eC(!0)},isLoading:eH.isLoading})]})]})]}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(w.default,{userID:A,userRole:M,token:L,accessToken:e,isActive:"audit logs"===e_,premiumUser:D})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(f.default,{})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(y.default,{})})]})]}),(0,t.jsx)(T.LogDetailsDrawer,{open:ek,onClose:()=>{eC(!1),eL(null)},logEntry:ew,sessionId:eT,accessToken:e,onOpenSettings:()=>eA(!0),allLogs:e2,onSelectLog:e=>{eS(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>K],936190)}]); \ No newline at end of file + store_prompts_in_spend_logs: true`}),(0,t.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null])},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),m=e.i(195116),x=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(70635),M=e.i(70969),A=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,t.jsx)("div",{className:"p-4",children:e.map((e,s)=>{var i,n;return(0,t.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,t.jsx)("span",{className:"font-mono",children:e.query})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,t.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,t.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:a}=(0,A.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,t.jsx)("span",{children:r(e.start_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,t.jsx)("span",{children:r(e.end_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,t.jsx)("span",{children:(i=e.start_time,n=e.end_time,`${((n-i)*1e3).toFixed(2)}ms`)})]})]})]})}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,t.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>{let e;return e=`${s}-${r}`,void l(t=>({...t,[e]:!t[e]}))},children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+1]}),(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,t.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var D=e.i(592968),I=e.i(207066);let{Text:O}=g.Typography;function z({value:e,maxWidth:s=I.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(D.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:I.FONT_FAMILY_MONO,fontSize:I.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:R}=g.Typography;function P({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(R,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let B=e=>!!e&&e instanceof Date,F=e=>"object"==typeof e&&null!==e,q=e=>!!e&&e instanceof Object&&"function"==typeof e;function H(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function $(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:m,outerRef:x,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},H(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!x.current)return;let s=x.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=x.current)?void 0:e.querySelector('[role=button][tabindex="0"]');s&&(s.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,s.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},(0,s.createElement)("span",{className:j,onClick:S,onKeyDown:w,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?y:void 0,ref:f,tabIndex:0===o?0:-1}),(t||""===t)&&(m?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},H(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},H(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(W,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function Y(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function K(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=B(l)?l.toISOString():q(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},H(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function W(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(K,Object.assign({},e)):!F(t)||B(t)||q(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(Y,Object.assign({},e))}let U={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},G=()=>!0,J=e=>{let{data:t,style:a=U,shouldExpandNode:l=G,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&F(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(W,{key:t,field:t,value:n,style:{...U,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(W,{value:t,style:{...U,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>J,"defaultStyles",()=>U],867612);let{Text:Q}=g.Typography;function X({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:I.JSON_MAX_HEIGHT,overflow:"auto",background:I.COLOR_BG_LIGHT,padding:I.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(J,{data:e,style:U,clickToExpandNode:!0})})}):(0,t.jsx)(Q,{type:"secondary",children:"No data"})}function Z(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function ee(e){return Array.isArray(e)?e:e?[e]:[]}function et(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var es=e.i(366308),ea=e.i(755151),el=e.i(291542);let{Text:er}=g.Typography;function ei({tool:e}){let s=Object.entries(e.parameters?.properties||{}).map(([t,s])=>({key:t,name:t,type:s.type||"any",description:s.description||"-",required:e.parameters?.required?.includes(t)||!1})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(er,{code:!0,children:[e,s.required&&(0,t.jsx)(er,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(er,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(er,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(er,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(el.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,t.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,t.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.callData.arguments,null,2)})})]})]})}function en({tool:e}){let s={type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}};return(0,t.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(s,null,2)})}let{Text:eo}=g.Typography;function ed({tool:e}){let[a,l]=(0,s.useState)("formatted");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,t.jsx)(eo,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(ei,{tool:e}):(0,t.jsx)(en,{tool:e})]})}let{Text:ec}=g.Typography;function em({tool:e}){let[a,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(es.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ec,{style:{fontSize:14},children:[e.index,". ",e.name]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(j.Tag,{color:e.called?"blue":"default",children:e.called?"called":"not called"}),a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ed,{tool:e})})]})}let{Text:ex}=g.Typography;function eu({log:e}){let s=function(e){let t,s=!(t=et(e.proxy_server_request||e.messages))||Array.isArray(t)?[]:"object"==typeof t&&t.tools&&Array.isArray(t.tools)?t.tools:[];if(0===s.length)return[];let a=function(e){let t=et(e.response);if(!t||"object"!=typeof t)return[];let s=t.choices;if(Array.isArray(s)&&s.length>0){let e=s[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}if(Array.isArray(t.content)){let e=t.content.filter(e=>"tool_use"===e.type);if(e.length>0)return e.map(e=>({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}}))}if(Array.isArray(t.tool_calls))return t.tool_calls;if(Array.isArray(t.results)){let e=[];for(let s of t.results)if("response.done"===s.type&&s.response?.output)for(let t of s.response.output)"function_call"===t.type&&e.push({id:t.call_id||"",type:"function",function:{name:t.name||"",arguments:t.arguments||"{}"}});if(e.length>0)return e}return[]}(e),l=new Set(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.set(t,{id:e.id,name:t,arguments:function(e){try{return JSON.parse(e)}catch{return{}}}(e.function?.arguments||"{}")})}),s.map((e,t)=>{let s=e.function?.name||e.name||`Tool ${t+1}`;return{index:t+1,name:s,description:e.function?.description||e.description||"",parameters:e.function?.parameters||e.input_schema||{},called:l.has(s),callData:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let ep=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eh=e.i(888259),eg=e.i(264843),ef=e.i(624001);let{Text:ey}=g.Typography;function ej({type:e,tokens:s,cost:l,onCopy:r,isCollapsed:n,onToggleCollapse:o,turnCount:d}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:n?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:o?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{o&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[o&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:n?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ey,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(D.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:eb}=g.Typography;function ev({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(eb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(eb,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(0,t.jsx)("div",{style:{maxHeight:r?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!r},children:(0,t.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:e_}=g.Typography;function eN({tool:e,compact:s=!1}){return(0,t.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:s?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,t.jsx)(e_,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:e.name}),Object.keys(e.arguments).length>0&&(0,t.jsx)("div",{children:Object.entries(e.arguments).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:2},children:[(0,t.jsxs)(e_,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(e_,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:ew}=g.Typography;function eS({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(ew,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(eN,{tool:e,compact:l},e.id||s))})]}):null}let{Text:ek}=g.Typography;function eC({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",e.length," message",1!==e.length?"s":"",")"]})]}),(0,t.jsx)("div",{style:{maxHeight:a?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!a},children:(0,t.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(eS,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eT({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=e.find(e=>"system"===e.role),o=e.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,c=o.slice(0,-1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eh.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(ev,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eC,{messages:c}),d&&(0,t.jsx)(eS,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eL}=g.Typography;function eM({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eh.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eS,{label:"ASSISTANT",content:e.content,toolCalls:e.toolCalls})})})]}):(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eL,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eA=e.i(782273),eE=e.i(313603),eD=e.i(793916);let{Text:eI}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(ez,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eR,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.length&&(0,t.jsx)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"16px",color:"#8c8c8c",fontStyle:"italic",fontSize:13},children:"No recognized realtime events found"})]})}function ez({session:e,turnCount:a}){let[l,r]=(0,s.useState)(!0);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)("div",{onClick:()=>r(!l),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:l?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:l?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(eI,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(eI,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eA.SoundOutlined,{})," ",e.voice]}),e.modalities&&(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.modalities.map(e=>(0,t.jsxs)(j.Tag,{style:{margin:0},children:["audio"===e?(0,t.jsx)(eD.AudioOutlined,{}):(0,t.jsx)(eg.MessageOutlined,{})," ",e]},e))})]})}),(0,t.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!l},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 24px",fontSize:13},children:[(0,t.jsx)(eq,{label:"Model",value:e.model}),(0,t.jsx)(eq,{label:"Voice",value:e.voice}),(0,t.jsx)(eq,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eq,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eq,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eq,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eq,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eq,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:4},children:"Instructions"}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"#595959",background:"#fafafa",padding:"8px 12px",borderRadius:4,border:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:120,overflowY:"auto"},children:e.instructions})]})]})})]})}function eR({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:l?.completion_tokens??n,cost:l?.output_cost,onCopy:()=>{let t=e.flatMap(e=>(e.output||[]).flatMap(e=>(e.content||[]).map(t=>`${e.role}: ${t.transcript||t.text||""}`))).join("\n");navigator.clipboard.writeText(t)},isCollapsed:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eP,{response:e,index:s},e.id||s))})})]})}function eP({response:e,index:s}){let a=e.output||[],l=e.usage;return(0,t.jsxs)("div",{style:{marginBottom:12,paddingBottom:12,borderBottom:"1px solid #f5f5f5"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)(j.Tag,{color:"completed"===e.status?"green":"orange",style:{margin:0},children:e.status||"unknown"}),l&&(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(D.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eB,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eF,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eF,{label:"Output",details:l.output_token_details})]})}function eB({output:e}){let s=e.content||[];return s.some(e=>e.transcript||e.text)?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eD.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})]},s):null})]}):null}function eF({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:[e," Token Breakdown"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:4},children:a.map(([e,s])=>"number"==typeof s?(0,t.jsxs)(j.Tag,{style:{margin:0},children:[e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),": ",s.toLocaleString()]},e):null)})]})}function eq({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function eH({request:e,response:s,metrics:a}){let l,r,i;if(s&&s.results&&Array.isArray(s.results)&&0!==s.results.length&&s.results.some(e=>"session.created"===e.type||"session.updated"===e.type||"response.done"===e.type))return(0,t.jsx)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{let t;l.push({role:e.role||"user",content:"string"==typeof(t=e.content)?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(t),toolCallId:e.tool_call_id})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:ep(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eT,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eM,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:e$}=g.Typography;function eY({logEntry:e,onOpenSettings:s,isLoadingDetails:a=!1,accessToken:l}){var r,i;let n=e.metadata||{},o="failure"===n.status,d=o?n.error_information:null,c=!!(r=e.messages)&&(Array.isArray(r)?r.length>0:"object"==typeof r&&Object.keys(r).length>0),m=!!(i=e.response)&&Object.keys(Z(i)).length>0,x=!c&&!m&&!o&&!a,u=n?.guardrail_information,p=ee(u),h=p.length>0,g=p.reduce((e,t)=>{let s=t?.masked_entity_count;return s?e+Object.values(s).reduce((e,t)=>"number"==typeof t?e+t:e,0):e},0),j=0===p.length?"-":1===p.length?p[0]?.guardrail_name??"-":`${p.length} guardrails`,b=n.vector_store_request_metadata&&Array.isArray(n.vector_store_request_metadata)&&n.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${I.DRAWER_CONTENT_PADDING} ${I.DRAWER_CONTENT_PADDING} 0`},children:[o&&d&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eK,{errorInfo:d}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(z,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(z,{value:e.api_base,maxWidth:I.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),h&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eW,{label:j,maskedCount:g})})]})})}),(0,t.jsx)(eU,{logEntry:e,metadata:n}),(0,t.jsx)(L.CostBreakdownViewer,{costBreakdown:n?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit}),(0,t.jsx)(eu,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(M.ConfigInfoMessage,{show:x,onOpenSettings:s})}),a?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eG,{hasResponse:m,hasError:o,getRawRequest:()=>Z(e.proxy_server_request||e.messages),getFormattedResponse:()=>o&&d?{error:{message:d.error_message||"An error occurred",type:d.error_class||"error",code:d.error_code||"unknown",param:null}}:Z(e.response),logEntry:e}),h&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:u,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),b&&(0,t.jsx)(E,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eQ,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:I.DRAWER_CONTENT_PADDING}})]})}function eK({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(e$,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:I.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eW({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:I.SPACING_MEDIUM,children:[(0,t.jsx)("a",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{cursor:"pointer"},children:e}),s>0&&(0,t.jsxs)(j.Tag,{color:"blue",children:[s," masked"]})]})}function eU({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default";return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(P,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.Descriptions.Item,{label:"Duration",children:[null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):"-"," s"]}),null!=l&&l>0&&(0,t.jsxs)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.Descriptions.Item,{label:"Retries",children:s?.attempted_retries!==void 0&&s?.attempted_retries!==null?s.attempted_retries>0?(0,t.jsxs)(t.Fragment,{children:[s.attempted_retries,void 0!==s.max_retries&&null!==s.max_retries?` / ${s.max_retries}`:""]}):(0,t.jsx)(j.Tag,{color:"green",children:"None"}):"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eG({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(I.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),m=i.spend??0,x=i.prompt_tokens||0,u=i.completion_tokens||0,p=x+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?m*x/p:0,y=g?h.output_cost??0:p>0?m*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(eH,{request:l(),response:r(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(n===I.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===I.TAB_RESPONSE&&!e&&!a}),items:[{key:I.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:(0,t.jsx)(X,{data:l(),mode:"formatted"})})},{key:I.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:e||a?(0,t.jsx)(X,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eJ({guardrailEntries:e}){let s=e.every(e=>{let t=e?.guardrail_status||e?.status;return"pass"===t||"passed"===t||"success"===t});return(0,t.jsx)("div",{style:{textAlign:"left",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:16,cursor:"pointer",fontSize:13,fontWeight:500,backgroundColor:s?"#f0fdf4":"#fef2f2",color:s?"#15803d":"#b91c1c",border:`1px solid ${s?"#bbf7d0":"#fecaca"}`},children:[s?"✓":"✗"," ",e.length," guardrail",1!==e.length?"s":""," evaluated",(0,t.jsx)("span",{style:{fontSize:11,opacity:.7},children:"↓"})]})})}function eQ({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:I.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:I.FONT_SIZE_SMALL,fontFamily:I.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eX=e.i(764205),eZ=e.i(266027),e0=e.i(135214);function e1({row:e,isSelected:s,onClick:a}){let l=x.MCP_CALL_TYPES.includes(e.call_type),r=x.AGENT_CALL_TYPES.includes(e.call_type),i=null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):e.startTime&&e.endTime?((Date.parse(e.endTime)-Date.parse(e.startTime))/1e3).toFixed(3):"-";return(0,t.jsxs)("button",{type:"button",className:`w-full text-left pl-8 pr-2 py-1 transition-colors ${s?"bg-blue-50":"hover:bg-slate-100"}`,onClick:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(m.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(0,t.jsxs)("div",{className:"text-[10px] text-slate-500 mt-0 flex items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{children:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.getSpendString)(e.spend)})]}):null,e.total_tokens?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[e.total_tokens," tok"]})]}):null]})]})}function e2({open:e,onClose:d,logEntry:c,sessionId:m,accessToken:u,onOpenSettings:g,allLogs:f=[],onSelectLog:y,startTime:j}){let b=!!m,[v,_]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),{data:T=[]}=(0,eZ.useQuery)({queryKey:["sessionLogs",m],queryFn:async()=>{if(!m||!u)return[];let e=await (0,eX.sessionSpendLogsCall)(u,m);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!x.MCP_CALL_TYPES.includes(e.call_type),a=+!!x.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&b&&m&&u)}),L=(0,s.useMemo)(()=>b?T.length?v?T.find(e=>e.request_id===v)||T[0]:c?.request_id&&T.find(e=>e.request_id===c.request_id)||T[0]:null:c,[b,c,v,T]);(0,s.useEffect)(()=>{b&&T.length&&(v&&T.some(e=>e.request_id===v)||_(c?.request_id&&T.some(e=>e.request_id===c.request_id)?c.request_id:T[0].request_id))},[b,c,v,T]),(0,s.useEffect)(()=>{e?w(!1):(b&&_(null),k(!1))},[e,b]);let{selectNextLog:M,selectPreviousLog:A}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:L,allLogs:b?T:f,onClose:d,onSelectLog:e=>{b&&_(e.request_id),y?.(e)}}),E=((e,t,s)=>{let{accessToken:a}=(0,e0.default)();return(0,eZ.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eX.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(L?.request_id,j,e&&!!L?.request_id),D=E.data,O=E.isLoading,z=(0,s.useMemo)(()=>L?{...L,messages:D?.messages||L.messages,response:D?.response||L.response,proxy_server_request:D?.proxy_server_request||L.proxy_server_request}:null,[L,D]),R=L?.metadata||{},P="failure"===R.status?"Failure":"Success",B="failure"===R.status?"error":"success",F=R?.user_api_key_team_alias||"default",q=T.reduce((e,t)=>e+(t.spend||0),0),H=T.length>0?new Date(Math.min(...T.map(e=>new Date(e.startTime).getTime()))):null,$=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&$?(($.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,W=T.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length,U=b?T:L?[L]:[],G=b?m||"":L?.request_id||"",J=G.length>14?`${G.slice(0,11)}...`:G,Q=async()=>{if(G)try{await navigator.clipboard.writeText(G),k(!0),setTimeout(()=>k(!1),1200)}catch{}};return L&&z?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:I.DRAWER_WIDTH,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:(0,t.jsxs)("div",{style:{height:"100%"},className:"flex relative",children:[N?(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>w(!1),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Expand trace sidebar"}):(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>w(!0),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Collapse trace sidebar"}),!N&&(0,t.jsxs)("div",{className:"border-r border-slate-200 bg-slate-50 flex flex-col",style:{width:224},children:[(0,t.jsxs)("div",{className:"pl-12 pr-3 py-2 border-b border-slate-200 bg-white",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:b?"Session":"Trace"}),(0,t.jsxs)("div",{className:"font-mono text-[12px] text-slate-900 leading-tight flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:J}),(0,t.jsx)("button",{type:"button",onClick:Q,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:S?(0,t.jsx)(r.CheckOutlined,{className:"text-[11px]"}):(0,t.jsx)(i.CopyOutlined,{className:"text-[11px]"})})]})]})}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500 font-mono",children:[U.length," req",[b?K:U.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?V:U.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?W:U.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),b?(0,C.getSpendString)(q):(0,C.getSpendString)(L.spend||0),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[ee(R?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eJ,{guardrailEntries:ee(R?.guardrail_information)})}),b?(0,t.jsx)("div",{className:"py-1",children:(0,t.jsxs)("div",{className:"relative pl-2",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1 bottom-1 border-l border-slate-300"}),U.map((e,s)=>{let a=s===U.length-1;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute left-4 top-3 w-3 border-t border-slate-300"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>{_(e.request_id),y?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:U.map(e=>(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>y?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:L,onClose:d,onPrevious:A,onNext:M,statusLabel:P,statusColor:B,environment:F}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eY,{logEntry:z,onOpenSettings:g,isLoadingDetails:O,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e2],502626),e.s([],3565)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},93648,245767,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(207082),l=e.i(500330),r=e.i(871943),i=e.i(360820),n=e.i(94629),o=e.i(152990),d=e.i(682830),c=e.i(269200),m=e.i(942232),x=e.i(977572),u=e.i(427612),p=e.i(64848),h=e.i(496020),g=e.i(592968);function f({keys:e,totalCount:a,isLoading:f,isFetching:y,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,l.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,l.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,o.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,d.getCoreRowModel)(),getSortedRowModel:(0,d.getSortedRowModel)(),getPaginationRowModel:(0,d.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[f||y?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[f||y?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:f||y||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:f||y||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(u.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(h.TableRow,{children:e.headers.map(e=>(0,t.jsx)(p.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,o.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(r.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(m.TableBody,{children:f||y?(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(h.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(x.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,o.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function y(){let[e,l]=(0,s.useState)(0),[r]=(0,s.useState)(50),{data:i,isPending:n,isFetching:o}=(0,a.useDeletedKeys)(e+1,r);return(0,t.jsx)(f,{keys:i?.keys||[],totalCount:i?.total_count||0,isLoading:n,isFetching:o,pageIndex:e,pageSize:r,onPageChange:l})}e.s(["default",()=>y],93648);var j=e.i(785242),b=e.i(389083),v=e.i(599724),_=e.i(355619);function N({teams:e,isLoading:a,isFetching:f}){let[y,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),N=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,l.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,l.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(b.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(v.Text,{children:e.length>30?`${(0,_.getModelDisplayName)(e).slice(0,30)}...`:(0,_.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(b.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(v.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],w=(0,o.useReactTable)({data:e,columns:N,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:y},onSortingChange:j,getCoreRowModel:(0,d.getCoreRowModel)(),getSortedRowModel:(0,d.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||f?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:w.getCenterTotalSize()},children:[(0,t.jsx)(u.TableHead,{children:w.getHeaderGroups().map(e=>(0,t.jsx)(h.TableRow,{children:e.headers.map(e=>(0,t.jsx)(p.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,o.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(r.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${w.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(m.TableBody,{children:a||f?(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:N.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?w.getRowModel().rows.map(e=>(0,t.jsx)(h.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(x.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,o.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:N.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function w(){let{data:e,isPending:s,isFetching:a}=(0,j.useDeletedTeams)(1,100);return(0,t.jsx)(N,{teams:e||[],isLoading:s,isFetching:a})}e.s(["default",()=>w],245767);var S=e.i(625901),k=e.i(56456),C=e.i(152473),T=e.i(199133),L=e.i(770914);let{Text:M}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[m,x]=(0,C.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,S.useInfiniteModelInfo)(i,m||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(T.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),x(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(k.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(L.Space,{direction:"vertical",children:[(0,t.jsxs)(L.Space,{direction:"horizontal",children:[(0,t.jsx)(M,{strong:!0,children:"Model name:"}),(0,t.jsx)(M,{ellipsis:!0,children:s})]}),(0,t.jsxs)(M,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(M,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(k.LoadingOutlined,{spin:!0})})]})})}],291950)},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),m=e.i(482725),x=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.jsx)("pre",{className:"p-3 bg-white text-xs font-mono overflow-auto max-h-96 whitespace-pre-wrap break-all m-0",children:JSON.stringify(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function E({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,E]=(0,s.useState)(""),[D,I]=(0,s.useState)(""),[O,z]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,D,O,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:D||void 0,action:O||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../ui/assets/audit-logs-preview.png",alt:"Audit Logs Preview",style:{maxWidth:"100%",maxHeight:"700px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",margin:"0 auto"},onError:e=>{e.target.style.display="none"}})]});let K=$.data?.audit_logs??[],V=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{E(e),_(1)},onChange:e=>{e.target.value||(E(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{z(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{label:"Keys",value:"LiteLLM_VerificationToken"},{label:"Teams",value:"LiteLLM_TeamTable"},{label:"Users",value:"LiteLLM_UserTable"},{label:"Organizations",value:"LiteLLM_OrganizationTable"},{label:"Models",value:"LiteLLM_ProxyModelTable"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(x.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:V,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(m.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>E],942161)},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.jsx)("path",{d:"M12 3l1.912 5.813a2 2 0 0 0 1.275 1.275L21 12l-5.813 1.912a2 2 0 0 0-1.275 1.275L12 21l-1.912-5.813a2 2 0 0 0-1.275-1.275L3 12l5.813-1.912a2 2 0 0 0 1.275-1.275L12 3z"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),m=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),x=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-violet-50 text-violet-700 border border-violet-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(m,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(x,{});let f=(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(m,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",m="Model",x="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[m]:"",[x]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[E,D]=(0,t.useState)(null),I=(0,t.useRef)(0),O=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[x]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[m]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&D({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),D({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),z=(0,t.useMemo)(()=>(0,i.default)((e,t)=>O(e,t),300),[O]);(0,t.useEffect)(()=>()=>z.cancel(),[z]);let R=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[x]||M[u]||M[g]||M[f]||M[m]),[M]);(0,t.useEffect)(()=>{R&&y&&(z.cancel(),O(M,T))},[k,C,T,j,b,_]);let P=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(R)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[m]&&(t=t.filter(e=>e.model_id===M[m])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,R]),B=(0,t.useMemo)(()=>R?null!==E?E:{data:[],total:0,page:1,page_size:v,total_pages:0}:P,[R,E,P]),{data:F}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y});return{filters:M,filteredLogs:B,hasBackendFilters:R,allTeams:F,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),D(null),z(s,1)),s})},handleFilterReset:()=>{A(L),D(null),z.cancel(),N(1)}}}e.s(["useLogFilterLogic",()=>y],504809)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(313603),o=e.i(772345),d=e.i(793130),c=e.i(197647),m=e.i(653824),x=e.i(881073),u=e.i(404206),p=e.i(723731),h=e.i(464571),g=e.i(708347),f=e.i(93648),y=e.i(245767),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var C=e.i(504809);e.i(3565);var T=e.i(502626),L=e.i(727749);e.i(867612);var M=e.i(153472),A=e.i(954616),E=e.i(135214);let D=async(e,t)=>{let s=(0,_.getProxyBaseUrl)(),a=s?`${s}/config/update`:"/config/update",l=await fetch(a,{method:"POST",headers:{[(0,_.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await l.json()};var I=e.i(190702),O=e.i(637235),z=e.i(808613),R=e.i(311451),P=e.i(212931),B=e.i(981339),F=e.i(770914),q=e.i(790848),H=e.i(898586);let $=({isVisible:e,onCancel:s,onSuccess:a})=>{let[l]=z.Form.useForm(),{mutateAsync:r,isPending:n}=(()=>{let{accessToken:e}=(0,E.default)();return(0,A.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await D(e,t)}})})(),{mutateAsync:o,isPending:d}=(0,M.useDeleteProxyConfigField)(),{data:c,isLoading:m,refetch:x}=(0,M.useProxyConfig)(M.ConfigType.GENERAL_SETTINGS),u=z.Form.useWatch("store_prompts_in_spend_logs",l);(0,i.useEffect)(()=>{e&&x()},[e,x]);let p=(0,i.useMemo)(()=>{if(!c)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=c.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=c.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[c]),g=async e=>{try{let t=e.maximum_spend_logs_retention_period;if(!t||"string"==typeof t&&""===t.trim())try{await o({config_type:M.ConfigType.GENERAL_SETTINGS,field_name:M.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let s={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...t&&"string"==typeof t&&""!==t.trim()&&{maximum_spend_logs_retention_period:t}};await r(s,{onSuccess:()=>{L.default.success("Spend logs settings updated successfully"),x(),a?.()},onError:e=>{L.default.fromBackend("Failed to save spend logs settings: "+(0,I.parseErrorMessage)(e))}})}catch(e){L.default.fromBackend("Failed to save spend logs settings: "+(0,I.parseErrorMessage)(e))}},f=()=>{l.resetFields(),s()};return(0,t.jsx)(P.Modal,{title:(0,t.jsx)(H.Typography.Title,{level:5,children:"Spend Logs Settings"}),open:e,footer:(0,t.jsxs)(F.Space,{children:[(0,t.jsx)(h.Button,{onClick:f,disabled:n||d||m,children:"Cancel"}),(0,t.jsx)(h.Button,{type:"primary",loading:n||d,disabled:m,onClick:()=>l.submit(),children:n||d?"Saving...":"Save Settings"})]}),onCancel:f,children:(0,t.jsxs)(z.Form,{form:l,layout:"horizontal",onFinish:g,initialValues:p,children:[(0,t.jsx)(z.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:c?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,t.jsx)("div",{children:m?(0,t.jsx)(B.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(q.Switch,{checked:u??!1,onChange:e=>l.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,t.jsx)(z.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:c?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:m?(0,t.jsx)(B.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(R.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(O.ClockCircleOutlined,{})})})]},c?JSON.stringify(p):"loading")})};var Y=e.i(149121);function K({accessToken:e,token:L,userRole:M,userID:A,allTeams:E,premiumUser:D}){let[I,O]=(0,i.useState)(""),[z,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),K=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),[U,G]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(null),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(""),[eb,ev]=(0,i.useState)(M&&g.internalUserRoles.includes(M)),[e_,eN]=(0,i.useState)("request logs"),[ew,eS]=(0,i.useState)(null),[ek,eC]=(0,i.useState)(!1),[eT,eL]=(0,i.useState)(null),[eM,eA]=(0,i.useState)(!1),[eE,eD]=(0,i.useState)("startTime"),[eI,eO]=(0,i.useState)("desc"),[ez,eR]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eP,eB]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eP))},[eP]);let[eF,eq]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{ep&&e&&eu({...(await (0,_.keyInfoV1Call)(e,ep)).info,token:ep,api_key:ep})})()},[ep,e]),(0,i.useEffect)(()=>{function e(e){K.current&&!K.current.contains(e.target)&&B(!1),V.current&&!V.current.contains(e.target)&&R(!1),W.current&&!W.current.contains(e.target)&&et(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{M&&g.internalUserRoles.includes(M)&&ev(!0)},[M]);let eH=(0,a.useQuery)({queryKey:["logs","table",F,H,U,J,ei,eo,eb?A:null,eg,ec,eE,eI],queryFn:async()=>{if(!e||!L||!M||!A)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=X?(0,r.default)(J).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:eo||void 0,team_id:ei||void 0,user_id:eb?A??void 0:void 0,end_user:ey||void 0,status_filter:eg||void 0,model_id:ec||void 0,sort_by:eE,sort_order:eI}})},enabled:!!e&&!!L&&!!M&&!!A&&"request logs"===e_&&ez,refetchInterval:!!eP&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),e$=(0,i.useDeferredValue)(eH.isFetching),eY=eH.isFetching||e$,eK=eH.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eV,filteredLogs:eW,hasBackendFilters:eU,allTeams:eG,handleFilterChange:eJ,handleFilterReset:eQ}=(0,C.useLogFilterLogic)({logs:eK,accessToken:e,startTime:U,endTime:J,pageSize:H,isCustomDate:X,setCurrentPage:q,userID:A,userRole:M,sortBy:eE,sortOrder:eI,currentPage:F}),eX=(0,i.useCallback)(()=>{eQ(),G((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),Z(!1),eq({value:24,unit:"hours"}),q(1)},[eQ]);if((0,i.useEffect)(()=>{eR(!eU)},[eU]),(0,i.useEffect)(()=>{e&&(eV["Team ID"]?en(eV["Team ID"]):en(""),ef(eV.Status||""),em(eV.Model||""),ej(eV["End User"]||""),ed(eV["Key Hash"]||""))},[eV,e]),!e||!L||!M||!A)return null;let eZ=eW.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),e0=eZ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),e1=new Map;for(let e of eZ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=e1.get(e.session_id);s&&(!s.isMcp||t)||e1.set(e.session_id,{requestId:e.request_id,isMcp:t})}let e2=eZ.map(e=>{let t=e.session_id?e0[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eh(e),onSessionClick:t=>{t&&(eL(t),eS(e),eC(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||e1.get(e.session_id)?.requestId===e.request_id)||[],e5=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>E&&0!==E.length?E.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e4=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eF.value&&e.unit===eF.unit),e6=X?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"minutes");if(i>=0&&i<2)return"Last 1 Minute";if(i>=2&&i<16)return"Last 15 Minutes";if(i>=16&&i<61)return"Last Hour";let n=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(X,U,J):e4?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(m.TabGroup,{defaultIndex:0,onIndexChange:e=>eN(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(c.Tab,{children:"Request Logs"}),(0,t.jsx)(c.Tab,{children:"Audit Logs"}),(0,t.jsx)(c.Tab,{children:"Deleted Keys"}),(0,t.jsx)(c.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsxs)(u.TabPanel,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"}),(0,t.jsx)(h.Button,{icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>eA(!0),title:"Spend Logs Settings"})]}),ex&&ep&&ex.api_key===ep?(0,t.jsx)(N.default,{keyId:ep,keyData:ex,teams:E,onClose:()=>eh(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e5,onApplyFilters:eJ,onResetFilters:eX}),(0,t.jsx)($,{isVisible:eM,onCancel:()=>eA(!1),onSuccess:()=>eA(!1)}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>O(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:W,children:[(0,t.jsxs)("button",{onClick:()=>et(!ee),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e6]}),ee&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e6===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),G((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eq({value:e.value,unit:e.unit}),Z(!1),et(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${X?"bg-blue-50 text-blue-600":""}`,onClick:()=>Z(!X),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(d.Switch,{color:"green",checked:eP,defaultChecked:!0,onChange:eB})]}),{}),(0,t.jsx)(h.Button,{type:"default",icon:(0,t.jsx)(o.SyncOutlined,{spin:eY}),onClick:()=>{eH.refetch()},disabled:eY,title:"Fetch data",children:eY?"Fetching":"Fetch"})]}),X&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:J,onChange:e=>{Q(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eH.isLoading?"...":eW?(F-1)*H+1:0," -"," ",eH.isLoading?"...":eW?Math.min(F*H,eW.total):0," ","of ",eH.isLoading?"...":eW?eW.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eH.isLoading?"...":F," of"," ",eH.isLoading?"...":eW?eW.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eH.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(eW.total_pages||1,e+1)),disabled:eH.isLoading||F===(eW.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eP&&1===F&&ez&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eB(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(Y.DataTable,{columns:(0,S.createColumns)({sortBy:eE,sortOrder:eI,onSortChange:(e,t)=>{eD(e),eO(t),q(1)}}),data:e2,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eL(e.session_id),eS(e),eC(!0);return}eL(null),eS(e),eC(!0)},isLoading:eH.isLoading})]})]})]}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(w.default,{userID:A,userRole:M,token:L,accessToken:e,isActive:"audit logs"===e_,premiumUser:D})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(f.default,{})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(y.default,{})})]})]}),(0,t.jsx)(T.LogDetailsDrawer,{open:ek,onClose:()=>{eC(!1),eL(null)},logEntry:ew,sessionId:eT,accessToken:e,onOpenSettings:()=>eA(!0),allLogs:e2,onSelectLog:e=>{eS(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>K],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/f4eadf7003875fab.js b/litellm/proxy/_experimental/out/_next/static/chunks/170d633bc8d9b797.js similarity index 98% rename from litellm/proxy/_experimental/out/_next/static/chunks/f4eadf7003875fab.js rename to litellm/proxy/_experimental/out/_next/static/chunks/170d633bc8d9b797.js index d05b1e9a036..38cbfa2b16c 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/f4eadf7003875fab.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/170d633bc8d9b797.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,440987,e=>{"use strict";var t=e.i(903446);e.s(["SettingsIcon",()=>t.default])},848725,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});e.s(["EyeIcon",0,r],848725)},292335,122520,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},r={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function s(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,r,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?r.SSE:t&&e!==r.STDIO?r.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>s],122520)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var r=e.i(546467);e.s(["ExternalLinkIcon",()=>r.default],634831);let s=(0,e.i(475254).default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);e.s(["KeyIcon",()=>s],438100)},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["LinkOutlined",0,l],596239)},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},458505,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={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 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z"}}]},name:"dollar",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["DollarOutlined",0,l],458505)},611052,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(212931),a=e.i(311451),l=e.i(790848),i=e.i(888259),c=e.i(438957);e.i(247167);var n=e.i(931067);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};var d=e.i(9583),u=r.forwardRef(function(e,t){return r.createElement(d.default,(0,n.default)({},e,{ref:t,icon:o}))}),h=e.i(492030),x=e.i(266537),m=e.i(447566),f=e.i(149192),g=e.i(596239);e.s(["ByokCredentialModal",0,({server:e,open:n,onClose:o,onSuccess:d,accessToken:v})=>{let[y,p]=(0,r.useState)(1),[b,j]=(0,r.useState)(""),[k,w]=(0,r.useState)(!0),[N,C]=(0,r.useState)(!1),z=e.alias||e.server_name||"Service",M=z.charAt(0).toUpperCase(),A=()=>{p(1),j(""),w(!0),C(!1),o()},O=async()=>{if(!b.trim())return void i.default.error("Please enter your API key");C(!0);try{let t=await fetch(`/v1/mcp/server/${e.server_id}/user-credential`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${v}`},body:JSON.stringify({credential:b.trim(),save:k})});if(!t.ok){let e=await t.json();throw Error(e?.detail?.error||"Failed to save credential")}i.default.success(`Connected to ${z}`),d(e.server_id),A()}catch(e){i.default.error(e.message||"Failed to connect")}finally{C(!1)}};return(0,t.jsx)(s.Modal,{open:n,onCancel:A,footer:null,width:480,closeIcon:null,className:"byok-modal",children:(0,t.jsxs)("div",{className:"relative p-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[2===y?(0,t.jsxs)("button",{onClick:()=>p(1),className:"flex items-center gap-1 text-gray-500 hover:text-gray-800 text-sm",children:[(0,t.jsx)(m.ArrowLeftOutlined,{})," Back"]}):(0,t.jsx)("div",{}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:`w-2 h-2 rounded-full ${1===y?"bg-blue-500":"bg-gray-300"}`}),(0,t.jsx)("div",{className:`w-2 h-2 rounded-full ${2===y?"bg-blue-500":"bg-gray-300"}`})]}),(0,t.jsx)("button",{onClick:A,className:"text-gray-400 hover:text-gray-600",children:(0,t.jsx)(f.CloseOutlined,{})})]}),1===y?(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3 mb-6",children:[(0,t.jsx)("div",{className:"w-14 h-14 rounded-xl bg-gradient-to-br from-teal-400 to-cyan-600 flex items-center justify-center text-white font-bold text-xl shadow",children:"L"}),(0,t.jsx)(x.ArrowRightOutlined,{className:"text-gray-400 text-lg"}),(0,t.jsx)("div",{className:"w-14 h-14 rounded-xl bg-gradient-to-br from-blue-600 to-indigo-800 flex items-center justify-center text-white font-bold text-xl shadow",children:M})]}),(0,t.jsxs)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:["Connect ",z]}),(0,t.jsxs)("p",{className:"text-gray-500 mb-6",children:["LiteLLM needs access to ",z," to complete your request."]}),(0,t.jsx)("div",{className:"bg-gray-50 rounded-xl p-4 text-left mb-4",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"mt-0.5",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"text-gray-500",children:[(0,t.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 4v16M16 4v16",stroke:"currentColor",strokeWidth:"2"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-semibold text-gray-800 mb-1",children:"How it works"}),(0,t.jsxs)("p",{className:"text-gray-500 text-sm",children:["LiteLLM acts as a secure bridge. Your requests are routed through our MCP client directly to"," ",z,"'s API."]})]})]})}),e.byok_description&&e.byok_description.length>0&&(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 text-left mb-6",children:[(0,t.jsxs)("p",{className:"text-xs font-semibold text-gray-500 uppercase tracking-widest mb-3 flex items-center gap-2",children:[(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:"text-green-500",children:[(0,t.jsx)("path",{d:"M12 2L12 22M2 12L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2"})]}),"Requested Access"]}),(0,t.jsx)("ul",{className:"space-y-2",children:e.byok_description.map((e,r)=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-sm text-gray-700",children:[(0,t.jsx)(h.CheckOutlined,{className:"text-green-500 flex-shrink-0"}),e]},r))})]}),(0,t.jsxs)("button",{onClick:()=>p(2),className:"w-full bg-gray-900 hover:bg-gray-700 text-white font-medium py-3 px-6 rounded-xl flex items-center justify-center gap-2 transition-colors",children:["Continue to Authentication ",(0,t.jsx)(x.ArrowRightOutlined,{})]}),(0,t.jsx)("button",{onClick:A,className:"mt-3 w-full text-gray-400 hover:text-gray-600 text-sm py-2",children:"Cancel"})]}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"w-12 h-12 rounded-full bg-blue-50 flex items-center justify-center mb-4",children:(0,t.jsx)(c.KeyOutlined,{className:"text-blue-400 text-xl"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Provide API Key"}),(0,t.jsxs)("p",{className:"text-gray-500 mb-6",children:["Enter your ",z," API key to authorize this connection."]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-800 mb-2",children:[z," API Key"]}),(0,t.jsx)(a.Input.Password,{placeholder:"Enter your API key",value:b,onChange:e=>j(e.target.value),size:"large",className:"rounded-lg"}),e.byok_api_key_help_url&&(0,t.jsxs)("a",{href:e.byok_api_key_help_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 text-sm mt-2 flex items-center gap-1",children:["Where do I find my API key? ",(0,t.jsx)(g.LinkOutlined,{})]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"text-gray-500",children:(0,t.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z",fill:"currentColor"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"Save key for future use"})]}),(0,t.jsx)(l.Switch,{checked:k,onChange:w})]}),(0,t.jsxs)("div",{className:"bg-blue-50 rounded-xl p-4 flex items-start gap-3 mb-6",children:[(0,t.jsx)(u,{className:"text-blue-400 mt-0.5 flex-shrink-0"}),(0,t.jsx)("p",{className:"text-sm text-blue-700",children:"Your key is stored securely and transmitted over HTTPS. It is never shared with third parties."})]}),(0,t.jsxs)("button",{onClick:O,disabled:N,className:"w-full bg-blue-500 hover:bg-blue-600 disabled:opacity-60 text-white font-medium py-3 px-6 rounded-xl flex items-center justify-center gap-2 transition-colors",children:[(0,t.jsx)(u,{})," Connect & Authorize"]})]})]})})}],611052)},903446,e=>{"use strict";let t=(0,e.i(475254).default)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",()=>t])},54943,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SaveOutlined",0,l],987432)},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{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"}}]},name:"check-circle",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["CheckCircleOutlined",0,l],245704)},245094,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["CodeOutlined",0,l],245094)},338468,e=>{"use strict";var t=e.i(843476);e.i(111790);var r=e.i(280881),s=e.i(135214);e.s(["default",0,()=>{let{accessToken:e,userRole:a,userId:l}=(0,s.default)();return(0,t.jsx)(r.MCPServers,{accessToken:e,userRole:a,userID:l})}])}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,440987,e=>{"use strict";var t=e.i(903446);e.s(["SettingsIcon",()=>t.default])},848725,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});e.s(["EyeIcon",0,r],848725)},292335,122520,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},r={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function s(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,r,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?r.SSE:t&&e!==r.STDIO?r.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>s],122520)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var r=e.i(546467);e.s(["ExternalLinkIcon",()=>r.default],634831);let s=(0,e.i(475254).default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);e.s(["KeyIcon",()=>s],438100)},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["LinkOutlined",0,l],596239)},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},458505,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={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 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z"}}]},name:"dollar",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["DollarOutlined",0,l],458505)},611052,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(212931),a=e.i(311451),l=e.i(790848),i=e.i(888259),c=e.i(438957);e.i(247167);var n=e.i(931067);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};var d=e.i(9583),u=r.forwardRef(function(e,t){return r.createElement(d.default,(0,n.default)({},e,{ref:t,icon:o}))}),h=e.i(492030),x=e.i(266537),m=e.i(447566),f=e.i(149192),g=e.i(596239);e.s(["ByokCredentialModal",0,({server:e,open:n,onClose:o,onSuccess:d,accessToken:v})=>{let[y,p]=(0,r.useState)(1),[b,j]=(0,r.useState)(""),[k,w]=(0,r.useState)(!0),[N,C]=(0,r.useState)(!1),z=e.alias||e.server_name||"Service",M=z.charAt(0).toUpperCase(),A=()=>{p(1),j(""),w(!0),C(!1),o()},O=async()=>{if(!b.trim())return void i.default.error("Please enter your API key");C(!0);try{let t=await fetch(`/v1/mcp/server/${e.server_id}/user-credential`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${v}`},body:JSON.stringify({credential:b.trim(),save:k})});if(!t.ok){let e=await t.json();throw Error(e?.detail?.error||"Failed to save credential")}i.default.success(`Connected to ${z}`),d(e.server_id),A()}catch(e){i.default.error(e.message||"Failed to connect")}finally{C(!1)}};return(0,t.jsx)(s.Modal,{open:n,onCancel:A,footer:null,width:480,closeIcon:null,className:"byok-modal",children:(0,t.jsxs)("div",{className:"relative p-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[2===y?(0,t.jsxs)("button",{onClick:()=>p(1),className:"flex items-center gap-1 text-gray-500 hover:text-gray-800 text-sm",children:[(0,t.jsx)(m.ArrowLeftOutlined,{})," Back"]}):(0,t.jsx)("div",{}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:`w-2 h-2 rounded-full ${1===y?"bg-blue-500":"bg-gray-300"}`}),(0,t.jsx)("div",{className:`w-2 h-2 rounded-full ${2===y?"bg-blue-500":"bg-gray-300"}`})]}),(0,t.jsx)("button",{onClick:A,className:"text-gray-400 hover:text-gray-600",children:(0,t.jsx)(f.CloseOutlined,{})})]}),1===y?(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3 mb-6",children:[(0,t.jsx)("div",{className:"w-14 h-14 rounded-xl bg-gradient-to-br from-teal-400 to-cyan-600 flex items-center justify-center text-white font-bold text-xl shadow",children:"L"}),(0,t.jsx)(x.ArrowRightOutlined,{className:"text-gray-400 text-lg"}),(0,t.jsx)("div",{className:"w-14 h-14 rounded-xl bg-gradient-to-br from-blue-600 to-indigo-800 flex items-center justify-center text-white font-bold text-xl shadow",children:M})]}),(0,t.jsxs)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:["Connect ",z]}),(0,t.jsxs)("p",{className:"text-gray-500 mb-6",children:["LiteLLM needs access to ",z," to complete your request."]}),(0,t.jsx)("div",{className:"bg-gray-50 rounded-xl p-4 text-left mb-4",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"mt-0.5",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"text-gray-500",children:[(0,t.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 4v16M16 4v16",stroke:"currentColor",strokeWidth:"2"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-semibold text-gray-800 mb-1",children:"How it works"}),(0,t.jsxs)("p",{className:"text-gray-500 text-sm",children:["LiteLLM acts as a secure bridge. Your requests are routed through our MCP client directly to"," ",z,"'s API."]})]})]})}),e.byok_description&&e.byok_description.length>0&&(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 text-left mb-6",children:[(0,t.jsxs)("p",{className:"text-xs font-semibold text-gray-500 uppercase tracking-widest mb-3 flex items-center gap-2",children:[(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",className:"text-green-500",children:[(0,t.jsx)("path",{d:"M12 2L12 22M2 12L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2"})]}),"Requested Access"]}),(0,t.jsx)("ul",{className:"space-y-2",children:e.byok_description.map((e,r)=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-sm text-gray-700",children:[(0,t.jsx)(h.CheckOutlined,{className:"text-green-500 flex-shrink-0"}),e]},r))})]}),(0,t.jsxs)("button",{onClick:()=>p(2),className:"w-full bg-gray-900 hover:bg-gray-700 text-white font-medium py-3 px-6 rounded-xl flex items-center justify-center gap-2 transition-colors",children:["Continue to Authentication ",(0,t.jsx)(x.ArrowRightOutlined,{})]}),(0,t.jsx)("button",{onClick:A,className:"mt-3 w-full text-gray-400 hover:text-gray-600 text-sm py-2",children:"Cancel"})]}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"w-12 h-12 rounded-full bg-blue-50 flex items-center justify-center mb-4",children:(0,t.jsx)(c.KeyOutlined,{className:"text-blue-400 text-xl"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Provide API Key"}),(0,t.jsxs)("p",{className:"text-gray-500 mb-6",children:["Enter your ",z," API key to authorize this connection."]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-800 mb-2",children:[z," API Key"]}),(0,t.jsx)(a.Input.Password,{placeholder:"Enter your API key",value:b,onChange:e=>j(e.target.value),size:"large",className:"rounded-lg"}),e.byok_api_key_help_url&&(0,t.jsxs)("a",{href:e.byok_api_key_help_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 text-sm mt-2 flex items-center gap-1",children:["Where do I find my API key? ",(0,t.jsx)(g.LinkOutlined,{})]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"text-gray-500",children:(0,t.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z",fill:"currentColor"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"Save key for future use"})]}),(0,t.jsx)(l.Switch,{checked:k,onChange:w})]}),(0,t.jsxs)("div",{className:"bg-blue-50 rounded-xl p-4 flex items-start gap-3 mb-6",children:[(0,t.jsx)(u,{className:"text-blue-400 mt-0.5 flex-shrink-0"}),(0,t.jsx)("p",{className:"text-sm text-blue-700",children:"Your key is stored securely and transmitted over HTTPS. It is never shared with third parties."})]}),(0,t.jsxs)("button",{onClick:O,disabled:N,className:"w-full bg-blue-500 hover:bg-blue-600 disabled:opacity-60 text-white font-medium py-3 px-6 rounded-xl flex items-center justify-center gap-2 transition-colors",children:[(0,t.jsx)(u,{})," Connect & Authorize"]})]})]})})}],611052)},903446,e=>{"use strict";let t=(0,e.i(475254).default)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",()=>t])},54943,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SaveOutlined",0,l],987432)},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{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"}}]},name:"check-circle",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["CheckCircleOutlined",0,l],245704)},245094,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"};var a=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(a.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["CodeOutlined",0,l],245094)},338468,e=>{"use strict";var t=e.i(843476);e.i(111790);var r=e.i(280881),s=e.i(135214);e.s(["default",0,()=>{let{accessToken:e,userRole:a,userId:l}=(0,s.default)();return(0,t.jsx)(r.MCPServers,{accessToken:e,userRole:a,userID:l})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/191ca3be6b9ca27f.js b/litellm/proxy/_experimental/out/_next/static/chunks/191ca3be6b9ca27f.js new file mode 100644 index 00000000000..f176e616b8d --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/191ca3be6b9ca27f.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,214541,e=>{"use strict";var t=e.i(271645),a=e.i(135214),s=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:i,userId:r,userRole:n}=(0,a.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,s.fetchTeams)(i,r,n,null))})()},[i,r,n]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function a(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function s(e,s){let l=t(e);return isNaN(s)?a(e,NaN):(s&&l.setDate(l.getDate()+s),l)}function l(e,s){let l=t(e);if(isNaN(s))return a(e,NaN);if(!s)return l;let i=l.getDate(),r=a(e,l.getTime());return(r.setMonth(l.getMonth()+s+1,0),i>=r.getDate())?r:(l.setFullYear(r.getFullYear(),r.getMonth(),i),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>a],96226),e.s(["addDays",()=>s],439189),e.s(["addMonths",()=>l],497245)},891547,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,disabled:o})=>{let[c,u]=(0,a.useState)([]),[d,m]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,l.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:r,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${s})${e.description?` — ${e.description}`:""}`,value:"production"===s?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:r,className:n,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,m]=(0,a.useState)([]),[h,f]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){f(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(m(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:r,loading:h,className:n,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var l=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(l.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["ClockCircleOutlined",0,i],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var l=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(l.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["ArrowLeftOutlined",0,i],447566)},954616,e=>{"use strict";var t=e.i(271645),a=e.i(114272),s=e.i(540143),l=e.i(915823),i=e.i(619273),r=class extends l.Subscribable{#e;#t=void 0;#a;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#l(),this.#i()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#l(){let e=this.#a?.state??(0,a.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,a,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,a,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,a){let l=(0,n.useQueryClient)(a),[o]=t.useState(()=>new r(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(i.noop)},[o]);if(c.error&&(0,i.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(529681),l=e.i(908286),i=e.i(242064),r=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let s,l,i;return(0,a.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(l={},u.forEach(a=>{l[`${e}-align-${a}`]=t.align===a}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(i={},c.forEach(a=>{i[`${e}-justify-${a}`]=t.justify===a}),i)))},m=(0,r.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:a,paddingLG:s}=e,l=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:a,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(l),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(l),(e=>{let{componentCls:t}=e,a={};return o.forEach(e=>{a[`${t}-wrap-${e}`]={flexWrap:e}}),a})(l),(e=>{let{componentCls:t}=e,a={};return u.forEach(e=>{a[`${t}-align-${e}`]={alignItems:e}}),a})(l),(e=>{let{componentCls:t}=e,a={};return c.forEach(e=>{a[`${t}-justify-${e}`]={justifyContent:e}}),a})(l)]},()=>({}),{resetStyle:!1});var h=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,s=Object.getOwnPropertySymbols(e);lt.indexOf(s[l])&&Object.prototype.propertyIsEnumerable.call(e,s[l])&&(a[s[l]]=e[s[l]]);return a};let f=t.default.forwardRef((e,r)=>{let{prefixCls:n,rootClassName:o,className:c,style:u,flex:f,gap:p,vertical:g=!1,component:x="div",children:y}=e,b=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:j,getPrefixCls:w}=t.default.useContext(i.ConfigContext),C=w("flex",n),[S,N,_]=m(C),k=null!=g?g:null==v?void 0:v.vertical,O=(0,a.default)(c,o,null==v?void 0:v.className,C,N,_,d(C,e),{[`${C}-rtl`]:"rtl"===j,[`${C}-gap-${p}`]:(0,l.isPresetSize)(p),[`${C}-vertical`]:k}),E=Object.assign(Object.assign({},null==v?void 0:v.style),u);return f&&(E.flex=f),p&&!(0,l.isPresetSize)(p)&&(E.gap=p),S(t.default.createElement(x,Object.assign({ref:r,className:O,style:E},(0,s.default)(b,["justify","wrap","align"])),y))});e.s(["Flex",0,f],525720)},969550,e=>{"use strict";var t=e.i(843476),a=e.i(271645);let s=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),i=e.i(311451),r=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[m,h]=(0,a.useState)(!1),[f,p]=(0,a.useState)(u),[g,x]=(0,a.useState)({}),[y,b]=(0,a.useState)({}),[v,j]=(0,a.useState)({}),[w,C]=(0,a.useState)({}),S=(0,a.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){b(e=>({...e,[t.name]:!0}));try{let a=await t.searchFn(e);x(e=>({...e,[t.name]:a}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{b(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,a.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){b(t=>({...t,[e.name]:!0})),C(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(a=>({...a,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{b(t=>({...t,[e.name]:!1}))}}},[w]);(0,a.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!w[e.name]&&N(e)})},[m,e,N,w]);let _=(e,t)=>{let a={...f,[e]:t};p(a),o(a)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(s,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(a=>{let s,l=e.find(e=>e.label===a||e.name===a);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(r.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>_(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!w[l.name]&&N(l)},onSearch:e=>{j(t=>({...t,[l.name]:e})),l.searchFn&&S(e,l)},filterOption:!1,loading:y[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:y[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(r.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>_(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(r.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(s=l.customComponent,(0,t.jsx)(s,{value:f[l.name]||void 0,onChange:e=>_(l.name,e??""),placeholder:`Select ${l.label||l.name}...`,allFilters:f})):(0,t.jsx)(i.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:f[l.name]||"",onChange:e=>_(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let a=(e,t,a,s)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let i=l?.organization_id??l?.org_id;i&&"string"==typeof i&&a.add(i.trim());let r=l?.user_id;if(r&&"string"==typeof r){let e=l?.user?.user_email||r;s.set(r,e)}}},s=async(e,s)=>{if(!e||!s)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,i=new Set,r=new Map,n=await (0,t.keyListCall)(e,null,s,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;a(o,l,i,r);let u=Math.min(c,10)-1;if(u>0){let n=Array.from({length:u},(a,l)=>(0,t.keyListCall)(e,null,s,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&a(e.value?.keys||[],l,i,r)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(i).sort(),userIds:Array.from(r.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,a)=>{if(!e)return[];try{let s=[],l=1,i=!0;for(;i;){let r=await (0,t.teamListCall)(e,a||null,null);s=[...s,...r],l{if(!e)return[];try{let a=[],s=1,l=!0;for(;l;){let i=await (0,t.organizationListCall)(e);a=[...a,...i],s{"use strict";var t=e.i(764205);let a=async(e,a,s,l,i)=>{let r;r="Admin"!=s&&"Admin Viewer"!=s?await (0,t.teamListCall)(e,l?.organization_id||null,a):await (0,t.teamListCall)(e,l?.organization_id||null),console.log(`givenTeams: ${r}`),i(r)};e.s(["fetchTeams",0,a])},54943,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var l=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(l.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["SaveOutlined",0,i],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},621192,e=>{"use strict";let t=e.i(264042).Row;e.s(["Row",0,t],621192)},178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var l=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(l.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["ReloadOutlined",0,i],91979)},468133,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(175712),l=e.i(464571),i=e.i(28651),r=e.i(898586),n=e.i(482725),o=e.i(199133),c=e.i(262218),u=e.i(621192),d=e.i(178654),m=e.i(751904),h=e.i(987432),f=e.i(764205),p=e.i(860585),g=e.i(355619),x=e.i(727749),y=e.i(162386);let{Title:b,Text:v}=r.Typography,j=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:a,isEditing:s,viewContent:l,editContent:i})=>(0,t.jsxs)(u.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(d.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:a})]}),(0,t.jsx)(d.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:s?i:l})})]}),C=()=>(0,t.jsx)(v,{className:"text-gray-400 italic",children:"Not set"}),S=(e,a)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:a?a(e):e},e))}):(0,t.jsx)(C,{}),N={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[r,u]=(0,a.useState)(!0),[d,_]=(0,a.useState)(N),[k,O]=(0,a.useState)(!1),[E,M]=(0,a.useState)(N),[T,R]=(0,a.useState)(!1),[$,L]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{if(!e)return u(!1);try{let t=await (0,f.getDefaultTeamSettings)(e),a={...N,...t.values||{}};_(a),M(a)}catch(e){console.error("Error fetching team SSO settings:",e),L(!0),x.default.fromBackend("Failed to fetch team settings")}finally{u(!1)}})()},[e]);let z=async()=>{if(e){R(!0);try{let t=await (0,f.updateDefaultTeamSettings)(e,E),a={...N,...t.settings||{}};_(a),M(a),O(!1),x.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.default.fromBackend("Failed to update team settings")}finally{R(!1)}}},D=(e,t)=>{M(a=>({...a,[e]:t}))};return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(n.Spin,{size:"large"})}):$?(0,t.jsx)(s.Card,{children:(0,t.jsx)(v,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(s.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(b,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(v,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:k?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(l.Button,{onClick:()=>{O(!1),M(d)},disabled:T,children:"Cancel"}),(0,t.jsx)(l.Button,{type:"primary",onClick:z,loading:T,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(l.Button,{onClick:()=>O(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:k,viewContent:null!=d.max_budget?(0,t.jsxs)(v,{children:["$",Number(d.max_budget).toLocaleString()]}):(0,t.jsx)(C,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:E.max_budget,onChange:e=>D("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:k,viewContent:d.budget_duration?(0,t.jsx)(v,{children:(0,p.getBudgetDurationLabel)(d.budget_duration)}):(0,t.jsx)(C,{}),editContent:(0,t.jsx)(p.default,{value:E.budget_duration||null,onChange:e=>D("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:k,viewContent:null!=d.tpm_limit?(0,t.jsx)(v,{children:d.tpm_limit.toLocaleString()}):(0,t.jsx)(C,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:E.tpm_limit,onChange:e=>D("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:k,viewContent:null!=d.rpm_limit?(0,t.jsx)(v,{children:d.rpm_limit.toLocaleString()}):(0,t.jsx)(C,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:E.rpm_limit,onChange:e=>D("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:k,viewContent:S(d.models,g.getModelDisplayName),editContent:(0,t.jsx)(y.ModelSelect,{value:E.models||[],onChange:e=>D("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:k,viewContent:S(d.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:E.team_member_permissions||[],onChange:e=>D("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:a,onClose:s})=>(0,t.jsx)(c.Tag,{color:"blue",closable:a,onClose:s,className:"mr-1 mt-1 mb-1",children:e}),children:j.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},747871,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(269200),l=e.i(942232),i=e.i(977572),r=e.i(427612),n=e.i(64848),o=e.i(496020),c=e.i(304967),u=e.i(994388),d=e.i(599724),m=e.i(389083),h=e.i(764205),f=e.i(727749);e.s(["default",0,({accessToken:e,userID:p})=>{let[g,x]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(e&&p)try{let t=await (0,h.availableTeamListCall)(e);x(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,p]);let y=async t=>{if(e&&p)try{await (0,h.teamMemberAddCall)(e,t,{user_id:p,role:"user"}),f.default.success("Successfully joined team"),x(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),f.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(s.Table,{children:[(0,t.jsx)(r.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(n.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(n.TableHeaderCell,{children:"Description"}),(0,t.jsx)(n.TableHeaderCell,{children:"Members"}),(0,t.jsx)(n.TableHeaderCell,{children:"Models"}),(0,t.jsx)(n.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(l.TableBody,{children:[g.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(d.Text,{children:e.team_alias})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(d.Text,{children:e.description||"No description available"})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsxs)(d.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,a)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(d.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},a)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(d.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(u.Button,{size:"xs",variant:"secondary",onClick:()=>y(e.team_id),children:"Join Team"})})]},e.team_id)),0===g.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(i.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(d.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1af83529c1ca7a96.js b/litellm/proxy/_experimental/out/_next/static/chunks/1af83529c1ca7a96.js new file mode 100644 index 00000000000..88b5ac1482c --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1af83529c1ca7a96.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),l=e.i(477386),r=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var i;let n=(i=e.callback_name,Object.entries(r.callback_map).find(([e,t])=>t===i)?.[0]||i),o=r.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=r.reverse_callback_map[e]||e,n=r.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),p=e.i(72713),g=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:k}=s.Typography;function N({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:N,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(k,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(p.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),p=e.i(808613),g=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),k=e.i(237016),N=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=p.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),N.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),N.default.fromBackend(e),C(!1)}}},E=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:E,footer:_?[(0,n.jsx)(o.Button,{onClick:E,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:E,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(k.CopyToClipboard,{text:_,onCopy:()=>N.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(p.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(p.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(p.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(g.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(p.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),p=e.i(653824),g=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),k=e.i(784647),N=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),E=e.i(190702),B=e.i(891547),O=e.i(109799),P=e.i(921511),K=e.i(827252),z=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[p,g]=(0,N.useState)([]),[h,j]=(0,N.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,N.useState)([]),[v,k]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,N.useState)(e.organization_id||null),[A,M]=(0,N.useState)(e.auto_rotate||!1),[R,D]=(0,N.useState)(e.rotation_interval||""),[E,el]=(0,N.useState)(!e.expires),[er,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,N.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let ep=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,N.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,N.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}E&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(z.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(B.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:p.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{k((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:E,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:B,teams:O,onKeyDataUpdate:P,onDelete:K,backButtonText:z="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,er]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[ep,eg]=(0,N.useState)(B),[eh,ej]=(0,N.useState)(null),[e_,ey]=(0,N.useState)(!1),[eb,ef]=(0,N.useState)({}),[ev,ek]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{B&&eg(B)},[B]),(0,N.useEffect)(()=>{(async()=>{let e=ep?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;ek(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ek(!1)}})()},[U,ep?.metadata?.policies]),(0,N.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!ep)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:z}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ep.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...ep.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);eg(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,ep.token||ep.token_id),F.default.success("Key deleted successfully"),K&&K(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"")||$===ep.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(k.KeyInfoHeader,{data:{keyName:ep.key_alias||"Virtual Key",keyId:ep.token_id||ep.token,userId:ep.user_id||"",userEmail:ep.user_email||"",createdBy:ep.user_email||ep.user_id||"",createdAt:ep.created_at?ew(ep.created_at):"",lastUpdated:ep.updated_at?ew(ep.updated_at):"",lastActive:ep.last_active?ew(ep.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:z,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:ep,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ep?.key_alias||"-"},{label:"Key ID",value:ep?.token_id||ep?.token||"-",code:!0},{label:"Team ID",value:ep?.team_id||"-",code:!0},{label:"Spend",value:ep?.spend?`$${(0,i.formatNumberWithCommas)(ep.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:ep?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(ep.token||ep.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ep?.key_alias||ep?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(p.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ep.metadata?.guardrails)&&ep.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ep.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ep.metadata?.disable_global_guardrails&&!0===ep.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ep.metadata?.policies)&&ep.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ep.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:ep,onCancel:()=>Z(!1),onSubmit:eN,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.token_id||ep.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:ep.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:ep.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:ep.project_id?(V=J?.find(e=>e.project_id===ep.project_id),V?.project_alias?`${V.project_alias} (${ep.project_id})`:ep.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(ep.organization_id??ep.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(ep.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:ep.expires?ew(ep.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.metadata?.tags)&&ep.metadata.tags.length>0?ep.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.prompts)&&ep.metadata.prompts.length>0?ep.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.allowed_routes)&&ep.allowed_routes.length>0?ep.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.allowed_passthrough_routes)&&ep.metadata.allowed_passthrough_routes.length>0?ep.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:ep.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==ep.max_parallel_requests?ep.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",ep.metadata?.model_tpm_limit?JSON.stringify(ep.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",ep.metadata?.model_rpm_limit?JSON.stringify(ep.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(ep.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/203dde2108f3f1ac.js b/litellm/proxy/_experimental/out/_next/static/chunks/203dde2108f3f1ac.js deleted file mode 100644 index c94ad050b0c..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/203dde2108f3f1ac.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(389083),l=e.i(810757),r=e.i(477386),i=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:n=[],variant:o="card",className:d=""}){let c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var n;let o=(n=e.callback_name,Object.entries(i.callback_map).find(([e,t])=>t===n)?.[0]||n),d=i.callbackInfo[o]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:o,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-blue-800",children:o}),(0,t.jsxs)(a.Text,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(s.Badge,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}})(e.callback_type),size:"sm",children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(s.Badge,{color:"red",size:"xs",children:n.length})]}),n.length>0?(0,t.jsx)("div",{className:"space-y-3",children:n.map((e,l)=>{let n=i.reverse_callback_map[e]||e,o=i.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-red-800",children:n}),(0,t.jsx)(a.Text,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(s.Badge,{color:"red",size:"sm",children:"Disabled"})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===o?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${d}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${d}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),c]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),g=e.i(72713),p=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:N}=s.Typography;function k({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:k,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(N,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:k,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(g.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(p.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>k],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),g=e.i(808613),p=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),N=e.i(237016),k=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=g.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),k.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),k.default.fromBackend(e),C(!1)}}},B=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:B,footer:_?[(0,n.jsx)(o.Button,{onClick:B,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:B,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(N.CopyToClipboard,{text:_,onCopy:()=>k.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(g.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(p.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),g=e.i(653824),p=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),N=e.i(784647),k=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),B=e.i(190702),E=e.i(891547),O=e.i(109799),P=e.i(921511),z=e.i(827252),K=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[g,p]=(0,k.useState)([]),[h,j]=(0,k.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,k.useState)([]),[v,N]=(0,k.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,k.useState)(e.organization_id||null),[A,M]=(0,k.useState)(e.auto_rotate||!1),[R,D]=(0,k.useState)(e.rotation_interval||""),[B,el]=(0,k.useState)(!e.expires),[er,ei]=(0,k.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,k.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);p(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,k.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let eg=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,ep={...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,k.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,k.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,k.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,k.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}B&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:ep,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(E.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:g.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{N((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:B,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:E,teams:O,onKeyDataUpdate:P,onDelete:z,backButtonText:K="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,k.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,k.useState)(!1),[es,er]=(0,k.useState)(!1),[ei,en]=(0,k.useState)(""),[eo,ed]=(0,k.useState)(!1),[ec,em]=(0,k.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[eg,ep]=(0,k.useState)(E),[eh,ej]=(0,k.useState)(null),[e_,ey]=(0,k.useState)(!1),[eb,ef]=(0,k.useState)({}),[ev,eN]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{E&&ep(E)},[E]),(0,k.useEffect)(()=>{(async()=>{let e=eg?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;eN(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eN(!1)}})()},[U,eg?.metadata?.policies]),(0,k.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!eg)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:K}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let ek=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...eg.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...eg.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);ep(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,eg.token||eg.token_id),F.default.success("Key deleted successfully"),z&&z(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"")||$===eg.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(N.KeyInfoHeader,{data:{keyName:eg.key_alias||"Virtual Key",keyId:eg.token_id||eg.token,userId:eg.user_id||"",userEmail:eg.user_email||"",createdBy:eg.user_email||eg.user_id||"",createdAt:eg.created_at?ew(eg.created_at):"",lastUpdated:eg.updated_at?ew(eg.updated_at):"",lastActive:eg.last_active?ew(eg.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:K,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:eg,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{ep(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:eg?.key_alias||"-"},{label:"Key ID",value:eg?.token_id||eg?.token||"-",code:!0},{label:"Team ID",value:eg?.team_id||"-",code:!0},{label:"Spend",value:eg?.spend?`$${(0,i.formatNumberWithCommas)(eg.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:eg?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(eg.token||eg.token_id,{onSuccess:()=>{ep(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:eg?.key_alias||eg?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(g.TabGroup,{children:[(0,t.jsxs)(p.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(eg.metadata?.guardrails)&&eg.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eg.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof eg.metadata?.disable_global_guardrails&&!0===eg.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(eg.metadata?.policies)&&eg.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:eg.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:eg,onCancel:()=>Z(!1),onSubmit:ek,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.token_id||eg.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:eg.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:eg.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:eg.project_id?(V=J?.find(e=>e.project_id===eg.project_id),V?.project_alias?`${V.project_alias} (${eg.project_id})`:eg.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(eg.organization_id??eg.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(eg.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:eg.expires?ew(eg.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.metadata?.tags)&&eg.metadata.tags.length>0?eg.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.prompts)&&eg.metadata.prompts.length>0?eg.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.allowed_routes)&&eg.allowed_routes.length>0?eg.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.allowed_passthrough_routes)&&eg.metadata.allowed_passthrough_routes.length>0?eg.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:eg.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==eg.max_parallel_requests?eg.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",eg.metadata?.model_tpm_limit?JSON.stringify(eg.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",eg.metadata?.model_rpm_limit?JSON.stringify(eg.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(eg.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/262c0742212bf6d1.js b/litellm/proxy/_experimental/out/_next/static/chunks/262c0742212bf6d1.js deleted file mode 100644 index 99c6a130afa..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/262c0742212bf6d1.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),g=e.i(72713),p=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:N}=s.Typography;function k({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:k,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(N,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:k,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(g.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(p.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>k],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(389083),l=e.i(810757),r=e.i(477386),i=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:n=[],variant:o="card",className:d=""}){let c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var n;let o=(n=e.callback_name,Object.entries(i.callback_map).find(([e,t])=>t===n)?.[0]||n),d=i.callbackInfo[o]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:o,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-blue-800",children:o}),(0,t.jsxs)(a.Text,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(s.Badge,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}})(e.callback_type),size:"sm",children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(s.Badge,{color:"red",size:"xs",children:n.length})]}),n.length>0?(0,t.jsx)("div",{className:"space-y-3",children:n.map((e,l)=>{let n=i.reverse_callback_map[e]||e,o=i.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-red-800",children:n}),(0,t.jsx)(a.Text,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(s.Badge,{color:"red",size:"sm",children:"Disabled"})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===o?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${d}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${d}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),c]})}])},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),g=e.i(808613),p=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),N=e.i(237016),k=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=g.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),k.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),k.default.fromBackend(e),C(!1)}}},B=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:B,footer:_?[(0,n.jsx)(o.Button,{onClick:B,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:B,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(N.CopyToClipboard,{text:_,onCopy:()=>k.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(g.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(p.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),g=e.i(653824),p=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),N=e.i(784647),k=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),B=e.i(190702),E=e.i(891547),O=e.i(109799),P=e.i(921511),z=e.i(827252),K=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[g,p]=(0,k.useState)([]),[h,j]=(0,k.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,k.useState)([]),[v,N]=(0,k.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,k.useState)(e.organization_id||null),[A,M]=(0,k.useState)(e.auto_rotate||!1),[R,D]=(0,k.useState)(e.rotation_interval||""),[B,el]=(0,k.useState)(!e.expires),[er,ei]=(0,k.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,k.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);p(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,k.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let eg=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,ep={...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,k.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,k.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,k.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,k.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}B&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:ep,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(E.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:g.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{N((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:B,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:E,teams:O,onKeyDataUpdate:P,onDelete:z,backButtonText:K="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,k.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,k.useState)(!1),[es,er]=(0,k.useState)(!1),[ei,en]=(0,k.useState)(""),[eo,ed]=(0,k.useState)(!1),[ec,em]=(0,k.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[eg,ep]=(0,k.useState)(E),[eh,ej]=(0,k.useState)(null),[e_,ey]=(0,k.useState)(!1),[eb,ef]=(0,k.useState)({}),[ev,eN]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{E&&ep(E)},[E]),(0,k.useEffect)(()=>{(async()=>{let e=eg?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;eN(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eN(!1)}})()},[U,eg?.metadata?.policies]),(0,k.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!eg)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:K}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let ek=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...eg.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...eg.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);ep(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,eg.token||eg.token_id),F.default.success("Key deleted successfully"),z&&z(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"")||$===eg.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(N.KeyInfoHeader,{data:{keyName:eg.key_alias||"Virtual Key",keyId:eg.token_id||eg.token,userId:eg.user_id||"",userEmail:eg.user_email||"",createdBy:eg.user_email||eg.user_id||"",createdAt:eg.created_at?ew(eg.created_at):"",lastUpdated:eg.updated_at?ew(eg.updated_at):"",lastActive:eg.last_active?ew(eg.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:K,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:eg,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{ep(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:eg?.key_alias||"-"},{label:"Key ID",value:eg?.token_id||eg?.token||"-",code:!0},{label:"Team ID",value:eg?.team_id||"-",code:!0},{label:"Spend",value:eg?.spend?`$${(0,i.formatNumberWithCommas)(eg.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:eg?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(eg.token||eg.token_id,{onSuccess:()=>{ep(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:eg?.key_alias||eg?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(g.TabGroup,{children:[(0,t.jsxs)(p.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(eg.metadata?.guardrails)&&eg.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eg.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof eg.metadata?.disable_global_guardrails&&!0===eg.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(eg.metadata?.policies)&&eg.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:eg.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:eg,onCancel:()=>Z(!1),onSubmit:ek,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.token_id||eg.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:eg.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:eg.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:eg.project_id?(V=J?.find(e=>e.project_id===eg.project_id),V?.project_alias?`${V.project_alias} (${eg.project_id})`:eg.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(eg.organization_id??eg.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(eg.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:eg.expires?ew(eg.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.metadata?.tags)&&eg.metadata.tags.length>0?eg.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.prompts)&&eg.metadata.prompts.length>0?eg.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.allowed_routes)&&eg.allowed_routes.length>0?eg.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.allowed_passthrough_routes)&&eg.metadata.allowed_passthrough_routes.length>0?eg.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:eg.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==eg.max_parallel_requests?eg.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",eg.metadata?.model_tpm_limit?JSON.stringify(eg.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",eg.metadata?.model_rpm_limit?JSON.stringify(eg.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(eg.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2cce5b8de81c2310.js b/litellm/proxy/_experimental/out/_next/static/chunks/2cce5b8de81c2310.js new file mode 100644 index 00000000000..481b5813665 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/2cce5b8de81c2310.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56567,e=>{"use strict";var t=e.i(843476),a=e.i(135214),i=e.i(109799),s=e.i(907308),l=e.i(764205),r=e.i(500330),n=e.i(11751),o=e.i(708347),d=e.i(751904),m=e.i(827252),c=e.i(987432),u=e.i(530212),g=e.i(389083),h=e.i(304967),x=e.i(350967),p=e.i(599724),_=e.i(779241),b=e.i(629569),f=e.i(464571),j=e.i(808613),y=e.i(311451),v=e.i(199133),S=e.i(790848),T=e.i(653496),N=e.i(592968),w=e.i(888259),C=e.i(678784),k=e.i(118366),I=e.i(271645),M=e.i(9314),z=e.i(552130),D=e.i(127952);function F({className:e,value:a,onChange:i}){return(0,t.jsxs)(v.Select,{className:e,value:a,onChange:i,children:[(0,t.jsx)(v.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(v.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(v.Select.Option,{value:"30d",children:"Monthly"})]})}var P=e.i(844565),B=e.i(355619),A=e.i(643449),L=e.i(75921),O=e.i(390605),R=e.i(162386),V=e.i(727749),U=e.i(384767),E=e.i(435451),K=e.i(916940),$=e.i(183588),G=e.i(276173),W=e.i(91979),q=e.i(269200),H=e.i(942232),J=e.i(977572),Q=e.i(427612),Y=e.i(64848),X=e.i(496020),Z=e.i(536916),ee=e.i(21548);let et={"/key/generate":"Member can generate a virtual key for this team","/key/service-account/generate":"Member can generate a service account key (not belonging to any user) for this team","/key/update":"Member can update a virtual key belonging to this team","/key/delete":"Member can delete a virtual key belonging to this team","/key/info":"Member can get info about a virtual key belonging to this team","/key/regenerate":"Member can regenerate a virtual key belonging to this team","/key/{key_id}/regenerate":"Member can regenerate a virtual key belonging to this team","/key/list":"Member can list virtual keys belonging to this team","/key/block":"Member can block a virtual key belonging to this team","/key/unblock":"Member can unblock a virtual key belonging to this team","/team/daily/activity":"Member can view all team usage data (not just their own)"},ea=({teamId:e,accessToken:a,canEditTeam:i})=>{let[s,r]=(0,I.useState)([]),[n,o]=(0,I.useState)([]),[d,m]=(0,I.useState)(!0),[u,g]=(0,I.useState)(!1),[x,_]=(0,I.useState)(!1),j=async()=>{try{if(m(!0),!a)return;let t=await (0,l.getTeamPermissionsCall)(a,e),i=t.all_available_permissions||[];r(i);let s=t.team_member_permissions||[];o(s),_(!1)}catch(e){V.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,I.useEffect)(()=>{j()},[e,a]);let y=async()=>{try{if(!a)return;g(!0),await (0,l.teamPermissionsUpdateCall)(a,e,n),V.default.success("Permissions updated successfully"),_(!1)}catch(e){V.default.fromBackend("Failed to update permissions"),console.error("Error updating permissions:",e)}finally{g(!1)}};if(d)return(0,t.jsx)("div",{className:"p-6 text-center",children:"Loading permissions..."});let v=s.length>0;return(0,t.jsxs)(h.Card,{className:"bg-white shadow-md rounded-md p-6",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b pb-4 mb-6",children:[(0,t.jsx)(b.Title,{className:"mb-2 sm:mb-0",children:"Member Permissions"}),i&&x&&(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(f.Button,{icon:(0,t.jsx)(W.ReloadOutlined,{}),onClick:()=>{j()},children:"Reset"}),(0,t.jsx)(f.Button,{onClick:y,loading:u,type:"primary",icon:(0,t.jsx)(c.SaveOutlined,{}),children:"Save Changes"})]})]}),(0,t.jsx)(p.Text,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),v?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(q.Table,{className:" min-w-full",children:[(0,t.jsx)(Q.TableHead,{children:(0,t.jsxs)(X.TableRow,{children:[(0,t.jsx)(Y.TableHeaderCell,{children:"Method"}),(0,t.jsx)(Y.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(Y.TableHeaderCell,{children:"Description"}),(0,t.jsx)(Y.TableHeaderCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:"Allow Access"})]})}),(0,t.jsx)(H.TableBody,{children:s.map(e=>{let a=(e=>{let t=e.includes("/info")||e.includes("/list")||e.includes("/activity")?"GET":"POST",a=et[e];if(!a){for(let[t,i]of Object.entries(et))if(e.includes(t)){a=i;break}}return a||(a=`Access ${e}`),{method:t,endpoint:e,description:a,route:e}})(e);return(0,t.jsxs)(X.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${"GET"===a.method?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"}`,children:a.method})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:a.endpoint})}),(0,t.jsx)(J.TableCell,{className:"text-gray-700",children:a.description}),(0,t.jsx)(J.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(Z.Checkbox,{checked:n.includes(e),onChange:t=>{o(t.target.checked?[...n,e]:n.filter(t=>t!==e)),_(!0)},disabled:!i})})]},e)})})]})}):(0,t.jsx)("div",{className:"py-12",children:(0,t.jsx)(ee.Empty,{description:"No permissions available"})})]})},ei="overview",es="virtual-keys",el="members",er="member-permissions",en="settings",eo={[ei]:"Overview",[es]:"Virtual Keys",[el]:"Members",[er]:"Member Permissions",[en]:"Settings"};var ed=e.i(292639),em=e.i(770914),ec=e.i(898586),eu=e.i(294612);function eg({teamData:e,canEditTeam:i,handleMemberDelete:s,setSelectedEditMember:l,setIsEditMemberModalVisible:n,setIsAddMemberModalVisible:d}){let c=e=>{if(null==e)return"0";if("number"==typeof e){let t=Number(e);return t===Math.floor(t)?t.toString():(0,r.formatNumberWithCommas)(t,8).replace(/\.?0+$/,"")}return"0"},{data:u}=(0,ed.useUISettings)(),{userId:g,userRole:h}=(0,a.default)(),x=!!u?.values?.disable_team_admin_delete_team_user,p=(0,o.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,g||""),_=(0,o.isProxyAdminRole)(h||""),b=[{title:(0,t.jsxs)(em.Space,{direction:"horizontal",children:["Team Member Spend (USD)",(0,t.jsx)(N.Tooltip,{title:"This is the amount spent by a user in the team.",children:(0,t.jsx)(m.InfoCircleOutlined,{})})]}),key:"spend",render:(a,i)=>(0,t.jsxs)(ec.Typography.Text,{children:["$",(0,r.formatNumberWithCommas)((t=>{if(!t)return 0;let a=e.team_memberships.find(e=>e.user_id===t);return a?.spend||0})(i.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",render:(a,i)=>{let s=(t=>{if(!t)return null;let a=e.team_memberships.find(e=>e.user_id===t),i=a?.litellm_budget_table?.max_budget;return null==i?null:c(i)})(i.user_id);return(0,t.jsx)(ec.Typography.Text,{children:s?`$${(0,r.formatNumberWithCommas)(Number(s),4)}`:"No Limit"})}},{title:(0,t.jsxs)(em.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(N.Tooltip,{title:"Rate limits for this member's usage within this team.",children:(0,t.jsx)(m.InfoCircleOutlined,{})})]}),key:"rate_limits",render:(a,i)=>(0,t.jsx)(ec.Typography.Text,{children:(t=>{if(!t)return"No Limits";let a=e.team_memberships.find(e=>e.user_id===t),i=a?.litellm_budget_table?.rpm_limit,s=a?.litellm_budget_table?.tpm_limit,l=[i?`${c(i)} RPM`:null,s?`${c(s)} TPM`:null].filter(Boolean);return l.length>0?l.join(" / "):"No Limits"})(i.user_id)})}];return(0,t.jsx)(eu.default,{members:e.team_info.members_with_roles,canEdit:i,onEdit:t=>{let a=e.team_memberships.find(e=>e.user_id===t.user_id);l({...t,max_budget_in_team:a?.litellm_budget_table?.max_budget||null,tpm_limit:a?.litellm_budget_table?.tpm_limit||null,rpm_limit:a?.litellm_budget_table?.rpm_limit||null}),n(!0)},onDelete:s,onAddMember:()=>d(!0),roleColumnTitle:"Team Role",roleTooltip:"This role applies only to this team and is independent from the user's proxy-level role.",extraColumns:b,showDeleteForMember:()=>_||i&&!p||p&&!x})}var eh=e.i(207082),ex=e.i(871943),ep=e.i(502547),e_=e.i(360820),eb=e.i(94629),ef=e.i(152990),ej=e.i(682830),ey=e.i(994388),ev=e.i(752978),eS=e.i(282786),eT=e.i(981339),eN=e.i(969550),ew=e.i(20147),eC=e.i(266027),ek=e.i(633627);function eI({teamId:e,teamAlias:i,organization:s}){let{accessToken:l}=(0,a.default)(),[n,o]=(0,I.useState)(null),[d,c]=(0,I.useState)([{id:"created_at",desc:!0}]),[u,h]=(0,I.useState)({pageIndex:0,pageSize:50}),[x,_]=(0,I.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),b=d.length>0?d[0].id:"created_at",f=d.length>0?d[0].desc?"desc":"asc":"desc",j=u.pageIndex,y=u.pageSize,{data:v,isPending:S,isFetching:T,refetch:w}=(0,eh.useKeys)(j+1,y,{teamID:e,organizationID:x["Organization ID"]?.trim()||void 0,selectedKeyAlias:x["Key Alias"]?.trim()||void 0,userID:x["User ID"]?.trim()||void 0,sortBy:b||void 0,sortOrder:f||void 0,expand:"user"}),C=(0,I.useMemo)(()=>{let e=v?.keys||[],t=s?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[v?.keys,s?.organization_id]),k=v?.total_pages??0,[M,z]=(0,I.useState)({}),D=(0,I.useMemo)(()=>({team_id:e,team_alias:i||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:s?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,i,s]),F=(0,eC.useQuery)({queryKey:["teamFilterOptions",e,l],queryFn:async()=>(0,ek.fetchTeamFilterOptions)(l,e),enabled:!!l&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},P=(0,I.useCallback)(()=>{w?.()},[w]);(0,I.useEffect)(()=>(window.addEventListener("storage",P),()=>window.removeEventListener("storage",P)),[P]);let A=(0,I.useCallback)((e,t=!1)=>{_(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||h(e=>({...e,pageIndex:0}))},[]),L=(0,I.useCallback)(()=>{_({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),h(e=>({...e,pageIndex:0}))},[]),O=(0,I.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=F;if(!t.length)return[];let a=e.toLowerCase();return(a?t.filter(e=>e.toLowerCase().includes(a)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=F,a=e.toLowerCase();return(a?t.filter(e=>e.toLowerCase().includes(a)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=F,a=e.toLowerCase();return(a?t.filter(e=>e.id.toLowerCase().includes(a)||e.email.toLowerCase().includes(a)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[F]),R=(0,I.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let a=e.getValue(),i=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:a,children:(0,t.jsx)(ey.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:i,overflow:"hidden"},onClick:()=>o(e.row.original),children:a??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let a=e.getValue(),i=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:a??"-"})})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"organization_id",accessorKey:"organization_id",header:"Organization ID",size:140,enableSorting:!1,cell:e=>e.getValue()?e.renderValue():"-"},{id:"user_email",accessorKey:"user",header:"User Email",size:160,enableSorting:!1,cell:e=>{let a=e.getValue(),i=a?.user_email,s=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:i??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:70,enableSorting:!1,cell:e=>{let a=e.getValue(),i="default_user_id"===a?"Default Proxy Admin":a,s=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:i??"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:70,enableSorting:!1,cell:e=>{let a=e.getValue(),i="default_user_id"===a?"Default Proxy Admin":a,s=e.cell.column.getSize();return(0,t.jsx)(N.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:i??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(eS.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(m.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let a=e.getValue();if(!a)return"Unknown";let i=new Date(a);return(0,t.jsx)(N.Tooltip,{title:i.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:i.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,r.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,r.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let a=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(a)?(0,t.jsx)("div",{className:"flex flex-col",children:0===a.length?(0,t.jsx)(g.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[a.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(ev.Icon,{icon:M[e.row.id]?ex.ChevronDownIcon:ep.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>z(t=>({...t,[e.row.id]:!t[e.row.id]}))})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[a.slice(0,3).map((e,a)=>"all-proxy-models"===e?(0,t.jsx)(g.Badge,{size:"xs",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})},a):(0,t.jsx)(g.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(p.Text,{children:e.length>30?`${(0,B.getModelDisplayName)(e).slice(0,30)}...`:(0,B.getModelDisplayName)(e)})},a)),a.length>3&&!M[e.row.id]&&(0,t.jsx)(g.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(p.Text,{children:["+",a.length-3," ",a.length-3==1?"more model":"more models"]})}),M[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.slice(3).map((e,a)=>"all-proxy-models"===e?(0,t.jsx)(g.Badge,{size:"xs",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})},a+3):(0,t.jsx)(g.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(p.Text,{children:e.length>30?`${(0,B.getModelDisplayName)(e).slice(0,30)}...`:(0,B.getModelDisplayName)(e)})},a+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==a.tpm_limit?a.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==a.rpm_limit?a.rpm_limit:"Unlimited"]})]})}}],[M]),V=(0,I.useCallback)(e=>{let t="function"==typeof e?e(d):e;if(c(t),t?.length>0){let e=t[0];A({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[d,A]),U=(0,ef.useReactTable)({data:C,columns:R,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:u},onSortingChange:V,onPaginationChange:h,getCoreRowModel:(0,ej.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:k});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:n?(0,t.jsx)(ew.default,{keyId:n.token,onClose:()=>o(null),keyData:n,teams:[D],onDelete:w}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eN.default,{options:O,onApplyFilters:A,initialValues:x,onResetFilters:L})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[S||T?(0,t.jsx)(eT.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",j+1," of ",U.getPageCount()]}),S||T?(0,t.jsx)(eT.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>U.previousPage(),disabled:S||T||!U.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),S||T?(0,t.jsx)(eT.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>U.nextPage(),disabled:S||T||!U.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(q.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:U.getCenterTotalSize()},children:[(0,t.jsx)(Q.TableHead,{children:U.getHeaderGroups().map(e=>(0,t.jsx)(X.TableRow,{children:e.headers.map(e=>(0,t.jsx)(Y.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,ef.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(e_.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ex.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(eb.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${U.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(H.TableBody,{children:S||T?(0,t.jsx)(X.TableRow,{children:(0,t.jsx)(J.TableCell,{colSpan:R.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):C.length>0?U.getRowModel().rows.map(e=>(0,t.jsx)(X.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(J.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,ef.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(X.TableRow,{children:(0,t.jsx)(J.TableCell,{colSpan:R.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:W,accessToken:q,is_team_admin:H,is_proxy_admin:J,is_org_admin:Q=!1,userModels:Y,editTeam:X,premiumUser:Z=!1,onUpdate:ee})=>{let[et,ed]=(0,I.useState)(null),[em,ec]=(0,I.useState)(!0),[eu,eh]=(0,I.useState)(!1),[ex]=j.Form.useForm(),[ep,e_]=(0,I.useState)(!1),[eb,ef]=(0,I.useState)(null),[ej,ey]=(0,I.useState)(!1),[ev,eS]=(0,I.useState)([]),[eT,eN]=(0,I.useState)(!1),[ew,eC]=(0,I.useState)({}),[ek,eM]=(0,I.useState)([]),[ez,eD]=(0,I.useState)([]),[eF,eP]=(0,I.useState)({}),[eB,eA]=(0,I.useState)(!1),[eL,eO]=(0,I.useState)(null),[eR,eV]=(0,I.useState)(!1),[eU,eE]=(0,I.useState)(!1),[eK,e$]=(0,I.useState)(!1),[eG,eW]=(0,I.useState)(null),{userRole:eq,userId:eH}=(0,a.default)(),{data:eJ=[]}=(0,i.useOrganizations)(),eQ=(0,I.useMemo)(()=>{let e=et?.team_info?.organization_id;if(!e||!eH)return!1;let t=eJ.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===eH&&"org_admin"===e.user_role)??!1},[et,eJ,eH]),eY=H||J||Q||eQ,eX=(0,I.useMemo)(()=>{let e;return e=[ei,es],eY?[...e,el,er,en]:e},[eY]),eZ=(0,I.useMemo)(()=>X&&eY?en:ei,[X,eY]),e0=async()=>{try{if(ec(!0),!q)return;let t=await (0,l.teamInfoCall)(q,e);ed(t)}catch(e){V.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{ec(!1)}};(0,I.useEffect)(()=>{e0()},[e,q]),(0,I.useEffect)(()=>{(async()=>{if(!q||!et?.team_info?.organization_id)return eW(null);try{let e=await (0,l.organizationInfoCall)(q,et.team_info.organization_id);eW(e)}catch(e){console.error("Error fetching organization info:",e),eW(null)}})()},[q,et?.team_info?.organization_id]),(0,I.useMemo)(()=>{let e;return e=[],e=eG?eG.models.includes("all-proxy-models")?Y:eG.models.length>0?eG.models:Y:Y,(0,B.unfurlWildcardModelsInList)(e,Y)},[eG,Y]),(0,I.useEffect)(()=>{let e=async()=>{try{if(!q)return;let e=(await (0,l.getPoliciesList)(q)).policies.map(e=>e.policy_name);eD(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(!q)return;let e=(await (0,l.getGuardrailsList)(q)).guardrails.map(e=>e.guardrail_name);eM(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[q]),(0,I.useEffect)(()=>{(async()=>{if(!q||!et?.team_info?.policies||0===et.team_info.policies.length)return;eA(!0);let e={};try{await Promise.all(et.team_info.policies.map(async t=>{try{let a=await (0,l.getPolicyInfoWithGuardrails)(q,t);e[t]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${t}:`,a),e[t]=[]}})),eP(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eA(!1)}})()},[q,et?.team_info?.policies]);let e1=async t=>{try{if(null==q)return;let a={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,l.teamMemberAddCall)(q,e,a),V.default.success("Team member added successfully"),eh(!1),ex.resetFields();let i=await (0,l.teamInfoCall)(q,e);ed(i),ee(i)}catch(t){let e="Failed to add team member";t?.raw?.detail?.error?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),V.default.fromBackend(e),console.error("Error adding team member:",t)}},e4=async t=>{try{if(null==q)return;let a={user_email:t.user_email,user_id:t.user_id,role:t.role,max_budget_in_team:t.max_budget_in_team,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit};w.default.destroy(),await (0,l.teamMemberUpdateCall)(q,e,a),V.default.success("Team member updated successfully"),e_(!1);let i=await (0,l.teamInfoCall)(q,e);ed(i),ee(i)}catch(t){let e="Failed to update team member";t?.raw?.detail?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),e_(!1),w.default.destroy(),V.default.fromBackend(e),console.error("Error updating team member:",t)}},e2=async()=>{if(eL&&q){eE(!0);try{await (0,l.teamMemberDeleteCall)(q,e,eL),V.default.success("Team member removed successfully");let t=await (0,l.teamInfoCall)(q,e);ed(t),ee(t)}catch(e){V.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{eE(!1),eV(!1),eO(null)}}},e3=async t=>{try{let a;if(!q)return;e$(!0);let i={};try{let{soft_budget_alerting_emails:e,...a}=t.metadata?JSON.parse(t.metadata):{};i=a}catch(e){V.default.fromBackend("Invalid JSON in metadata field");return}if("string"==typeof t.secret_manager_settings&&t.secret_manager_settings.trim().length>0)try{a=JSON.parse(t.secret_manager_settings)}catch(e){V.default.fromBackend("Invalid JSON in secret manager settings");return}let s=e=>null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&Number.isNaN(e)?null:e,r={team_id:e,team_alias:t.team_alias,models:t.models,tpm_limit:s(t.tpm_limit),rpm_limit:s(t.rpm_limit),max_budget:t.max_budget,soft_budget:s(t.soft_budget),budget_duration:t.budget_duration,metadata:{...i,...t.guardrails?.length>0?{guardrails:t.guardrails}:{},...t.logging_settings?.length>0?{logging:t.logging_settings}:{},disable_global_guardrails:t.disable_global_guardrails||!1,soft_budget_alerting_emails:"string"==typeof t.soft_budget_alerting_emails?t.soft_budget_alerting_emails.split(",").map(e=>e.trim()).filter(e=>e.length>0):t.soft_budget_alerting_emails||[],...void 0!==a?{secret_manager_settings:a}:{}},...t.policies?.length>0?{policies:t.policies}:{},...t.organization_id!==e5.organization_id?{organization_id:t.organization_id??null}:{}};r.max_budget=(0,n.mapEmptyStringToNull)(r.max_budget),r.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(r.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(r.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(r.team_member_tpm_limit=s(t.team_member_tpm_limit),r.team_member_rpm_limit=s(t.team_member_rpm_limit));let{servers:o,accessGroups:d}=t.mcp_servers_and_groups||{servers:[],accessGroups:[]},m=new Set(o||[]),c=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>m.has(e)));r.object_permission={},o&&(r.object_permission.mcp_servers=o),d&&(r.object_permission.mcp_access_groups=d),c&&(r.object_permission.mcp_tool_permissions=c),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:u,accessGroups:g}=t.agents_and_groups||{agents:[],accessGroups:[]};u&&u.length>0&&(r.object_permission.agents=u),g&&g.length>0&&(r.object_permission.agent_access_groups=g),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(r.object_permission.vector_stores=t.vector_stores),void 0!==t.access_group_ids&&(r.access_group_ids=t.access_group_ids),await (0,l.teamUpdateCall)(q,r),V.default.success("Team settings updated successfully"),ey(!1),e0()}catch(e){console.error("Error updating team:",e)}finally{e$(!1)}};if(em)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!et?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:e5}=et,e6=async(e,t)=>{await (0,r.copyToClipboard)(e)&&(eC(e=>({...e,[t]:!0})),setTimeout(()=>{eC(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Button,{type:"text",icon:(0,t.jsx)(u.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:W,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(b.Title,{children:e5.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(p.Text,{className:"text-gray-500 font-mono",children:e5.team_id}),(0,t.jsx)(f.Button,{type:"text",size:"small",icon:ew["team-id"]?(0,t.jsx)(C.CheckIcon,{size:12}):(0,t.jsx)(k.CopyIcon,{size:12}),onClick:()=>e6(e5.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${ew["team-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsx)(T.Tabs,{defaultActiveKey:eZ,className:"mb-4",items:[{key:ei,label:eo[ei],children:(0,t.jsxs)(x.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(b.Title,{children:["$",(0,r.formatNumberWithCommas)(e5.spend,4)]}),(0,t.jsxs)(p.Text,{children:["of ",null===e5.max_budget?"Unlimited":`$${(0,r.formatNumberWithCommas)(e5.max_budget,4)}`]}),e5.budget_duration&&(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Reset: ",e5.budget_duration]}),(0,t.jsx)("br",{}),e5.team_member_budget_table&&(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,r.formatNumberWithCommas)(e5.team_member_budget_table.max_budget,4)]})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(p.Text,{children:["TPM: ",e5.tpm_limit||"Unlimited"]}),(0,t.jsxs)(p.Text,{children:["RPM: ",e5.rpm_limit||"Unlimited"]}),e5.max_parallel_requests&&(0,t.jsxs)(p.Text,{children:["Max Parallel Requests: ",e5.max_parallel_requests]})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===e5.models.length||e5.models.includes("all-proxy-models")?(0,t.jsx)(g.Badge,{color:"red",children:"All proxy models"}):(0,t.jsxs)(t.Fragment,{children:[e5.models.map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",children:e},`direct-${a}`)),(e5.access_group_models||[]).map((e,a)=>(0,t.jsx)(g.Badge,{color:"green",title:"From access group",children:e},`ag-${a}`))]})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(p.Text,{children:["User Keys: ",et.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(p.Text,{children:["Service Account Keys: ",et.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Total: ",et.keys.length]})]})]}),(0,t.jsx)(U.default,{objectPermission:e5.object_permission,variant:"card",accessToken:q}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900 mb-3",children:"Guardrails"}),e5.guardrails&&e5.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e5.guardrails.map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(p.Text,{className:"text-gray-500",children:"No guardrails configured"}),e5.metadata?.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(g.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),e5.policies&&e5.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:e5.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Badge,{color:"purple",children:e}),eB&&(0,t.jsx)(p.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!eB&&eF[e]&&eF[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(p.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eF[e].map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(p.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:e5.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:es,label:eo[es],children:(0,t.jsx)(eI,{teamId:e,teamAlias:e5.team_alias,organization:eG})},{key:el,label:eo[el],children:(0,t.jsx)(eg,{teamData:et,canEditTeam:eY,handleMemberDelete:e=>{eO(e),eV(!0)},setSelectedEditMember:ef,setIsEditMemberModalVisible:e_,setIsAddMemberModalVisible:eh})},{key:er,label:eo[er],children:(0,t.jsx)(ea,{teamId:e,accessToken:q,canEditTeam:eY})},{key:en,label:eo[en],children:(0,t.jsxs)(h.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Title,{children:"Team Settings"}),eY&&!ej&&(0,t.jsx)(f.Button,{icon:(0,t.jsx)(d.EditOutlined,{className:"h-4 w-4"}),onClick:()=>ey(!0),children:"Edit Settings"})]}),ej?(0,t.jsxs)(j.Form,{form:ex,onFinish:e3,initialValues:{...e5,team_alias:e5.team_alias,models:e5.models,tpm_limit:e5.tpm_limit,rpm_limit:e5.rpm_limit,max_budget:e5.max_budget,soft_budget:e5.soft_budget,budget_duration:e5.budget_duration,team_member_tpm_limit:e5.team_member_budget_table?.tpm_limit,team_member_rpm_limit:e5.team_member_budget_table?.rpm_limit,team_member_budget:e5.team_member_budget_table?.max_budget,team_member_budget_duration:e5.team_member_budget_table?.budget_duration,guardrails:e5.metadata?.guardrails||[],policies:e5.policies||[],disable_global_guardrails:e5.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(e5.metadata?.soft_budget_alerting_emails)?e5.metadata.soft_budget_alerting_emails.join(", "):"",metadata:e5.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:a,...i})=>i)(e5.metadata),null,2):"",logging_settings:e5.metadata?.logging||[],secret_manager_settings:e5.metadata?.secret_manager_settings?JSON.stringify(e5.metadata.secret_manager_settings,null,2):"",organization_id:e5.organization_id,vector_stores:e5.object_permission?.vector_stores||[],mcp_servers:e5.object_permission?.mcp_servers||[],mcp_access_groups:e5.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:e5.object_permission?.mcp_servers||[],accessGroups:e5.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e5.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e5.object_permission?.agents||[],accessGroups:e5.object_permission?.agent_access_groups||[]},access_group_ids:e5.access_group_ids||[]},layout:"vertical",children:[(0,t.jsx)(j.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(y.Input,{type:""})}),(0,t.jsx)(j.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(R.ModelSelect,{value:ex.getFieldValue("models")||[],onChange:e=>ex.setFieldValue("models",e),teamID:e,organizationID:et?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!et?.team_info?.organization_id,showAllProxyModelsOverride:(0,o.isProxyAdminRole)(eq)&&!et?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(j.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(E.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(E.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:"Soft Budget Alerting Emails",name:"soft_budget_alerting_emails",tooltip:"Comma-separated email addresses to receive alerts when the soft budget is reached",children:(0,t.jsx)(y.Input,{placeholder:"example1@test.com, example2@test.com"})}),(0,t.jsx)(j.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(E.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:"Team Member Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(F,{onChange:e=>ex.setFieldValue("team_member_budget_duration",e),value:ex.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(j.Form.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,t.jsx)(_.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(j.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"Default tokens per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,t.jsx)(E.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(j.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"Default requests per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,t.jsx)(E.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})}),(0,t.jsx)(j.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(v.Select,{placeholder:"n/a",children:[(0,t.jsx)(v.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(v.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(v.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(j.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(E.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(E.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(N.Tooltip,{title:"Setup your first guardrail",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(v.Select,{mode:"tags",placeholder:"Select or enter guardrails",options:ek.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails",(0,t.jsx)(N.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(S.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(N.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",help:"Select existing policies or enter new ones",children:(0,t.jsx)(v.Select,{mode:"tags",placeholder:"Select or enter policies",options:ez.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(N.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(K.default,{onChange:e=>ex.setFieldValue("vector_stores",e),value:ex.getFieldValue("vector_stores"),accessToken:q||"",placeholder:"Select vector stores"})}),(0,t.jsx)(j.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(P.default,{onChange:e=>ex.setFieldValue("allowed_passthrough_routes",e),value:ex.getFieldValue("allowed_passthrough_routes"),accessToken:q||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(j.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(L.default,{onChange:e=>ex.setFieldValue("mcp_servers_and_groups",e),value:ex.getFieldValue("mcp_servers_and_groups"),accessToken:q||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(y.Input,{type:"hidden"})}),(0,t.jsx)(j.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(O.default,{accessToken:q||"",selectedServers:ex.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:ex.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ex.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(j.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(z.default,{onChange:e=>ex.setFieldValue("agents_and_groups",e),value:ex.getFieldValue("agents_and_groups"),accessToken:q||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:"Organization",name:"organization_id",children:(0,t.jsx)(v.Select,{allowClear:!0,placeholder:"Select an organization",showSearch:!0,optionFilterProp:"label",options:eJ.map(e=>({value:e.organization_id,label:e.organization_alias||e.organization_id}))})}),(0,t.jsx)(j.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)($.default,{value:ex.getFieldValue("logging_settings"),onChange:e=>ex.setFieldValue("logging_settings",e)})}),(0,t.jsx)(j.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:Z?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(y.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!Z})}),(0,t.jsx)(j.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(y.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(f.Button,{onClick:()=>ey(!1),disabled:eK,children:"Cancel"}),(0,t.jsx)(f.Button,{icon:(0,t.jsx)(c.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:eK,children:"Save Changes"})]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team Name"}),(0,t.jsx)("div",{children:e5.team_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"font-mono",children:e5.team_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:new Date(e5.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:e5.models.map((e,a)=>(0,t.jsx)(g.Badge,{color:"red",children:e},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",e5.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",e5.rpm_limit||"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team Budget"}),(0,t.jsxs)("div",{children:["Max Budget:"," ",null!==e5.max_budget?`$${(0,r.formatNumberWithCommas)(e5.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==e5.soft_budget&&void 0!==e5.soft_budget?`$${(0,r.formatNumberWithCommas)(e5.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",e5.budget_duration||"Never"]}),e5.metadata?.soft_budget_alerting_emails&&Array.isArray(e5.metadata.soft_budget_alerting_emails)&&e5.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",e5.metadata.soft_budget_alerting_emails.join(", ")]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(p.Text,{className:"font-medium",children:["Team Member Settings"," ",(0,t.jsx)(N.Tooltip,{title:"These are limits on individual team members",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),(0,t.jsxs)("div",{children:["Max Budget: ",e5.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",e5.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",e5.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",e5.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",e5.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Organization ID"}),(0,t.jsx)("div",{children:e5.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(g.Badge,{color:e5.blocked?"red":"green",children:e5.blocked?"Blocked":"Active"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)("div",{children:e5.metadata?.disable_global_guardrails===!0?(0,t.jsx)(g.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(g.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsx)(U.default,{objectPermission:e5.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:q}),(0,t.jsx)(A.default,{loggingConfigs:e5.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),e5.metadata?.secret_manager_settings&&(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Secret Manager Settings"}),(0,t.jsx)("pre",{className:"mt-2 bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(e5.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>eX.includes(e.key))}),(0,t.jsx)(G.default,{visible:ep,onCancel:()=>e_(!1),onSubmit:e4,initialData:eb,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Admin",value:"admin"},{label:"User",value:"user"}],additionalFields:[{name:"max_budget_in_team",label:(0,t.jsxs)("span",{children:["Team Member Budget (USD)"," ",(0,t.jsx)(N.Tooltip,{title:"Maximum amount in USD this member can spend within this team. This is separate from any global user budget limits",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(N.Tooltip,{title:"Maximum tokens per minute this member can use within this team. This is separate from any global user TPM limit",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Tokens per minute limit for this member in this team"},{name:"rpm_limit",label:(0,t.jsxs)("span",{children:["Team Member RPM Limit"," ",(0,t.jsx)(N.Tooltip,{title:"Maximum requests per minute this member can make within this team. This is separate from any global user RPM limit",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Requests per minute limit for this member in this team"}]}}),(0,t.jsx)(s.default,{isVisible:eu,onCancel:()=>eh(!1),onSubmit:e1,accessToken:q,teamId:e}),(0,t.jsx)(D.default,{isOpen:eR,title:"Delete Team Member",alertMessage:"Removing team members will also delete any keys created by or created for this member.",message:"Are you sure you want to remove this member from the team? This action cannot be undone.",resourceInformationTitle:"Team Member Information",resourceInformation:[{label:"User ID",value:eL?.user_id,code:!0},{label:"Email",value:eL?.user_email},{label:"Role",value:eL?.role}],onCancel:()=>{eV(!1),eO(null)},onOk:e2,confirmLoading:eU})]})}],56567)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2d313397aa3e57de.js b/litellm/proxy/_experimental/out/_next/static/chunks/2d313397aa3e57de.js deleted file mode 100644 index f1cbeefa080..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/2d313397aa3e57de.js +++ /dev/null @@ -1,38 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},902555,e=>{"use strict";var t=e.i(843476),l=e.i(591935),i=e.i(122577),r=e.i(278587),a=e.i(68155),n=e.i(360820),s=e.i(871943),o=e.i(434626),d=e.i(551332),c=e.i(592968),u=e.i(115504),m=e.i(752978);function h({icon:e,onClick:l,className:i,disabled:r,dataTestId:a}){return r?(0,t.jsx)(m.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":a}):(0,t.jsx)(m.Icon,{icon:e,size:"sm",onClick:l,className:(0,u.cx)("cursor-pointer",i),"data-testid":a})}let p={Edit:{icon:l.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:a.TrashIcon,className:"hover:text-red-600"},Test:{icon:i.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:r.RefreshIcon,className:"hover:text-green-600"},Up:{icon:n.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:s.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function x({onClick:e,tooltipText:l,disabled:i=!1,disabledTooltipText:r,dataTestId:a,variant:n}){let{icon:s,className:o}=p[n];return(0,t.jsx)(c.Tooltip,{title:i?r:l,children:(0,t.jsx)("span",{children:(0,t.jsx)(h,{icon:s,onClick:e,className:o,disabled:i,dataTestId:a})})})}e.s(["default",()=>x],902555)},551332,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,l],551332)},122577,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,l],122577)},434626,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,l],434626)},207670,e=>{"use strict";function t(){for(var e,t,l=0,i="",r=arguments.length;lt,"default",0,t])},591935,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,l],591935)},646050,e=>{"use strict";var t=e.i(843476),l=e.i(994388),i=e.i(304967),r=e.i(197647),a=e.i(653824),n=e.i(269200),s=e.i(942232),o=e.i(977572),d=e.i(427612),c=e.i(64848),u=e.i(496020),m=e.i(881073),h=e.i(404206),p=e.i(723731),x=e.i(599724),g=e.i(271645),b=e.i(650056),j=e.i(127952),f=e.i(902555),v=e.i(727749),y=e.i(764205),T=e.i(779241),C=e.i(677667),I=e.i(898667),w=e.i(130643),k=e.i(464571),B=e.i(212931),_=e.i(808613),A=e.i(28651),E=e.i(199133);let O=({isModalVisible:e,accessToken:l,setIsModalVisible:i,setBudgetList:r})=>{let[a]=_.Form.useForm(),n=async e=>{if(null!=l&&void 0!=l)try{v.default.info("Making API Call");let t=await (0,y.budgetCreateCall)(l,e);console.log("key create Response:",t),r(e=>e?[...e,t]:[t]),v.default.success("Budget Created"),a.resetFields()}catch(e){console.error("Error creating the key:",e),v.default.fromBackend(`Error creating the key: ${e}`)}};return(0,t.jsx)(B.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{i(!1),a.resetFields()},onCancel:()=>{i(!1),a.resetFields()},children:(0,t.jsxs)(_.Form,{form:a,onFinish:n,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(T.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(A.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(A.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(C.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(I.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(w.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(A.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(E.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(E.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(E.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(E.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(k.Button,{htmlType:"submit",children:"Create Budget"})})]})})},N=({isModalVisible:e,accessToken:l,setIsModalVisible:i,setBudgetList:r,existingBudget:a,handleUpdateCall:n})=>{console.log("existingBudget",a);let[s]=_.Form.useForm();(0,g.useEffect)(()=>{s.setFieldsValue(a)},[a,s]);let o=async e=>{if(null!=l&&void 0!=l)try{v.default.info("Making API Call"),i(!0);let t=await (0,y.budgetUpdateCall)(l,e);r(e=>e?[...e,t]:[t]),v.default.success("Budget Updated"),s.resetFields(),n()}catch(e){console.error("Error creating the key:",e),v.default.fromBackend(`Error creating the key: ${e}`)}};return(0,t.jsx)(B.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{i(!1),s.resetFields()},onCancel:()=>{i(!1),s.resetFields()},children:(0,t.jsxs)(_.Form,{form:s,onFinish:o,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(T.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(A.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(A.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(C.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(I.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(w.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(A.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(E.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(E.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(E.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(E.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(k.Button,{htmlType:"submit",children:"Save"})})]})})},F=` -curl -X POST --location '/end_user/new' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE - -`,M=` -curl -X POST --location '/chat/completions' \\ - --H 'Authorization: Bearer ' \\ - --H 'Content-Type: application/json' \\ - --d '{ - "model": "gpt-3.5-turbo', - "messages":[{"role": "user", "content": "Hey, how's it going?"}], - "user": "my-customer-id" -}' # 👈 KEY CHANGE - -`,P=`from openai import OpenAI -client = OpenAI( - base_url="", - api_key="" -) - -completion = client.chat.completions.create( - model="gpt-3.5-turbo", - messages=[ - {"role": "system", "content": "You are a helpful assistant."}, - {"role": "user", "content": "Hello!"} - ], - user="my-customer-id" -) - -print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[T,C]=(0,g.useState)(!1),[I,w]=(0,g.useState)(!1),[k,B]=(0,g.useState)(null),[_,A]=(0,g.useState)([]),[E,H]=(0,g.useState)(!1),[S,D]=(0,g.useState)(!1);(0,g.useEffect)(()=>{e&&(0,y.getBudgetList)(e).then(e=>{A(e)})},[e]);let L=async t=>{null!=e&&(B(t),w(!0))},R=async()=>{if(k&&null!=e){H(!0);try{await (0,y.budgetDeleteCall)(e,k.budget_id),v.default.success("Budget deleted."),await U()}catch(e){console.error("Error deleting budget:",e),"function"==typeof v.default.fromBackend?v.default.fromBackend("Failed to delete budget"):v.default.info("Failed to delete budget")}finally{H(!1),D(!1),B(null)}}},U=async()=>{null!=e&&(0,y.getBudgetList)(e).then(e=>{A(e)})};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>C(!0),children:"+ Create Budget"}),(0,t.jsxs)(a.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Budgets"}),(0,t.jsx)(r.Tab,{children:"Examples"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(O,{accessToken:e,isModalVisible:T,setIsModalVisible:C,setBudgetList:A}),k&&(0,t.jsx)(N,{accessToken:e,isModalVisible:I,setIsModalVisible:w,setBudgetList:A,existingBudget:k,handleUpdateCall:U}),(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(x.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(c.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(c.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(c.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(c.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(s.TableBody,{children:_.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map((e,l)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(f.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>L(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(f.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{B(e),D(!0)},dataTestId:"delete-budget-button"})]},l))})]})]}),(0,t.jsx)(j.default,{isOpen:S,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:k?.budget_id,code:!0},{label:"Max Budget",value:k?.max_budget},{label:"TPM",value:k?.tpm_limit},{label:"RPM",value:k?.rpm_limit}],onCancel:()=>{D(!1)},onOk:R,confirmLoading:E})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(x.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(a.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(r.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(r.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(r.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(b.Prism,{language:"bash",children:F})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(b.Prism,{language:"bash",children:M})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(b.Prism,{language:"python",children:P})})]})]})]})})]})]})]})}],646050)},267167,e=>{"use strict";var t=e.i(843476),l=e.i(646050),i=e.i(135214);e.s(["default",0,()=>{let{accessToken:e}=(0,i.default)();return(0,t.jsx)(l.default,{accessToken:e})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/23e34a8c920ebd31.js b/litellm/proxy/_experimental/out/_next/static/chunks/3030a60a51383269.js similarity index 68% rename from litellm/proxy/_experimental/out/_next/static/chunks/23e34a8c920ebd31.js rename to litellm/proxy/_experimental/out/_next/static/chunks/3030a60a51383269.js index 6932afc8fc8..b6369f3472a 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/23e34a8c920ebd31.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3030a60a51383269.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:s,userId:i,userRole:n}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,a.fetchTeams)(s,i,n,null))})()},[s,i,n]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let l=t(e);return isNaN(a)?r(e,NaN):(a&&l.setDate(l.getDate()+a),l)}function l(e,a){let l=t(e);if(isNaN(a))return r(e,NaN);if(!a)return l;let s=l.getDate(),i=r(e,l.getTime());return(i.setMonth(l.getMonth()+a+1,0),s>=i.getDate())?i:(l.setFullYear(i.getFullYear(),i.getMonth(),s),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>l],497245)},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:n,disabled:o})=>{let[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{h(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:s,loading:d,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);function s(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${a})${e.description?` — ${e.description}`:""}`,value:"production"===a?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,h]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(h(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:f,className:n,allowClear:!0,options:s(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>s])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ClockCircleOutlined",0,s],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ArrowLeftOutlined",0,s],447566)},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),l=e.i(915823),s=e.i(619273),i=class extends l.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#s()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#s(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,r){let l=(0,n.useQueryClient)(r),[o]=t.useState(()=>new i(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(s.noop)},[o]);if(c.error&&(0,s.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(908286),s=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let a,l,s;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(l={},u.forEach(r=>{l[`${e}-align-${r}`]=t.align===r}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(s={},c.forEach(r=>{s[`${e}-justify-${r}`]=t.justify===r}),s)))},h=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,l=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(l),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(l),(e=>{let{componentCls:t}=e,r={};return o.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(l)]},()=>({}),{resetStyle:!1});var f=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let m=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:u,flex:m,gap:p,vertical:g=!1,component:y="div",children:x}=e,b=f(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:w,direction:v,getPrefixCls:j}=t.default.useContext(s.ConfigContext),C=j("flex",n),[S,M,E]=h(C),N=null!=g?g:null==w?void 0:w.vertical,O=(0,r.default)(c,o,null==w?void 0:w.className,C,M,E,d(C,e),{[`${C}-rtl`]:"rtl"===v,[`${C}-gap-${p}`]:(0,l.isPresetSize)(p),[`${C}-vertical`]:N}),R=Object.assign(Object.assign({},null==w?void 0:w.style),u);return m&&(R.flex=m),p&&!(0,l.isPresetSize)(p)&&(R.gap=p),S(t.default.createElement(y,Object.assign({ref:i,className:O,style:R},(0,a.default)(b,["justify","wrap","align"])),x))});e.s(["Flex",0,m],525720)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),l=e.i(682830),s=e.i(269200),i=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:h,renderSubComponent:f,renderChildRows:m,getRowCanExpand:p,isLoading:g=!1,loadingMessage:y="🚅 Loading logs...",noDataMessage:x="No logs found",enableSorting:b=!1}){let w=!!(f||m)&&!!p,[v,j]=(0,r.useState)([]),C=(0,a.useReactTable)({data:e,columns:d,...b&&{state:{sorting:v},onSortingChange:j,enableSortingRemoval:!1},...w&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,l.getCoreRowModel)(),...b&&{getSortedRowModel:(0,l.getSortedRowModel)()},...w&&{getExpandedRowModel:(0,l.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(i.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=b&&e.column.getCanSort(),l=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===l?"↑":"desc"===l?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})}):C.getRowModel().rows.length>0?C.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${h?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>h?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),w&&e.getIsExpanded()&&m&&m({row:e}),w&&e.getIsExpanded()&&f&&!m&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:f({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:x})})})})})]})})}e.s(["DataTable",()=>d])},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),s=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[h,f]=(0,r.useState)(!1),[m,p]=(0,r.useState)(u),[g,y]=(0,r.useState)({}),[x,b]=(0,r.useState)({}),[w,v]=(0,r.useState)({}),[j,C]=(0,r.useState)({}),S=(0,r.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){b(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);y(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[t.name]:[]}))}finally{b(e=>({...e,[t.name]:!1}))}}},300),[]),M=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){b(t=>({...t,[e.name]:!0})),C(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");y(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),y(t=>({...t,[e.name]:[]}))}finally{b(t=>({...t,[e.name]:!1}))}}},[j]);(0,r.useEffect)(()=>{h&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&M(e)})},[h,e,M,j]);let E=(e,t)=>{let r={...m,[e]:t};p(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>f(!h),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),h&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,l=e.find(e=>e.label===r||e.name===r);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:m[l.name]||void 0,onChange:e=>E(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!j[l.name]&&M(l)},onSearch:e=>{v(t=>({...t,[l.name]:e})),l.searchFn&&S(e,l)},filterOption:!1,loading:x[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:x[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:m[l.name]||void 0,onChange:e=>E(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(a=l.customComponent,(0,t.jsx)(a,{value:m[l.name]||void 0,onChange:e=>E(l.name,e??""),placeholder:`Select ${l.label||l.name}...`})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:m[l.name]||"",onChange:e=>E(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=l?.organization_id??l?.org_id;s&&"string"==typeof s&&r.add(s.trim());let i=l?.user_id;if(i&&"string"==typeof i){let e=l?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,s=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;r(o,l,s,i);let u=Math.min(c,10)-1;if(u>0){let n=Array.from({length:u},(r,l)=>(0,t.keyListCall)(e,null,a,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&r(e.value?.keys||[],l,s,i)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,r)=>{if(!e)return[];try{let a=[],l=1,s=!0;for(;s;){let i=await (0,t.teamListCall)(e,r||null,null);a=[...a,...i],l{if(!e)return[];try{let r=[],a=1,l=!0;for(;l;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("models"),n=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let c=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:i,userRole:n}=(0,s.default)();return(0,r.useInfiniteQuery)({queryKey:c.list({filters:{...i&&{userId:i},...n&&{userRole:n},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,i,n,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,n,o,c,u)=>{let{accessToken:d,userId:h,userRole:f}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...h&&{userId:h},...f&&{userRole:f},page:e,size:r,...a&&{search:a},...n&&{modelId:n},...o&&{teamId:o},...c&&{sortBy:c},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,l.modelInfoCall)(d,h,f,e,r,a,n,o,c,u),enabled:!!(d&&h&&f)})}])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},446891,836991,153472,e=>{"use strict";var t,r,a=e.i(843476),l=e.i(464571),s=e.i(326373),i=e.i(94629),n=e.i(360820),o=e.i(871943),c=e.i(271645);let u=c.forwardRef(function(e,t){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,u],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let r=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(u,{className:"h-4 w-4"})}];return(0,a.jsx)(s.Dropdown,{menu:{items:r,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(l.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(i.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var d=e.i(266027),h=e.i(954616),f=e.i(243652),m=e.i(135214),p=e.i(764205),g=((t={}).GENERAL_SETTINGS="general_settings",t),y=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let x=async(e,t)=>{try{let r=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},b=(0,f.createQueryKeys)("proxyConfig"),w=async(e,t)=>{try{let r=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>g,"GeneralSettingsFieldName",()=>y,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,m.default)();return(0,h.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await w(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,m.default)();return(0,d.useQuery)({queryKey:b.list({filters:{configType:e}}),queryFn:async()=>await x(t,e),enabled:!!t})}],153472)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:s,userId:i,userRole:n}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,a.fetchTeams)(s,i,n,null))})()},[s,i,n]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let l=t(e);return isNaN(a)?r(e,NaN):(a&&l.setDate(l.getDate()+a),l)}function l(e,a){let l=t(e);if(isNaN(a))return r(e,NaN);if(!a)return l;let s=l.getDate(),i=r(e,l.getTime());return(i.setMonth(l.getMonth()+a+1,0),s>=i.getDate())?i:(l.setFullYear(i.getFullYear(),i.getMonth(),s),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>l],497245)},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:n,disabled:o})=>{let[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{h(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:s,loading:d,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);function s(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${a})${e.description?` — ${e.description}`:""}`,value:"production"===a?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,h]=(0,r.useState)([]),[f,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(h(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{m(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:f,className:n,allowClear:!0,options:s(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>s])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ClockCircleOutlined",0,s],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ArrowLeftOutlined",0,s],447566)},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),l=e.i(915823),s=e.i(619273),i=class extends l.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#s()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#s(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,r){let l=(0,n.useQueryClient)(r),[o]=t.useState(()=>new i(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(s.noop)},[o]);if(c.error&&(0,s.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(908286),s=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let a,l,s;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(l={},u.forEach(r=>{l[`${e}-align-${r}`]=t.align===r}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(s={},c.forEach(r=>{s[`${e}-justify-${r}`]=t.justify===r}),s)))},h=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,l=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(l),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(l),(e=>{let{componentCls:t}=e,r={};return o.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(l)]},()=>({}),{resetStyle:!1});var f=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let m=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:u,flex:m,gap:p,vertical:g=!1,component:y="div",children:x}=e,b=f(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:w,direction:v,getPrefixCls:j}=t.default.useContext(s.ConfigContext),C=j("flex",n),[S,M,E]=h(C),N=null!=g?g:null==w?void 0:w.vertical,O=(0,r.default)(c,o,null==w?void 0:w.className,C,M,E,d(C,e),{[`${C}-rtl`]:"rtl"===v,[`${C}-gap-${p}`]:(0,l.isPresetSize)(p),[`${C}-vertical`]:N}),R=Object.assign(Object.assign({},null==w?void 0:w.style),u);return m&&(R.flex=m),p&&!(0,l.isPresetSize)(p)&&(R.gap=p),S(t.default.createElement(y,Object.assign({ref:i,className:O,style:R},(0,a.default)(b,["justify","wrap","align"])),x))});e.s(["Flex",0,m],525720)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),l=e.i(682830),s=e.i(269200),i=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:h,renderSubComponent:f,renderChildRows:m,getRowCanExpand:p,isLoading:g=!1,loadingMessage:y="🚅 Loading logs...",noDataMessage:x="No logs found",enableSorting:b=!1}){let w=!!(f||m)&&!!p,[v,j]=(0,r.useState)([]),C=(0,a.useReactTable)({data:e,columns:d,...b&&{state:{sorting:v},onSortingChange:j,enableSortingRemoval:!1},...w&&{getRowCanExpand:p},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,l.getCoreRowModel)(),...b&&{getSortedRowModel:(0,l.getSortedRowModel)()},...w&&{getExpandedRowModel:(0,l.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(i.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=b&&e.column.getCanSort(),l=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===l?"↑":"desc"===l?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})}):C.getRowModel().rows.length>0?C.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${h?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>h?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),w&&e.getIsExpanded()&&m&&m({row:e}),w&&e.getIsExpanded()&&f&&!m&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:f({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:x})})})})})]})})}e.s(["DataTable",()=>d])},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),s=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[h,f]=(0,r.useState)(!1),[m,p]=(0,r.useState)(u),[g,y]=(0,r.useState)({}),[x,b]=(0,r.useState)({}),[w,v]=(0,r.useState)({}),[j,C]=(0,r.useState)({}),S=(0,r.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){b(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);y(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[t.name]:[]}))}finally{b(e=>({...e,[t.name]:!1}))}}},300),[]),M=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){b(t=>({...t,[e.name]:!0})),C(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");y(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),y(t=>({...t,[e.name]:[]}))}finally{b(t=>({...t,[e.name]:!1}))}}},[j]);(0,r.useEffect)(()=>{h&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&M(e)})},[h,e,M,j]);let E=(e,t)=>{let r={...m,[e]:t};p(r),o(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>f(!h),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),h&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,l=e.find(e=>e.label===r||e.name===r);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:m[l.name]||void 0,onChange:e=>E(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!j[l.name]&&M(l)},onSearch:e=>{v(t=>({...t,[l.name]:e})),l.searchFn&&S(e,l)},filterOption:!1,loading:x[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:x[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:m[l.name]||void 0,onChange:e=>E(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(a=l.customComponent,(0,t.jsx)(a,{value:m[l.name]||void 0,onChange:e=>E(l.name,e??""),placeholder:`Select ${l.label||l.name}...`,allFilters:m})):(0,t.jsx)(s.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:m[l.name]||"",onChange:e=>E(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let s=l?.organization_id??l?.org_id;s&&"string"==typeof s&&r.add(s.trim());let i=l?.user_id;if(i&&"string"==typeof i){let e=l?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,s=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;r(o,l,s,i);let u=Math.min(c,10)-1;if(u>0){let n=Array.from({length:u},(r,l)=>(0,t.keyListCall)(e,null,a,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&r(e.value?.keys||[],l,s,i)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(s).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,r)=>{if(!e)return[];try{let a=[],l=1,s=!0;for(;s;){let i=await (0,t.teamListCall)(e,r||null,null);a=[...a,...i],l{if(!e)return[];try{let r=[],a=1,l=!0;for(;l;){let s=await (0,t.organizationListCall)(e);r=[...r,...s],a{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["ReloadOutlined",0,s],91979)},625901,e=>{"use strict";var t=e.i(266027),r=e.i(621482),a=e.i(243652),l=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("models"),n=(0,a.createQueryKeys)("modelHub"),o=(0,a.createQueryKeys)("allProxyModels");(0,a.createQueryKeys)("selectedTeamModels");let c=(0,a.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:r,userRole:a}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,l.modelAvailableCall)(e,r,a,!0,null,!0,!1,"expand"),enabled:!!(e&&r&&a)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:a,userId:i,userRole:n}=(0,s.default)();return(0,r.useInfiniteQuery)({queryKey:c.list({filters:{...i&&{userId:i},...n&&{userRole:n},size:e,...t&&{search:t}}}),queryFn:async({pageParam:r})=>await (0,l.modelInfoCall)(a,i,n,r,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,l.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,r=50,a,n,o,c,u)=>{let{accessToken:d,userId:h,userRole:f}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...h&&{userId:h},...f&&{userRole:f},page:e,size:r,...a&&{search:a},...n&&{modelId:n},...o&&{teamId:o},...c&&{sortBy:c},...u&&{sortOrder:u}}}),queryFn:async()=>await (0,l.modelInfoCall)(d,h,f,e,r,a,n,o,c,u),enabled:!!(d&&h&&f)})}])},446891,836991,153472,e=>{"use strict";var t,r,a=e.i(843476),l=e.i(464571),s=e.i(326373),i=e.i(94629),n=e.i(360820),o=e.i(871943),c=e.i(271645);let u=c.forwardRef(function(e,t){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,u],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let r=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(u,{className:"h-4 w-4"})}];return(0,a.jsx)(s.Dropdown,{menu:{items:r,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(l.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(i.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var d=e.i(266027),h=e.i(954616),f=e.i(243652),m=e.i(135214),p=e.i(764205),g=((t={}).GENERAL_SETTINGS="general_settings",t),y=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let x=async(e,t)=>{try{let r=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},b=(0,f.createQueryKeys)("proxyConfig"),w=async(e,t)=>{try{let r=p.proxyBaseUrl?`${p.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,p.deriveErrorMessage)(e);throw(0,p.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>g,"GeneralSettingsFieldName",()=>y,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,m.default)();return(0,h.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await w(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,m.default)();return(0,d.useQuery)({queryKey:b.list({filters:{configType:e}}),queryFn:async()=>await x(t,e),enabled:!!t})}],153472)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5f4170980a69ffa3.js b/litellm/proxy/_experimental/out/_next/static/chunks/3c27749aaf30135a.js similarity index 79% rename from litellm/proxy/_experimental/out/_next/static/chunks/5f4170980a69ffa3.js rename to litellm/proxy/_experimental/out/_next/static/chunks/3c27749aaf30135a.js index 6f5c075ec06..076bc8cc043 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5f4170980a69ffa3.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/3c27749aaf30135a.js @@ -7,4 +7,4 @@ `:""}-H 'Content-Type: application/json' \\ -d '{ ${m} - }'`):"";return(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[y?(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(te,{style:{fontSize:"16px"},children:["Testing connection to ",r,"..."]}),(0,t.jsx)(e7.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]}):v?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)(te,{type:"success",style:{fontSize:"18px",fontWeight:500,marginLeft:"10px"},children:["Connection to ",r," successful!"]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(ek.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(te,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",r," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(te,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(te,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:F}),h&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(K.Button,{type:"link",onClick:()=>S(!C),style:{paddingLeft:0,height:"auto"},children:C?"Hide Details":"Show Details"})})]}),C&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(te,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:"string"==typeof h?h:JSON.stringify(h,null,2)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(te,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:M||"No request data available"}),(0,t.jsx)(K.Button,{style:{marginTop:"8px"},icon:(0,t.jsx)(e9.CopyOutlined,{}),onClick:()=>{navigator.clipboard.writeText(M||""),D.default.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,t.jsx)(I.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(K.Button,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,t.jsx)(w.InfoCircleOutlined,{}),children:"View Documentation"})})]})},tl=async(e,t,s,a)=>{try{let r;console.log("=== AUTO ROUTER SUBMIT HANDLER CALLED ==="),console.log("handling auto router submit for formValues:",e),console.log("Model type:",e.model_type),"complexity_router"===e.model_type?(console.log("Creating complexity router configuration"),r={model_name:e.auto_router_name,litellm_params:{model:"auto_router/complexity_router",complexity_router_config:e.complexity_router_config,complexity_router_default_model:e.auto_router_default_model},model_info:{}},console.log("Complexity router config:",e.complexity_router_config)):(console.log("Creating semantic router configuration"),r={model_name:e.auto_router_name,litellm_params:{model:`auto_router/${e.auto_router_name}`,auto_router_config:JSON.stringify(e.auto_router_config),auto_router_default_model:e.auto_router_default_model},model_info:{}},e.auto_router_embedding_model&&"custom"!==e.auto_router_embedding_model?r.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model:e.custom_embedding_model&&(r.litellm_params.auto_router_embedding_model=e.custom_embedding_model),console.log("Semantic router config (stringified):",r.litellm_params.auto_router_config)),e.team_id&&(r.model_info.team_id=e.team_id),e.model_access_group&&e.model_access_group.length>0&&(r.model_info.access_groups=e.model_access_group),console.log("Auto router configuration to be created:",r),console.log("Calling modelCreateCall...");let i=await (0,l.modelCreateCall)(t,r);console.log("response for auto router create call:",i);let o="complexity_router"===e.model_type?"Complexity Router":"Semantic Router";D.default.success(`Successfully created ${o}: ${e.auto_router_name}`),s.resetFields(),a&&a()}catch(e){console.error("Failed to add auto router:",e),D.default.fromBackend("Failed to add auto router: "+e)}};var ts=e.i(689020),ta=e.i(955135),tr=e.i(646563),ti=e.i(362024),to=e.i(21548);let{Text:tn}=L.Typography,{TextArea:td}=eV.Input,tc=({modelInfo:e,value:l,onChange:s})=>{let[a,r]=(0,x.useState)([]),[i,o]=(0,x.useState)(!1),[n,d]=(0,x.useState)([]);(0,x.useEffect)(()=>{let e=l?.routes;if(e){let t=[];r(l=>e.map((e,s)=>{let a=l[s],r=a?.id||e.id||`route-${s}-${Date.now()}`;return t.push(r),{id:r,model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold??.5}})),d(t)}else r([]),d([])},[l]);let c=(e,t,l)=>{let s=a.map(s=>s.id===e?{...s,[t]:l}:s);r(s),m(s)},m=e=>{let t={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};s?.(t)},u=e.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)(M.Flex,{justify:"space-between",align:"center",gap:"middle",style:{width:"100%",marginBottom:24},children:[(0,t.jsxs)(A.Space,{align:"center",children:[(0,t.jsx)(L.Typography.Title,{level:4,style:{margin:0},children:"Routes Configuration"}),(0,t.jsx)(E.Tooltip,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(K.Button,{type:"primary",icon:(0,t.jsx)(tr.PlusOutlined,{}),onClick:()=>{let e=`route-${Date.now()}`,t=[...a,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];r(t),m(t),d(t=>[...t,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===a.length?(0,t.jsx)(ej.Card,{children:(0,t.jsx)(to.Empty,{description:'No routes configured. Click "Add Route" to get started.'})}):(0,t.jsx)(ti.Collapse,{activeKey:n,onChange:e=>d(Array.isArray(e)?e:[e].filter(Boolean)),style:{width:"100%"},items:a.map((e,l)=>({key:e.id,label:(0,t.jsxs)(tn,{style:{fontSize:16},children:["Route ",l+1,": ",e.model||"Unnamed"]}),extra:(0,t.jsx)(K.Button,{type:"text",danger:!0,size:"small",icon:(0,t.jsx)(ta.DeleteOutlined,{}),onClick:t=>{var l;let s;t.stopPropagation(),l=e.id,r(s=a.filter(e=>e.id!==l)),m(s),d(e=>e.filter(e=>e!==l))}}),children:(0,t.jsxs)(ej.Card,{children:[(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,t.jsx)(W.Select,{value:e.model,onChange:t=>c(e.id,"model",t),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:u})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,t.jsx)(td,{value:e.description,onChange:t=>c(e.id,"description",t.target.value),placeholder:"Describe when this route should be used...",rows:2,style:{width:"100%"}})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(tn,{className:"text-sm font-medium",children:"Score Threshold"}),(0,t.jsx)(E.Tooltip,{title:"Minimum similarity score to route to this model (0-1)",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(eh.InputNumber,{value:e.score_threshold,onChange:t=>c(e.id,"score_threshold",t||0),min:0,max:1,step:.1,style:{width:"100%"},placeholder:"0.5"})]}),(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(tn,{className:"text-sm font-medium",children:"Example Utterances"}),(0,t.jsx)(E.Tooltip,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(tn,{className:"text-xs text-gray-500 mb-2",children:"Type an utterance and press Enter to add it. You can also paste multiple lines."}),(0,t.jsx)(W.Select,{mode:"tags",value:e.utterances,onChange:t=>c(e.id,"utterances",t),placeholder:"Type an utterance and press Enter...",style:{width:"100%"},tokenSeparators:["\n"],maxTagCount:"responsive",allowClear:!0})]})]},e.id)}))}),(0,t.jsx)(I.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,t.jsx)(K.Button,{type:"link",onClick:()=>o(!i),className:"text-blue-600 p-0",children:i?"Hide":"Show"})]}),i&&(0,t.jsx)(ej.Card,{className:"bg-gray-50 w-full",children:(0,t.jsx)("pre",{className:"text-sm overflow-auto max-h-64 w-full",children:JSON.stringify({routes:a.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})},{Text:tm}=L.Typography,tu={SIMPLE:{label:"Simple",description:"Basic questions, greetings, simple factual queries",examples:'"Hello!", "What is Python?", "Thanks!"'},MEDIUM:{label:"Medium",description:"Standard queries requiring some reasoning or explanation",examples:'"Explain how REST APIs work", "Debug this error"'},COMPLEX:{label:"Complex",description:"Technical, multi-part requests requiring deep knowledge",examples:'"Design a microservices architecture", "Implement a rate limiter"'},REASONING:{label:"Reasoning",description:"Chain-of-thought, analysis, explicit reasoning requests",examples:'"Think step by step...", "Analyze the pros and cons..."'}},th=({modelInfo:e,value:l,onChange:s})=>{let a=e.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)(A.Space,{align:"center",style:{marginBottom:16},children:[(0,t.jsx)(L.Typography.Title,{level:4,style:{margin:0},children:"Complexity Tier Configuration"}),(0,t.jsx)(E.Tooltip,{title:"Map each complexity tier to a model. Simple queries use cheaper/faster models, complex queries use more capable models.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(tm,{type:"secondary",style:{display:"block",marginBottom:24},children:"The complexity router automatically classifies requests by complexity using rule-based scoring (no API calls, <1ms latency). Configure which model handles each tier."}),(0,t.jsx)(ej.Card,{children:Object.keys(tu).map((e,r)=>{let i=tu[e];return(0,t.jsxs)("div",{children:[r>0&&(0,t.jsx)(I.Divider,{style:{margin:"16px 0"}}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsxs)(tm,{strong:!0,style:{fontSize:16},children:[i.label," Tier"]}),(0,t.jsx)(E.Tooltip,{title:i.description,children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsxs)(tm,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:["Examples: ",i.examples]}),(0,t.jsx)(W.Select,{value:l[e],onChange:t=>{s({...l,[e]:t})},placeholder:`Select model for ${i.label.toLowerCase()} queries`,showSearch:!0,style:{width:"100%"},options:a})]})]},e)})}),(0,t.jsx)(I.Divider,{}),(0,t.jsxs)(ej.Card,{className:"bg-gray-50",children:[(0,t.jsx)(tm,{strong:!0,style:{display:"block",marginBottom:8},children:"How Classification Works"}),(0,t.jsx)(tm,{type:"secondary",style:{fontSize:13},children:"The router scores each request across 7 dimensions: token count, code presence, reasoning markers, technical terms, simple indicators, multi-step patterns, and question complexity. The weighted score determines the tier:"}),(0,t.jsxs)("ul",{style:{marginTop:8,marginBottom:0,paddingLeft:20,fontSize:13,color:"rgba(0, 0, 0, 0.45)"},children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"SIMPLE"}),": Score < 0.15"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"MEDIUM"}),": Score 0.15 - 0.35"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"COMPLEX"}),": Score 0.35 - 0.60"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"REASONING"}),": Score > 0.60 (or 2+ reasoning markers)"]})]})]})]})};var tx=e.i(962944);let tp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"};var tg=x.forwardRef(function(e,t){return x.createElement(ew.default,(0,ev.default)({},e,{ref:t,icon:tp}))});let{Title:tf,Link:tj}=L.Typography,t_=({form:e,handleOk:s,accessToken:a,userRole:r})=>{let[i,o]=(0,x.useState)(!1),[n,d]=(0,x.useState)(!1),[c,m]=(0,x.useState)(""),[u,h]=(0,x.useState)([]),[p,g]=(0,x.useState)([]),[f,j]=(0,x.useState)(!1),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)("complexity"),[N,w]=(0,x.useState)(null),[C,S]=(0,x.useState)({SIMPLE:"",MEDIUM:"",COMPLEX:"",REASONING:""});(0,x.useEffect)(()=>{(async()=>{h((await (0,l.modelAvailableCall)(a,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[a]),(0,x.useEffect)(()=>{(async()=>{try{let e=await (0,ts.fetchAvailableModels)(a);console.log("Fetched models for auto router:",e),g(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[a]);let k=eZ.all_admin_roles.includes(r),T=async()=>{d(!0),m(`test-${Date.now()}`),o(!0)},F=()=>{console.log("Auto router submit triggered!"),console.log("Router type:",b);let t=e.getFieldsValue();if(console.log("Form values:",t),!t.auto_router_name)return void D.default.fromBackend("Please enter an Auto Router Name");if("complexity"===b){if(0===Object.values(C).filter(Boolean).length)return void D.default.fromBackend("Please select at least one model for a complexity tier");let l=C.MEDIUM||C.SIMPLE||C.COMPLEX||C.REASONING;e.setFieldsValue({custom_llm_provider:"auto_router",model:t.auto_router_name,api_key:"not_required_for_auto_router",auto_router_default_model:l}),e.validateFields(["auto_router_name"]).then(r=>{console.log("Complexity router validation passed");let i={...r,auto_router_name:t.auto_router_name,auto_router_default_model:l,model_type:"complexity_router",complexity_router_config:{tiers:C},model_access_group:t.model_access_group};console.log("Final submit values:",i),tl(i,a,e,s)}).catch(e=>{console.error("Validation failed:",e),D.default.fromBackend("Please fill in all required fields")})}else{if(!t.auto_router_default_model)return void D.default.fromBackend("Please select a Default Model");if(e.setFieldsValue({custom_llm_provider:"auto_router",model:t.auto_router_name,api_key:"not_required_for_auto_router"}),!N||!N.routes||0===N.routes.length)return void D.default.fromBackend("Please configure at least one route for the auto router");if(N.routes.filter(e=>!e.name||!e.description||0===e.utterances.length).length>0)return void D.default.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");e.validateFields().then(t=>{console.log("Form validation passed, submitting with values:",t);let l={...t,auto_router_config:N,model_type:"semantic_router"};console.log("Final submit values:",l),tl(l,a,e,s)}).catch(e=>{console.error("Validation failed:",e);let t=e.errorFields||[];if(t.length>0){let e=t.map(e=>{let t=e.name[0];return({auto_router_name:"Auto Router Name",auto_router_default_model:"Default Model",auto_router_embedding_model:"Embedding Model"})[t]||t});D.default.fromBackend(`Please fill in the following required fields: ${e.join(", ")}`)}else D.default.fromBackend("Please fill in all required fields")})}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tf,{level:2,children:"Add Auto Router"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mb-6",children:"Create an auto router that automatically selects the best model based on request complexity or semantic matching."}),(0,t.jsx)(ej.Card,{className:"mb-4",children:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(em.Text,{className:"text-sm font-medium mb-2 block",children:"Router Type"}),(0,t.jsx)(e8.Radio.Group,{value:b,onChange:e=>v(e.target.value),className:"w-full",children:(0,t.jsxs)(A.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(e8.Radio,{value:"complexity",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tx.ThunderboltOutlined,{className:"text-yellow-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Complexity Router"}),(0,t.jsx)(J.Badge,{count:"Recommended",style:{backgroundColor:"#52c41a",fontSize:"10px",padding:"0 6px"}})]}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:["Automatically routes based on request complexity. No training data needed — just pick 4 models and go.",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-green-600",children:"✓ Zero API calls"})," · ",(0,t.jsx)("span",{className:"text-green-600",children:"✓ <1ms latency"})," · ",(0,t.jsx)("span",{className:"text-green-600",children:"✓ No cost"})]})]}),(0,t.jsxs)(e8.Radio,{value:"semantic",className:"w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tg,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Semantic Router"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:"Routes based on semantic similarity to example utterances. Requires embedding model and training examples."})]})]})})]})}),(0,t.jsx)(ej.Card,{children:(0,t.jsxs)(et.Form,{form:e,onFinish:F,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Auto router name is required"}],label:"Auto Router Name",name:"auto_router_name",tooltip:"Unique name for this auto router configuration",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(eR.TextInput,{placeholder:"e.g., smart_router, auto_router_1"})}),"complexity"===b?(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(th,{modelInfo:p,value:C,onChange:e=>{S(e)}})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(tc,{modelInfo:p,value:N,onChange:t=>{w(t),e.setFieldValue("auto_router_config",t)}})}),(0,t.jsx)(et.Form.Item,{rules:[{required:"semantic"===b,message:"Default model is required"}],label:"Default Model",name:"auto_router_default_model",tooltip:"Fallback model to use when auto routing logic cannot determine the best model",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(W.Select,{placeholder:"Select a default model",onChange:e=>{j("custom"===e)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0})}),(0,t.jsx)(et.Form.Item,{label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Optional: Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(W.Select,{value:e.getFieldValue("auto_router_embedding_model"),placeholder:"Select an embedding model (optional)",onChange:t=>{y("custom"===t),e.setFieldValue("auto_router_embedding_model",t)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0,allowClear:!0})})]}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Settings"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),k&&(0,t.jsx)(et.Form.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to control who can access this auto router",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:u.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(L.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(K.Button,{onClick:T,loading:n,children:"Test Connection"}),(0,t.jsx)(K.Button,{type:"primary",onClick:()=>{console.log("Add Auto Router button clicked!"),F()},children:"Add Auto Router"})]})]})]})}),(0,t.jsx)(el.Modal,{title:"Connection Test Results",open:i,onCancel:()=>{o(!1),d(!1)},footer:[(0,t.jsx)(K.Button,{onClick:()=>{o(!1),d(!1)},children:"Close"},"close")],width:700,children:i&&(0,t.jsx)(tt,{formValues:e.getFieldsValue(),accessToken:a,testMode:"chat",modelName:e.getFieldValue("auto_router_name"),onClose:()=>{o(!1),d(!1)},onTestComplete:()=>d(!1)},c)})]})},ty=(0,a.createQueryKeys)("guardrails");var tb=e.i(109034),tv=e.i(793130),tN=e.i(560445),tw=e.i(663435),tC=e.i(677667),tS=e.i(898667),tk=e.i(130643),tT=e.i(635432),tF=e.i(564897),tI=e.i(435451);let{Text:tM}=L.Typography,tP=({form:e,showCacheControl:l,onCacheControlChange:s})=>{let a=t=>{let l=e.getFieldValue("litellm_extra_params");try{let s=l?JSON.parse(l):{};t.length>0?s.cache_control_injection_points=t:delete s.cache_control_injection_points,Object.keys(s).length>0?e.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):e.setFieldValue("litellm_extra_params","")}catch(e){console.error("Error updating cache control points:",e)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Cache Control Injection Points",name:"cache_control",valuePropName:"checked",className:"mb-4",tooltip:"Tell litellm where to inject cache control checkpoints. You can specify either by role (to apply to all messages of that role) or by specific message index.",children:(0,t.jsx)(es.Switch,{onChange:s,className:"bg-gray-600"})}),l&&(0,t.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,t.jsx)(tM,{className:"text-sm text-gray-500 block mb-4",children:"Providers like Anthropic, Bedrock API require users to specify where to inject cache control checkpoints, litellm can automatically add them for you as a cost saving feature."}),(0,t.jsx)(et.Form.List,{name:"cache_control_injection_points",initialValue:[{location:"message"}],children:(l,{add:s,remove:r})=>(0,t.jsxs)(t.Fragment,{children:[l.map((s,i)=>(0,t.jsxs)("div",{className:"flex items-center mb-4 gap-4",children:[(0,t.jsx)(et.Form.Item,{...s,label:"Type",name:[s.name,"location"],initialValue:"message",className:"mb-0",style:{width:"180px"},children:(0,t.jsx)(W.Select,{disabled:!0,options:[{value:"message",label:"Message"}]})}),(0,t.jsx)(et.Form.Item,{...s,label:"Role",name:[s.name,"role"],className:"mb-0",style:{width:"180px"},tooltip:"LiteLLM will mark all messages of this role as cacheable",children:(0,t.jsx)(W.Select,{placeholder:"Select a role",allowClear:!0,options:[{value:"user",label:"User"},{value:"system",label:"System"},{value:"assistant",label:"Assistant"}],onChange:()=>{a(e.getFieldValue("cache_control_points"))}})}),(0,t.jsx)(et.Form.Item,{...s,label:"Index",name:[s.name,"index"],className:"mb-0",style:{width:"180px"},tooltip:"(Optional) If set litellm will mark the message at this index as cacheable",children:(0,t.jsx)(tI.default,{type:"number",placeholder:"Optional",step:1,onChange:()=>{a(e.getFieldValue("cache_control_points"))}})}),l.length>1&&(0,t.jsx)(tF.MinusCircleOutlined,{className:"text-red-500 cursor-pointer text-lg ml-12",onClick:()=>{r(s.name),setTimeout(()=>{a(e.getFieldValue("cache_control_points"))},0)}})]},s.key)),(0,t.jsx)(et.Form.Item,{children:(0,t.jsxs)("button",{type:"button",className:"flex items-center justify-center w-full border border-dashed border-gray-300 py-2 px-4 text-gray-600 hover:text-blue-600 hover:border-blue-300 transition-all rounded",onClick:()=>s(),children:[(0,t.jsx)(tr.PlusOutlined,{className:"mr-2"}),"Add Injection Point"]})})]})})]})]})};var tA=e.i(916940),tE=e.i(122550);let{Link:tL}=L.Typography,tR=({showAdvancedSettings:e,setShowAdvancedSettings:l,teams:s,guardrailsList:a,tagsList:r,accessToken:i})=>{let[o]=et.Form.useForm(),[n,d]=x.default.useState(!1),[c,m]=x.default.useState("per_token"),[u,h]=x.default.useState(!1),p=(e,t)=>t&&(isNaN(Number(t))||0>Number(t))?Promise.reject("Please enter a valid positive number"):Promise.resolve();return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(tC.Accordion,{className:"mt-2 mb-4",children:[(0,t.jsx)(tS.AccordionHeader,{children:(0,t.jsx)("b",{children:"Advanced Settings"})}),(0,t.jsx)(tk.AccordionBody,{children:(0,t.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,t.jsx)(et.Form.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,t.jsx)(es.Switch,{onChange:e=>{d(e),e||o.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{children:["Attached Knowledge Bases (RAG)"," ",(0,t.jsx)(E.Tooltip,{title:"Vector stores to use for RAG. Every request to this model will automatically retrieve context from these knowledge bases.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/knowledgebase",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"vector_store_ids",className:"mt-4",help:"Select vector stores to attach. Requests to this model will automatically use these for RAG. Set up vector stores in Tools > Vector Stores.",children:(0,t.jsx)(tA.default,{onChange:()=>{},accessToken:i,placeholder:"Select knowledge bases (optional)"})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(E.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails. Go to 'Guardrails' tab to create new guardrails.",children:(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:a.map(e=>({value:e,label:e}))})}),(0,t.jsx)(et.Form.Item,{label:"Tags",name:"tags",className:"mb-4",children:(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(r).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),n&&(0,t.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,t.jsx)(et.Form.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,t.jsx)(W.Select,{defaultValue:"per_token",onChange:e=>m(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})}),(0,t.jsx)(et.Form.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})})]}):(0,t.jsx)(et.Form.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})})]}),(0,t.jsx)(et.Form.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,t.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,t.jsx)(tL,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,t.jsx)(es.Switch,{onChange:e=>{let t=o.getFieldValue("litellm_extra_params");try{let l=t?JSON.parse(t):{};e?l.use_in_pass_through=!0:delete l.use_in_pass_through,Object.keys(l).length>0?o.setFieldValue("litellm_extra_params",JSON.stringify(l,null,2)):o.setFieldValue("litellm_extra_params","")}catch(t){e?o.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):o.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,t.jsx)(tP,{form:o,showCacheControl:u,onCacheControlChange:e=>{if(h(e),!e){let e=o.getFieldValue("litellm_extra_params");try{let t=e?JSON.parse(e):{};delete t.cache_control_injection_points,Object.keys(t).length>0?o.setFieldValue("litellm_extra_params",JSON.stringify(t,null,2)):o.setFieldValue("litellm_extra_params","")}catch(e){o.setFieldValue("litellm_extra_params","")}}}}),(0,t.jsx)(et.Form.Item,{label:"LiteLLM Params",name:"litellm_extra_params",tooltip:"Optional litellm params used for making a litellm.completion() call.",className:"mb-4 mt-4",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(tT.default,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,t.jsxs)(eD.Row,{className:"mb-4",children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,t.jsx)(tL,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,t.jsx)(et.Form.Item,{label:"Model Info",name:"model_info_params",tooltip:"Optional model info params. Returned when calling `/model/info` endpoint.",className:"mb-0",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(tT.default,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})};var tO=e.i(291542),tB=e.i(750113);let tz=({content:e,children:l,width:s="auto",className:a=""})=>{let[r,i]=(0,x.useState)(!1),[o,n]=(0,x.useState)("top"),d=(0,x.useRef)(null);return(0,t.jsxs)("div",{className:"relative inline-block",ref:d,children:[l||(0,t.jsx)(tB.QuestionCircleOutlined,{className:"ml-1 text-gray-500 cursor-help",onMouseEnter:()=>{if(d.current){let e=d.current.getBoundingClientRect(),t=e.top,l=window.innerHeight-e.bottom;t<300&&l>300?n("bottom"):n("top")}i(!0)},onMouseLeave:()=>i(!1)}),r&&(0,t.jsxs)("div",{className:`absolute left-1/2 -translate-x-1/2 z-50 bg-black/90 text-white p-2 rounded-md text-sm font-normal shadow-lg ${a}`,style:{["top"===o?"bottom":"top"]:"100%",width:s,marginBottom:"top"===o?"8px":"0",marginTop:"bottom"===o?"8px":"0"},children:[e,(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 w-0 h-0",style:{top:"top"===o?"100%":"auto",bottom:"bottom"===o?"100%":"auto",borderTop:"top"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderBottom:"bottom"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderLeft:"6px solid transparent",borderRight:"6px solid transparent"}})]})]})},tq=()=>{let e=et.Form.useFormInstance(),[l,s]=(0,x.useState)(0),a=et.Form.useWatch("model",e)||[],r=Array.isArray(a)?a:[a],i=et.Form.useWatch("custom_model_name",e),o=!r.includes("all-wildcard"),n=et.Form.useWatch("custom_llm_provider",e);if((0,x.useEffect)(()=>{if(i&&r.includes("custom")){let t=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?n===eM.Providers.Azure?{public_name:i,litellm_model:`azure/${i}`}:{public_name:i,litellm_model:i}:e);e.setFieldValue("model_mappings",t),s(e=>e+1)}},[i,r,n,e]),(0,x.useEffect)(()=>{if(r.length>0&&!r.includes("all-wildcard")){let t=e.getFieldValue("model_mappings")||[];if(t.length!==r.length||!r.every(e=>t.some(t=>"custom"===e?"custom"===t.litellm_model||t.litellm_model===i:n===eM.Providers.Azure?t.litellm_model===`azure/${e}`:t.litellm_model===e))){let t=r.map(e=>"custom"===e&&i?n===eM.Providers.Azure?{public_name:i,litellm_model:`azure/${i}`}:{public_name:i,litellm_model:i}:n===eM.Providers.Azure?{public_name:e,litellm_model:`azure/${e}`}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",t),s(e=>e+1)}}},[r,i,n,e]),!o)return null;let d=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-2 font-normal",children:"The name you specify in your API calls to LiteLLM Proxy"}),(0,t.jsxs)("div",{className:"mb-2 font-normal",children:[(0,t.jsx)("strong",{children:"Example:"})," If you name your public model"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"example-name"}),", and choose"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"openai/qwen-plus-latest"})," as the LiteLLM model"]}),(0,t.jsxs)("div",{className:"mb-2 font-normal",children:[(0,t.jsx)("strong",{children:"Usage:"})," You make an API call to the LiteLLM proxy with"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:'model = "example-name"'})]}),(0,t.jsxs)("div",{className:"font-normal",children:[(0,t.jsx)("strong",{children:"Result:"})," LiteLLM sends"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"qwen-plus-latest"})," to the provider"]})]}),c=(0,t.jsx)("div",{children:"The model name LiteLLM will send to the LLM API"}),m=[{title:(0,t.jsxs)("span",{className:"flex items-center",children:["Public Model Name",(0,t.jsx)(tz,{content:d,width:"500px"})]}),dataIndex:"public_name",key:"public_name",render:(l,s,a)=>(0,t.jsx)(eR.TextInput,{value:l,onChange:t=>{let l=t.target.value,s=[...e.getFieldValue("model_mappings")],r=n===eM.Providers.Anthropic,i=l.endsWith("-1m"),o=e.getFieldValue("litellm_extra_params"),d=!o||""===o.trim(),c=l;if(r&&i&&d){let t=JSON.stringify({extra_headers:{"anthropic-beta":"context-1m-2025-08-07"}},null,2);e.setFieldValue("litellm_extra_params",t),c=l.slice(0,-3)}s[a].public_name=c,e.setFieldValue("model_mappings",s)}})},{title:(0,t.jsxs)("span",{className:"flex items-center",children:["LiteLLM Model Name",(0,t.jsx)(tz,{content:c,width:"360px"})]}),dataIndex:"litellm_model",key:"litellm_model"}];return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(et.Form.Item,{label:"Model Mappings",name:"model_mappings",tooltip:"Map public model names to LiteLLM model names for load balancing",labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",rules:[{required:!0,validator:async(e,t)=>{if(!t||0===t.length)throw Error("At least one model mapping is required");if(t.filter(e=>!e.public_name||""===e.public_name.trim()).length>0)throw Error("All model mappings must have valid public names")}}],children:(0,t.jsx)(tO.Table,{dataSource:e.getFieldValue("model_mappings"),columns:m,pagination:!1,size:"small"},l)})})},tV=({selectedProvider:e,providerModels:l,getPlaceholder:s})=>{let a=et.Form.useFormInstance(),r=t=>{let l=t.target.value,s=(a.getFieldValue("model_mappings")||[]).map(t=>"custom"===t.public_name||"custom"===t.litellm_model?e===eM.Providers.Azure?{public_name:l,litellm_model:`azure/${l}`}:{public_name:l,litellm_model:l}:t);a.setFieldsValue({model_mappings:s})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(et.Form.Item,{label:"LiteLLM Model Name(s)",tooltip:"The model name LiteLLM will send to the LLM API",className:"mb-0",children:[(0,t.jsx)(et.Form.Item,{name:"model",rules:[{required:!0,message:`Please enter ${e===eM.Providers.Azure?"a deployment name":"at least one model"}.`}],noStyle:!0,children:e===eM.Providers.Azure||e===eM.Providers.OpenAI_Compatible||e===eM.Providers.Ollama?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(eR.TextInput,{placeholder:s(e),onChange:e===eM.Providers.Azure?e=>{let t=e.target.value,l=t?[{public_name:t,litellm_model:`azure/${t}`}]:[];a.setFieldsValue({model:t,model_mappings:l})}:void 0})}):l.length>0?(0,t.jsx)(W.Select,{mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:t=>{let l=Array.isArray(t)?t:[t];if(l.includes("all-wildcard"))a.setFieldsValue({model_name:void 0,model_mappings:[]});else if(JSON.stringify(a.getFieldValue("model"))!==JSON.stringify(l)){let t=l.map(t=>e===eM.Providers.Azure?{public_name:t,litellm_model:`azure/${t}`}:{public_name:t,litellm_model:t});a.setFieldsValue({model:l,model_mappings:t})}},optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:`All ${e} Models (Wildcard)`,value:"all-wildcard"},...l.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,t.jsx)(eR.TextInput,{placeholder:s(e)})}),(0,t.jsx)(et.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.model!==t.model,children:({getFieldValue:l})=>{let s=l("model")||[];return(Array.isArray(s)?s:[s]).includes("custom")&&(0,t.jsx)(et.Form.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,t.jsx)(eR.TextInput,{placeholder:e===eM.Providers.Azure?"Enter Azure deployment name":"Enter custom model name",onChange:r})})}})]}),(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:14,children:(0,t.jsx)(em.Text,{className:"mb-3 mt-1",children:e===eM.Providers.Azure?"Your deployment name will be saved as the public model name, and LiteLLM will use 'azure/deployment-name' internally":"The model name LiteLLM will send to the LLM API"})})]})]})},tD=[{value:"chat",label:"Chat - /chat/completions"},{value:"completion",label:"Completion - /completions"},{value:"embedding",label:"Embedding - /embeddings"},{value:"audio_speech",label:"Audio Speech - /audio/speech"},{value:"audio_transcription",label:"Audio Transcription - /audio/transcriptions"},{value:"image_generation",label:"Image Generation - /images/generations"},{value:"video_generation",label:"Video Generation - /videos"},{value:"rerank",label:"Rerank - /rerank"},{value:"realtime",label:"Realtime - /realtime"},{value:"batch",label:"Batch - /batch"},{value:"ocr",label:"OCR - /ocr"}],{Title:tH,Link:tG}=L.Typography,t$=({form:e,handleOk:a,selectedProvider:i,setSelectedProvider:o,providerModels:n,setProviderModelsFn:d,getPlaceholder:c,uploadProps:m,showAdvancedSettings:u,setShowAdvancedSettings:h,teams:p,credentials:g})=>{let[f,j]=(0,x.useState)("chat"),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)(!1),[N,w]=(0,x.useState)(""),{accessToken:C,userRole:S,premiumUser:k,userId:T}=(0,r.default)(),{data:F,isLoading:I,error:M}=eB(),{data:P,isLoading:A,error:O}=(()=>{let{accessToken:e,userId:t,userRole:a}=(0,r.default)();return(0,s.useQuery)({queryKey:ty.list({}),queryFn:async()=>(await (0,l.getGuardrailsList)(e)).guardrails.map(e=>e.guardrail_name),enabled:!!(e&&t&&a)})})(),{data:B,isLoading:z,error:q}=(0,tb.useTags)(),V=async()=>{v(!0),w(`test-${Date.now()}`),y(!0)},[D,H]=(0,x.useState)(!1),[G,$]=(0,x.useState)([]),[U,J]=(0,x.useState)(null);(0,x.useEffect)(()=>{(async()=>{$((await (0,l.modelAvailableCall)(C,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[C]);let Q=(0,x.useMemo)(()=>F?[...F].sort((e,t)=>e.provider_display_name.localeCompare(t.provider_display_name)):[],[F]),Y=M?M instanceof Error?M.message:"Failed to load providers":null,X=eZ.all_admin_roles.includes(S),Z=(0,eZ.isUserTeamAdminForAnyTeam)(p,T);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tH,{level:2,children:"Add Model"}),(0,t.jsx)(ej.Card,{children:(0,t.jsx)(et.Form,{form:e,onFinish:async e=>{console.log("🔥 Form onFinish triggered with values:",e),await a().then(()=>{J(null)})},onFinishFailed:e=>{console.log("💥 Form onFinishFailed triggered:",e)},labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[Z&&!X&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Select Team",name:"team_id",rules:[{required:!0,message:"Please select a team to continue"}],tooltip:"Select the team for which you want to add this model",children:(0,t.jsx)(tw.default,{onChange:e=>{J(e)}})}),!U&&(0,t.jsx)(tN.Alert,{message:"Team Selection Required",description:"As a team admin, you need to select your team first before adding models.",type:"info",showIcon:!0,className:"mb-4"})]}),(X||Z&&U)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"E.g. OpenAI, Azure OpenAI, Anthropic, Bedrock, etc.",labelCol:{span:10},labelAlign:"left",children:(0,t.jsxs)(W.Select,{virtual:!1,showSearch:!0,loading:I,placeholder:I?"Loading providers...":"Select a provider",optionFilterProp:"data-label",onChange:t=>{o(t),d(t),e.setFieldsValue({custom_llm_provider:t}),e.setFieldsValue({model:[],model_name:void 0})},children:[Y&&0===Q.length&&(0,t.jsx)(W.Select.Option,{value:"",children:Y},"__error"),Q.map(e=>{let l=e.provider_display_name,s=e.provider;return eM.providerLogoMap[l],(0,t.jsx)(W.Select.Option,{value:s,"data-label":l,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(R.ProviderLogo,{provider:s,className:"w-5 h-5"}),(0,t.jsx)("span",{children:l})]})},s)})]})}),(0,t.jsx)(tV,{selectedProvider:i,providerModels:n,getPlaceholder:c}),(0,t.jsx)(tq,{}),(0,t.jsx)(et.Form.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,t.jsx)(W.Select,{style:{width:"100%"},value:f,onChange:e=>j(e),options:tD})}),(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"mb-5 mt-1",children:[(0,t.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model"," ",(0,t.jsx)(tG,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(L.Typography.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,t.jsx)(et.Form.Item,{label:"Existing Credentials",name:"litellm_credential_name",initialValue:null,children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{value:null,label:"None"},...g.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,t.jsx)(et.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.litellm_credential_name!==t.litellm_credential_name||e.provider!==t.provider,children:({getFieldValue:e})=>{let l=e("litellm_credential_name");return(console.log("🔑 Credential Name Changed:",l),l)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,t.jsx)(eJ,{selectedProvider:i,uploadProps:m})]})}}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Model Info Settings"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(X||!Z)&&(0,t.jsx)(et.Form.Item,{label:"Team-BYOK Model",tooltip:"Only use this model + credential combination for this team. Useful when teams want to onboard their own OpenAI keys.",className:"mb-4",children:(0,t.jsx)(E.Tooltip,{title:k?"":"This is an enterprise-only feature. Upgrade to premium to restrict model+credential combinations to a specific team.",placement:"top",children:(0,t.jsx)(tv.Switch,{checked:D,onChange:t=>{H(t),t||e.setFieldValue("team_id",void 0)},disabled:!k})})}),D&&(X||!Z)&&(0,t.jsx)(et.Form.Item,{label:"Select Team",name:"team_id",className:"mb-4",tooltip:"Only keys for this team will be able to call this model.",rules:[{required:D&&!X,message:"Please select a team."}],children:(0,t.jsx)(tw.default,{disabled:!k})}),X&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(et.Form.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to give users access to select models, and add new ones to the group over time.",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:G.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})}),(0,t.jsx)(tR,{showAdvancedSettings:u,setShowAdvancedSettings:h,teams:p,guardrailsList:P||[],tagsList:B||{},accessToken:C||""})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(L.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(K.Button,{onClick:V,loading:b,children:"Test Connect"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Add Model"})]})]})]})})}),(0,t.jsx)(el.Modal,{title:"Connection Test Results",open:_,onCancel:()=>{y(!1),v(!1)},footer:[(0,t.jsx)(K.Button,{onClick:()=>{y(!1),v(!1)},children:"Close"},"close")],width:700,children:_&&(0,t.jsx)(tt,{formValues:e.getFieldsValue(),accessToken:C,testMode:f,modelName:e.getFieldValue("model_name")||e.getFieldValue("model"),onClose:()=>{y(!1),v(!1)},onTestComplete:()=>v(!1)},N)})]})},tU=({form:e,handleOk:l,selectedProvider:s,setSelectedProvider:a,providerModels:r,setProviderModelsFn:i,getPlaceholder:o,uploadProps:n,showAdvancedSettings:d,setShowAdvancedSettings:c,teams:m,credentials:u,accessToken:h,userRole:x})=>{let[p]=et.Form.useForm();return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(e4.TabGroup,{className:"w-full",children:[(0,t.jsxs)(e5.TabList,{className:"mb-4",children:[(0,t.jsx)(e2.Tab,{children:"Add Model"}),(0,t.jsx)(e2.Tab,{children:"Add Auto Router"})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t$,{form:e,handleOk:l,selectedProvider:s,setSelectedProvider:a,providerModels:r,setProviderModelsFn:i,getPlaceholder:o,uploadProps:n,showAdvancedSettings:d,setShowAdvancedSettings:c,teams:m,credentials:u})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t_,{form:p,handleOk:()=>{p.validateFields().then(e=>{tl(e,h,p,l)}).catch(e=>{console.error("Validation failed:",e)})},accessToken:h,userRole:x})})]})]})})};var tJ=e.i(798496),tK=e.i(536916),tW=e.i(502275),tQ=e.i(122577);let tY=[{pattern:/Missing .* API Key/i,replacement:"Missing API Key"},{pattern:/Connection timeout/i,replacement:"Connection timeout"},{pattern:/Network.*not.*ok/i,replacement:"Network connection failed"},{pattern:/403.*Forbidden/i,replacement:"Access forbidden - check API key permissions"},{pattern:/401.*Unauthorized/i,replacement:"Unauthorized - invalid API key"},{pattern:/429.*rate limit/i,replacement:"Rate limit exceeded"},{pattern:/500.*Internal Server Error/i,replacement:"Provider internal server error"},{pattern:/litellm\.AuthenticationError/i,replacement:"Authentication failed"},{pattern:/litellm\.RateLimitError/i,replacement:"Rate limit exceeded"},{pattern:/litellm\.APIError/i,replacement:"API error"}],tX=({accessToken:e,modelData:s,all_models_on_proxy:a,getDisplayModelName:r,setSelectedModelId:i,teams:o})=>{let n,d,c,m,[u,h]=(0,x.useState)({}),[p,g]=(0,x.useState)([]),[f,j]=(0,x.useState)(!1),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)(null),[N,w]=(0,x.useState)(!1),[C,S]=(0,x.useState)(null);(0,x.useRef)(null),(0,x.useEffect)(()=>{e&&s?.data&&(async()=>{let t={};s.data.forEach(e=>{let l=e.model_info?.id;l&&(t[l]={status:"none",lastCheck:"None",lastSuccess:"None",loading:!1,error:void 0,fullError:void 0,successResponse:void 0})});try{let a=await (0,l.latestHealthChecksCall)(e);a&&a.latest_health_checks&&"object"==typeof a.latest_health_checks&&Object.entries(a.latest_health_checks).forEach(([e,l])=>{if(!l||!s.data.some(t=>t.model_info?.id===e))return;let a=l.error_message||void 0;t[e]={status:l.status||"unknown",lastCheck:l.checked_at?new Date(l.checked_at).toLocaleString():"None",lastSuccess:"healthy"===l.status&&l.checked_at?new Date(l.checked_at).toLocaleString():"None",loading:!1,error:a?F(a):void 0,fullError:a,successResponse:"healthy"===l.status?l:void 0}})}catch(e){console.warn("Failed to load health check history (using default states):",e)}h(t)})()},[e,s]);let F=e=>{if(!e)return"Health check failed";let t="string"==typeof e?e:JSON.stringify(e),l=t.match(/(\w+Error):\s*(\d{3})/i);if(l)return`${l[1]}: ${l[2]}`;let s=t.match(/(AuthenticationError|RateLimitError|BadRequestError|InternalServerError|TimeoutError|NotFoundError|ForbiddenError|ServiceUnavailableError|BadGatewayError|ContentPolicyViolationError|\w+Error)/i),a=t.match(/\b(400|401|403|404|408|429|500|502|503|504)\b/);if(s&&a)return`${s[1]}: ${a[1]}`;if(a){let e=a[1];return`${({400:"BadRequestError",401:"AuthenticationError",403:"ForbiddenError",404:"NotFoundError",408:"TimeoutError",429:"RateLimitError",500:"InternalServerError",502:"BadGatewayError",503:"ServiceUnavailableError",504:"GatewayTimeoutError"})[e]}: ${e}`}if(s){let e=s[1],t={AuthenticationError:"401",RateLimitError:"429",BadRequestError:"400",InternalServerError:"500",TimeoutError:"408",NotFoundError:"404",ForbiddenError:"403",ServiceUnavailableError:"503",BadGatewayError:"502",GatewayTimeoutError:"504",ContentPolicyViolationError:"400"}[e];return t?`${e}: ${t}`:e}for(let{pattern:e,replacement:l}of tY)if(e.test(t))return l;if(/missing.*api.*key|invalid.*key|unauthorized/i.test(t))return"AuthenticationError: 401";if(/rate.*limit|too.*many.*requests/i.test(t))return"RateLimitError: 429";if(/timeout|timed.*out/i.test(t))return"TimeoutError: 408";if(/not.*found/i.test(t))return"NotFoundError: 404";if(/forbidden|access.*denied/i.test(t))return"ForbiddenError: 403";if(/internal.*server.*error/i.test(t))return"InternalServerError: 500";let r=t.replace(/[\n\r]+/g," ").replace(/\s+/g," ").trim(),i=r.split(/[.!?]/),o=i[0]?.trim();return o&&o.length>0?o.length>100?o.substring(0,97)+"...":o:r.length>100?r.substring(0,97)+"...":r},I=async t=>{if(e){h(e=>({...e,[t]:{...e[t],loading:!0,status:"checking"}}));try{let s=await (0,l.individualModelHealthCheckCall)(e,t),a=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){let e=s.unhealthy_endpoints[0]?.error||"Health check failed",l=F(e);h(s=>({...s,[t]:{status:"unhealthy",lastCheck:a,lastSuccess:s[t]?.lastSuccess||"None",loading:!1,error:l,fullError:e}}))}else h(e=>({...e,[t]:{status:"healthy",lastCheck:a,lastSuccess:a,loading:!1,successResponse:s}}));try{let s=await (0,l.latestHealthChecksCall)(e),a=s.latest_health_checks?.[t];if(a){let e=a.error_message||void 0;h(l=>({...l,[t]:{status:a.status||l[t]?.status||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():l[t]?.lastCheck||"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():l[t]?.lastSuccess||"None",loading:!1,error:e?F(e):l[t]?.error,fullError:e||l[t]?.fullError,successResponse:"healthy"===a.status?a:l[t]?.successResponse}}))}}catch(e){console.debug("Could not fetch updated status from database (non-critical):",e)}}catch(a){let e=new Date().toLocaleString(),l=a instanceof Error?a.message:String(a),s=F(l);h(a=>({...a,[t]:{status:"unhealthy",lastCheck:e,lastSuccess:a[t]?.lastSuccess||"None",loading:!1,error:s,fullError:l}}))}}},M=async()=>{let t=p.length>0?p:a,s=t.reduce((e,t)=>(e[t]={...u[t],loading:!0,status:"checking"},e),{});h(e=>({...e,...s}));let r={},i=t.map(async t=>{if(e)try{let s=await (0,l.individualModelHealthCheckCall)(e,t);r[t]=s;let a=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){let e=s.unhealthy_endpoints[0]?.error||"Health check failed",l=F(e);h(s=>({...s,[t]:{status:"unhealthy",lastCheck:a,lastSuccess:s[t]?.lastSuccess||"None",loading:!1,error:l,fullError:e}}))}else h(e=>({...e,[t]:{status:"healthy",lastCheck:a,lastSuccess:a,loading:!1,successResponse:s}}))}catch(a){console.error(`Health check failed for model id ${t}:`,a);let e=new Date().toLocaleString(),l=a instanceof Error?a.message:String(a),s=F(l);h(a=>({...a,[t]:{status:"unhealthy",lastCheck:e,lastSuccess:a[t]?.lastSuccess||"None",loading:!1,error:s,fullError:l}}))}});await Promise.allSettled(i);try{if(!e)return;let s=await (0,l.latestHealthChecksCall)(e);s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(([e,l])=>{if(t.includes(e)&&l){let t=l.error_message||void 0;h(s=>{let a=s[e];return{...s,[e]:{status:l.status||a?.status||"unknown",lastCheck:l.checked_at?new Date(l.checked_at).toLocaleString():a?.lastCheck||"None",lastSuccess:"healthy"===l.status&&l.checked_at?new Date(l.checked_at).toLocaleString():a?.lastSuccess||"None",loading:!1,error:t?F(t):a?.error,fullError:t||a?.fullError,successResponse:"healthy"===l.status?l:a?.successResponse}}})}})}catch(e){console.warn("Failed to fetch updated health statuses from database (non-critical):",e)}},P=e=>{j(e),e?g(a):g([])},A=()=>{y(!1),v(null)},L=()=>{w(!1),S(null)};return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eu.Title,{children:"Model Health Status"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mt-1",children:"Run health checks on individual models to verify they are working correctly"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[p.length>0&&(0,t.jsx)(T.Button,{size:"sm",variant:"light",onClick:()=>P(!1),className:"px-3 py-1 text-sm",children:"Clear Selection"}),(0,t.jsx)(T.Button,{size:"sm",variant:"secondary",onClick:M,disabled:Object.values(u).some(e=>e.loading),className:"px-3 py-1 text-sm",children:p.length>0&&p.length{t?g(t=>[...t,e]):(g(t=>t.filter(t=>t!==e)),j(!1))},d=e=>{switch(e){case"healthy":return(0,t.jsx)(k.Badge,{color:"emerald",children:"healthy"});case"unhealthy":return(0,t.jsx)(k.Badge,{color:"red",children:"unhealthy"});case"checking":return(0,t.jsx)(k.Badge,{color:"blue",children:"checking"});case"none":return(0,t.jsx)(k.Badge,{color:"gray",children:"none"});default:return(0,t.jsx)(k.Badge,{color:"gray",children:"unknown"})}},c=(e,t,l)=>{v({modelName:e,cleanedError:t,fullError:l}),y(!0)},m=(e,t)=>{S({modelName:e,response:t}),w(!0)},[{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tK.Checkbox,{checked:f,indeterminate:p.length>0&&!f,onChange:e=>P(e.target.checked),onClick:e=>e.stopPropagation()}),(0,t.jsx)("span",{children:"Model ID"})]}),accessorKey:"model_info.id",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=p.includes(s);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tK.Checkbox,{checked:a,onChange:e=>n(s,e.target.checked),onClick:e=>e.stopPropagation()}),(0,t.jsx)(E.Tooltip,{title:l.model_info.id,children:(0,t.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>i&&i(l.model_info.id),children:l.model_info.id})})]})}},{header:"Model Name",accessorKey:"model_name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=r(l)||l.model_name;return(0,t.jsx)("div",{className:"font-medium text-sm",children:(0,t.jsx)(E.Tooltip,{title:s,children:(0,t.jsx)("div",{className:"truncate max-w-[200px]",children:s})})})}},{header:"Team Alias",accessorKey:"model_info.team_id",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=l.model_info?.team_id;if(!s)return(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"-"});let a=o?.find(e=>e.team_id===s),r=a?.team_alias||s;return(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(E.Tooltip,{title:r,children:(0,t.jsx)("div",{className:"truncate max-w-[150px]",children:r})})})}},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("health_status")||"unknown",a=t.getValue("health_status")||"unknown",r={healthy:0,checking:1,unknown:2,unhealthy:3};return(r[s]??4)-(r[a]??4)},cell:({row:e})=>{let l=e.original,s={status:l.health_status,loading:l.health_loading,error:l.health_error};if(s.loading)return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse"}),(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:"Checking..."})]});let a=l.model_info?.id??"",i=r(l)||l.model_name,o="healthy"===s.status&&u[a]?.successResponse;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d(s.status),o&&m&&(0,t.jsx)(E.Tooltip,{title:"View response details",placement:"top",children:(0,t.jsx)("button",{onClick:()=>m(i,u[a]?.successResponse),className:"p-1 text-green-600 hover:text-green-800 hover:bg-green-50 rounded cursor-pointer transition-colors",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"h-4 w-4"})})})]})}},{header:"Error Details",accessorKey:"health_error",enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=r(l)||l.model_name,i=u[s];if(!i?.error)return(0,t.jsx)(em.Text,{className:"text-gray-400 text-sm",children:"No errors"});let o=i.error,n=i.fullError||i.error;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"max-w-[200px]",children:(0,t.jsx)(E.Tooltip,{title:o,placement:"top",children:(0,t.jsx)(em.Text,{className:"text-red-600 text-sm truncate",children:o})})}),c&&n!==o&&(0,t.jsx)(E.Tooltip,{title:"View full error details",placement:"top",children:(0,t.jsx)("button",{onClick:()=>c(a,o,n),className:"p-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded cursor-pointer transition-colors",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"h-4 w-4"})})})]})}},{header:"Last Check",accessorKey:"last_check",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("last_check")||"Never checked",a=t.getValue("last_check")||"Never checked";if("Never checked"===s&&"Never checked"===a)return 0;if("Never checked"===s)return 1;if("Never checked"===a)return -1;if("Check in progress..."===s&&"Check in progress..."===a)return 0;if("Check in progress..."===s)return -1;if("Check in progress..."===a)return 1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:({row:e})=>{let l=e.original;return(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:l.health_loading?"Check in progress...":l.last_check})}},{header:"Last Success",accessorKey:"last_success",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("last_success")||"Never succeeded",a=t.getValue("last_success")||"Never succeeded";if("Never succeeded"===s&&"Never succeeded"===a)return 0;if("Never succeeded"===s)return 1;if("Never succeeded"===a)return -1;if("None"===s&&"None"===a)return 0;if("None"===s)return 1;if("None"===a)return -1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:({row:e})=>{let l=e.original,s=u[l.model_info?.id??""],a=s?.lastSuccess||"None";return(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:a})}},{header:"Actions",id:"actions",cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=l.health_status&&"none"!==l.health_status,r=l.health_loading?"Checking...":a?"Re-run Health Check":"Run Health Check";return(0,t.jsx)(E.Tooltip,{title:r,placement:"top",children:(0,t.jsx)("button",{"data-testid":"run-health-check-btn",className:`p-2 rounded-md transition-colors ${l.health_loading?"text-gray-400 cursor-not-allowed bg-gray-100":"text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50"}`,onClick:()=>{l.health_loading||I(s)},disabled:l.health_loading,children:l.health_loading?(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse"}),(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}):a?(0,t.jsx)(e0.RefreshIcon,{className:"h-4 w-4"}):(0,t.jsx)(tQ.PlayIcon,{className:"h-4 w-4"})})})},enableSorting:!1}]),data:s.data.map(e=>{let t=e.model_info?.id,l=(t?u[t]:null)||{status:"none",lastCheck:"None",loading:!1};return{model_name:e.model_name,model_info:e.model_info,provider:e.provider,litellm_model_name:e.litellm_model_name,health_status:l.status,last_check:l.lastCheck,last_success:l.lastSuccess||"None",health_loading:l.loading,health_error:l.error,health_full_error:l.fullError}}),isLoading:!1})}),(0,t.jsx)(el.Modal,{title:b?`Health Check Error - ${b.modelName}`:"Error Details",open:_,onCancel:A,footer:[(0,t.jsx)(K.Button,{onClick:A,children:"Close"},"close")],width:800,children:b&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Error:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,t.jsx)(em.Text,{className:"text-red-800",children:b.cleanedError})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Full Error Details:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:b.fullError})})]})]})}),(0,t.jsx)(el.Modal,{title:C?`Health Check Response - ${C.modelName}`:"Response Details",open:N,onCancel:L,footer:[(0,t.jsx)(K.Button,{onClick:L,children:"Close"},"close")],width:800,children:C&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Status:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:(0,t.jsx)(em.Text,{className:"text-green-800",children:"Health check passed successfully"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Response Details:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(C.response,null,2)})})]})]})})]})};var tZ=e.i(250980),t0=e.i(797672),t1=e.i(871943),t2=e.i(502547);let t4=({accessToken:e,initialModelGroupAlias:s={},onAliasUpdate:a})=>{let[r,i]=(0,x.useState)([]),[o,n]=(0,x.useState)({aliasName:"",targetModelGroup:""}),[d,c]=(0,x.useState)(null),[m,u]=(0,x.useState)(!0);(0,x.useEffect)(()=>{i(Object.entries(s).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModelGroup:"string"==typeof t?t:t?.model??""})))},[s]);let h=async t=>{if(!e)return console.error("Access token is missing"),!1;try{let s={};return t.forEach(e=>{s[e.aliasName]=e.targetModelGroup}),console.log("Saving model group alias:",s),await (0,l.setCallbacksCall)(e,{router_settings:{model_group_alias:s}}),a&&a(s),!0}catch(e){return console.error("Failed to save model group alias settings:",e),D.default.fromBackend("Failed to save model group alias settings"),!1}},b=async()=>{if(!o.aliasName||!o.targetModelGroup)return void D.default.fromBackend("Please provide both alias name and target model group");if(r.some(e=>e.aliasName===o.aliasName))return void D.default.fromBackend("An alias with this name already exists");let e=[...r,{id:`${Date.now()}-${o.aliasName}`,aliasName:o.aliasName,targetModelGroup:o.targetModelGroup}];await h(e)&&(i(e),n({aliasName:"",targetModelGroup:""}),D.default.success("Alias added successfully"))},v=async()=>{if(!d)return;if(!d.aliasName||!d.targetModelGroup)return void D.default.fromBackend("Please provide both alias name and target model group");if(r.some(e=>e.id!==d.id&&e.aliasName===d.aliasName))return void D.default.fromBackend("An alias with this name already exists");let e=r.map(e=>e.id===d.id?d:e);await h(e)&&(i(e),c(null),D.default.success("Alias updated successfully"))},N=()=>{c(null)},w=async e=>{let t=r.filter(t=>t.id!==e);await h(t)&&(i(t),D.default.success("Alias deleted successfully"))},C=r.reduce((e,t)=>(e[t.aliasName]=t.targetModelGroup,e),{});return(0,t.jsxs)(eL.Card,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>u(!m),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(eu.Title,{className:"mb-0",children:"Model Group Alias Settings"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Create aliases for your model groups to simplify API calls. For example, you can create an alias 'gpt-4o' that points to 'gpt-4o-mini-openai' model group."})]}),(0,t.jsx)("div",{className:"flex items-center",children:m?(0,t.jsx)(t1.ChevronDownIcon,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(t2.ChevronRightIcon,{className:"w-5 h-5 text-gray-500"})})]}),m&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(em.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:o.aliasName,onChange:e=>n({...o,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model Group"}),(0,t.jsx)("input",{type:"text",value:o.targetModelGroup,onChange:e=>n({...o,targetModelGroup:e.target.value}),placeholder:"e.g., gpt-4o-mini-openai",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:b,disabled:!o.aliasName||!o.targetModelGroup,className:`flex items-center px-4 py-2 rounded-md text-sm ${!o.aliasName||!o.targetModelGroup?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(tZ.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(em.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(p.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(_.TableRow,{children:[(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Target Model Group"}),(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(j.TableBody,{children:[r.map(e=>(0,t.jsx)(_.TableRow,{className:"h-8",children:d&&d.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:d.aliasName,onChange:e=>c({...d,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(y.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:d.targetModelGroup,onChange:e=>c({...d,targetModelGroup:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(y.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:v,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:N,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.TableCell,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,t.jsx)(y.TableCell,{className:"py-0.5 text-sm text-gray-500",children:e.targetModelGroup}),(0,t.jsx)(y.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{c({...e})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(t0.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>w(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(S.TrashIcon,{className:"w-3 h-3"})})]})})]})},e.id)),0===r.length&&(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(eu.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config.yaml:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["router_settings:",(0,t.jsx)("br",{}),"  model_group_alias:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"    # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'    "',e,'": "',l,'"']},e))]})})]})]})]})};var t5=e.i(530212);let t6=x.forwardRef(function(e,t){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"}))});var t3=e.i(678784),t8=e.i(118366),t7=e.i(500330);let t9=({isVisible:e,onCancel:s,onSuccess:a,modelData:r,accessToken:i,userRole:o})=>{let[n]=et.Form.useForm(),[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)([]),[h,p]=(0,x.useState)([]),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null);(0,x.useEffect)(()=>{e&&r&&v()},[e,r]),(0,x.useEffect)(()=>{let t=async()=>{if(i)try{let e=await (0,l.modelAvailableCall)(i,"","",!1,null,!0,!0);u(e.data.map(e=>e.id))}catch(e){console.error("Error fetching model access groups:",e)}},s=async()=>{if(i)try{let e=await (0,ts.fetchAvailableModels)(i);p(e)}catch(e){console.error("Error fetching model info:",e)}};e&&(t(),s())},[e,i]);let v=()=>{try{let e=null;r.litellm_params?.auto_router_config&&(e="string"==typeof r.litellm_params.auto_router_config?JSON.parse(r.litellm_params.auto_router_config):r.litellm_params.auto_router_config),b(e),n.setFieldsValue({auto_router_name:r.model_name,auto_router_default_model:r.litellm_params?.auto_router_default_model||"",auto_router_embedding_model:r.litellm_params?.auto_router_embedding_model||"",model_access_group:r.model_info?.access_groups||[]});let t=new Set(h.map(e=>e.model_group));f(!t.has(r.litellm_params?.auto_router_default_model)),_(!t.has(r.litellm_params?.auto_router_embedding_model))}catch(e){console.error("Error parsing auto router config:",e),D.default.fromBackend("Error loading auto router configuration")}},N=async()=>{try{c(!0);let e=await n.validateFields(),t={...r.litellm_params,auto_router_config:JSON.stringify(y),auto_router_default_model:e.auto_router_default_model,auto_router_embedding_model:e.auto_router_embedding_model||void 0},o={...r.model_info,access_groups:e.model_access_group||[]},d={model_name:e.auto_router_name,litellm_params:t,model_info:o};await (0,l.modelPatchUpdateCall)(i,d,r.model_info.id);let m={...r,model_name:e.auto_router_name,litellm_params:t,model_info:o};D.default.success("Auto router configuration updated successfully"),a(m),s()}catch(e){console.error("Error updating auto router:",e),D.default.fromBackend("Failed to update auto router configuration")}finally{c(!1)}},w=h.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsx)(el.Modal,{title:"Edit Auto Router Configuration",open:e,onCancel:s,footer:[(0,t.jsx)(K.Button,{onClick:s,children:"Cancel"},"cancel"),(0,t.jsx)(K.Button,{loading:d,onClick:N,children:"Save Changes"},"submit")],width:1e3,destroyOnHidden:!0,children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(em.Text,{className:"text-gray-600",children:"Edit the auto router configuration including routing logic, default models, and access settings."}),(0,t.jsxs)(et.Form,{form:n,layout:"vertical",className:"space-y-4",children:[(0,t.jsx)(et.Form.Item,{label:"Auto Router Name",name:"auto_router_name",rules:[{required:!0,message:"Auto router name is required"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(tc,{modelInfo:h,value:y,onChange:e=>{b(e)}})}),(0,t.jsx)(et.Form.Item,{label:"Default Model",name:"auto_router_default_model",rules:[{required:!0,message:"Default model is required"}],children:(0,t.jsx)(W.Select,{placeholder:"Select a default model",onChange:e=>{f("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model name"}],showSearch:!0})}),(0,t.jsx)(et.Form.Item,{label:"Embedding Model",name:"auto_router_embedding_model",children:(0,t.jsx)(W.Select,{placeholder:"Select an embedding model (optional)",onChange:e=>{_("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model name"}],showSearch:!0,allowClear:!0})}),"Admin"===o&&(0,t.jsx)(et.Form.Item,{label:"Model Access Groups",name:"model_access_group",tooltip:"Control who can access this auto router",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:m.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})]})]})})},{Title:le,Link:lt}=L.Typography,ll=({isVisible:e,onCancel:l,onAddCredential:s,existingCredential:a,setIsCredentialModalOpen:r})=>{let[i]=et.Form.useForm();return console.log(`existingCredential in add credentials tab: ${JSON.stringify(a)}`),(0,t.jsx)(el.Modal,{title:"Reuse Credentials",open:e,onCancel:()=>{l(),i.resetFields()},footer:null,width:600,children:(0,t.jsxs)(et.Form,{form:i,onFinish:e=>{s(e),i.resetFields(),r(!1)},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:a?.credential_name,children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries(a?.credential_values||{}).map(([e,l])=>(0,t.jsx)(et.Form.Item,{label:e,name:e,initialValue:l,children:(0,t.jsx)(eR.TextInput,{placeholder:`Enter ${e}`,disabled:!0})},e)),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(lt,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:()=>{l(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})};function ls({modelId:e,onClose:s,accessToken:a,userID:r,userRole:i,onModelUpdate:o,modelAccessGroups:c}){let m,[u]=et.Form.useForm(),[h,p]=(0,x.useState)(null),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)(!1),[C,k]=(0,x.useState)(!1),[F,I]=(0,x.useState)(!1),[M,P]=(0,x.useState)(null),[A,L]=(0,x.useState)(!1),[R,O]=(0,x.useState)({}),[B,z]=(0,x.useState)(!1),[H,G]=(0,x.useState)([]),[J,Q]=(0,x.useState)({}),[Y,X]=(0,x.useState)([]),{data:Z,isLoading:ee}=(0,d.useModelsInfo)(1,50,void 0,e),{data:es}=(0,n.useModelCostMap)(),{data:ea}=(0,d.useModelHub)(),er=e=>null!=es&&"object"==typeof es&&e in es?es[e].litellm_provider:"openai",eo=(0,x.useMemo)(()=>Z?.data&&0!==Z.data.length&&ei(Z,er).data[0]||null,[Z,es]),en=("Admin"===i||eo?.model_info?.created_by===r)&&eo?.model_info?.db_model,ed="Admin"===i,ec=eo?.litellm_params?.auto_router_config!=null,eh=eo?.litellm_params?.litellm_credential_name!=null&&eo?.litellm_params?.litellm_credential_name!=void 0;(0,x.useEffect)(()=>{if(eo&&!h){let e=eo;e.litellm_model_name||(e={...e,litellm_model_name:e?.litellm_params?.litellm_model_name??e?.litellm_params?.model??e?.model_info?.key??null}),p(e),e?.litellm_params?.cache_control_injection_points&&L(!0)}},[eo,h]),(0,x.useEffect)(()=>{let t=async()=>{if(!a||eo)return;let t=(await (0,l.modelInfoV1Call)(a,e)).data[0];t&&!t.litellm_model_name&&(t={...t,litellm_model_name:t?.litellm_params?.litellm_model_name??t?.litellm_params?.model??t?.model_info?.key??null}),p(t),t?.litellm_params?.cache_control_injection_points&&L(!0)},s=async()=>{if(a)try{let e=(await (0,l.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);G(e)}catch(e){console.error("Failed to fetch guardrails:",e)}},r=async()=>{if(a)try{let e=await (0,l.tagListCall)(a);Q(e)}catch(e){console.error("Failed to fetch tags:",e)}},i=async()=>{if(a)try{let e=await (0,l.credentialListCall)(a);X(e.credentials||[])}catch(e){console.error("Failed to fetch credentials:",e)}};(async()=>{if(!a||eh)return;let t=await (0,l.credentialGetCall)(a,null,e);P({credential_name:t.credential_name,credential_values:t.credential_values,credential_info:t.credential_info})})(),t(),s(),r(),i()},[a,e]);let ex=async t=>{if(!a)return;let s={credential_name:t.credential_name,model_id:e,credential_info:{custom_llm_provider:h.litellm_params?.custom_llm_provider}};D.default.info("Storing credential.."),await (0,l.credentialCreateCall)(a,s),D.default.success("Credential stored successfully")},ep=async t=>{try{let s;if(!a)return;k(!0);let r={};try{r=t.litellm_extra_params?JSON.parse(t.litellm_extra_params):{},delete r.litellm_credential_name}catch(e){D.default.fromBackend("Invalid JSON in LiteLLM Params"),k(!1);return}let i={...t.litellm_params,...r,model:t.litellm_model_name,api_base:t.api_base,custom_llm_provider:t.custom_llm_provider,organization:t.organization,tpm:t.tpm,rpm:t.rpm,max_retries:t.max_retries,timeout:t.timeout,stream_timeout:t.stream_timeout,input_cost_per_token:t.input_cost/1e6,output_cost_per_token:t.output_cost/1e6,tags:t.tags};t.litellm_credential_name?i.litellm_credential_name=t.litellm_credential_name:delete i.litellm_credential_name,t.guardrails&&(i.guardrails=t.guardrails),void 0!==t.vector_store_ids&&(i.vector_store_ids=Array.isArray(t.vector_store_ids)?t.vector_store_ids:[]),t.cache_control&&t.cache_control_injection_points?.length>0?i.cache_control_injection_points=t.cache_control_injection_points:delete i.cache_control_injection_points;try{s=t.model_info?JSON.parse(t.model_info):eo.model_info,t.model_access_group&&(s={...s,access_groups:t.model_access_group}),void 0!==t.health_check_model&&(s={...s,health_check_model:t.health_check_model})}catch(e){D.default.fromBackend("Invalid JSON in Model Info");return}let n={model_name:t.model_name,litellm_params:i,model_info:s};await (0,l.modelPatchUpdateCall)(a,n,e);let d={...h,model_name:t.model_name,litellm_model_name:t.litellm_model_name,litellm_params:i,model_info:s};p(d),o&&o(d),D.default.success("Model settings updated successfully"),N(!1),I(!1)}catch(e){console.error("Error updating model:",e),D.default.fromBackend("Failed to update model settings")}finally{k(!1)}};if(ee)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsx)(em.Text,{children:"Loading..."})]});if(!eo)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsx)(em.Text,{children:"Model not found"})]});let eg=async()=>{if(a)try{D.default.info("Testing connection...");let e=await (0,l.testConnectionRequest)(a,{custom_llm_provider:h.litellm_params.custom_llm_provider,litellm_credential_name:h.litellm_params.litellm_credential_name,model:h.litellm_model_name},{mode:h.model_info?.mode},h.model_info?.mode);if("success"===e.status)D.default.success("Connection test successful!");else throw Error(e?.result?.error||e?.message||"Unknown error")}catch(e){e instanceof Error?D.default.error("Error testing connection: "+(0,tE.truncateString)(e.message,100)):D.default.error("Error testing connection: "+String(e))}},ef=async()=>{try{if(_(!0),!a)return;await (0,l.modelDeleteCall)(a,e),D.default.success("Model deleted successfully"),o&&o({deleted:!0,model_info:{id:e}}),s()}catch(e){console.error("Error deleting the model:",e),D.default.fromBackend("Failed to delete model")}finally{_(!1),f(!1)}},ej=async(e,t)=>{await (0,t7.copyToClipboard)(e)&&(O(e=>({...e,[t]:!0})),setTimeout(()=>{O(e=>({...e,[t]:!1}))},2e3))},e_=eo.litellm_model_name.includes("*");return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsxs)(eu.Title,{children:["Public Model Name: ",q(eo)]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(em.Text,{className:"text-gray-500 font-mono",children:eo.model_info.id}),(0,t.jsx)(K.Button,{type:"text",size:"small",icon:R["model-id"]?(0,t.jsx)(t3.CheckIcon,{size:12}):(0,t.jsx)(t8.CopyIcon,{size:12}),onClick:()=>ej(eo.model_info.id,"model-id"),className:`left-2 z-10 transition-all duration-200 ${R["model-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(T.Button,{variant:"secondary",icon:e0.RefreshIcon,onClick:eg,className:"flex items-center gap-2","data-testid":"test-connection-button",children:"Test Connection"}),(0,t.jsx)(T.Button,{icon:t6,variant:"secondary",onClick:()=>b(!0),className:"flex items-center",disabled:!ed,"data-testid":"reuse-credentials-button",children:"Re-use Credentials"}),(0,t.jsx)(T.Button,{icon:S.TrashIcon,variant:"secondary",onClick:()=>f(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-700",disabled:!en,"data-testid":"delete-model-button",children:"Delete Model"})]})]}),(0,t.jsxs)(e4.TabGroup,{children:[(0,t.jsxs)(e5.TabList,{className:"mb-6",children:[(0,t.jsx)(e2.Tab,{children:"Overview"}),(0,t.jsx)(e2.Tab,{children:"Raw JSON"})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsxs)($.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Provider"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[eo.provider&&(0,t.jsx)("img",{src:(0,eM.getProviderLogoAndName)(eo.provider).logo,alt:`${eo.provider} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,l=t.parentElement;if(l&&l.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=eo.provider?.charAt(0)||"-",l.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}),(0,t.jsx)(eu.Title,{children:eo.provider||"Not Set"})]})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"LiteLLM Model"}),(0,t.jsx)("div",{className:"mt-2 overflow-hidden",children:(0,t.jsx)(E.Tooltip,{title:eo.litellm_model_name||"Not Set",children:(0,t.jsx)("div",{className:"break-all text-sm font-medium leading-relaxed cursor-pointer",children:eo.litellm_model_name||"Not Set"})})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Pricing"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(em.Text,{children:["Input: $",eo.input_cost,"/1M tokens"]}),(0,t.jsxs)(em.Text,{children:["Output: $",eo.output_cost,"/1M tokens"]})]})]})]}),(0,t.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Created At"," ",eo.model_info.created_at?new Date(eo.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Created By ",eo.model_info.created_by||"Not Set"]})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eu.Title,{children:"Model Settings"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[ec&&en&&!F&&(0,t.jsx)(T.Button,{onClick:()=>z(!0),className:"flex items-center",children:"Edit Auto Router"}),en?!F&&(0,t.jsx)(T.Button,{onClick:()=>I(!0),className:"flex items-center",children:"Edit Settings"}):(0,t.jsx)(E.Tooltip,{title:"Only DB models can be edited. You must be an admin or the creator of the model to edit it.",children:(0,t.jsx)(w.InfoCircleOutlined,{})})]})]}),h?(0,t.jsx)(et.Form,{form:u,onFinish:ep,initialValues:{model_name:h.model_name,litellm_model_name:h.litellm_model_name,api_base:h.litellm_params.api_base,custom_llm_provider:h.litellm_params.custom_llm_provider,organization:h.litellm_params.organization,tpm:h.litellm_params.tpm,rpm:h.litellm_params.rpm,max_retries:h.litellm_params.max_retries,timeout:h.litellm_params.timeout,stream_timeout:h.litellm_params.stream_timeout,input_cost:h.litellm_params.input_cost_per_token?1e6*h.litellm_params.input_cost_per_token:h.model_info?.input_cost_per_token*1e6||null,output_cost:h.litellm_params?.output_cost_per_token?1e6*h.litellm_params.output_cost_per_token:h.model_info?.output_cost_per_token*1e6||null,cache_control:!!h.litellm_params?.cache_control_injection_points,cache_control_injection_points:h.litellm_params?.cache_control_injection_points||[],model_access_group:Array.isArray(h.model_info?.access_groups)?h.model_info.access_groups:[],guardrails:Array.isArray(h.litellm_params?.guardrails)?h.litellm_params.guardrails:[],vector_store_ids:Array.isArray(h.litellm_params?.vector_store_ids)?h.litellm_params.vector_store_ids:[],tags:Array.isArray(h.litellm_params?.tags)?h.litellm_params.tags:[],health_check_model:e_?h.model_info?.health_check_model:null,litellm_credential_name:h.litellm_params?.litellm_credential_name||"",litellm_extra_params:JSON.stringify(Object.fromEntries(Object.entries(h.litellm_params||{}).filter(([e])=>"litellm_credential_name"!==e)),null,2)},layout:"vertical",onValuesChange:()=>N(!0),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Name"}),F?(0,t.jsx)(et.Form.Item,{name:"model_name",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter model name"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"LiteLLM Model Name"}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_model_name",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter LiteLLM model name"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_model_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),F?(0,t.jsx)(et.Form.Item,{name:"input_cost",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter input cost"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h?.litellm_params?.input_cost_per_token?(h.litellm_params?.input_cost_per_token*1e6).toFixed(4):h?.model_info?.input_cost_per_token?(1e6*h.model_info.input_cost_per_token).toFixed(4):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),F?(0,t.jsx)(et.Form.Item,{name:"output_cost",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter output cost"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h?.litellm_params?.output_cost_per_token?(1e6*h.litellm_params.output_cost_per_token).toFixed(4):h?.model_info?.output_cost_per_token?(1e6*h.model_info.output_cost_per_token).toFixed(4):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"API Base"}),F?(0,t.jsx)(et.Form.Item,{name:"api_base",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter API base"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.api_base||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Custom LLM Provider"}),F?(0,t.jsx)(et.Form.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter custom LLM provider"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.custom_llm_provider||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Organization"}),F?(0,t.jsx)(et.Form.Item,{name:"organization",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter organization"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.organization||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"TPM (Tokens per Minute)"}),F?(0,t.jsx)(et.Form.Item,{name:"tpm",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter TPM"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.tpm||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"RPM (Requests per Minute)"}),F?(0,t.jsx)(et.Form.Item,{name:"rpm",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter RPM"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.rpm||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Max Retries"}),F?(0,t.jsx)(et.Form.Item,{name:"max_retries",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter max retries"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.max_retries||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Timeout (seconds)"}),F?(0,t.jsx)(et.Form.Item,{name:"timeout",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter timeout"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.timeout||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Stream Timeout (seconds)"}),F?(0,t.jsx)(et.Form.Item,{name:"stream_timeout",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter stream timeout"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.stream_timeout||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Access Groups"}),F?(0,t.jsx)(et.Form.Item,{name:"model_access_group",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:c?.map(e=>({value:e,label:e}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_info?.access_groups?Array.isArray(h.model_info.access_groups)?h.model_info.access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.model_info.access_groups.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No groups assigned":h.model_info.access_groups:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["Guardrails",(0,t.jsx)(E.Tooltip,{title:"Apply safety guardrails to this model to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"guardrails",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing guardrails or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:H.map(e=>({value:e,label:e}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.guardrails?Array.isArray(h.litellm_params.guardrails)?h.litellm_params.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.guardrails.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:e},l))}):"No guardrails assigned":h.litellm_params.guardrails:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["Attached Knowledge Bases (RAG)",(0,t.jsx)(E.Tooltip,{title:"Vector stores used for RAG. Every request to this model will automatically retrieve context from these knowledge bases.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/knowledgebase",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"vector_store_ids",className:"mb-0",children:(0,t.jsx)(tA.default,{onChange:()=>{},accessToken:a||"",placeholder:"Select knowledge bases (optional)"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.vector_store_ids?Array.isArray(h.litellm_params.vector_store_ids)?h.litellm_params.vector_store_ids.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.vector_store_ids.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No knowledge bases attached":String(h.litellm_params.vector_store_ids):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Tags"}),F?(0,t.jsx)(et.Form.Item,{name:"tags",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing tags or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:Object.values(J).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.tags?Array.isArray(h.litellm_params.tags)?h.litellm_params.tags.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.tags.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:e},l))}):"No tags assigned":h.litellm_params.tags:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Existing Credentials"}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_credential_name",className:"mb-0",children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{value:"",label:"None"},...Y.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.litellm_credential_name||"Manual"})]}),e_&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Health Check Model"}),F?(0,t.jsx)(et.Form.Item,{name:"health_check_model",className:"mb-0",children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select existing health check model",optionFilterProp:"children",allowClear:!0,options:(m=eo.litellm_model_name.split("/")[0],ea?.data?.filter(e=>e.providers?.includes(m)&&e.model_group!==eo.litellm_model_name).map(e=>({value:e.model_group,label:e.model_group}))||[])})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_info?.health_check_model||"Not Set"})]}),F?(0,t.jsx)(tP,{form:u,showCacheControl:A,onCacheControlChange:e=>L(e)}):(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Cache Control"}),(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.cache_control_injection_points?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"Enabled"}),(0,t.jsx)("div",{className:"mt-2",children:h.litellm_params.cache_control_injection_points.map((e,l)=>(0,t.jsxs)("div",{className:"text-sm text-gray-600 mb-1",children:["Location: ",e.location,",",e.role&&(0,t.jsxs)("span",{children:[" Role: ",e.role]}),void 0!==e.index&&(0,t.jsxs)("span",{children:[" Index: ",e.index]})]},l))})]}):"Disabled"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Info"}),F?(0,t.jsx)(et.Form.Item,{name:"model_info",className:"mb-0",children:(0,t.jsx)(eV.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}',defaultValue:JSON.stringify(eo.model_info,null,2)})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(h.model_info,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["LiteLLM Params",(0,t.jsx)(E.Tooltip,{title:"Optional litellm params used for making a litellm.completion() call. Some params are automatically added by LiteLLM.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_extra_params",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(eV.Input.TextArea,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(h.litellm_params,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:eo.model_info.team_id||"Not Set"})]})]}),F&&(0,t.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,t.jsx)(T.Button,{variant:"secondary",onClick:()=>{u.resetFields(),N(!1),I(!1)},disabled:C,children:"Cancel"}),(0,t.jsx)(T.Button,{variant:"primary",onClick:()=>u.submit(),loading:C,children:"Save Changes"})]})]})}):(0,t.jsx)(em.Text,{children:"Loading..."})]})]}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(eL.Card,{children:(0,t.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(eo,null,2)})})})]})]}),(0,t.jsx)(V.default,{isOpen:g,title:"Delete Model",alertMessage:"This action cannot be undone.",message:"Are you sure you want to delete this model?",resourceInformationTitle:"Model Information",resourceInformation:[{label:"Model Name",value:eo?.model_name||"Not Set"},{label:"LiteLLM Model Name",value:eo?.litellm_model_name||"Not Set"},{label:"Provider",value:eo?.provider||"Not Set"},{label:"Created By",value:eo?.model_info?.created_by||"Not Set"}],onCancel:()=>f(!1),onOk:ef,confirmLoading:j}),y&&!eh?(0,t.jsx)(ll,{isVisible:y,onCancel:()=>b(!1),onAddCredential:ex,existingCredential:M,setIsCredentialModalOpen:b}):(0,t.jsx)(el.Modal,{open:y,onCancel:()=>b(!1),title:"Using Existing Credential",children:(0,t.jsx)(em.Text,{children:eo.litellm_params.litellm_credential_name})}),(0,t.jsx)(t9,{isVisible:B,onCancel:()=>z(!1),onSuccess:e=>{p(e),o&&o(e)},modelData:h||eo,accessToken:a||"",userRole:i||""})]})}var la=e.i(37091),lr=e.i(218129);let li=({value:e={},onChange:l})=>{let[s,a]=(0,x.useState)(Object.entries(e)),r=(e,t,r)=>{let i=[...s];i[e]=[t,r],a(i),l?.(Object.fromEntries(i))};return(0,t.jsxs)("div",{children:[s.map(([e,i],o)=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,t.jsx)(eR.TextInput,{placeholder:"Header Name",value:e,onChange:e=>r(o,e.target.value,i)}),(0,t.jsx)(eR.TextInput,{placeholder:"Header Value",value:i,onChange:t=>r(o,e,t.target.value)}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tF.MinusCircleOutlined,{onClick:()=>{let e;a(e=s.filter((e,t)=>t!==o)),l?.(Object.fromEntries(e))},style:{cursor:"pointer"}})})]},o)),(0,t.jsx)(K.Button,{type:"dashed",onClick:()=>{a([...s,["",""]])},icon:(0,t.jsx)(tr.PlusOutlined,{}),children:"Add Header"})]})},lo=({value:e={},onChange:l})=>{let[s,a]=(0,x.useState)(Object.entries(e)),r=(e,t,r)=>{let i=[...s];i[e]=[t,r],a(i),l?.(Object.fromEntries(i))};return(0,t.jsxs)("div",{children:[s.map(([e,i],o)=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,t.jsx)(eR.TextInput,{placeholder:"Parameter Name (e.g., version)",value:e,onChange:e=>r(o,e.target.value,i)}),(0,t.jsx)(eR.TextInput,{placeholder:"Parameter Value (e.g., v1)",value:i,onChange:t=>r(o,e,t.target.value)}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tF.MinusCircleOutlined,{onClick:()=>{let e;a(e=s.filter((e,t)=>t!==o)),l?.(Object.fromEntries(e))},style:{cursor:"pointer"}})})]},o)),(0,t.jsx)(K.Button,{type:"dashed",onClick:()=>{a([...s,["",""]])},icon:(0,t.jsx)(tr.PlusOutlined,{}),children:"Add Query Parameter"})]})};var ln=e.i(240647);let ld=({pathValue:e,targetValue:s,includeSubpath:a})=>{let r=(0,l.getProxyBaseUrl)();return e&&s?(0,t.jsxs)(eL.Card,{className:"p-5",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Preview"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-5",children:"How your requests will be routed"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"Basic routing:"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint"}),(0,t.jsx)("code",{className:"font-mono text-sm text-gray-900",children:e?`${r}${e}`:""})]}),(0,t.jsx)("div",{className:"text-gray-400",children:(0,t.jsx)(ln.RightOutlined,{className:"text-lg"})}),(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,t.jsx)("code",{className:"font-mono text-sm text-gray-900",children:s})]})]})]}),a&&(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"With subpaths:"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint + subpath"}),(0,t.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[e&&`${r}${e}`,(0,t.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]}),(0,t.jsx)("div",{className:"text-gray-400",children:(0,t.jsx)(ln.RightOutlined,{className:"text-lg"})}),(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,t.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[s,(0,t.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["Any path after ",e," will be appended to the target URL"]})]})}),!a&&(0,t.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md border border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(w.InfoCircleOutlined,{className:"text-blue-500 mt-0.5 mr-2 flex-shrink-0"}),(0,t.jsxs)("div",{className:"text-sm text-blue-700",children:[(0,t.jsx)("span",{className:"font-medium",children:"Not seeing the routing you wanted?"})," Try enabling - Include Subpaths - above - this allows subroutes like"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded font-mono text-xs",children:"/api/v1/models"})," to be forwarded automatically."]})]})})]})]}):null},lc=({premiumUser:e,authEnabled:l,onAuthChange:s})=>(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Security"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-4",children:"When enabled, requests to this endpoint will require a valid LiteLLM Virtual Key"}),e?(0,t.jsx)(et.Form.Item,{name:"auth",valuePropName:"checked",className:"mb-0",children:(0,t.jsx)(es.Switch,{checked:l,onChange:e=>{s(e)}})}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-3",children:[(0,t.jsx)(es.Switch,{disabled:!0,checked:!1,style:{outline:"2px solid #d1d5db",outlineOffset:"2px"}}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-400",children:"Authentication (Premium)"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(em.Text,{className:"text-sm text-yellow-800",children:["Setting authentication for pass-through endpoints is a LiteLLM Enterprise feature. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})]});var lm=e.i(891547);let lu=({accessToken:e,value:l={},onChange:s,disabled:a=!1})=>{let[r,i]=(0,x.useState)(Object.keys(l)),[o,n]=(0,x.useState)(l);(0,x.useEffect)(()=>{n(l),i(Object.keys(l))},[l]);let d=(e,t,l)=>{let a=o[e]||{},r={...o,[e]:{...a,[t]:l.length>0?l:void 0}};r[e]?.request_fields||r[e]?.response_fields||(r[e]=null),n(r),s&&s(r)};return(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Guardrails"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Configure guardrails to enforce policies on requests and responses. Guardrails are opt-in for passthrough endpoints."}),(0,t.jsx)(tN.Alert,{message:(0,t.jsxs)("span",{children:["Field-Level Targeting"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through_guardrails#field-level-targeting",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"(Learn More)"})]}),description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{children:"Optionally specify which fields to check. If left empty, the entire request/response is sent to the guardrail."}),(0,t.jsxs)("div",{className:"text-xs space-y-1 mt-2",children:[(0,t.jsx)("div",{className:"font-medium",children:"Common Examples:"}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"query"})," - Single field"]}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"documents[*].text"})," - All text in documents array"]}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"messages[*].content"})," - All message contents"]})]})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Select Guardrails",(0,t.jsx)(E.Tooltip,{title:"Choose which guardrails should run on this endpoint. Org/team/key level guardrails will also be included.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),children:(0,t.jsx)(lm.default,{accessToken:e,value:r,onChange:e=>{i(e);let t={};e.forEach(e=>{t[e]=o[e]||null}),n(t),s&&s(t)},disabled:a})}),r.length>0&&(0,t.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Field Targeting (Optional)"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"💡 Tip: Leave empty to check entire payload"})]}),r.map(e=>(0,t.jsxs)(eL.Card,{className:"p-4 bg-gray-50",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 mb-3",children:e}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Request Fields (pre_call)",(0,t.jsx)(E.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Specify which request fields to check"}),(0,t.jsxs)("div",{className:"text-xs space-y-1",children:[(0,t.jsx)("div",{children:"Examples:"}),(0,t.jsx)("div",{children:"• query"}),(0,t.jsx)("div",{children:"• documents[*].text"}),(0,t.jsx)("div",{children:"• messages[*].content"})]})]}),children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.request_fields||[];d(e,"request_fields",[...t,"query"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ query"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.request_fields||[];d(e,"request_fields",[...t,"documents[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ documents[*]"})]})]}),(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., query, documents[*].text)",value:o[e]?.request_fields||[],onChange:t=>d(e,"request_fields",t),disabled:a,tokenSeparators:[","]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Response Fields (post_call)",(0,t.jsx)(E.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Specify which response fields to check"}),(0,t.jsxs)("div",{className:"text-xs space-y-1",children:[(0,t.jsx)("div",{children:"Examples:"}),(0,t.jsx)("div",{children:"• results[*].text"}),(0,t.jsx)("div",{children:"• choices[*].message.content"})]})]}),children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)("div",{className:"flex gap-1",children:(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.response_fields||[];d(e,"response_fields",[...t,"results[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ results[*]"})})]}),(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., results[*].text)",value:o[e]?.response_fields||[],onChange:t=>d(e,"response_fields",t),disabled:a,tokenSeparators:[","]})]})]})]},e))]})]})},{Option:lh}=W.Select,lx=["GET","POST","PUT","DELETE","PATCH"],lp=({accessToken:e,setPassThroughItems:s,passThroughItems:a,premiumUser:r=!1})=>{let[i]=et.Form.useForm(),[o,n]=(0,x.useState)(!1),[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)(""),[h,p]=(0,x.useState)(""),[g,f]=(0,x.useState)(""),[j,_]=(0,x.useState)(!0),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)([]),[C,S]=(0,x.useState)({}),k=()=>{i.resetFields(),p(""),f(""),_(!0),N([]),S({}),n(!1)},F=async t=>{console.log("addPassThrough called with:",t),c(!0);try{!r&&"auth"in t&&delete t.auth,C&&Object.keys(C).length>0&&(t.guardrails=C),v&&v.length>0&&(t.methods=v),console.log(`formValues: ${JSON.stringify(t)}`);let o=(await (0,l.createPassThroughEndpoint)(e,t)).endpoints[0],d=[...a,o];s(d),D.default.success("Pass-through endpoint created successfully"),i.resetFields(),p(""),f(""),_(!0),N([]),S({}),n(!1)}catch(e){D.default.fromBackend("Error creating pass-through endpoint: "+e)}finally{c(!1)}};return(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Button,{className:"mx-auto mb-4 mt-4",onClick:()=>n(!0),children:"+ Add Pass-Through Endpoint"}),(0,t.jsx)(el.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)(lr.ApiOutlined,{className:"text-xl text-blue-500"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Pass-Through Endpoint"})]}),open:o,width:1e3,onCancel:k,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(tN.Alert,{message:"What is a Pass-Through Endpoint?",description:"Route requests from your LiteLLM proxy to any external API. Perfect for custom models, image generation APIs, or any service you want to proxy through LiteLLM.",type:"info",showIcon:!0,className:"mb-6"}),(0,t.jsxs)(et.Form,{form:i,onFinish:F,layout:"vertical",className:"space-y-6",initialValues:{include_subpath:!0,path:h,target:g},children:[(0,t.jsxs)(eL.Card,{className:"p-5",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Configuration"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-5",children:"Configure how requests to your domain will be forwarded to the target API"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsx)(et.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Path Prefix"}),name:"path",rules:[{required:!0,message:"Path is required",pattern:/^\//}],extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example: /bria, /adobe-photoshop, /elasticsearch"}),className:"mb-4",children:(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsx)(eR.TextInput,{placeholder:"bria",value:h,onChange:e=>{var t;let l;return l=t=e.target.value,void(t&&!t.startsWith("/")&&(l="/"+t),p(l),i.setFieldsValue({path:l}))},className:"flex-1"})})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Target URL"}),name:"target",rules:[{required:!0,message:"Target URL is required"},{type:"url",message:"Please enter a valid URL"}],extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example:https://engine.prod.bria-api.com"}),className:"mb-4",children:(0,t.jsx)(eR.TextInput,{placeholder:"https://engine.prod.bria-api.com",value:g,onChange:e=>{f(e.target.value),i.setFieldsValue({target:e.target.value})}})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["HTTP Methods (Optional)",(0,t.jsx)(E.Tooltip,{title:"Select specific HTTP methods. Leave empty to support all methods (GET, POST, PUT, DELETE, PATCH). Useful when the same path needs different targets for different methods.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"methods",extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:0===v.length?"All HTTP methods supported (default)":`Only ${v.join(", ")} requests will be routed to this endpoint`}),className:"mb-4",children:(0,t.jsx)(W.Select,{mode:"multiple",placeholder:"Select methods (leave empty for all)",value:v,onChange:N,allowClear:!0,style:{width:"100%"},children:lx.map(e=>(0,t.jsx)(lh,{value:e,children:e},e))})}),(0,t.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Include Subpaths"}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Forward all subpaths to the target API (recommended for REST APIs)"})]}),(0,t.jsx)(et.Form.Item,{name:"include_subpath",valuePropName:"checked",className:"mb-0",children:(0,t.jsx)(tv.Switch,{checked:j,onChange:_})})]})]})]}),(0,t.jsx)(ld,{pathValue:h,targetValue:g,includeSubpath:j}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Headers"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Add headers that will be sent with every request to the target API"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Headers",(0,t.jsx)(E.Tooltip,{title:"Authentication and other headers to forward with requests",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"headers",rules:[{required:!0,message:"Please configure the headers"}],extra:(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Add authentication tokens and other required headers"}),(0,t.jsx)("div",{children:"Common examples: auth_token, Authorization, x-api-key"})]}),children:(0,t.jsx)(li,{})})]}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Default Query Parameters"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Add query parameters that will be automatically sent with every request to the target API"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Default Query Parameters (Optional)",(0,t.jsx)(E.Tooltip,{title:"Query parameters that will be added to all requests. Clients can override these by providing their own values.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"default_query_params",extra:(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Parameters are sent with all GET, POST, PUT, PATCH requests"}),(0,t.jsx)("div",{children:"Client parameters override defaults. Examples: version=v1, format=json, key=default"})]}),children:(0,t.jsx)(lo,{})})]}),(0,t.jsx)(lc,{premiumUser:r,authEnabled:y,onAuthChange:e=>{b(e),i.setFieldsValue({auth:e})}}),(0,t.jsx)(lu,{accessToken:e,value:C,onChange:S}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Billing"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Optional cost tracking for this endpoint"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Cost Per Request (USD)",(0,t.jsx)(E.Tooltip,{title:"Optional: Track costs for requests to this endpoint",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:"cost_per_request",extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"The cost charged for each request through this endpoint"}),children:(0,t.jsx)(tI.default,{min:0,step:.001,precision:4,placeholder:"2.0000",size:"large"})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(T.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,t.jsx)(T.Button,{variant:"primary",loading:d,onClick:()=>{console.log("Submit button clicked"),i.submit()},children:d?"Creating...":"Add Pass-Through Endpoint"})]})]})]})})]})};var lg=e.i(286536),lf=e.i(77705);let lj=["GET","POST","PUT","DELETE","PATCH"],{Option:l_}=W.Select,ly=({value:e})=>{let[l,s]=(0,x.useState)(!1),a=JSON.stringify(e,null,2);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("pre",{className:"font-mono text-xs bg-gray-50 p-2 rounded max-w-md overflow-auto",children:l?a:"••••••••"}),(0,t.jsx)("button",{onClick:()=>s(!l),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:l?(0,t.jsx)(lf.EyeOff,{className:"w-4 h-4 text-gray-500"}):(0,t.jsx)(lg.Eye,{className:"w-4 h-4 text-gray-500"})})]})},lb=({endpointData:e,onClose:s,accessToken:a,isAdmin:r,premiumUser:i=!1,onEndpointUpdated:o})=>{let[n,d]=(0,x.useState)(e),[c,m]=(0,x.useState)(!1),[u,h]=(0,x.useState)(!1),[p,g]=(0,x.useState)(e?.auth||!1),[f,j]=(0,x.useState)(e?.methods||[]),[_,y]=(0,x.useState)(e?.guardrails||{}),[b]=et.Form.useForm(),v=async e=>{try{if(!a||!n?.id)return;let t={};if(e.headers)try{t="string"==typeof e.headers?JSON.parse(e.headers):e.headers}catch(e){D.default.fromBackend("Invalid JSON format for headers");return}let s={path:n.path,target:e.target,headers:t,include_subpath:e.include_subpath,cost_per_request:e.cost_per_request,auth:i?e.auth:void 0,methods:f&&f.length>0?f:void 0,guardrails:_&&Object.keys(_).length>0?_:void 0};await (0,l.updatePassThroughEndpoint)(a,n.id,s),d({...n,...s}),h(!1),o&&o()}catch(e){console.error("Error updating endpoint:",e),D.default.fromBackend("Failed to update pass through endpoint")}},N=async()=>{try{if(!a||!n?.id)return;await (0,l.deletePassThroughEndpointsCall)(a,n.id),D.default.success("Pass through endpoint deleted successfully"),s(),o&&o()}catch(e){console.error("Error deleting endpoint:",e),D.default.fromBackend("Failed to delete pass through endpoint")}};return c?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):n?(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:s,className:"mb-4",children:"← Back"}),(0,t.jsxs)(eu.Title,{children:["Pass Through Endpoint: ",n.path]}),(0,t.jsx)(em.Text,{className:"text-gray-500 font-mono",children:n.id})]})}),(0,t.jsxs)(e4.TabGroup,{children:[(0,t.jsxs)(e5.TabList,{className:"mb-4",children:[(0,t.jsx)(e2.Tab,{children:"Overview"},"overview"),r?(0,t.jsx)(e2.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsxs)($.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Path"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eu.Title,{className:"font-mono",children:n.path})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Target"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eu.Title,{children:n.target})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Configuration"}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{color:n.include_subpath?"green":"gray",children:n.include_subpath?"Include Subpath":"Exact Path"})}),(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{color:n.auth?"blue":"gray",children:n.auth?"Auth Required":"No Auth"})}),n.methods&&n.methods.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"text-xs text-gray-500",children:"HTTP Methods:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:n.methods.map(e=>(0,t.jsx)(k.Badge,{color:"indigo",size:"sm",children:e},e))})]}),(!n.methods||0===n.methods.length)&&(0,t.jsx)("div",{children:(0,t.jsx)(em.Text,{className:"text-xs text-gray-500",children:"All HTTP methods supported"})}),void 0!==n.cost_per_request&&(0,t.jsx)("div",{children:(0,t.jsxs)(em.Text,{children:["Cost per request: $",n.cost_per_request]})})]})]})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(ld,{pathValue:n.path,targetValue:n.target,includeSubpath:n.include_subpath||!1})}),n.headers&&Object.keys(n.headers).length>0&&(0,t.jsxs)(eL.Card,{className:"mt-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Headers"}),(0,t.jsxs)(k.Badge,{color:"blue",children:[Object.keys(n.headers).length," headers configured"]})]}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(ly,{value:n.headers})})]}),n.guardrails&&Object.keys(n.guardrails).length>0&&(0,t.jsxs)(eL.Card,{className:"mt-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Guardrails"}),(0,t.jsxs)(k.Badge,{color:"purple",children:[Object.keys(n.guardrails).length," guardrails configured"]})]}),(0,t.jsx)("div",{className:"mt-4 space-y-2",children:Object.entries(n.guardrails).map(([e,l])=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 rounded",children:[(0,t.jsx)("div",{className:"font-medium text-sm",children:e}),l&&(l.request_fields||l.response_fields)&&(0,t.jsxs)("div",{className:"mt-2 text-xs text-gray-600 space-y-1",children:[l.request_fields&&(0,t.jsxs)("div",{children:["Request fields: ",l.request_fields.join(", ")]}),l.response_fields&&(0,t.jsxs)("div",{children:["Response fields: ",l.response_fields.join(", ")]})]}),!l&&(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Uses entire payload"})]},e))})]})]}),r&&(0,t.jsx)(U.TabPanel,{children:(0,t.jsxs)(eL.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eu.Title,{children:"Pass Through Endpoint Settings"}),(0,t.jsx)("div",{className:"space-x-2",children:!u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Button,{onClick:()=>h(!0),children:"Edit Settings"}),(0,t.jsx)(T.Button,{onClick:N,variant:"secondary",color:"red",children:"Delete Endpoint"})]})})]}),u?(0,t.jsxs)(et.Form,{form:b,onFinish:v,initialValues:{target:n.target,headers:n.headers?JSON.stringify(n.headers,null,2):"",include_subpath:n.include_subpath||!1,cost_per_request:n.cost_per_request,auth:n.auth||!1,methods:n.methods||[]},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Target URL",name:"target",rules:[{required:!0,message:"Please input a target URL"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"https://api.example.com"})}),(0,t.jsx)(et.Form.Item,{label:"Headers (JSON)",name:"headers",children:(0,t.jsx)(eV.Input.TextArea,{rows:5,placeholder:'{"Authorization": "Bearer your-token", "Content-Type": "application/json"}'})}),(0,t.jsx)(et.Form.Item,{label:"HTTP Methods (Optional)",name:"methods",extra:0===f.length?"All HTTP methods supported (default)":`Only ${f.join(", ")} requests will be routed to this endpoint`,children:(0,t.jsx)(W.Select,{mode:"multiple",placeholder:"Select methods (leave empty for all)",value:f,onChange:j,allowClear:!0,style:{width:"100%"},children:lj.map(e=>(0,t.jsx)(l_,{value:e,children:e},e))})}),(0,t.jsx)(et.Form.Item,{label:"Include Subpath",name:"include_subpath",valuePropName:"checked",children:(0,t.jsx)(es.Switch,{})}),(0,t.jsx)(et.Form.Item,{label:"Cost per Request",name:"cost_per_request",children:(0,t.jsx)(eh.InputNumber,{min:0,step:.01,precision:2,placeholder:"0.00",addonBefore:"$"})}),(0,t.jsx)(lc,{premiumUser:i,authEnabled:p,onAuthChange:e=>{g(e),b.setFieldsValue({auth:e})}}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(lu,{accessToken:a||"",value:_,onChange:y})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(K.Button,{onClick:()=>h(!1),children:"Cancel"}),(0,t.jsx)(T.Button,{children:"Save Changes"})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Path"}),(0,t.jsx)("div",{className:"font-mono",children:n.path})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Target URL"}),(0,t.jsx)("div",{children:n.target})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Include Subpath"}),(0,t.jsx)(k.Badge,{color:n.include_subpath?"green":"gray",children:n.include_subpath?"Yes":"No"})]}),void 0!==n.cost_per_request&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Cost per Request"}),(0,t.jsxs)("div",{children:["$",n.cost_per_request]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Authentication Required"}),(0,t.jsx)(k.Badge,{color:n.auth?"green":"gray",children:n.auth?"Yes":"No"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Headers"}),n.headers&&Object.keys(n.headers).length>0?(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(ly,{value:n.headers})}):(0,t.jsx)("div",{className:"text-gray-500",children:"No headers configured"})]})]})]})})]})]})]}):(0,t.jsx)("div",{className:"p-4",children:"Pass through endpoint not found"})};var lv=e.i(149121);let lN=({value:e})=>{let[l,s]=(0,x.useState)(!1),a=JSON.stringify(e);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs",children:l?a:"••••••••"}),(0,t.jsx)("button",{onClick:()=>s(!l),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:l?(0,t.jsx)(lf.EyeOff,{className:"w-4 h-4 text-gray-500"}):(0,t.jsx)(lg.Eye,{className:"w-4 h-4 text-gray-500"})})]})},lw=({accessToken:e,userRole:s,userID:a,modelData:r,premiumUser:i})=>{let[o,n]=(0,x.useState)([]),[d,c]=(0,x.useState)(null),[m,u]=(0,x.useState)(!1),[h,p]=(0,x.useState)(null);(0,x.useEffect)(()=>{e&&s&&a&&(0,l.getPassThroughEndpointsCall)(e).then(e=>{n(e.endpoints)})},[e,s,a]);let g=async e=>{p(e),u(!0)},f=async()=>{if(null!=h&&e){try{await (0,l.deletePassThroughEndpointsCall)(e,h);let t=o.filter(e=>e.id!==h);n(t),D.default.success("Endpoint deleted successfully.")}catch(e){console.error("Error deleting the endpoint:",e),D.default.fromBackend("Error deleting the endpoint: "+e)}u(!1),p(null)}},j=[{header:"ID",accessorKey:"id",cell:e=>(0,t.jsx)(E.Tooltip,{title:e.row.original.id,children:(0,t.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>e.row.original.id&&c(e.row.original.id),children:e.row.original.id})})},{header:"Path",accessorKey:"path"},{header:"Target",accessorKey:"target",cell:e=>(0,t.jsx)(em.Text,{children:e.getValue()})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:"Methods"}),(0,t.jsx)(E.Tooltip,{title:"HTTP methods supported by this endpoint",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"methods",cell:e=>{let l=e.getValue();return l&&0!==l.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.map(e=>(0,t.jsx)(J.Badge,{color:"indigo",className:"text-xs",children:e},e))}):(0,t.jsx)(J.Badge,{color:"blue",children:"ALL"})}},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:"Authentication"}),(0,t.jsx)(E.Tooltip,{title:"LiteLLM Virtual Key required to call endpoint",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"auth",cell:e=>(0,t.jsx)(J.Badge,{color:e.getValue()?"green":"gray",children:e.getValue()?"Yes":"No"})},{header:"Headers",accessorKey:"headers",cell:e=>(0,t.jsx)(lN,{value:e.getValue()||{}})},{header:"Actions",id:"actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)(F.Icon,{icon:eE.PencilAltIcon,size:"sm",onClick:()=>e.original.id&&c(e.original.id),title:"Edit"}),(0,t.jsx)(F.Icon,{icon:S.TrashIcon,size:"sm",onClick:()=>{var t;return t=e.original.id,e.index,void g(t)},title:"Delete"})]})}];if(!e)return null;if(d){console.log("selectedEndpointId",d),console.log("generalSettings",o);let a=o.find(e=>e.id===d);return a?(0,t.jsx)(lb,{endpointData:a,onClose:()=>c(null),accessToken:e,isAdmin:"Admin"===s||"admin"===s,premiumUser:i,onEndpointUpdated:()=>{e&&(0,l.getPassThroughEndpointsCall)(e).then(e=>{n(e.endpoints)})}}):(0,t.jsx)("div",{children:"Endpoint not found"})}return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eu.Title,{children:"Pass Through Endpoints"}),(0,t.jsx)(em.Text,{className:"text-tremor-content",children:"Configure and manage your pass-through endpoints"})]}),(0,t.jsx)(lp,{accessToken:e,setPassThroughItems:n,passThroughItems:o,premiumUser:i}),(0,t.jsx)(lv.DataTable,{data:o,columns:j,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:!1,noDataMessage:"No pass-through endpoints configured"}),m&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Pass-Through Endpoint"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this pass-through endpoint? This action cannot be undone."})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(T.Button,{onClick:f,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(T.Button,{onClick:()=>{u(!1),p(null)},children:"Cancel"})]})]})]})})]})};e.s(["default",0,lw],147612);var lC=e.i(56567);e.s(["default",0,({premiumUser:e,teams:s})=>{let{accessToken:a,token:i,userRole:m,userId:u}=(0,r.default)(),[h]=et.Form.useForm(),[p,g]=(0,x.useState)(""),[f,j]=(0,x.useState)([]),[_,y]=(0,x.useState)(eM.Providers.Anthropic),[b,v]=(0,x.useState)(null),[N,w]=(0,x.useState)(null),[C,S]=(0,x.useState)(null),[k,T]=(0,x.useState)(0),[I,M]=(0,x.useState)({}),[P,A]=(0,x.useState)(!1),[E,R]=(0,x.useState)(null),[O,B]=(0,x.useState)(null),[z,V]=(0,x.useState)(0),[H,J]=(0,x.useState)(()=>"true"!==localStorage.getItem("hideMissingProviderBanner")),K=(0,G.useQueryClient)(),{data:W,isLoading:Q,refetch:Y}=(0,d.useModelsInfo)(),{data:X,isLoading:Z}=(0,n.useModelCostMap)(),{data:ee,isLoading:el}=o(),es=ee?.credentials||[],{data:ea,isLoading:er}=(0,c.useUISettings)(),eo=(0,x.useMemo)(()=>{if(!W?.data)return[];let e=new Set;for(let t of W.data)e.add(t.model_name);return Array.from(e).sort()},[W?.data]),ed=(0,x.useMemo)(()=>{if(!W?.data)return[];let e=new Set;for(let t of W.data){let l=t.model_info;if(l?.access_groups)for(let t of l.access_groups)e.add(t)}return Array.from(e)},[W?.data]),ec=(0,x.useMemo)(()=>W?.data?W.data.map(e=>e.model_name):[],[W?.data]),em=(0,x.useMemo)(()=>W?.data?W.data.map(e=>e.model_info?.id).filter(e=>!!e):[],[W?.data]),eu=e=>null!=X&&"object"==typeof X&&e in X?X[e].litellm_provider:"openai",eh=(0,x.useMemo)(()=>W?.data?ei(W,eu):{data:[]},[W?.data,eu]),ex=m&&(0,eZ.isProxyAdminRole)(m),eg=m&&eZ.internalUserRoles.includes(m),ef=u&&(0,eZ.isUserTeamAdminForAnyTeam)(s,u),ej=eg&&ea?.values?.disable_model_add_for_internal_users===!0,e_=!ex&&(ej||!ef),ey={name:"file",accept:".json",pastable:!1,beforeUpload:e=>{if("application/json"===e.type){let t=new FileReader;t.onload=e=>{if(e.target){let t=e.target.result;h.setFieldsValue({vertex_credentials:t})}},t.readAsText(e)}return!1},onChange(e){"done"===e.file.status?D.default.success(`${e.file.name} file uploaded successfully`):"error"===e.file.status&&D.default.fromBackend(`${e.file.name} file upload failed.`)}},eb=()=>{g(new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})),K.invalidateQueries({queryKey:["models","list"]}),Y()},ev=async()=>{if(a)try{let e={router_settings:{}};"global"===b?(C&&(e.router_settings.retry_policy=C),D.default.success("Global retry settings saved successfully")):(N&&(e.router_settings.model_group_retry_policy=N),D.default.success(`Retry settings saved successfully for ${b}`)),await (0,l.setCallbacksCall)(a,e)}catch(e){D.default.fromBackend("Failed to save retry settings")}};if((0,x.useEffect)(()=>{if(!a||!i||!m||!u||!W)return;let e=async()=>{try{let e=(await (0,l.getCallbacksCall)(a,u,m)).router_settings,t=e.model_group_retry_policy,s=e.num_retries;w(t),S(e.retry_policy),T(s);let r=e.model_group_alias||{};M(r)}catch(e){console.error("Error fetching model data:",e)}};a&&i&&m&&u&&W&&e()},[a,i,m,u,W]),m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=L.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to view all models"})]})}let eN=async()=>{try{let e=await h.validateFields();await eA(e,a,h,eb)}catch(t){let e=t.errorFields?.map(e=>`${e.name.join(".")}: ${e.errors.join(", ")}`).join(" | ")||"Unknown validation error";D.default.fromBackend(`Please fill in the following required fields: ${e}`)}};return(Object.keys(eM.Providers).find(e=>eM.Providers[e]===_),O)?(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(lC.default,{teamId:O,onClose:()=>B(null),accessToken:a,is_team_admin:"Admin"===m,is_proxy_admin:"Proxy Admin"===m,userModels:ec,editTeam:!1,onUpdate:eb,premiumUser:e})}):(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)($.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(e1.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:"Model Management"}),eZ.all_admin_roles.includes(m)?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Add and manage models for the proxy"}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Add models for teams you are an admin for."})]}),!H&&(0,t.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-[#6366f1] hover:text-[#5558e3] border border-[#6366f1] hover:border-[#5558e3] rounded-lg transition-colors",children:[(0,t.jsx)(e3.PlusCircleOutlined,{style:{fontSize:"12px"}}),"Request Provider"]})]}),H&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-3 bg-blue-50 rounded-lg border border-blue-100 flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-10 h-10 bg-white rounded-full flex items-center justify-center border border-blue-200",children:(0,t.jsx)(e3.PlusCircleOutlined,{style:{fontSize:"18px",color:"#6366f1"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"text-gray-900 font-semibold text-sm m-0",children:"Missing a provider?"}),(0,t.jsx)("p",{className:"text-gray-500 text-xs m-0 mt-0.5",children:"The LiteLLM engineering team is constantly adding support for new LLM models, providers, endpoints. If you don't see the one you need, let us know and we'll prioritize it."})]}),(0,t.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 inline-flex items-center gap-2 px-4 py-2 bg-[#6366f1] hover:bg-[#5558e3] text-white text-sm font-medium rounded-lg transition-colors",children:["Request Provider",(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),(0,t.jsx)("button",{onClick:()=>{J(!1),localStorage.setItem("hideMissingProviderBanner","true")},className:"flex-shrink-0 p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Dismiss banner",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),E&&!(Q||Z||el||er)?(0,t.jsx)(ls,{modelId:E,onClose:()=>{R(null)},accessToken:a,userID:u,userRole:m,onModelUpdate:e=>{K.invalidateQueries({queryKey:["models","list"]}),eb()},modelAccessGroups:ed}):(0,t.jsxs)(e4.TabGroup,{index:z,onIndexChange:V,className:"gap-2 h-[75vh] w-full ",children:[(0,t.jsxs)(e5.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[eZ.all_admin_roles.includes(m)?(0,t.jsx)(e2.Tab,{children:"All Models"}):(0,t.jsx)(e2.Tab,{children:"Your Models"}),!e_&&(0,t.jsx)(e2.Tab,{children:"Add Model"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"LLM Credentials"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Pass-Through Endpoints"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Health Status"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Model Retry Settings"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Model Group Alias"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Price Data Reload"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 self-center",children:[p&&(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Last Refreshed: ",p]}),(0,t.jsx)(F.Icon,{icon:e0.RefreshIcon,variant:"shadow",size:"xs",className:"cursor-pointer",onClick:eb})]})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsx)(en,{selectedModelGroup:b,setSelectedModelGroup:v,availableModelGroups:eo,availableModelAccessGroups:ed,setSelectedModelId:R,setSelectedTeamId:B}),!e_&&(0,t.jsx)(U.TabPanel,{className:"h-full",children:(0,t.jsx)(tU,{form:h,handleOk:eN,selectedProvider:_,setSelectedProvider:y,providerModels:f,setProviderModelsFn:e=>{j((0,eM.getProviderModels)(e,X))},getPlaceholder:eM.getPlaceholder,uploadProps:ey,showAdvancedSettings:P,setShowAdvancedSettings:A,teams:s,credentials:es,accessToken:a,userRole:m})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(eX,{uploadProps:ey})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(lw,{accessToken:a,userRole:m,userID:u,modelData:eh,premiumUser:e})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(tX,{accessToken:a,modelData:eh,all_models_on_proxy:em,getDisplayModelName:q,setSelectedModelId:R,teams:s})}),(0,t.jsx)(ep,{selectedModelGroup:b,setSelectedModelGroup:v,availableModelGroups:eo,globalRetryPolicy:C,setGlobalRetryPolicy:S,defaultRetry:k,modelGroupRetryPolicy:N,setModelGroupRetryPolicy:w,handleSaveRetrySettings:ev}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t4,{accessToken:a,initialModelGroupAlias:I,onAliasUpdate:M})}),(0,t.jsx)(eI,{})]})]})]})})})}],161059)}]); \ No newline at end of file + }'`):"";return(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[y?(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(te,{style:{fontSize:"16px"},children:["Testing connection to ",r,"..."]}),(0,t.jsx)(e7.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]}):v?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)(te,{type:"success",style:{fontSize:"18px",fontWeight:500,marginLeft:"10px"},children:["Connection to ",r," successful!"]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(ek.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(te,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",r," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(te,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(te,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:F}),h&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(K.Button,{type:"link",onClick:()=>S(!C),style:{paddingLeft:0,height:"auto"},children:C?"Hide Details":"Show Details"})})]}),C&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(te,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:"string"==typeof h?h:JSON.stringify(h,null,2)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(te,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:M||"No request data available"}),(0,t.jsx)(K.Button,{style:{marginTop:"8px"},icon:(0,t.jsx)(e9.CopyOutlined,{}),onClick:()=>{navigator.clipboard.writeText(M||""),D.default.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,t.jsx)(I.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(K.Button,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,t.jsx)(w.InfoCircleOutlined,{}),children:"View Documentation"})})]})},tl=async(e,t,s,a)=>{try{let r;console.log("=== AUTO ROUTER SUBMIT HANDLER CALLED ==="),console.log("handling auto router submit for formValues:",e),console.log("Model type:",e.model_type),"complexity_router"===e.model_type?(console.log("Creating complexity router configuration"),r={model_name:e.auto_router_name,litellm_params:{model:"auto_router/complexity_router",complexity_router_config:e.complexity_router_config,complexity_router_default_model:e.auto_router_default_model},model_info:{}},console.log("Complexity router config:",e.complexity_router_config)):(console.log("Creating semantic router configuration"),r={model_name:e.auto_router_name,litellm_params:{model:`auto_router/${e.auto_router_name}`,auto_router_config:JSON.stringify(e.auto_router_config),auto_router_default_model:e.auto_router_default_model},model_info:{}},e.auto_router_embedding_model&&"custom"!==e.auto_router_embedding_model?r.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model:e.custom_embedding_model&&(r.litellm_params.auto_router_embedding_model=e.custom_embedding_model),console.log("Semantic router config (stringified):",r.litellm_params.auto_router_config)),e.team_id&&(r.model_info.team_id=e.team_id),e.model_access_group&&e.model_access_group.length>0&&(r.model_info.access_groups=e.model_access_group),console.log("Auto router configuration to be created:",r),console.log("Calling modelCreateCall...");let i=await (0,l.modelCreateCall)(t,r);console.log("response for auto router create call:",i);let o="complexity_router"===e.model_type?"Complexity Router":"Semantic Router";D.default.success(`Successfully created ${o}: ${e.auto_router_name}`),s.resetFields(),a&&a()}catch(e){console.error("Failed to add auto router:",e),D.default.fromBackend("Failed to add auto router: "+e)}};var ts=e.i(689020),ta=e.i(955135),tr=e.i(646563),ti=e.i(362024),to=e.i(21548);let{Text:tn}=L.Typography,{TextArea:td}=eV.Input,tc=({modelInfo:e,value:l,onChange:s})=>{let[a,r]=(0,x.useState)([]),[i,o]=(0,x.useState)(!1),[n,d]=(0,x.useState)([]);(0,x.useEffect)(()=>{let e=l?.routes;if(e){let t=[];r(l=>e.map((e,s)=>{let a=l[s],r=a?.id||e.id||`route-${s}-${Date.now()}`;return t.push(r),{id:r,model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold??.5}})),d(t)}else r([]),d([])},[l]);let c=(e,t,l)=>{let s=a.map(s=>s.id===e?{...s,[t]:l}:s);r(s),m(s)},m=e=>{let t={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};s?.(t)},u=e.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)(M.Flex,{justify:"space-between",align:"center",gap:"middle",style:{width:"100%",marginBottom:24},children:[(0,t.jsxs)(A.Space,{align:"center",children:[(0,t.jsx)(L.Typography.Title,{level:4,style:{margin:0},children:"Routes Configuration"}),(0,t.jsx)(E.Tooltip,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(K.Button,{type:"primary",icon:(0,t.jsx)(tr.PlusOutlined,{}),onClick:()=>{let e=`route-${Date.now()}`,t=[...a,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];r(t),m(t),d(t=>[...t,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===a.length?(0,t.jsx)(ej.Card,{children:(0,t.jsx)(to.Empty,{description:'No routes configured. Click "Add Route" to get started.'})}):(0,t.jsx)(ti.Collapse,{activeKey:n,onChange:e=>d(Array.isArray(e)?e:[e].filter(Boolean)),style:{width:"100%"},items:a.map((e,l)=>({key:e.id,label:(0,t.jsxs)(tn,{style:{fontSize:16},children:["Route ",l+1,": ",e.model||"Unnamed"]}),extra:(0,t.jsx)(K.Button,{type:"text",danger:!0,size:"small",icon:(0,t.jsx)(ta.DeleteOutlined,{}),onClick:t=>{var l;let s;t.stopPropagation(),l=e.id,r(s=a.filter(e=>e.id!==l)),m(s),d(e=>e.filter(e=>e!==l))}}),children:(0,t.jsxs)(ej.Card,{children:[(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,t.jsx)(W.Select,{value:e.model,onChange:t=>c(e.id,"model",t),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:u})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,t.jsx)(td,{value:e.description,onChange:t=>c(e.id,"description",t.target.value),placeholder:"Describe when this route should be used...",rows:2,style:{width:"100%"}})]}),(0,t.jsxs)("div",{className:"mb-4 w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(tn,{className:"text-sm font-medium",children:"Score Threshold"}),(0,t.jsx)(E.Tooltip,{title:"Minimum similarity score to route to this model (0-1)",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(eh.InputNumber,{value:e.score_threshold,onChange:t=>c(e.id,"score_threshold",t||0),min:0,max:1,step:.1,style:{width:"100%"},placeholder:"0.5"})]}),(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(tn,{className:"text-sm font-medium",children:"Example Utterances"}),(0,t.jsx)(E.Tooltip,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(tn,{className:"text-xs text-gray-500 mb-2",children:"Type an utterance and press Enter to add it. You can also paste multiple lines."}),(0,t.jsx)(W.Select,{mode:"tags",value:e.utterances,onChange:t=>c(e.id,"utterances",t),placeholder:"Type an utterance and press Enter...",style:{width:"100%"},tokenSeparators:["\n"],maxTagCount:"responsive",allowClear:!0})]})]},e.id)}))}),(0,t.jsx)(I.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,t.jsx)(tn,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,t.jsx)(K.Button,{type:"link",onClick:()=>o(!i),className:"text-blue-600 p-0",children:i?"Hide":"Show"})]}),i&&(0,t.jsx)(ej.Card,{className:"bg-gray-50 w-full",children:(0,t.jsx)("pre",{className:"text-sm overflow-auto max-h-64 w-full",children:JSON.stringify({routes:a.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})},{Text:tm}=L.Typography,tu={SIMPLE:{label:"Simple",description:"Basic questions, greetings, simple factual queries",examples:'"Hello!", "What is Python?", "Thanks!"'},MEDIUM:{label:"Medium",description:"Standard queries requiring some reasoning or explanation",examples:'"Explain how REST APIs work", "Debug this error"'},COMPLEX:{label:"Complex",description:"Technical, multi-part requests requiring deep knowledge",examples:'"Design a microservices architecture", "Implement a rate limiter"'},REASONING:{label:"Reasoning",description:"Chain-of-thought, analysis, explicit reasoning requests",examples:'"Think step by step...", "Analyze the pros and cons..."'}},th=({modelInfo:e,value:l,onChange:s})=>{let a=e.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"w-full max-w-none",children:[(0,t.jsxs)(A.Space,{align:"center",style:{marginBottom:16},children:[(0,t.jsx)(L.Typography.Title,{level:4,style:{margin:0},children:"Complexity Tier Configuration"}),(0,t.jsx)(E.Tooltip,{title:"Map each complexity tier to a model. Simple queries use cheaper/faster models, complex queries use more capable models.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsx)(tm,{type:"secondary",style:{display:"block",marginBottom:24},children:"The complexity router automatically classifies requests by complexity using rule-based scoring (no API calls, <1ms latency). Configure which model handles each tier."}),(0,t.jsx)(ej.Card,{children:Object.keys(tu).map((e,r)=>{let i=tu[e];return(0,t.jsxs)("div",{children:[r>0&&(0,t.jsx)(I.Divider,{style:{margin:"16px 0"}}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsxs)(tm,{strong:!0,style:{fontSize:16},children:[i.label," Tier"]}),(0,t.jsx)(E.Tooltip,{title:i.description,children:(0,t.jsx)(w.InfoCircleOutlined,{className:"text-gray-400"})})]}),(0,t.jsxs)(tm,{type:"secondary",style:{display:"block",marginBottom:8,fontSize:12},children:["Examples: ",i.examples]}),(0,t.jsx)(W.Select,{value:l[e],onChange:t=>{s({...l,[e]:t})},placeholder:`Select model for ${i.label.toLowerCase()} queries`,showSearch:!0,style:{width:"100%"},options:a})]})]},e)})}),(0,t.jsx)(I.Divider,{}),(0,t.jsxs)(ej.Card,{className:"bg-gray-50",children:[(0,t.jsx)(tm,{strong:!0,style:{display:"block",marginBottom:8},children:"How Classification Works"}),(0,t.jsx)(tm,{type:"secondary",style:{fontSize:13},children:"The router scores each request across 7 dimensions: token count, code presence, reasoning markers, technical terms, simple indicators, multi-step patterns, and question complexity. The weighted score determines the tier:"}),(0,t.jsxs)("ul",{style:{marginTop:8,marginBottom:0,paddingLeft:20,fontSize:13,color:"rgba(0, 0, 0, 0.45)"},children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"SIMPLE"}),": Score < 0.15"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"MEDIUM"}),": Score 0.15 - 0.35"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"COMPLEX"}),": Score 0.35 - 0.60"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"REASONING"}),": Score > 0.60 (or 2+ reasoning markers)"]})]})]})]})};var tx=e.i(962944);let tp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"};var tg=x.forwardRef(function(e,t){return x.createElement(ew.default,(0,ev.default)({},e,{ref:t,icon:tp}))});let{Title:tf,Link:tj}=L.Typography,t_=({form:e,handleOk:s,accessToken:a,userRole:r})=>{let[i,o]=(0,x.useState)(!1),[n,d]=(0,x.useState)(!1),[c,m]=(0,x.useState)(""),[u,h]=(0,x.useState)([]),[p,g]=(0,x.useState)([]),[f,j]=(0,x.useState)(!1),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)("complexity"),[N,w]=(0,x.useState)(null),[C,S]=(0,x.useState)({SIMPLE:"",MEDIUM:"",COMPLEX:"",REASONING:""});(0,x.useEffect)(()=>{(async()=>{h((await (0,l.modelAvailableCall)(a,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[a]),(0,x.useEffect)(()=>{(async()=>{try{let e=await (0,ts.fetchAvailableModels)(a);console.log("Fetched models for auto router:",e),g(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[a]);let k=eZ.all_admin_roles.includes(r),T=async()=>{d(!0),m(`test-${Date.now()}`),o(!0)},F=()=>{console.log("Auto router submit triggered!"),console.log("Router type:",b);let t=e.getFieldsValue();if(console.log("Form values:",t),!t.auto_router_name)return void D.default.fromBackend("Please enter an Auto Router Name");if("complexity"===b){if(0===Object.values(C).filter(Boolean).length)return void D.default.fromBackend("Please select at least one model for a complexity tier");let l=C.MEDIUM||C.SIMPLE||C.COMPLEX||C.REASONING;e.setFieldsValue({custom_llm_provider:"auto_router",model:t.auto_router_name,api_key:"not_required_for_auto_router",auto_router_default_model:l}),e.validateFields(["auto_router_name"]).then(r=>{console.log("Complexity router validation passed");let i={...r,auto_router_name:t.auto_router_name,auto_router_default_model:l,model_type:"complexity_router",complexity_router_config:{tiers:C},model_access_group:t.model_access_group};console.log("Final submit values:",i),tl(i,a,e,s)}).catch(e=>{console.error("Validation failed:",e),D.default.fromBackend("Please fill in all required fields")})}else{if(!t.auto_router_default_model)return void D.default.fromBackend("Please select a Default Model");if(e.setFieldsValue({custom_llm_provider:"auto_router",model:t.auto_router_name,api_key:"not_required_for_auto_router"}),!N||!N.routes||0===N.routes.length)return void D.default.fromBackend("Please configure at least one route for the auto router");if(N.routes.filter(e=>!e.name||!e.description||0===e.utterances.length).length>0)return void D.default.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");e.validateFields().then(t=>{console.log("Form validation passed, submitting with values:",t);let l={...t,auto_router_config:N,model_type:"semantic_router"};console.log("Final submit values:",l),tl(l,a,e,s)}).catch(e=>{console.error("Validation failed:",e);let t=e.errorFields||[];if(t.length>0){let e=t.map(e=>{let t=e.name[0];return({auto_router_name:"Auto Router Name",auto_router_default_model:"Default Model",auto_router_embedding_model:"Embedding Model"})[t]||t});D.default.fromBackend(`Please fill in the following required fields: ${e.join(", ")}`)}else D.default.fromBackend("Please fill in all required fields")})}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tf,{level:2,children:"Add Auto Router"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mb-6",children:"Create an auto router that automatically selects the best model based on request complexity or semantic matching."}),(0,t.jsx)(ej.Card,{className:"mb-4",children:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(em.Text,{className:"text-sm font-medium mb-2 block",children:"Router Type"}),(0,t.jsx)(e8.Radio.Group,{value:b,onChange:e=>v(e.target.value),className:"w-full",children:(0,t.jsxs)(A.Space,{direction:"vertical",className:"w-full",children:[(0,t.jsxs)(e8.Radio,{value:"complexity",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tx.ThunderboltOutlined,{className:"text-yellow-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Complexity Router"}),(0,t.jsx)(J.Badge,{count:"Recommended",style:{backgroundColor:"#52c41a",fontSize:"10px",padding:"0 6px"}})]}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:["Automatically routes based on request complexity. No training data needed — just pick 4 models and go.",(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"text-green-600",children:"✓ Zero API calls"})," · ",(0,t.jsx)("span",{className:"text-green-600",children:"✓ <1ms latency"})," · ",(0,t.jsx)("span",{className:"text-green-600",children:"✓ No cost"})]})]}),(0,t.jsxs)(e8.Radio,{value:"semantic",className:"w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tg,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Semantic Router"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500 ml-6 mt-1",children:"Routes based on semantic similarity to example utterances. Requires embedding model and training examples."})]})]})})]})}),(0,t.jsx)(ej.Card,{children:(0,t.jsxs)(et.Form,{form:e,onFinish:F,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Auto router name is required"}],label:"Auto Router Name",name:"auto_router_name",tooltip:"Unique name for this auto router configuration",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(eR.TextInput,{placeholder:"e.g., smart_router, auto_router_1"})}),"complexity"===b?(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(th,{modelInfo:p,value:C,onChange:e=>{S(e)}})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full mb-4",children:(0,t.jsx)(tc,{modelInfo:p,value:N,onChange:t=>{w(t),e.setFieldValue("auto_router_config",t)}})}),(0,t.jsx)(et.Form.Item,{rules:[{required:"semantic"===b,message:"Default model is required"}],label:"Default Model",name:"auto_router_default_model",tooltip:"Fallback model to use when auto routing logic cannot determine the best model",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(W.Select,{placeholder:"Select a default model",onChange:e=>{j("custom"===e)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0})}),(0,t.jsx)(et.Form.Item,{label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Optional: Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,t.jsx)(W.Select,{value:e.getFieldValue("auto_router_embedding_model"),placeholder:"Select an embedding model (optional)",onChange:t=>{y("custom"===t),e.setFieldValue("auto_router_embedding_model",t)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0,allowClear:!0})})]}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Settings"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),k&&(0,t.jsx)(et.Form.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to control who can access this auto router",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:u.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(L.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(K.Button,{onClick:T,loading:n,children:"Test Connection"}),(0,t.jsx)(K.Button,{type:"primary",onClick:()=>{console.log("Add Auto Router button clicked!"),F()},children:"Add Auto Router"})]})]})]})}),(0,t.jsx)(el.Modal,{title:"Connection Test Results",open:i,onCancel:()=>{o(!1),d(!1)},footer:[(0,t.jsx)(K.Button,{onClick:()=>{o(!1),d(!1)},children:"Close"},"close")],width:700,children:i&&(0,t.jsx)(tt,{formValues:e.getFieldsValue(),accessToken:a,testMode:"chat",modelName:e.getFieldValue("auto_router_name"),onClose:()=>{o(!1),d(!1)},onTestComplete:()=>d(!1)},c)})]})},ty=(0,a.createQueryKeys)("guardrails");var tb=e.i(109034),tv=e.i(793130),tN=e.i(560445),tw=e.i(663435),tC=e.i(677667),tS=e.i(898667),tk=e.i(130643),tT=e.i(635432),tF=e.i(564897),tI=e.i(435451);let{Text:tM}=L.Typography,tP=({form:e,showCacheControl:l,onCacheControlChange:s})=>{let a=t=>{let l=e.getFieldValue("litellm_extra_params");try{let s=l?JSON.parse(l):{};t.length>0?s.cache_control_injection_points=t:delete s.cache_control_injection_points,Object.keys(s).length>0?e.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):e.setFieldValue("litellm_extra_params","")}catch(e){console.error("Error updating cache control points:",e)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Cache Control Injection Points",name:"cache_control",valuePropName:"checked",className:"mb-4",tooltip:"Tell litellm where to inject cache control checkpoints. You can specify either by role (to apply to all messages of that role) or by specific message index.",children:(0,t.jsx)(es.Switch,{onChange:s,className:"bg-gray-600"})}),l&&(0,t.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,t.jsx)(tM,{className:"text-sm text-gray-500 block mb-4",children:"Providers like Anthropic, Bedrock API require users to specify where to inject cache control checkpoints, litellm can automatically add them for you as a cost saving feature."}),(0,t.jsx)(et.Form.List,{name:"cache_control_injection_points",initialValue:[{location:"message"}],children:(l,{add:s,remove:r})=>(0,t.jsxs)(t.Fragment,{children:[l.map((s,i)=>(0,t.jsxs)("div",{className:"flex items-center mb-4 gap-4",children:[(0,t.jsx)(et.Form.Item,{...s,label:"Type",name:[s.name,"location"],initialValue:"message",className:"mb-0",style:{width:"180px"},children:(0,t.jsx)(W.Select,{disabled:!0,options:[{value:"message",label:"Message"}]})}),(0,t.jsx)(et.Form.Item,{...s,label:"Role",name:[s.name,"role"],className:"mb-0",style:{width:"180px"},tooltip:"LiteLLM will mark all messages of this role as cacheable",children:(0,t.jsx)(W.Select,{placeholder:"Select a role",allowClear:!0,options:[{value:"user",label:"User"},{value:"system",label:"System"},{value:"assistant",label:"Assistant"}],onChange:()=>{a(e.getFieldValue("cache_control_points"))}})}),(0,t.jsx)(et.Form.Item,{...s,label:"Index",name:[s.name,"index"],className:"mb-0",style:{width:"180px"},tooltip:"(Optional) If set litellm will mark the message at this index as cacheable",children:(0,t.jsx)(tI.default,{type:"number",placeholder:"Optional",step:1,onChange:()=>{a(e.getFieldValue("cache_control_points"))}})}),l.length>1&&(0,t.jsx)(tF.MinusCircleOutlined,{className:"text-red-500 cursor-pointer text-lg ml-12",onClick:()=>{r(s.name),setTimeout(()=>{a(e.getFieldValue("cache_control_points"))},0)}})]},s.key)),(0,t.jsx)(et.Form.Item,{children:(0,t.jsxs)("button",{type:"button",className:"flex items-center justify-center w-full border border-dashed border-gray-300 py-2 px-4 text-gray-600 hover:text-blue-600 hover:border-blue-300 transition-all rounded",onClick:()=>s(),children:[(0,t.jsx)(tr.PlusOutlined,{className:"mr-2"}),"Add Injection Point"]})})]})})]})]})};var tA=e.i(916940),tE=e.i(122550);let{Link:tL}=L.Typography,tR=({showAdvancedSettings:e,setShowAdvancedSettings:l,teams:s,guardrailsList:a,tagsList:r,accessToken:i})=>{let[o]=et.Form.useForm(),[n,d]=x.default.useState(!1),[c,m]=x.default.useState("per_token"),[u,h]=x.default.useState(!1),p=(e,t)=>t&&(isNaN(Number(t))||0>Number(t))?Promise.reject("Please enter a valid positive number"):Promise.resolve();return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(tC.Accordion,{className:"mt-2 mb-4",children:[(0,t.jsx)(tS.AccordionHeader,{children:(0,t.jsx)("b",{children:"Advanced Settings"})}),(0,t.jsx)(tk.AccordionBody,{children:(0,t.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,t.jsx)(et.Form.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,t.jsx)(es.Switch,{onChange:e=>{d(e),e||o.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{children:["Attached Knowledge Bases (RAG)"," ",(0,t.jsx)(E.Tooltip,{title:"Vector stores to use for RAG. Every request to this model will automatically retrieve context from these knowledge bases.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/knowledgebase",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"vector_store_ids",className:"mt-4",help:"Select vector stores to attach. Requests to this model will automatically use these for RAG. Set up vector stores in Tools > Vector Stores.",children:(0,t.jsx)(tA.default,{onChange:()=>{},accessToken:i,placeholder:"Select knowledge bases (optional)"})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(E.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails. Go to 'Guardrails' tab to create new guardrails.",children:(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:a.map(e=>({value:e,label:e}))})}),(0,t.jsx)(et.Form.Item,{label:"Tags",name:"tags",className:"mb-4",children:(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(r).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),n&&(0,t.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,t.jsx)(et.Form.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,t.jsx)(W.Select,{defaultValue:"per_token",onChange:e=>m(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})}),(0,t.jsx)(et.Form.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})})]}):(0,t.jsx)(et.Form.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:p}],className:"mb-4",children:(0,t.jsx)(eR.TextInput,{})})]}),(0,t.jsx)(et.Form.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,t.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,t.jsx)(tL,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,t.jsx)(es.Switch,{onChange:e=>{let t=o.getFieldValue("litellm_extra_params");try{let l=t?JSON.parse(t):{};e?l.use_in_pass_through=!0:delete l.use_in_pass_through,Object.keys(l).length>0?o.setFieldValue("litellm_extra_params",JSON.stringify(l,null,2)):o.setFieldValue("litellm_extra_params","")}catch(t){e?o.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):o.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,t.jsx)(tP,{form:o,showCacheControl:u,onCacheControlChange:e=>{if(h(e),!e){let e=o.getFieldValue("litellm_extra_params");try{let t=e?JSON.parse(e):{};delete t.cache_control_injection_points,Object.keys(t).length>0?o.setFieldValue("litellm_extra_params",JSON.stringify(t,null,2)):o.setFieldValue("litellm_extra_params","")}catch(e){o.setFieldValue("litellm_extra_params","")}}}}),(0,t.jsx)(et.Form.Item,{label:"LiteLLM Params",name:"litellm_extra_params",tooltip:"Optional litellm params used for making a litellm.completion() call.",className:"mb-4 mt-4",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(tT.default,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,t.jsxs)(eD.Row,{className:"mb-4",children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,t.jsx)(tL,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,t.jsx)(et.Form.Item,{label:"Model Info",name:"model_info_params",tooltip:"Optional model info params. Returned when calling `/model/info` endpoint.",className:"mb-0",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(tT.default,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})};var tO=e.i(291542),tB=e.i(750113);let tz=({content:e,children:l,width:s="auto",className:a=""})=>{let[r,i]=(0,x.useState)(!1),[o,n]=(0,x.useState)("top"),d=(0,x.useRef)(null);return(0,t.jsxs)("div",{className:"relative inline-block",ref:d,children:[l||(0,t.jsx)(tB.QuestionCircleOutlined,{className:"ml-1 text-gray-500 cursor-help",onMouseEnter:()=>{if(d.current){let e=d.current.getBoundingClientRect(),t=e.top,l=window.innerHeight-e.bottom;t<300&&l>300?n("bottom"):n("top")}i(!0)},onMouseLeave:()=>i(!1)}),r&&(0,t.jsxs)("div",{className:`absolute left-1/2 -translate-x-1/2 z-50 bg-black/90 text-white p-2 rounded-md text-sm font-normal shadow-lg ${a}`,style:{["top"===o?"bottom":"top"]:"100%",width:s,marginBottom:"top"===o?"8px":"0",marginTop:"bottom"===o?"8px":"0"},children:[e,(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 w-0 h-0",style:{top:"top"===o?"100%":"auto",bottom:"bottom"===o?"100%":"auto",borderTop:"top"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderBottom:"bottom"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderLeft:"6px solid transparent",borderRight:"6px solid transparent"}})]})]})},tq=()=>{let e=et.Form.useFormInstance(),[l,s]=(0,x.useState)(0),a=et.Form.useWatch("model",e)||[],r=Array.isArray(a)?a:[a],i=et.Form.useWatch("custom_model_name",e),o=!r.includes("all-wildcard"),n=et.Form.useWatch("custom_llm_provider",e);if((0,x.useEffect)(()=>{if(i&&r.includes("custom")){let t=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?n===eM.Providers.Azure?{public_name:i,litellm_model:`azure/${i}`}:{public_name:i,litellm_model:i}:e);e.setFieldValue("model_mappings",t),s(e=>e+1)}},[i,r,n,e]),(0,x.useEffect)(()=>{if(r.length>0&&!r.includes("all-wildcard")){let t=e.getFieldValue("model_mappings")||[];if(t.length!==r.length||!r.every(e=>t.some(t=>"custom"===e?"custom"===t.litellm_model||t.litellm_model===i:n===eM.Providers.Azure?t.litellm_model===`azure/${e}`:t.litellm_model===e))){let t=r.map(e=>"custom"===e&&i?n===eM.Providers.Azure?{public_name:i,litellm_model:`azure/${i}`}:{public_name:i,litellm_model:i}:n===eM.Providers.Azure?{public_name:e,litellm_model:`azure/${e}`}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",t),s(e=>e+1)}}},[r,i,n,e]),!o)return null;let d=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-2 font-normal",children:"The name you specify in your API calls to LiteLLM Proxy"}),(0,t.jsxs)("div",{className:"mb-2 font-normal",children:[(0,t.jsx)("strong",{children:"Example:"})," If you name your public model"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"example-name"}),", and choose"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"openai/qwen-plus-latest"})," as the LiteLLM model"]}),(0,t.jsxs)("div",{className:"mb-2 font-normal",children:[(0,t.jsx)("strong",{children:"Usage:"})," You make an API call to the LiteLLM proxy with"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:'model = "example-name"'})]}),(0,t.jsxs)("div",{className:"font-normal",children:[(0,t.jsx)("strong",{children:"Result:"})," LiteLLM sends"," ",(0,t.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"qwen-plus-latest"})," to the provider"]})]}),c=(0,t.jsx)("div",{children:"The model name LiteLLM will send to the LLM API"}),m=[{title:(0,t.jsxs)("span",{className:"flex items-center",children:["Public Model Name",(0,t.jsx)(tz,{content:d,width:"500px"})]}),dataIndex:"public_name",key:"public_name",render:(l,s,a)=>(0,t.jsx)(eR.TextInput,{value:l,onChange:t=>{let l=t.target.value,s=[...e.getFieldValue("model_mappings")],r=n===eM.Providers.Anthropic,i=l.endsWith("-1m"),o=e.getFieldValue("litellm_extra_params"),d=!o||""===o.trim(),c=l;if(r&&i&&d){let t=JSON.stringify({extra_headers:{"anthropic-beta":"context-1m-2025-08-07"}},null,2);e.setFieldValue("litellm_extra_params",t),c=l.slice(0,-3)}s[a].public_name=c,e.setFieldValue("model_mappings",s)}})},{title:(0,t.jsxs)("span",{className:"flex items-center",children:["LiteLLM Model Name",(0,t.jsx)(tz,{content:c,width:"360px"})]}),dataIndex:"litellm_model",key:"litellm_model"}];return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(et.Form.Item,{label:"Model Mappings",name:"model_mappings",tooltip:"Map public model names to LiteLLM model names for load balancing",labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",rules:[{required:!0,validator:async(e,t)=>{if(!t||0===t.length)throw Error("At least one model mapping is required");if(t.filter(e=>!e.public_name||""===e.public_name.trim()).length>0)throw Error("All model mappings must have valid public names")}}],children:(0,t.jsx)(tO.Table,{dataSource:e.getFieldValue("model_mappings"),columns:m,pagination:!1,size:"small"},l)})})},tV=({selectedProvider:e,providerModels:l,getPlaceholder:s})=>{let a=et.Form.useFormInstance(),r=t=>{let l=t.target.value,s=(a.getFieldValue("model_mappings")||[]).map(t=>"custom"===t.public_name||"custom"===t.litellm_model?e===eM.Providers.Azure?{public_name:l,litellm_model:`azure/${l}`}:{public_name:l,litellm_model:l}:t);a.setFieldsValue({model_mappings:s})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(et.Form.Item,{label:"LiteLLM Model Name(s)",tooltip:"The model name LiteLLM will send to the LLM API",className:"mb-0",children:[(0,t.jsx)(et.Form.Item,{name:"model",rules:[{required:!0,message:`Please enter ${e===eM.Providers.Azure?"a deployment name":"at least one model"}.`}],noStyle:!0,children:e===eM.Providers.Azure||e===eM.Providers.OpenAI_Compatible||e===eM.Providers.Ollama?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(eR.TextInput,{placeholder:s(e),onChange:e===eM.Providers.Azure?e=>{let t=e.target.value,l=t?[{public_name:t,litellm_model:`azure/${t}`}]:[];a.setFieldsValue({model:t,model_mappings:l})}:void 0})}):l.length>0?(0,t.jsx)(W.Select,{mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:t=>{let l=Array.isArray(t)?t:[t];if(l.includes("all-wildcard"))a.setFieldsValue({model_name:void 0,model_mappings:[]});else if(JSON.stringify(a.getFieldValue("model"))!==JSON.stringify(l)){let t=l.map(t=>e===eM.Providers.Azure?{public_name:t,litellm_model:`azure/${t}`}:{public_name:t,litellm_model:t});a.setFieldsValue({model:l,model_mappings:t})}},optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:`All ${e} Models (Wildcard)`,value:"all-wildcard"},...l.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,t.jsx)(eR.TextInput,{placeholder:s(e)})}),(0,t.jsx)(et.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.model!==t.model,children:({getFieldValue:l})=>{let s=l("model")||[];return(Array.isArray(s)?s:[s]).includes("custom")&&(0,t.jsx)(et.Form.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,t.jsx)(eR.TextInput,{placeholder:e===eM.Providers.Azure?"Enter Azure deployment name":"Enter custom model name",onChange:r})})}})]}),(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:14,children:(0,t.jsx)(em.Text,{className:"mb-3 mt-1",children:e===eM.Providers.Azure?"Your deployment name will be saved as the public model name, and LiteLLM will use 'azure/deployment-name' internally":"The model name LiteLLM will send to the LLM API"})})]})]})},tD=[{value:"chat",label:"Chat - /chat/completions"},{value:"completion",label:"Completion - /completions"},{value:"embedding",label:"Embedding - /embeddings"},{value:"audio_speech",label:"Audio Speech - /audio/speech"},{value:"audio_transcription",label:"Audio Transcription - /audio/transcriptions"},{value:"image_generation",label:"Image Generation - /images/generations"},{value:"video_generation",label:"Video Generation - /videos"},{value:"rerank",label:"Rerank - /rerank"},{value:"realtime",label:"Realtime - /realtime"},{value:"batch",label:"Batch - /batch"},{value:"ocr",label:"OCR - /ocr"}],{Title:tH,Link:tG}=L.Typography,t$=({form:e,handleOk:a,selectedProvider:i,setSelectedProvider:o,providerModels:n,setProviderModelsFn:d,getPlaceholder:c,uploadProps:m,showAdvancedSettings:u,setShowAdvancedSettings:h,teams:p,credentials:g})=>{let[f,j]=(0,x.useState)("chat"),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)(!1),[N,w]=(0,x.useState)(""),{accessToken:C,userRole:S,premiumUser:k,userId:T}=(0,r.default)(),{data:F,isLoading:I,error:M}=eB(),{data:P,isLoading:A,error:O}=(()=>{let{accessToken:e,userId:t,userRole:a}=(0,r.default)();return(0,s.useQuery)({queryKey:ty.list({}),queryFn:async()=>(await (0,l.getGuardrailsList)(e)).guardrails.map(e=>e.guardrail_name),enabled:!!(e&&t&&a)})})(),{data:B,isLoading:z,error:q}=(0,tb.useTags)(),V=async()=>{v(!0),w(`test-${Date.now()}`),y(!0)},[D,H]=(0,x.useState)(!1),[G,$]=(0,x.useState)([]),[U,J]=(0,x.useState)(null);(0,x.useEffect)(()=>{(async()=>{$((await (0,l.modelAvailableCall)(C,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[C]);let Q=(0,x.useMemo)(()=>F?[...F].sort((e,t)=>e.provider_display_name.localeCompare(t.provider_display_name)):[],[F]),Y=M?M instanceof Error?M.message:"Failed to load providers":null,X=eZ.all_admin_roles.includes(S),Z=(0,eZ.isUserTeamAdminForAnyTeam)(p,T);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tH,{level:2,children:"Add Model"}),(0,t.jsx)(ej.Card,{children:(0,t.jsx)(et.Form,{form:e,onFinish:async e=>{console.log("🔥 Form onFinish triggered with values:",e),await a().then(()=>{J(null)})},onFinishFailed:e=>{console.log("💥 Form onFinishFailed triggered:",e)},labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[Z&&!X&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{label:"Select Team",name:"team_id",rules:[{required:!0,message:"Please select a team to continue"}],tooltip:"Select the team for which you want to add this model",children:(0,t.jsx)(tw.default,{onChange:e=>{J(e)}})}),!U&&(0,t.jsx)(tN.Alert,{message:"Team Selection Required",description:"As a team admin, you need to select your team first before adding models.",type:"info",showIcon:!0,className:"mb-4"})]}),(X||Z&&U)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Form.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"E.g. OpenAI, Azure OpenAI, Anthropic, Bedrock, etc.",labelCol:{span:10},labelAlign:"left",children:(0,t.jsxs)(W.Select,{virtual:!1,showSearch:!0,loading:I,placeholder:I?"Loading providers...":"Select a provider",optionFilterProp:"data-label",onChange:t=>{o(t),d(t),e.setFieldsValue({custom_llm_provider:t}),e.setFieldsValue({model:[],model_name:void 0})},children:[Y&&0===Q.length&&(0,t.jsx)(W.Select.Option,{value:"",children:Y},"__error"),Q.map(e=>{let l=e.provider_display_name,s=e.provider;return eM.providerLogoMap[l],(0,t.jsx)(W.Select.Option,{value:s,"data-label":l,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(R.ProviderLogo,{provider:s,className:"w-5 h-5"}),(0,t.jsx)("span",{children:l})]})},s)})]})}),(0,t.jsx)(tV,{selectedProvider:i,providerModels:n,getPlaceholder:c}),(0,t.jsx)(tq,{}),(0,t.jsx)(et.Form.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,t.jsx)(W.Select,{style:{width:"100%"},value:f,onChange:e=>j(e),options:tD})}),(0,t.jsxs)(eD.Row,{children:[(0,t.jsx)(eq.Col,{span:10}),(0,t.jsx)(eq.Col,{span:10,children:(0,t.jsxs)(em.Text,{className:"mb-5 mt-1",children:[(0,t.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model"," ",(0,t.jsx)(tG,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(L.Typography.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,t.jsx)(et.Form.Item,{label:"Existing Credentials",name:"litellm_credential_name",initialValue:null,children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{value:null,label:"None"},...g.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,t.jsx)(et.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.litellm_credential_name!==t.litellm_credential_name||e.provider!==t.provider,children:({getFieldValue:e})=>{let l=e("litellm_credential_name");return(console.log("🔑 Credential Name Changed:",l),l)?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,t.jsx)(eJ,{selectedProvider:i,uploadProps:m})]})}}),(0,t.jsxs)("div",{className:"flex items-center my-4",children:[(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,t.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Model Info Settings"}),(0,t.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(X||!Z)&&(0,t.jsx)(et.Form.Item,{label:"Team-BYOK Model",tooltip:"Only use this model + credential combination for this team. Useful when teams want to onboard their own OpenAI keys.",className:"mb-4",children:(0,t.jsx)(E.Tooltip,{title:k?"":"This is an enterprise-only feature. Upgrade to premium to restrict model+credential combinations to a specific team.",placement:"top",children:(0,t.jsx)(tv.Switch,{checked:D,onChange:t=>{H(t),t||e.setFieldValue("team_id",void 0)},disabled:!k})})}),D&&(X||!Z)&&(0,t.jsx)(et.Form.Item,{label:"Select Team",name:"team_id",className:"mb-4",tooltip:"Only keys for this team will be able to call this model.",rules:[{required:D&&!X,message:"Please select a team."}],children:(0,t.jsx)(tw.default,{disabled:!k})}),X&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(et.Form.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to give users access to select models, and add new ones to the group over time.",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:G.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})}),(0,t.jsx)(tR,{showAdvancedSettings:u,setShowAdvancedSettings:h,teams:p,guardrailsList:P||[],tagsList:B||{},accessToken:C||""})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(L.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(K.Button,{onClick:V,loading:b,children:"Test Connect"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Add Model"})]})]})]})})}),(0,t.jsx)(el.Modal,{title:"Connection Test Results",open:_,onCancel:()=>{y(!1),v(!1)},footer:[(0,t.jsx)(K.Button,{onClick:()=>{y(!1),v(!1)},children:"Close"},"close")],width:700,children:_&&(0,t.jsx)(tt,{formValues:e.getFieldsValue(),accessToken:C,testMode:f,modelName:e.getFieldValue("model_name")||e.getFieldValue("model"),onClose:()=>{y(!1),v(!1)},onTestComplete:()=>v(!1)},N)})]})},tU=({form:e,handleOk:l,selectedProvider:s,setSelectedProvider:a,providerModels:r,setProviderModelsFn:i,getPlaceholder:o,uploadProps:n,showAdvancedSettings:d,setShowAdvancedSettings:c,teams:m,credentials:u,accessToken:h,userRole:x})=>{let[p]=et.Form.useForm();return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(e4.TabGroup,{className:"w-full",children:[(0,t.jsxs)(e5.TabList,{className:"mb-4",children:[(0,t.jsx)(e2.Tab,{children:"Add Model"}),(0,t.jsx)(e2.Tab,{children:"Add Auto Router"})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t$,{form:e,handleOk:l,selectedProvider:s,setSelectedProvider:a,providerModels:r,setProviderModelsFn:i,getPlaceholder:o,uploadProps:n,showAdvancedSettings:d,setShowAdvancedSettings:c,teams:m,credentials:u})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t_,{form:p,handleOk:()=>{p.validateFields().then(e=>{tl(e,h,p,l)}).catch(e=>{console.error("Validation failed:",e)})},accessToken:h,userRole:x})})]})]})})};var tJ=e.i(798496),tK=e.i(536916),tW=e.i(502275),tQ=e.i(122577);let tY=[{pattern:/Missing .* API Key/i,replacement:"Missing API Key"},{pattern:/Connection timeout/i,replacement:"Connection timeout"},{pattern:/Network.*not.*ok/i,replacement:"Network connection failed"},{pattern:/403.*Forbidden/i,replacement:"Access forbidden - check API key permissions"},{pattern:/401.*Unauthorized/i,replacement:"Unauthorized - invalid API key"},{pattern:/429.*rate limit/i,replacement:"Rate limit exceeded"},{pattern:/500.*Internal Server Error/i,replacement:"Provider internal server error"},{pattern:/litellm\.AuthenticationError/i,replacement:"Authentication failed"},{pattern:/litellm\.RateLimitError/i,replacement:"Rate limit exceeded"},{pattern:/litellm\.APIError/i,replacement:"API error"}],tX=({accessToken:e,modelData:s,all_models_on_proxy:a,getDisplayModelName:r,setSelectedModelId:i,teams:o})=>{let n,d,c,m,[u,h]=(0,x.useState)({}),[p,g]=(0,x.useState)([]),[f,j]=(0,x.useState)(!1),[_,y]=(0,x.useState)(!1),[b,v]=(0,x.useState)(null),[N,w]=(0,x.useState)(!1),[C,S]=(0,x.useState)(null);(0,x.useRef)(null),(0,x.useEffect)(()=>{e&&s?.data&&(async()=>{let t={};s.data.forEach(e=>{let l=e.model_info?.id;l&&(t[l]={status:"none",lastCheck:"None",lastSuccess:"None",loading:!1,error:void 0,fullError:void 0,successResponse:void 0})});try{let a=await (0,l.latestHealthChecksCall)(e);a&&a.latest_health_checks&&"object"==typeof a.latest_health_checks&&Object.entries(a.latest_health_checks).forEach(([e,l])=>{if(!l||!s.data.some(t=>t.model_info?.id===e))return;let a=l.error_message||void 0;t[e]={status:l.status||"unknown",lastCheck:l.checked_at?new Date(l.checked_at).toLocaleString():"None",lastSuccess:"healthy"===l.status&&l.checked_at?new Date(l.checked_at).toLocaleString():"None",loading:!1,error:a?F(a):void 0,fullError:a,successResponse:"healthy"===l.status?l:void 0}})}catch(e){console.warn("Failed to load health check history (using default states):",e)}h(t)})()},[e,s]);let F=e=>{if(!e)return"Health check failed";let t="string"==typeof e?e:JSON.stringify(e),l=t.match(/(\w+Error):\s*(\d{3})/i);if(l)return`${l[1]}: ${l[2]}`;let s=t.match(/(AuthenticationError|RateLimitError|BadRequestError|InternalServerError|TimeoutError|NotFoundError|ForbiddenError|ServiceUnavailableError|BadGatewayError|ContentPolicyViolationError|\w+Error)/i),a=t.match(/\b(400|401|403|404|408|429|500|502|503|504)\b/);if(s&&a)return`${s[1]}: ${a[1]}`;if(a){let e=a[1];return`${({400:"BadRequestError",401:"AuthenticationError",403:"ForbiddenError",404:"NotFoundError",408:"TimeoutError",429:"RateLimitError",500:"InternalServerError",502:"BadGatewayError",503:"ServiceUnavailableError",504:"GatewayTimeoutError"})[e]}: ${e}`}if(s){let e=s[1],t={AuthenticationError:"401",RateLimitError:"429",BadRequestError:"400",InternalServerError:"500",TimeoutError:"408",NotFoundError:"404",ForbiddenError:"403",ServiceUnavailableError:"503",BadGatewayError:"502",GatewayTimeoutError:"504",ContentPolicyViolationError:"400"}[e];return t?`${e}: ${t}`:e}for(let{pattern:e,replacement:l}of tY)if(e.test(t))return l;if(/missing.*api.*key|invalid.*key|unauthorized/i.test(t))return"AuthenticationError: 401";if(/rate.*limit|too.*many.*requests/i.test(t))return"RateLimitError: 429";if(/timeout|timed.*out/i.test(t))return"TimeoutError: 408";if(/not.*found/i.test(t))return"NotFoundError: 404";if(/forbidden|access.*denied/i.test(t))return"ForbiddenError: 403";if(/internal.*server.*error/i.test(t))return"InternalServerError: 500";let r=t.replace(/[\n\r]+/g," ").replace(/\s+/g," ").trim(),i=r.split(/[.!?]/),o=i[0]?.trim();return o&&o.length>0?o.length>100?o.substring(0,97)+"...":o:r.length>100?r.substring(0,97)+"...":r},I=async t=>{if(e){h(e=>({...e,[t]:{...e[t],loading:!0,status:"checking"}}));try{let s=await (0,l.individualModelHealthCheckCall)(e,t),a=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){let e=s.unhealthy_endpoints[0]?.error||"Health check failed",l=F(e);h(s=>({...s,[t]:{status:"unhealthy",lastCheck:a,lastSuccess:s[t]?.lastSuccess||"None",loading:!1,error:l,fullError:e}}))}else h(e=>({...e,[t]:{status:"healthy",lastCheck:a,lastSuccess:a,loading:!1,successResponse:s}}));try{let s=await (0,l.latestHealthChecksCall)(e),a=s.latest_health_checks?.[t];if(a){let e=a.error_message||void 0;h(l=>({...l,[t]:{status:a.status||l[t]?.status||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():l[t]?.lastCheck||"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():l[t]?.lastSuccess||"None",loading:!1,error:e?F(e):l[t]?.error,fullError:e||l[t]?.fullError,successResponse:"healthy"===a.status?a:l[t]?.successResponse}}))}}catch(e){console.debug("Could not fetch updated status from database (non-critical):",e)}}catch(a){let e=new Date().toLocaleString(),l=a instanceof Error?a.message:String(a),s=F(l);h(a=>({...a,[t]:{status:"unhealthy",lastCheck:e,lastSuccess:a[t]?.lastSuccess||"None",loading:!1,error:s,fullError:l}}))}}},M=async()=>{let t=p.length>0?p:a,s=t.reduce((e,t)=>(e[t]={...u[t],loading:!0,status:"checking"},e),{});h(e=>({...e,...s}));let r={},i=t.map(async t=>{if(e)try{let s=await (0,l.individualModelHealthCheckCall)(e,t);r[t]=s;let a=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){let e=s.unhealthy_endpoints[0]?.error||"Health check failed",l=F(e);h(s=>({...s,[t]:{status:"unhealthy",lastCheck:a,lastSuccess:s[t]?.lastSuccess||"None",loading:!1,error:l,fullError:e}}))}else h(e=>({...e,[t]:{status:"healthy",lastCheck:a,lastSuccess:a,loading:!1,successResponse:s}}))}catch(a){console.error(`Health check failed for model id ${t}:`,a);let e=new Date().toLocaleString(),l=a instanceof Error?a.message:String(a),s=F(l);h(a=>({...a,[t]:{status:"unhealthy",lastCheck:e,lastSuccess:a[t]?.lastSuccess||"None",loading:!1,error:s,fullError:l}}))}});await Promise.allSettled(i);try{if(!e)return;let s=await (0,l.latestHealthChecksCall)(e);s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(([e,l])=>{if(t.includes(e)&&l){let t=l.error_message||void 0;h(s=>{let a=s[e];return{...s,[e]:{status:l.status||a?.status||"unknown",lastCheck:l.checked_at?new Date(l.checked_at).toLocaleString():a?.lastCheck||"None",lastSuccess:"healthy"===l.status&&l.checked_at?new Date(l.checked_at).toLocaleString():a?.lastSuccess||"None",loading:!1,error:t?F(t):a?.error,fullError:t||a?.fullError,successResponse:"healthy"===l.status?l:a?.successResponse}}})}})}catch(e){console.warn("Failed to fetch updated health statuses from database (non-critical):",e)}},P=e=>{j(e),e?g(a):g([])},A=()=>{y(!1),v(null)},L=()=>{w(!1),S(null)};return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eu.Title,{children:"Model Health Status"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mt-1",children:"Run health checks on individual models to verify they are working correctly"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[p.length>0&&(0,t.jsx)(T.Button,{size:"sm",variant:"light",onClick:()=>P(!1),className:"px-3 py-1 text-sm",children:"Clear Selection"}),(0,t.jsx)(T.Button,{size:"sm",variant:"secondary",onClick:M,disabled:Object.values(u).some(e=>e.loading),className:"px-3 py-1 text-sm",children:p.length>0&&p.length{t?g(t=>[...t,e]):(g(t=>t.filter(t=>t!==e)),j(!1))},d=e=>{switch(e){case"healthy":return(0,t.jsx)(k.Badge,{color:"emerald",children:"healthy"});case"unhealthy":return(0,t.jsx)(k.Badge,{color:"red",children:"unhealthy"});case"checking":return(0,t.jsx)(k.Badge,{color:"blue",children:"checking"});case"none":return(0,t.jsx)(k.Badge,{color:"gray",children:"none"});default:return(0,t.jsx)(k.Badge,{color:"gray",children:"unknown"})}},c=(e,t,l)=>{v({modelName:e,cleanedError:t,fullError:l}),y(!0)},m=(e,t)=>{S({modelName:e,response:t}),w(!0)},[{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tK.Checkbox,{checked:f,indeterminate:p.length>0&&!f,onChange:e=>P(e.target.checked),onClick:e=>e.stopPropagation()}),(0,t.jsx)("span",{children:"Model ID"})]}),accessorKey:"model_info.id",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=p.includes(s);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(tK.Checkbox,{checked:a,onChange:e=>n(s,e.target.checked),onClick:e=>e.stopPropagation()}),(0,t.jsx)(E.Tooltip,{title:l.model_info.id,children:(0,t.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>i&&i(l.model_info.id),children:l.model_info.id})})]})}},{header:"Model Name",accessorKey:"model_name",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=r(l)||l.model_name;return(0,t.jsx)("div",{className:"font-medium text-sm",children:(0,t.jsx)(E.Tooltip,{title:s,children:(0,t.jsx)("div",{className:"truncate max-w-[200px]",children:s})})})}},{header:"Team Alias",accessorKey:"model_info.team_id",enableSorting:!0,sortingFn:"alphanumeric",cell:({row:e})=>{let l=e.original,s=l.model_info?.team_id;if(!s)return(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"-"});let a=o?.find(e=>e.team_id===s),r=a?.team_alias||s;return(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(E.Tooltip,{title:r,children:(0,t.jsx)("div",{className:"truncate max-w-[150px]",children:r})})})}},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("health_status")||"unknown",a=t.getValue("health_status")||"unknown",r={healthy:0,checking:1,unknown:2,unhealthy:3};return(r[s]??4)-(r[a]??4)},cell:({row:e})=>{let l=e.original,s={status:l.health_status,loading:l.health_loading,error:l.health_error};if(s.loading)return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse"}),(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:"Checking..."})]});let a=l.model_info?.id??"",i=r(l)||l.model_name,o="healthy"===s.status&&u[a]?.successResponse;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d(s.status),o&&m&&(0,t.jsx)(E.Tooltip,{title:"View response details",placement:"top",children:(0,t.jsx)("button",{onClick:()=>m(i,u[a]?.successResponse),className:"p-1 text-green-600 hover:text-green-800 hover:bg-green-50 rounded cursor-pointer transition-colors",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"h-4 w-4"})})})]})}},{header:"Error Details",accessorKey:"health_error",enableSorting:!1,cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=r(l)||l.model_name,i=u[s];if(!i?.error)return(0,t.jsx)(em.Text,{className:"text-gray-400 text-sm",children:"No errors"});let o=i.error,n=i.fullError||i.error;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"max-w-[200px]",children:(0,t.jsx)(E.Tooltip,{title:o,placement:"top",children:(0,t.jsx)(em.Text,{className:"text-red-600 text-sm truncate",children:o})})}),c&&n!==o&&(0,t.jsx)(E.Tooltip,{title:"View full error details",placement:"top",children:(0,t.jsx)("button",{onClick:()=>c(a,o,n),className:"p-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded cursor-pointer transition-colors",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"h-4 w-4"})})})]})}},{header:"Last Check",accessorKey:"last_check",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("last_check")||"Never checked",a=t.getValue("last_check")||"Never checked";if("Never checked"===s&&"Never checked"===a)return 0;if("Never checked"===s)return 1;if("Never checked"===a)return -1;if("Check in progress..."===s&&"Check in progress..."===a)return 0;if("Check in progress..."===s)return -1;if("Check in progress..."===a)return 1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:({row:e})=>{let l=e.original;return(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:l.health_loading?"Check in progress...":l.last_check})}},{header:"Last Success",accessorKey:"last_success",enableSorting:!0,sortingFn:(e,t,l)=>{let s=e.getValue("last_success")||"Never succeeded",a=t.getValue("last_success")||"Never succeeded";if("Never succeeded"===s&&"Never succeeded"===a)return 0;if("Never succeeded"===s)return 1;if("Never succeeded"===a)return -1;if("None"===s&&"None"===a)return 0;if("None"===s)return 1;if("None"===a)return -1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:({row:e})=>{let l=e.original,s=u[l.model_info?.id??""],a=s?.lastSuccess||"None";return(0,t.jsx)(em.Text,{className:"text-gray-600 text-sm",children:a})}},{header:"Actions",id:"actions",cell:({row:e})=>{let l=e.original,s=l.model_info?.id??"",a=l.health_status&&"none"!==l.health_status,r=l.health_loading?"Checking...":a?"Re-run Health Check":"Run Health Check";return(0,t.jsx)(E.Tooltip,{title:r,placement:"top",children:(0,t.jsx)("button",{"data-testid":"run-health-check-btn",className:`p-2 rounded-md transition-colors ${l.health_loading?"text-gray-400 cursor-not-allowed bg-gray-100":"text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50"}`,onClick:()=>{l.health_loading||I(s)},disabled:l.health_loading,children:l.health_loading?(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse"}),(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,t.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}):a?(0,t.jsx)(e0.RefreshIcon,{className:"h-4 w-4"}):(0,t.jsx)(tQ.PlayIcon,{className:"h-4 w-4"})})})},enableSorting:!1}]),data:s.data.map(e=>{let t=e.model_info?.id,l=(t?u[t]:null)||{status:"none",lastCheck:"None",loading:!1};return{model_name:e.model_name,model_info:e.model_info,provider:e.provider,litellm_model_name:e.litellm_model_name,health_status:l.status,last_check:l.lastCheck,last_success:l.lastSuccess||"None",health_loading:l.loading,health_error:l.error,health_full_error:l.fullError}}),isLoading:!1})}),(0,t.jsx)(el.Modal,{title:b?`Health Check Error - ${b.modelName}`:"Error Details",open:_,onCancel:A,footer:[(0,t.jsx)(K.Button,{onClick:A,children:"Close"},"close")],width:800,children:b&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Error:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,t.jsx)(em.Text,{className:"text-red-800",children:b.cleanedError})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Full Error Details:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:b.fullError})})]})]})}),(0,t.jsx)(el.Modal,{title:C?`Health Check Response - ${C.modelName}`:"Response Details",open:N,onCancel:L,footer:[(0,t.jsx)(K.Button,{onClick:L,children:"Close"},"close")],width:800,children:C&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Status:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:(0,t.jsx)(em.Text,{className:"text-green-800",children:"Health check passed successfully"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Response Details:"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(C.response,null,2)})})]})]})})]})};var tZ=e.i(250980),t0=e.i(797672),t1=e.i(871943),t2=e.i(502547);let t4=({accessToken:e,initialModelGroupAlias:s={},onAliasUpdate:a})=>{let[r,i]=(0,x.useState)([]),[o,n]=(0,x.useState)({aliasName:"",targetModelGroup:""}),[d,c]=(0,x.useState)(null),[m,u]=(0,x.useState)(!0);(0,x.useEffect)(()=>{i(Object.entries(s).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModelGroup:"string"==typeof t?t:t?.model??""})))},[s]);let h=async t=>{if(!e)return console.error("Access token is missing"),!1;try{let s={};return t.forEach(e=>{s[e.aliasName]=e.targetModelGroup}),console.log("Saving model group alias:",s),await (0,l.setCallbacksCall)(e,{router_settings:{model_group_alias:s}}),a&&a(s),!0}catch(e){return console.error("Failed to save model group alias settings:",e),D.default.fromBackend("Failed to save model group alias settings"),!1}},b=async()=>{if(!o.aliasName||!o.targetModelGroup)return void D.default.fromBackend("Please provide both alias name and target model group");if(r.some(e=>e.aliasName===o.aliasName))return void D.default.fromBackend("An alias with this name already exists");let e=[...r,{id:`${Date.now()}-${o.aliasName}`,aliasName:o.aliasName,targetModelGroup:o.targetModelGroup}];await h(e)&&(i(e),n({aliasName:"",targetModelGroup:""}),D.default.success("Alias added successfully"))},v=async()=>{if(!d)return;if(!d.aliasName||!d.targetModelGroup)return void D.default.fromBackend("Please provide both alias name and target model group");if(r.some(e=>e.id!==d.id&&e.aliasName===d.aliasName))return void D.default.fromBackend("An alias with this name already exists");let e=r.map(e=>e.id===d.id?d:e);await h(e)&&(i(e),c(null),D.default.success("Alias updated successfully"))},N=()=>{c(null)},w=async e=>{let t=r.filter(t=>t.id!==e);await h(t)&&(i(t),D.default.success("Alias deleted successfully"))},C=r.reduce((e,t)=>(e[t.aliasName]=t.targetModelGroup,e),{});return(0,t.jsxs)(eL.Card,{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>u(!m),children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(eu.Title,{className:"mb-0",children:"Model Group Alias Settings"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Create aliases for your model groups to simplify API calls. For example, you can create an alias 'gpt-4o' that points to 'gpt-4o-mini-openai' model group."})]}),(0,t.jsx)("div",{className:"flex items-center",children:m?(0,t.jsx)(t1.ChevronDownIcon,{className:"w-5 h-5 text-gray-500"}):(0,t.jsx)(t2.ChevronRightIcon,{className:"w-5 h-5 text-gray-500"})})]}),m&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(em.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:o.aliasName,onChange:e=>n({...o,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model Group"}),(0,t.jsx)("input",{type:"text",value:o.targetModelGroup,onChange:e=>n({...o,targetModelGroup:e.target.value}),placeholder:"e.g., gpt-4o-mini-openai",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:b,disabled:!o.aliasName||!o.targetModelGroup,className:`flex items-center px-4 py-2 rounded-md text-sm ${!o.aliasName||!o.targetModelGroup?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(tZ.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(em.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(p.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(_.TableRow,{children:[(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Target Model Group"}),(0,t.jsx)(f.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(j.TableBody,{children:[r.map(e=>(0,t.jsx)(_.TableRow,{className:"h-8",children:d&&d.id===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:d.aliasName,onChange:e=>c({...d,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(y.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:d.targetModelGroup,onChange:e=>c({...d,targetModelGroup:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(y.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:v,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:N,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.TableCell,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,t.jsx)(y.TableCell,{className:"py-0.5 text-sm text-gray-500",children:e.targetModelGroup}),(0,t.jsx)(y.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{c({...e})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(t0.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>w(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(S.TrashIcon,{className:"w-3 h-3"})})]})})]})},e.id)),0===r.length&&(0,t.jsx)(_.TableRow,{children:(0,t.jsx)(y.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(eu.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(em.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config.yaml:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["router_settings:",(0,t.jsx)("br",{}),"  model_group_alias:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"    # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'    "',e,'": "',l,'"']},e))]})})]})]})]})};var t5=e.i(530212);let t6=x.forwardRef(function(e,t){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"}))});var t3=e.i(678784),t8=e.i(118366),t7=e.i(500330);let t9=({isVisible:e,onCancel:s,onSuccess:a,modelData:r,accessToken:i,userRole:o})=>{let[n]=et.Form.useForm(),[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)([]),[h,p]=(0,x.useState)([]),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null);(0,x.useEffect)(()=>{e&&r&&v()},[e,r]),(0,x.useEffect)(()=>{let t=async()=>{if(i)try{let e=await (0,l.modelAvailableCall)(i,"","",!1,null,!0,!0);u(e.data.map(e=>e.id))}catch(e){console.error("Error fetching model access groups:",e)}},s=async()=>{if(i)try{let e=await (0,ts.fetchAvailableModels)(i);p(e)}catch(e){console.error("Error fetching model info:",e)}};e&&(t(),s())},[e,i]);let v=()=>{try{let e=null;r.litellm_params?.auto_router_config&&(e="string"==typeof r.litellm_params.auto_router_config?JSON.parse(r.litellm_params.auto_router_config):r.litellm_params.auto_router_config),b(e),n.setFieldsValue({auto_router_name:r.model_name,auto_router_default_model:r.litellm_params?.auto_router_default_model||"",auto_router_embedding_model:r.litellm_params?.auto_router_embedding_model||"",model_access_group:r.model_info?.access_groups||[]});let t=new Set(h.map(e=>e.model_group));f(!t.has(r.litellm_params?.auto_router_default_model)),_(!t.has(r.litellm_params?.auto_router_embedding_model))}catch(e){console.error("Error parsing auto router config:",e),D.default.fromBackend("Error loading auto router configuration")}},N=async()=>{try{c(!0);let e=await n.validateFields(),t={...r.litellm_params,auto_router_config:JSON.stringify(y),auto_router_default_model:e.auto_router_default_model,auto_router_embedding_model:e.auto_router_embedding_model||void 0},o={...r.model_info,access_groups:e.model_access_group||[]},d={model_name:e.auto_router_name,litellm_params:t,model_info:o};await (0,l.modelPatchUpdateCall)(i,d,r.model_info.id);let m={...r,model_name:e.auto_router_name,litellm_params:t,model_info:o};D.default.success("Auto router configuration updated successfully"),a(m),s()}catch(e){console.error("Error updating auto router:",e),D.default.fromBackend("Failed to update auto router configuration")}finally{c(!1)}},w=h.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsx)(el.Modal,{title:"Edit Auto Router Configuration",open:e,onCancel:s,footer:[(0,t.jsx)(K.Button,{onClick:s,children:"Cancel"},"cancel"),(0,t.jsx)(K.Button,{loading:d,onClick:N,children:"Save Changes"},"submit")],width:1e3,destroyOnHidden:!0,children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(em.Text,{className:"text-gray-600",children:"Edit the auto router configuration including routing logic, default models, and access settings."}),(0,t.jsxs)(et.Form,{form:n,layout:"vertical",className:"space-y-4",children:[(0,t.jsx)(et.Form.Item,{label:"Auto Router Name",name:"auto_router_name",rules:[{required:!0,message:"Auto router name is required"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(tc,{modelInfo:h,value:y,onChange:e=>{b(e)}})}),(0,t.jsx)(et.Form.Item,{label:"Default Model",name:"auto_router_default_model",rules:[{required:!0,message:"Default model is required"}],children:(0,t.jsx)(W.Select,{placeholder:"Select a default model",onChange:e=>{f("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model name"}],showSearch:!0})}),(0,t.jsx)(et.Form.Item,{label:"Embedding Model",name:"auto_router_embedding_model",children:(0,t.jsx)(W.Select,{placeholder:"Select an embedding model (optional)",onChange:e=>{_("custom"===e)},options:[...w,{value:"custom",label:"Enter custom model name"}],showSearch:!0,allowClear:!0})}),"Admin"===o&&(0,t.jsx)(et.Form.Item,{label:"Model Access Groups",name:"model_access_group",tooltip:"Control who can access this auto router",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:m.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})]})]})})},{Title:le,Link:lt}=L.Typography,ll=({isVisible:e,onCancel:l,onAddCredential:s,existingCredential:a,setIsCredentialModalOpen:r})=>{let[i]=et.Form.useForm();return console.log(`existingCredential in add credentials tab: ${JSON.stringify(a)}`),(0,t.jsx)(el.Modal,{title:"Reuse Credentials",open:e,onCancel:()=>{l(),i.resetFields()},footer:null,width:600,children:(0,t.jsxs)(et.Form,{form:i,onFinish:e=>{s(e),i.resetFields(),r(!1)},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:a?.credential_name,children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries(a?.credential_values||{}).map(([e,l])=>(0,t.jsx)(et.Form.Item,{label:e,name:e,initialValue:l,children:(0,t.jsx)(eR.TextInput,{placeholder:`Enter ${e}`,disabled:!0})},e)),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(E.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(lt,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:()=>{l(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,t.jsx)(K.Button,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})};function ls({modelId:e,onClose:s,accessToken:a,userID:r,userRole:i,onModelUpdate:o,modelAccessGroups:c}){let m,[u]=et.Form.useForm(),[h,p]=(0,x.useState)(null),[g,f]=(0,x.useState)(!1),[j,_]=(0,x.useState)(!1),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)(!1),[C,k]=(0,x.useState)(!1),[F,I]=(0,x.useState)(!1),[M,P]=(0,x.useState)(null),[A,L]=(0,x.useState)(!1),[R,O]=(0,x.useState)({}),[B,z]=(0,x.useState)(!1),[H,G]=(0,x.useState)([]),[J,Q]=(0,x.useState)({}),[Y,X]=(0,x.useState)([]),{data:Z,isLoading:ee}=(0,d.useModelsInfo)(1,50,void 0,e),{data:es}=(0,n.useModelCostMap)(),{data:ea}=(0,d.useModelHub)(),er=e=>null!=es&&"object"==typeof es&&e in es?es[e].litellm_provider:"openai",eo=(0,x.useMemo)(()=>Z?.data&&0!==Z.data.length&&ei(Z,er).data[0]||null,[Z,es]),en=("Admin"===i||eo?.model_info?.created_by===r)&&eo?.model_info?.db_model,ed="Admin"===i,ec=eo?.litellm_params?.auto_router_config!=null,eh=eo?.litellm_params?.litellm_credential_name!=null&&eo?.litellm_params?.litellm_credential_name!=void 0;(0,x.useEffect)(()=>{if(eo&&!h){let e=eo;e.litellm_model_name||(e={...e,litellm_model_name:e?.litellm_params?.litellm_model_name??e?.litellm_params?.model??e?.model_info?.key??null}),p(e),e?.litellm_params?.cache_control_injection_points&&L(!0)}},[eo,h]),(0,x.useEffect)(()=>{let t=async()=>{if(!a||eo)return;let t=(await (0,l.modelInfoV1Call)(a,e)).data[0];t&&!t.litellm_model_name&&(t={...t,litellm_model_name:t?.litellm_params?.litellm_model_name??t?.litellm_params?.model??t?.model_info?.key??null}),p(t),t?.litellm_params?.cache_control_injection_points&&L(!0)},s=async()=>{if(a)try{let e=(await (0,l.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);G(e)}catch(e){console.error("Failed to fetch guardrails:",e)}},r=async()=>{if(a)try{let e=await (0,l.tagListCall)(a);Q(e)}catch(e){console.error("Failed to fetch tags:",e)}},i=async()=>{if(a)try{let e=await (0,l.credentialListCall)(a);X(e.credentials||[])}catch(e){console.error("Failed to fetch credentials:",e)}};(async()=>{if(!a||eh)return;let t=await (0,l.credentialGetCall)(a,null,e);P({credential_name:t.credential_name,credential_values:t.credential_values,credential_info:t.credential_info})})(),t(),s(),r(),i()},[a,e]);let ex=async t=>{if(!a)return;let s={credential_name:t.credential_name,model_id:e,credential_info:{custom_llm_provider:h.litellm_params?.custom_llm_provider}};D.default.info("Storing credential.."),await (0,l.credentialCreateCall)(a,s),D.default.success("Credential stored successfully")},ep=async t=>{try{let s;if(!a)return;k(!0);let r={};try{r=t.litellm_extra_params?JSON.parse(t.litellm_extra_params):{},delete r.litellm_credential_name}catch(e){D.default.fromBackend("Invalid JSON in LiteLLM Params"),k(!1);return}let i={...t.litellm_params,...r,model:t.litellm_model_name,api_base:t.api_base,custom_llm_provider:t.custom_llm_provider,organization:t.organization,tpm:t.tpm,rpm:t.rpm,max_retries:t.max_retries,timeout:t.timeout,stream_timeout:t.stream_timeout,input_cost_per_token:t.input_cost/1e6,output_cost_per_token:t.output_cost/1e6,tags:t.tags};t.litellm_credential_name?i.litellm_credential_name=t.litellm_credential_name:delete i.litellm_credential_name,t.guardrails&&(i.guardrails=t.guardrails),void 0!==t.vector_store_ids&&(i.vector_store_ids=Array.isArray(t.vector_store_ids)?t.vector_store_ids:[]),t.cache_control&&t.cache_control_injection_points?.length>0?i.cache_control_injection_points=t.cache_control_injection_points:delete i.cache_control_injection_points;try{s=t.model_info?JSON.parse(t.model_info):eo.model_info,t.model_access_group&&(s={...s,access_groups:t.model_access_group}),void 0!==t.health_check_model&&(s={...s,health_check_model:t.health_check_model})}catch(e){D.default.fromBackend("Invalid JSON in Model Info");return}let n={model_name:t.model_name,litellm_params:i,model_info:s};await (0,l.modelPatchUpdateCall)(a,n,e);let d={...h,model_name:t.model_name,litellm_model_name:t.litellm_model_name,litellm_params:i,model_info:s};p(d),o&&o(d),D.default.success("Model settings updated successfully"),N(!1),I(!1)}catch(e){console.error("Error updating model:",e),D.default.fromBackend("Failed to update model settings")}finally{k(!1)}};if(ee)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsx)(em.Text,{children:"Loading..."})]});if(!eo)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsx)(em.Text,{children:"Model not found"})]});let eg=async()=>{if(a)try{D.default.info("Testing connection...");let e=await (0,l.testConnectionRequest)(a,{custom_llm_provider:h.litellm_params.custom_llm_provider,litellm_credential_name:h.litellm_params.litellm_credential_name,model:h.litellm_model_name},{mode:h.model_info?.mode},h.model_info?.mode);if("success"===e.status)D.default.success("Connection test successful!");else throw Error(e?.result?.error||e?.message||"Unknown error")}catch(e){e instanceof Error?D.default.error("Error testing connection: "+(0,tE.truncateString)(e.message,100)):D.default.error("Error testing connection: "+String(e))}},ef=async()=>{try{if(_(!0),!a)return;await (0,l.modelDeleteCall)(a,e),D.default.success("Model deleted successfully"),o&&o({deleted:!0,model_info:{id:e}}),s()}catch(e){console.error("Error deleting the model:",e),D.default.fromBackend("Failed to delete model")}finally{_(!1),f(!1)}},ej=async(e,t)=>{await (0,t7.copyToClipboard)(e)&&(O(e=>({...e,[t]:!0})),setTimeout(()=>{O(e=>({...e,[t]:!1}))},2e3))},e_=eo.litellm_model_name.includes("*");return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Button,{icon:t5.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Models"}),(0,t.jsxs)(eu.Title,{children:["Public Model Name: ",q(eo)]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(em.Text,{className:"text-gray-500 font-mono",children:eo.model_info.id}),(0,t.jsx)(K.Button,{type:"text",size:"small",icon:R["model-id"]?(0,t.jsx)(t3.CheckIcon,{size:12}):(0,t.jsx)(t8.CopyIcon,{size:12}),onClick:()=>ej(eo.model_info.id,"model-id"),className:`left-2 z-10 transition-all duration-200 ${R["model-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(T.Button,{variant:"secondary",icon:e0.RefreshIcon,onClick:eg,className:"flex items-center gap-2","data-testid":"test-connection-button",children:"Test Connection"}),(0,t.jsx)(T.Button,{icon:t6,variant:"secondary",onClick:()=>b(!0),className:"flex items-center",disabled:!ed,"data-testid":"reuse-credentials-button",children:"Re-use Credentials"}),(0,t.jsx)(T.Button,{icon:S.TrashIcon,variant:"secondary",onClick:()=>f(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-700",disabled:!en,"data-testid":"delete-model-button",children:"Delete Model"})]})]}),(0,t.jsxs)(e4.TabGroup,{children:[(0,t.jsxs)(e5.TabList,{className:"mb-6",children:[(0,t.jsx)(e2.Tab,{children:"Overview"}),(0,t.jsx)(e2.Tab,{children:"Raw JSON"})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsxs)($.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Provider"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[eo.provider&&(0,t.jsx)("img",{src:(0,eM.getProviderLogoAndName)(eo.provider).logo,alt:`${eo.provider} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,l=t.parentElement;if(l&&l.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=eo.provider?.charAt(0)||"-",l.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}),(0,t.jsx)(eu.Title,{children:eo.provider||"Not Set"})]})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"LiteLLM Model"}),(0,t.jsx)("div",{className:"mt-2 overflow-hidden",children:(0,t.jsx)(E.Tooltip,{title:eo.litellm_model_name||"Not Set",children:(0,t.jsx)("div",{className:"break-all text-sm font-medium leading-relaxed cursor-pointer",children:eo.litellm_model_name||"Not Set"})})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Pricing"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(em.Text,{children:["Input: $",eo.input_cost,"/1M tokens"]}),(0,t.jsxs)(em.Text,{children:["Output: $",eo.output_cost,"/1M tokens"]})]})]})]}),(0,t.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Created At"," ",eo.model_info.created_at?new Date(eo.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Created By ",eo.model_info.created_by||"Not Set"]})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eu.Title,{children:"Model Settings"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[ec&&en&&!F&&(0,t.jsx)(T.Button,{onClick:()=>z(!0),className:"flex items-center",children:"Edit Auto Router"}),en?!F&&(0,t.jsx)(T.Button,{onClick:()=>I(!0),className:"flex items-center",children:"Edit Settings"}):(0,t.jsx)(E.Tooltip,{title:"Only DB models can be edited. You must be an admin or the creator of the model to edit it.",children:(0,t.jsx)(w.InfoCircleOutlined,{})})]})]}),h?(0,t.jsx)(et.Form,{form:u,onFinish:ep,initialValues:{model_name:h.model_name,litellm_model_name:h.litellm_model_name,api_base:h.litellm_params.api_base,custom_llm_provider:h.litellm_params.custom_llm_provider,organization:h.litellm_params.organization,tpm:h.litellm_params.tpm,rpm:h.litellm_params.rpm,max_retries:h.litellm_params.max_retries,timeout:h.litellm_params.timeout,stream_timeout:h.litellm_params.stream_timeout,input_cost:h.litellm_params.input_cost_per_token?1e6*h.litellm_params.input_cost_per_token:h.model_info?.input_cost_per_token*1e6||null,output_cost:h.litellm_params?.output_cost_per_token?1e6*h.litellm_params.output_cost_per_token:h.model_info?.output_cost_per_token*1e6||null,cache_control:!!h.litellm_params?.cache_control_injection_points,cache_control_injection_points:h.litellm_params?.cache_control_injection_points||[],model_access_group:Array.isArray(h.model_info?.access_groups)?h.model_info.access_groups:[],guardrails:Array.isArray(h.litellm_params?.guardrails)?h.litellm_params.guardrails:[],vector_store_ids:Array.isArray(h.litellm_params?.vector_store_ids)?h.litellm_params.vector_store_ids:[],tags:Array.isArray(h.litellm_params?.tags)?h.litellm_params.tags:[],health_check_model:e_?h.model_info?.health_check_model:null,litellm_credential_name:h.litellm_params?.litellm_credential_name||"",litellm_extra_params:JSON.stringify(Object.fromEntries(Object.entries(h.litellm_params||{}).filter(([e])=>"litellm_credential_name"!==e)),null,2)},layout:"vertical",onValuesChange:()=>N(!0),children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Name"}),F?(0,t.jsx)(et.Form.Item,{name:"model_name",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter model name"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"LiteLLM Model Name"}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_model_name",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter LiteLLM model name"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_model_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),F?(0,t.jsx)(et.Form.Item,{name:"input_cost",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter input cost"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h?.litellm_params?.input_cost_per_token?(h.litellm_params?.input_cost_per_token*1e6).toFixed(4):h?.model_info?.input_cost_per_token?(1e6*h.model_info.input_cost_per_token).toFixed(4):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),F?(0,t.jsx)(et.Form.Item,{name:"output_cost",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter output cost"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h?.litellm_params?.output_cost_per_token?(1e6*h.litellm_params.output_cost_per_token).toFixed(4):h?.model_info?.output_cost_per_token?(1e6*h.model_info.output_cost_per_token).toFixed(4):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"API Base"}),F?(0,t.jsx)(et.Form.Item,{name:"api_base",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter API base"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.api_base||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Custom LLM Provider"}),F?(0,t.jsx)(et.Form.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter custom LLM provider"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.custom_llm_provider||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Organization"}),F?(0,t.jsx)(et.Form.Item,{name:"organization",className:"mb-0",children:(0,t.jsx)(eR.TextInput,{placeholder:"Enter organization"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.organization||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"TPM (Tokens per Minute)"}),F?(0,t.jsx)(et.Form.Item,{name:"tpm",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter TPM"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.tpm||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"RPM (Requests per Minute)"}),F?(0,t.jsx)(et.Form.Item,{name:"rpm",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter RPM"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.rpm||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Max Retries"}),F?(0,t.jsx)(et.Form.Item,{name:"max_retries",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter max retries"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.max_retries||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Timeout (seconds)"}),F?(0,t.jsx)(et.Form.Item,{name:"timeout",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter timeout"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.timeout||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Stream Timeout (seconds)"}),F?(0,t.jsx)(et.Form.Item,{name:"stream_timeout",className:"mb-0",children:(0,t.jsx)(tI.default,{placeholder:"Enter stream timeout"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.stream_timeout||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Access Groups"}),F?(0,t.jsx)(et.Form.Item,{name:"model_access_group",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:c?.map(e=>({value:e,label:e}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_info?.access_groups?Array.isArray(h.model_info.access_groups)?h.model_info.access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.model_info.access_groups.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No groups assigned":h.model_info.access_groups:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["Guardrails",(0,t.jsx)(E.Tooltip,{title:"Apply safety guardrails to this model to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"guardrails",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing guardrails or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:H.map(e=>({value:e,label:e}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.guardrails?Array.isArray(h.litellm_params.guardrails)?h.litellm_params.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.guardrails.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:e},l))}):"No guardrails assigned":h.litellm_params.guardrails:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["Attached Knowledge Bases (RAG)",(0,t.jsx)(E.Tooltip,{title:"Vector stores used for RAG. Every request to this model will automatically retrieve context from these knowledge bases.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/knowledgebase",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"vector_store_ids",className:"mb-0",children:(0,t.jsx)(tA.default,{onChange:()=>{},accessToken:a||"",placeholder:"Select knowledge bases (optional)"})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.vector_store_ids?Array.isArray(h.litellm_params.vector_store_ids)?h.litellm_params.vector_store_ids.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.vector_store_ids.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No knowledge bases attached":String(h.litellm_params.vector_store_ids):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Tags"}),F?(0,t.jsx)(et.Form.Item,{name:"tags",className:"mb-0",children:(0,t.jsx)(W.Select,{mode:"tags",showSearch:!0,placeholder:"Select existing tags or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:Object.values(J).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.tags?Array.isArray(h.litellm_params.tags)?h.litellm_params.tags.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:h.litellm_params.tags.map((e,l)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:e},l))}):"No tags assigned":h.litellm_params.tags:"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Existing Credentials"}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_credential_name",className:"mb-0",children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:[{value:"",label:"None"},...Y.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.litellm_credential_name||"Manual"})]}),e_&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Health Check Model"}),F?(0,t.jsx)(et.Form.Item,{name:"health_check_model",className:"mb-0",children:(0,t.jsx)(W.Select,{showSearch:!0,placeholder:"Select existing health check model",optionFilterProp:"children",allowClear:!0,options:(m=eo.litellm_model_name.split("/")[0],ea?.data?.filter(e=>e.providers?.includes(m)&&e.model_group!==eo.litellm_model_name).map(e=>({value:e.model_group,label:e.model_group}))||[])})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.model_info?.health_check_model||"Not Set"})]}),F?(0,t.jsx)(tP,{form:u,showCacheControl:A,onCacheControlChange:e=>L(e)}):(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Cache Control"}),(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:h.litellm_params?.cache_control_injection_points?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"Enabled"}),(0,t.jsx)("div",{className:"mt-2",children:h.litellm_params.cache_control_injection_points.map((e,l)=>(0,t.jsxs)("div",{className:"text-sm text-gray-600 mb-1",children:["Location: ",e.location,",",e.role&&(0,t.jsxs)("span",{children:[" Role: ",e.role]}),void 0!==e.index&&(0,t.jsxs)("span",{children:[" Index: ",e.index]})]},l))})]}):"Disabled"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Model Info"}),F?(0,t.jsx)(et.Form.Item,{name:"model_info",className:"mb-0",children:(0,t.jsx)(eV.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}',defaultValue:JSON.stringify(eo.model_info,null,2)})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(h.model_info,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(em.Text,{className:"font-medium",children:["LiteLLM Params",(0,t.jsx)(E.Tooltip,{title:"Optional litellm params used for making a litellm.completion() call. Some params are automatically added by LiteLLM.",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(w.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),F?(0,t.jsx)(et.Form.Item,{name:"litellm_extra_params",rules:[{validator:tE.formItemValidateJSON}],children:(0,t.jsx)(eV.Input.TextArea,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(h.litellm_params,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:eo.model_info.team_id||"Not Set"})]})]}),F&&(0,t.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,t.jsx)(T.Button,{variant:"secondary",onClick:()=>{u.resetFields(),N(!1),I(!1)},disabled:C,children:"Cancel"}),(0,t.jsx)(T.Button,{variant:"primary",onClick:()=>u.submit(),loading:C,children:"Save Changes"})]})]})}):(0,t.jsx)(em.Text,{children:"Loading..."})]})]}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(eL.Card,{children:(0,t.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(eo,null,2)})})})]})]}),(0,t.jsx)(V.default,{isOpen:g,title:"Delete Model",alertMessage:"This action cannot be undone.",message:"Are you sure you want to delete this model?",resourceInformationTitle:"Model Information",resourceInformation:[{label:"Model Name",value:eo?.model_name||"Not Set"},{label:"LiteLLM Model Name",value:eo?.litellm_model_name||"Not Set"},{label:"Provider",value:eo?.provider||"Not Set"},{label:"Created By",value:eo?.model_info?.created_by||"Not Set"}],onCancel:()=>f(!1),onOk:ef,confirmLoading:j}),y&&!eh?(0,t.jsx)(ll,{isVisible:y,onCancel:()=>b(!1),onAddCredential:ex,existingCredential:M,setIsCredentialModalOpen:b}):(0,t.jsx)(el.Modal,{open:y,onCancel:()=>b(!1),title:"Using Existing Credential",children:(0,t.jsx)(em.Text,{children:eo.litellm_params.litellm_credential_name})}),(0,t.jsx)(t9,{isVisible:B,onCancel:()=>z(!1),onSuccess:e=>{p(e),o&&o(e)},modelData:h||eo,accessToken:a||"",userRole:i||""})]})}var la=e.i(37091),lr=e.i(218129);let li=({value:e={},onChange:l})=>{let[s,a]=(0,x.useState)(Object.entries(e)),r=(e,t,r)=>{let i=[...s];i[e]=[t,r],a(i),l?.(Object.fromEntries(i))};return(0,t.jsxs)("div",{children:[s.map(([e,i],o)=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,t.jsx)(eR.TextInput,{placeholder:"Header Name",value:e,onChange:e=>r(o,e.target.value,i)}),(0,t.jsx)(eR.TextInput,{placeholder:"Header Value",value:i,onChange:t=>r(o,e,t.target.value)}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tF.MinusCircleOutlined,{onClick:()=>{let e;a(e=s.filter((e,t)=>t!==o)),l?.(Object.fromEntries(e))},style:{cursor:"pointer"}})})]},o)),(0,t.jsx)(K.Button,{type:"dashed",onClick:()=>{a([...s,["",""]])},icon:(0,t.jsx)(tr.PlusOutlined,{}),children:"Add Header"})]})},lo=({value:e={},onChange:l})=>{let[s,a]=(0,x.useState)(Object.entries(e)),r=(e,t,r)=>{let i=[...s];i[e]=[t,r],a(i),l?.(Object.fromEntries(i))};return(0,t.jsxs)("div",{children:[s.map(([e,i],o)=>(0,t.jsxs)(A.Space,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,t.jsx)(eR.TextInput,{placeholder:"Parameter Name (e.g., version)",value:e,onChange:e=>r(o,e.target.value,i)}),(0,t.jsx)(eR.TextInput,{placeholder:"Parameter Value (e.g., v1)",value:i,onChange:t=>r(o,e,t.target.value)}),(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(tF.MinusCircleOutlined,{onClick:()=>{let e;a(e=s.filter((e,t)=>t!==o)),l?.(Object.fromEntries(e))},style:{cursor:"pointer"}})})]},o)),(0,t.jsx)(K.Button,{type:"dashed",onClick:()=>{a([...s,["",""]])},icon:(0,t.jsx)(tr.PlusOutlined,{}),children:"Add Query Parameter"})]})};var ln=e.i(240647);let{Title:ld,Text:lc}=L.Typography,lm=({pathValue:e,targetValue:s,includeSubpath:a})=>{let r=(0,l.getProxyBaseUrl)();return e&&s?(0,t.jsxs)(ej.Card,{className:"p-5",children:[(0,t.jsx)(ld,{level:5,className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Preview"}),(0,t.jsx)(lc,{type:"secondary",className:"text-gray-600 mb-5",style:{display:"block"},children:"How your requests will be routed"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"Basic routing:"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint"}),(0,t.jsx)("code",{className:"font-mono text-sm text-gray-900",children:e?`${r}${e}`:""})]}),(0,t.jsx)("div",{className:"text-gray-400",children:(0,t.jsx)(ln.RightOutlined,{className:"text-lg"})}),(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,t.jsx)("code",{className:"font-mono text-sm text-gray-900",children:s})]})]})]}),a&&(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"With subpaths:"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint + subpath"}),(0,t.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[e&&`${r}${e}`,(0,t.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]}),(0,t.jsx)("div",{className:"text-gray-400",children:(0,t.jsx)(ln.RightOutlined,{className:"text-lg"})}),(0,t.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,t.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[s,(0,t.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["Any path after ",e," will be appended to the target URL"]})]})}),!a&&(0,t.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md border border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)(w.InfoCircleOutlined,{className:"text-blue-500 mt-0.5 mr-2 flex-shrink-0"}),(0,t.jsxs)("div",{className:"text-sm text-blue-700",children:[(0,t.jsx)("span",{className:"font-medium",children:"Not seeing the routing you wanted?"})," Try enabling - Include Subpaths - above - this allows subroutes like"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded font-mono text-xs",children:"/api/v1/models"})," to be forwarded automatically."]})]})})]})]}):null},lu=({premiumUser:e,authEnabled:l,onAuthChange:s})=>(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Security"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-4",children:"When enabled, requests to this endpoint will require a valid LiteLLM Virtual Key"}),e?(0,t.jsx)(et.Form.Item,{name:"auth",valuePropName:"checked",className:"mb-0",children:(0,t.jsx)(es.Switch,{checked:l,onChange:e=>{s(e)}})}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-3",children:[(0,t.jsx)(es.Switch,{disabled:!0,checked:!1,style:{outline:"2px solid #d1d5db",outlineOffset:"2px"}}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-400",children:"Authentication (Premium)"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(em.Text,{className:"text-sm text-yellow-800",children:["Setting authentication for pass-through endpoints is a LiteLLM Enterprise feature. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})]});var lh=e.i(891547);let lx=({accessToken:e,value:l={},onChange:s,disabled:a=!1})=>{let[r,i]=(0,x.useState)(Object.keys(l)),[o,n]=(0,x.useState)(l);(0,x.useEffect)(()=>{n(l),i(Object.keys(l))},[l]);let d=(e,t,l)=>{let a=o[e]||{},r={...o,[e]:{...a,[t]:l.length>0?l:void 0}};r[e]?.request_fields||r[e]?.response_fields||(r[e]=null),n(r),s&&s(r)};return(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Guardrails"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Configure guardrails to enforce policies on requests and responses. Guardrails are opt-in for passthrough endpoints."}),(0,t.jsx)(tN.Alert,{message:(0,t.jsxs)("span",{children:["Field-Level Targeting"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through_guardrails#field-level-targeting",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"(Learn More)"})]}),description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{children:"Optionally specify which fields to check. If left empty, the entire request/response is sent to the guardrail."}),(0,t.jsxs)("div",{className:"text-xs space-y-1 mt-2",children:[(0,t.jsx)("div",{className:"font-medium",children:"Common Examples:"}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"query"})," - Single field"]}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"documents[*].text"})," - All text in documents array"]}),(0,t.jsxs)("div",{children:["• ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"messages[*].content"})," - All message contents"]})]})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Select Guardrails",(0,t.jsx)(E.Tooltip,{title:"Choose which guardrails should run on this endpoint. Org/team/key level guardrails will also be included.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),children:(0,t.jsx)(lh.default,{accessToken:e,value:r,onChange:e=>{i(e);let t={};e.forEach(e=>{t[e]=o[e]||null}),n(t),s&&s(t)},disabled:a})}),r.length>0&&(0,t.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Field Targeting (Optional)"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"💡 Tip: Leave empty to check entire payload"})]}),r.map(e=>(0,t.jsxs)(eL.Card,{className:"p-4 bg-gray-50",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 mb-3",children:e}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Request Fields (pre_call)",(0,t.jsx)(E.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Specify which request fields to check"}),(0,t.jsxs)("div",{className:"text-xs space-y-1",children:[(0,t.jsx)("div",{children:"Examples:"}),(0,t.jsx)("div",{children:"• query"}),(0,t.jsx)("div",{children:"• documents[*].text"}),(0,t.jsx)("div",{children:"• messages[*].content"})]})]}),children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.request_fields||[];d(e,"request_fields",[...t,"query"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ query"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.request_fields||[];d(e,"request_fields",[...t,"documents[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ documents[*]"})]})]}),(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., query, documents[*].text)",value:o[e]?.request_fields||[],onChange:t=>d(e,"request_fields",t),disabled:a,tokenSeparators:[","]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Response Fields (post_call)",(0,t.jsx)(E.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Specify which response fields to check"}),(0,t.jsxs)("div",{className:"text-xs space-y-1",children:[(0,t.jsx)("div",{children:"Examples:"}),(0,t.jsx)("div",{children:"• results[*].text"}),(0,t.jsx)("div",{children:"• choices[*].message.content"})]})]}),children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)("div",{className:"flex gap-1",children:(0,t.jsx)("button",{type:"button",onClick:()=>{let t=o[e]?.response_fields||[];d(e,"response_fields",[...t,"results[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:a,children:"+ results[*]"})})]}),(0,t.jsx)(W.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., results[*].text)",value:o[e]?.response_fields||[],onChange:t=>d(e,"response_fields",t),disabled:a,tokenSeparators:[","]})]})]})]},e))]})]})},{Option:lp}=W.Select,lg=["GET","POST","PUT","DELETE","PATCH"],lf=({accessToken:e,setPassThroughItems:s,passThroughItems:a,premiumUser:r=!1})=>{let[i]=et.Form.useForm(),[o,n]=(0,x.useState)(!1),[d,c]=(0,x.useState)(!1),[m,u]=(0,x.useState)(""),[h,p]=(0,x.useState)(""),[g,f]=(0,x.useState)(""),[j,_]=(0,x.useState)(!0),[y,b]=(0,x.useState)(!1),[v,N]=(0,x.useState)([]),[C,S]=(0,x.useState)({}),k=()=>{i.resetFields(),p(""),f(""),_(!0),N([]),S({}),n(!1)},F=async t=>{console.log("addPassThrough called with:",t),c(!0);try{!r&&"auth"in t&&delete t.auth,C&&Object.keys(C).length>0&&(t.guardrails=C),v&&v.length>0&&(t.methods=v),console.log(`formValues: ${JSON.stringify(t)}`);let o=(await (0,l.createPassThroughEndpoint)(e,t)).endpoints[0],d=[...a,o];s(d),D.default.success("Pass-through endpoint created successfully"),i.resetFields(),p(""),f(""),_(!0),N([]),S({}),n(!1)}catch(e){D.default.fromBackend("Error creating pass-through endpoint: "+e)}finally{c(!1)}};return(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Button,{className:"mx-auto mb-4 mt-4",onClick:()=>n(!0),children:"+ Add Pass-Through Endpoint"}),(0,t.jsx)(el.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)(lr.ApiOutlined,{className:"text-xl text-blue-500"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Pass-Through Endpoint"})]}),open:o,width:1e3,onCancel:k,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(tN.Alert,{message:"What is a Pass-Through Endpoint?",description:"Route requests from your LiteLLM proxy to any external API. Perfect for custom models, image generation APIs, or any service you want to proxy through LiteLLM.",type:"info",showIcon:!0,className:"mb-6"}),(0,t.jsxs)(et.Form,{form:i,onFinish:F,layout:"vertical",className:"space-y-6",initialValues:{include_subpath:!0,path:h,target:g},children:[(0,t.jsxs)(eL.Card,{className:"p-5",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Configuration"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-5",children:"Configure how requests to your domain will be forwarded to the target API"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsx)(et.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Path Prefix"}),name:"path",rules:[{required:!0,message:"Path is required",pattern:/^\//}],extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example: /bria, /adobe-photoshop, /elasticsearch"}),className:"mb-4",children:(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsx)(eR.TextInput,{placeholder:"bria",value:h,onChange:e=>{var t;let l;return l=t=e.target.value,void(t&&!t.startsWith("/")&&(l="/"+t),p(l),i.setFieldsValue({path:l}))},className:"flex-1"})})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Target URL"}),name:"target",rules:[{required:!0,message:"Target URL is required"},{type:"url",message:"Please enter a valid URL"}],extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example:https://engine.prod.bria-api.com"}),className:"mb-4",children:(0,t.jsx)(eR.TextInput,{placeholder:"https://engine.prod.bria-api.com",value:g,onChange:e=>{f(e.target.value),i.setFieldsValue({target:e.target.value})}})}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["HTTP Methods (Optional)",(0,t.jsx)(E.Tooltip,{title:"Select specific HTTP methods. Leave empty to support all methods (GET, POST, PUT, DELETE, PATCH). Useful when the same path needs different targets for different methods.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"methods",extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:0===v.length?"All HTTP methods supported (default)":`Only ${v.join(", ")} requests will be routed to this endpoint`}),className:"mb-4",children:(0,t.jsx)(W.Select,{mode:"multiple",placeholder:"Select methods (leave empty for all)",value:v,onChange:N,allowClear:!0,style:{width:"100%"},children:lg.map(e=>(0,t.jsx)(lp,{value:e,children:e},e))})}),(0,t.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Include Subpaths"}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Forward all subpaths to the target API (recommended for REST APIs)"})]}),(0,t.jsx)(et.Form.Item,{name:"include_subpath",valuePropName:"checked",className:"mb-0",children:(0,t.jsx)(tv.Switch,{checked:j,onChange:_})})]})]})]}),(0,t.jsx)(lm,{pathValue:h,targetValue:g,includeSubpath:j}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Headers"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Add headers that will be sent with every request to the target API"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Headers",(0,t.jsx)(E.Tooltip,{title:"Authentication and other headers to forward with requests",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"headers",rules:[{required:!0,message:"Please configure the headers"}],extra:(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Add authentication tokens and other required headers"}),(0,t.jsx)("div",{children:"Common examples: auth_token, Authorization, x-api-key"})]}),children:(0,t.jsx)(li,{})})]}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Default Query Parameters"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Add query parameters that will be automatically sent with every request to the target API"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Default Query Parameters (Optional)",(0,t.jsx)(E.Tooltip,{title:"Query parameters that will be added to all requests. Clients can override these by providing their own values.",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"default_query_params",extra:(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:"Parameters are sent with all GET, POST, PUT, PATCH requests"}),(0,t.jsx)("div",{children:"Client parameters override defaults. Examples: version=v1, format=json, key=default"})]}),children:(0,t.jsx)(lo,{})})]}),(0,t.jsx)(lu,{premiumUser:r,authEnabled:y,onAuthChange:e=>{b(e),i.setFieldsValue({auth:e})}}),(0,t.jsx)(lx,{accessToken:e,value:C,onChange:S}),(0,t.jsxs)(eL.Card,{className:"p-6",children:[(0,t.jsx)(eu.Title,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Billing"}),(0,t.jsx)(la.Subtitle,{className:"text-gray-600 mb-6",children:"Optional cost tracking for this endpoint"}),(0,t.jsx)(et.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Cost Per Request (USD)",(0,t.jsx)(E.Tooltip,{title:"Optional: Track costs for requests to this endpoint",children:(0,t.jsx)(w.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:"cost_per_request",extra:(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"The cost charged for each request through this endpoint"}),children:(0,t.jsx)(tI.default,{min:0,step:.001,precision:4,placeholder:"2.0000",size:"large"})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(T.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,t.jsx)(T.Button,{variant:"primary",loading:d,onClick:()=>{console.log("Submit button clicked"),i.submit()},children:d?"Creating...":"Add Pass-Through Endpoint"})]})]})]})})]})};var lj=e.i(286536),l_=e.i(77705);let ly=["GET","POST","PUT","DELETE","PATCH"],{Option:lb}=W.Select,lv=({value:e})=>{let[l,s]=(0,x.useState)(!1),a=JSON.stringify(e,null,2);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("pre",{className:"font-mono text-xs bg-gray-50 p-2 rounded max-w-md overflow-auto",children:l?a:"••••••••"}),(0,t.jsx)("button",{onClick:()=>s(!l),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:l?(0,t.jsx)(l_.EyeOff,{className:"w-4 h-4 text-gray-500"}):(0,t.jsx)(lj.Eye,{className:"w-4 h-4 text-gray-500"})})]})},lN=({endpointData:e,onClose:s,accessToken:a,isAdmin:r,premiumUser:i=!1,onEndpointUpdated:o})=>{let[n,d]=(0,x.useState)(e),[c,m]=(0,x.useState)(!1),[u,h]=(0,x.useState)(!1),[p,g]=(0,x.useState)(e?.auth||!1),[f,j]=(0,x.useState)(e?.methods||[]),[_,y]=(0,x.useState)(e?.guardrails||{}),[b]=et.Form.useForm(),v=async e=>{try{if(!a||!n?.id)return;let t={};if(e.headers)try{t="string"==typeof e.headers?JSON.parse(e.headers):e.headers}catch(e){D.default.fromBackend("Invalid JSON format for headers");return}let s={path:n.path,target:e.target,headers:t,include_subpath:e.include_subpath,cost_per_request:e.cost_per_request,auth:i?e.auth:void 0,methods:f&&f.length>0?f:void 0,guardrails:_&&Object.keys(_).length>0?_:void 0};await (0,l.updatePassThroughEndpoint)(a,n.id,s),d({...n,...s}),h(!1),o&&o()}catch(e){console.error("Error updating endpoint:",e),D.default.fromBackend("Failed to update pass through endpoint")}},N=async()=>{try{if(!a||!n?.id)return;await (0,l.deletePassThroughEndpointsCall)(a,n.id),D.default.success("Pass through endpoint deleted successfully"),s(),o&&o()}catch(e){console.error("Error deleting endpoint:",e),D.default.fromBackend("Failed to delete pass through endpoint")}};return c?(0,t.jsx)("div",{className:"p-4",children:"Loading..."}):n?(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(K.Button,{onClick:s,className:"mb-4",children:"← Back"}),(0,t.jsxs)(eu.Title,{children:["Pass Through Endpoint: ",n.path]}),(0,t.jsx)(em.Text,{className:"text-gray-500 font-mono",children:n.id})]})}),(0,t.jsxs)(e4.TabGroup,{children:[(0,t.jsxs)(e5.TabList,{className:"mb-4",children:[(0,t.jsx)(e2.Tab,{children:"Overview"},"overview"),r?(0,t.jsx)(e2.Tab,{children:"Settings"},"settings"):(0,t.jsx)(t.Fragment,{})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsxs)(U.TabPanel,{children:[(0,t.jsxs)($.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Path"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eu.Title,{className:"font-mono",children:n.path})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Target"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eu.Title,{children:n.target})})]}),(0,t.jsxs)(eL.Card,{children:[(0,t.jsx)(em.Text,{children:"Configuration"}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{color:n.include_subpath?"green":"gray",children:n.include_subpath?"Include Subpath":"Exact Path"})}),(0,t.jsx)("div",{children:(0,t.jsx)(k.Badge,{color:n.auth?"blue":"gray",children:n.auth?"Auth Required":"No Auth"})}),n.methods&&n.methods.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"text-xs text-gray-500",children:"HTTP Methods:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:n.methods.map(e=>(0,t.jsx)(k.Badge,{color:"indigo",size:"sm",children:e},e))})]}),(!n.methods||0===n.methods.length)&&(0,t.jsx)("div",{children:(0,t.jsx)(em.Text,{className:"text-xs text-gray-500",children:"All HTTP methods supported"})}),void 0!==n.cost_per_request&&(0,t.jsx)("div",{children:(0,t.jsxs)(em.Text,{children:["Cost per request: $",n.cost_per_request]})})]})]})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(lm,{pathValue:n.path,targetValue:n.target,includeSubpath:n.include_subpath||!1})}),n.headers&&Object.keys(n.headers).length>0&&(0,t.jsxs)(eL.Card,{className:"mt-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Headers"}),(0,t.jsxs)(k.Badge,{color:"blue",children:[Object.keys(n.headers).length," headers configured"]})]}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(lv,{value:n.headers})})]}),n.guardrails&&Object.keys(n.guardrails).length>0&&(0,t.jsxs)(eL.Card,{className:"mt-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Guardrails"}),(0,t.jsxs)(k.Badge,{color:"purple",children:[Object.keys(n.guardrails).length," guardrails configured"]})]}),(0,t.jsx)("div",{className:"mt-4 space-y-2",children:Object.entries(n.guardrails).map(([e,l])=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 rounded",children:[(0,t.jsx)("div",{className:"font-medium text-sm",children:e}),l&&(l.request_fields||l.response_fields)&&(0,t.jsxs)("div",{className:"mt-2 text-xs text-gray-600 space-y-1",children:[l.request_fields&&(0,t.jsxs)("div",{children:["Request fields: ",l.request_fields.join(", ")]}),l.response_fields&&(0,t.jsxs)("div",{children:["Response fields: ",l.response_fields.join(", ")]})]}),!l&&(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Uses entire payload"})]},e))})]})]}),r&&(0,t.jsx)(U.TabPanel,{children:(0,t.jsxs)(eL.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eu.Title,{children:"Pass Through Endpoint Settings"}),(0,t.jsx)("div",{className:"space-x-2",children:!u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Button,{onClick:()=>h(!0),children:"Edit Settings"}),(0,t.jsx)(T.Button,{onClick:N,variant:"secondary",color:"red",children:"Delete Endpoint"})]})})]}),u?(0,t.jsxs)(et.Form,{form:b,onFinish:v,initialValues:{target:n.target,headers:n.headers?JSON.stringify(n.headers,null,2):"",include_subpath:n.include_subpath||!1,cost_per_request:n.cost_per_request,auth:n.auth||!1,methods:n.methods||[]},layout:"vertical",children:[(0,t.jsx)(et.Form.Item,{label:"Target URL",name:"target",rules:[{required:!0,message:"Please input a target URL"}],children:(0,t.jsx)(eR.TextInput,{placeholder:"https://api.example.com"})}),(0,t.jsx)(et.Form.Item,{label:"Headers (JSON)",name:"headers",children:(0,t.jsx)(eV.Input.TextArea,{rows:5,placeholder:'{"Authorization": "Bearer your-token", "Content-Type": "application/json"}'})}),(0,t.jsx)(et.Form.Item,{label:"HTTP Methods (Optional)",name:"methods",extra:0===f.length?"All HTTP methods supported (default)":`Only ${f.join(", ")} requests will be routed to this endpoint`,children:(0,t.jsx)(W.Select,{mode:"multiple",placeholder:"Select methods (leave empty for all)",value:f,onChange:j,allowClear:!0,style:{width:"100%"},children:ly.map(e=>(0,t.jsx)(lb,{value:e,children:e},e))})}),(0,t.jsx)(et.Form.Item,{label:"Include Subpath",name:"include_subpath",valuePropName:"checked",children:(0,t.jsx)(es.Switch,{})}),(0,t.jsx)(et.Form.Item,{label:"Cost per Request",name:"cost_per_request",children:(0,t.jsx)(eh.InputNumber,{min:0,step:.01,precision:2,placeholder:"0.00",addonBefore:"$"})}),(0,t.jsx)(lu,{premiumUser:i,authEnabled:p,onAuthChange:e=>{g(e),b.setFieldsValue({auth:e})}}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(lx,{accessToken:a||"",value:_,onChange:y})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,t.jsx)(K.Button,{onClick:()=>h(!1),children:"Cancel"}),(0,t.jsx)(T.Button,{children:"Save Changes"})]})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Path"}),(0,t.jsx)("div",{className:"font-mono",children:n.path})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Target URL"}),(0,t.jsx)("div",{children:n.target})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Include Subpath"}),(0,t.jsx)(k.Badge,{color:n.include_subpath?"green":"gray",children:n.include_subpath?"Yes":"No"})]}),void 0!==n.cost_per_request&&(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Cost per Request"}),(0,t.jsxs)("div",{children:["$",n.cost_per_request]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Authentication Required"}),(0,t.jsx)(k.Badge,{color:n.auth?"green":"gray",children:n.auth?"Yes":"No"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(em.Text,{className:"font-medium",children:"Headers"}),n.headers&&Object.keys(n.headers).length>0?(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(lv,{value:n.headers})}):(0,t.jsx)("div",{className:"text-gray-500",children:"No headers configured"})]})]})]})})]})]})]}):(0,t.jsx)("div",{className:"p-4",children:"Pass through endpoint not found"})};var lw=e.i(149121);let lC=({value:e})=>{let[l,s]=(0,x.useState)(!1),a=JSON.stringify(e);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs",children:l?a:"••••••••"}),(0,t.jsx)("button",{onClick:()=>s(!l),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:l?(0,t.jsx)(l_.EyeOff,{className:"w-4 h-4 text-gray-500"}):(0,t.jsx)(lj.Eye,{className:"w-4 h-4 text-gray-500"})})]})},lS=({accessToken:e,userRole:s,userID:a,modelData:r,premiumUser:i})=>{let[o,n]=(0,x.useState)([]),[d,c]=(0,x.useState)(null),[m,u]=(0,x.useState)(!1),[h,p]=(0,x.useState)(null);(0,x.useEffect)(()=>{e&&s&&a&&(0,l.getPassThroughEndpointsCall)(e).then(e=>{n(e.endpoints)})},[e,s,a]);let g=async e=>{p(e),u(!0)},f=async()=>{if(null!=h&&e){try{await (0,l.deletePassThroughEndpointsCall)(e,h);let t=o.filter(e=>e.id!==h);n(t),D.default.success("Endpoint deleted successfully.")}catch(e){console.error("Error deleting the endpoint:",e),D.default.fromBackend("Error deleting the endpoint: "+e)}u(!1),p(null)}},j=[{header:"ID",accessorKey:"id",cell:e=>(0,t.jsx)(E.Tooltip,{title:e.row.original.id,children:(0,t.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>e.row.original.id&&c(e.row.original.id),children:e.row.original.id})})},{header:"Path",accessorKey:"path"},{header:"Target",accessorKey:"target",cell:e=>(0,t.jsx)(em.Text,{children:e.getValue()})},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:"Methods"}),(0,t.jsx)(E.Tooltip,{title:"HTTP methods supported by this endpoint",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"methods",cell:e=>{let l=e.getValue();return l&&0!==l.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.map(e=>(0,t.jsx)(J.Badge,{color:"indigo",className:"text-xs",children:e},e))}):(0,t.jsx)(J.Badge,{color:"blue",children:"ALL"})}},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:"Authentication"}),(0,t.jsx)(E.Tooltip,{title:"LiteLLM Virtual Key required to call endpoint",children:(0,t.jsx)(tW.InformationCircleIcon,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"auth",cell:e=>(0,t.jsx)(J.Badge,{color:e.getValue()?"green":"gray",children:e.getValue()?"Yes":"No"})},{header:"Headers",accessorKey:"headers",cell:e=>(0,t.jsx)(lC,{value:e.getValue()||{}})},{header:"Actions",id:"actions",cell:({row:e})=>(0,t.jsxs)("div",{className:"flex space-x-1",children:[(0,t.jsx)(F.Icon,{icon:eE.PencilAltIcon,size:"sm",onClick:()=>e.original.id&&c(e.original.id),title:"Edit"}),(0,t.jsx)(F.Icon,{icon:S.TrashIcon,size:"sm",onClick:()=>{var t;return t=e.original.id,e.index,void g(t)},title:"Delete"})]})}];if(!e)return null;if(d){console.log("selectedEndpointId",d),console.log("generalSettings",o);let a=o.find(e=>e.id===d);return a?(0,t.jsx)(lN,{endpointData:a,onClose:()=>c(null),accessToken:e,isAdmin:"Admin"===s||"admin"===s,premiumUser:i,onEndpointUpdated:()=>{e&&(0,l.getPassThroughEndpointsCall)(e).then(e=>{n(e.endpoints)})}}):(0,t.jsx)("div",{children:"Endpoint not found"})}return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eu.Title,{children:"Pass Through Endpoints"}),(0,t.jsx)(em.Text,{className:"text-tremor-content",children:"Configure and manage your pass-through endpoints"})]}),(0,t.jsx)(lf,{accessToken:e,setPassThroughItems:n,passThroughItems:o,premiumUser:i}),(0,t.jsx)(lw.DataTable,{data:o,columns:j,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:!1,noDataMessage:"No pass-through endpoints configured"}),m&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Pass-Through Endpoint"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this pass-through endpoint? This action cannot be undone."})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(T.Button,{onClick:f,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(T.Button,{onClick:()=>{u(!1),p(null)},children:"Cancel"})]})]})]})})]})};e.s(["default",0,lS],147612);var lk=e.i(56567);e.s(["default",0,({premiumUser:e,teams:s})=>{let{accessToken:a,token:i,userRole:m,userId:u}=(0,r.default)(),[h]=et.Form.useForm(),[p,g]=(0,x.useState)(""),[f,j]=(0,x.useState)([]),[_,y]=(0,x.useState)(eM.Providers.Anthropic),[b,v]=(0,x.useState)(null),[N,w]=(0,x.useState)(null),[C,S]=(0,x.useState)(null),[k,T]=(0,x.useState)(0),[I,M]=(0,x.useState)({}),[P,A]=(0,x.useState)(!1),[E,R]=(0,x.useState)(null),[O,B]=(0,x.useState)(null),[z,V]=(0,x.useState)(0),[H,J]=(0,x.useState)(()=>"true"!==localStorage.getItem("hideMissingProviderBanner")),K=(0,G.useQueryClient)(),{data:W,isLoading:Q,refetch:Y}=(0,d.useModelsInfo)(),{data:X,isLoading:Z}=(0,n.useModelCostMap)(),{data:ee,isLoading:el}=o(),es=ee?.credentials||[],{data:ea,isLoading:er}=(0,c.useUISettings)(),eo=(0,x.useMemo)(()=>{if(!W?.data)return[];let e=new Set;for(let t of W.data)e.add(t.model_name);return Array.from(e).sort()},[W?.data]),ed=(0,x.useMemo)(()=>{if(!W?.data)return[];let e=new Set;for(let t of W.data){let l=t.model_info;if(l?.access_groups)for(let t of l.access_groups)e.add(t)}return Array.from(e)},[W?.data]),ec=(0,x.useMemo)(()=>W?.data?W.data.map(e=>e.model_name):[],[W?.data]),em=(0,x.useMemo)(()=>W?.data?W.data.map(e=>e.model_info?.id).filter(e=>!!e):[],[W?.data]),eu=e=>null!=X&&"object"==typeof X&&e in X?X[e].litellm_provider:"openai",eh=(0,x.useMemo)(()=>W?.data?ei(W,eu):{data:[]},[W?.data,eu]),ex=m&&(0,eZ.isProxyAdminRole)(m),eg=m&&eZ.internalUserRoles.includes(m),ef=u&&(0,eZ.isUserTeamAdminForAnyTeam)(s,u),ej=eg&&ea?.values?.disable_model_add_for_internal_users===!0,e_=!ex&&(ej||!ef),ey={name:"file",accept:".json",pastable:!1,beforeUpload:e=>{if("application/json"===e.type){let t=new FileReader;t.onload=e=>{if(e.target){let t=e.target.result;h.setFieldsValue({vertex_credentials:t})}},t.readAsText(e)}return!1},onChange(e){"done"===e.file.status?D.default.success(`${e.file.name} file uploaded successfully`):"error"===e.file.status&&D.default.fromBackend(`${e.file.name} file upload failed.`)}},eb=()=>{g(new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})),K.invalidateQueries({queryKey:["models","list"]}),Y()},ev=async()=>{if(a)try{let e={router_settings:{}};"global"===b?(C&&(e.router_settings.retry_policy=C),D.default.success("Global retry settings saved successfully")):(N&&(e.router_settings.model_group_retry_policy=N),D.default.success(`Retry settings saved successfully for ${b}`)),await (0,l.setCallbacksCall)(a,e)}catch(e){D.default.fromBackend("Failed to save retry settings")}};if((0,x.useEffect)(()=>{if(!a||!i||!m||!u||!W)return;let e=async()=>{try{let e=(await (0,l.getCallbacksCall)(a,u,m)).router_settings,t=e.model_group_retry_policy,s=e.num_retries;w(t),S(e.retry_policy),T(s);let r=e.model_group_alias||{};M(r)}catch(e){console.error("Error fetching model data:",e)}};a&&i&&m&&u&&W&&e()},[a,i,m,u,W]),m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=L.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to view all models"})]})}let eN=async()=>{try{let e=await h.validateFields();await eA(e,a,h,eb)}catch(t){let e=t.errorFields?.map(e=>`${e.name.join(".")}: ${e.errors.join(", ")}`).join(" | ")||"Unknown validation error";D.default.fromBackend(`Please fill in the following required fields: ${e}`)}};return(Object.keys(eM.Providers).find(e=>eM.Providers[e]===_),O)?(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(lk.default,{teamId:O,onClose:()=>B(null),accessToken:a,is_team_admin:"Admin"===m,is_proxy_admin:"Proxy Admin"===m,userModels:ec,editTeam:!1,onUpdate:eb,premiumUser:e})}):(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)($.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(e1.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:"Model Management"}),eZ.all_admin_roles.includes(m)?(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Add and manage models for the proxy"}):(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Add models for teams you are an admin for."})]}),!H&&(0,t.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-[#6366f1] hover:text-[#5558e3] border border-[#6366f1] hover:border-[#5558e3] rounded-lg transition-colors",children:[(0,t.jsx)(e3.PlusCircleOutlined,{style:{fontSize:"12px"}}),"Request Provider"]})]}),H&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-3 bg-blue-50 rounded-lg border border-blue-100 flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-10 h-10 bg-white rounded-full flex items-center justify-center border border-blue-200",children:(0,t.jsx)(e3.PlusCircleOutlined,{style:{fontSize:"18px",color:"#6366f1"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"text-gray-900 font-semibold text-sm m-0",children:"Missing a provider?"}),(0,t.jsx)("p",{className:"text-gray-500 text-xs m-0 mt-0.5",children:"The LiteLLM engineering team is constantly adding support for new LLM models, providers, endpoints. If you don't see the one you need, let us know and we'll prioritize it."})]}),(0,t.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 inline-flex items-center gap-2 px-4 py-2 bg-[#6366f1] hover:bg-[#5558e3] text-white text-sm font-medium rounded-lg transition-colors",children:["Request Provider",(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),(0,t.jsx)("button",{onClick:()=>{J(!1),localStorage.setItem("hideMissingProviderBanner","true")},className:"flex-shrink-0 p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Dismiss banner",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),E&&!(Q||Z||el||er)?(0,t.jsx)(ls,{modelId:E,onClose:()=>{R(null)},accessToken:a,userID:u,userRole:m,onModelUpdate:e=>{K.invalidateQueries({queryKey:["models","list"]}),eb()},modelAccessGroups:ed}):(0,t.jsxs)(e4.TabGroup,{index:z,onIndexChange:V,className:"gap-2 h-[75vh] w-full ",children:[(0,t.jsxs)(e5.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[eZ.all_admin_roles.includes(m)?(0,t.jsx)(e2.Tab,{children:"All Models"}):(0,t.jsx)(e2.Tab,{children:"Your Models"}),!e_&&(0,t.jsx)(e2.Tab,{children:"Add Model"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"LLM Credentials"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Pass-Through Endpoints"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Health Status"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Model Retry Settings"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Model Group Alias"}),eZ.all_admin_roles.includes(m)&&(0,t.jsx)(e2.Tab,{children:"Price Data Reload"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 self-center",children:[p&&(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Last Refreshed: ",p]}),(0,t.jsx)(F.Icon,{icon:e0.RefreshIcon,variant:"shadow",size:"xs",className:"cursor-pointer",onClick:eb})]})]}),(0,t.jsxs)(e6.TabPanels,{children:[(0,t.jsx)(en,{selectedModelGroup:b,setSelectedModelGroup:v,availableModelGroups:eo,availableModelAccessGroups:ed,setSelectedModelId:R,setSelectedTeamId:B}),!e_&&(0,t.jsx)(U.TabPanel,{className:"h-full",children:(0,t.jsx)(tU,{form:h,handleOk:eN,selectedProvider:_,setSelectedProvider:y,providerModels:f,setProviderModelsFn:e=>{j((0,eM.getProviderModels)(e,X))},getPlaceholder:eM.getPlaceholder,uploadProps:ey,showAdvancedSettings:P,setShowAdvancedSettings:A,teams:s,credentials:es,accessToken:a,userRole:m})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(eX,{uploadProps:ey})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(lS,{accessToken:a,userRole:m,userID:u,modelData:eh,premiumUser:e})}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(tX,{accessToken:a,modelData:eh,all_models_on_proxy:em,getDisplayModelName:q,setSelectedModelId:R,teams:s})}),(0,t.jsx)(ep,{selectedModelGroup:b,setSelectedModelGroup:v,availableModelGroups:eo,globalRetryPolicy:C,setGlobalRetryPolicy:S,defaultRetry:k,modelGroupRetryPolicy:N,setModelGroupRetryPolicy:w,handleSaveRetrySettings:ev}),(0,t.jsx)(U.TabPanel,{children:(0,t.jsx)(t4,{accessToken:a,initialModelGroupAlias:I,onAliasUpdate:M})}),(0,t.jsx)(eI,{})]})]})]})})})}],161059)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3f320784d80bed94.js b/litellm/proxy/_experimental/out/_next/static/chunks/3f320784d80bed94.js deleted file mode 100644 index 044f485b6c7..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/3f320784d80bed94.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),g=e.i(72713),p=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:N}=s.Typography;function k({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:k,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(N,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:k,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(g.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(p.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>k],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(389083),l=e.i(810757),r=e.i(477386),i=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:n=[],variant:o="card",className:d=""}){let c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var n;let o=(n=e.callback_name,Object.entries(i.callback_map).find(([e,t])=>t===n)?.[0]||n),d=i.callbackInfo[o]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:o,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-blue-800",children:o}),(0,t.jsxs)(a.Text,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(s.Badge,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}})(e.callback_type),size:"sm",children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(s.Badge,{color:"red",size:"xs",children:n.length})]}),n.length>0?(0,t.jsx)("div",{className:"space-y-3",children:n.map((e,l)=>{let n=i.reverse_callback_map[e]||e,o=i.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-red-800",children:n}),(0,t.jsx)(a.Text,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(s.Badge,{color:"red",size:"sm",children:"Disabled"})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===o?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${d}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${d}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),c]})}])},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),g=e.i(808613),p=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),N=e.i(237016),k=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=g.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),k.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),k.default.fromBackend(e),C(!1)}}},B=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:B,footer:_?[(0,n.jsx)(o.Button,{onClick:B,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:B,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(N.CopyToClipboard,{text:_,onCopy:()=>k.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(g.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(p.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),g=e.i(653824),p=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),N=e.i(784647),k=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),B=e.i(190702),E=e.i(891547),O=e.i(109799),P=e.i(921511),z=e.i(827252),K=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[g,p]=(0,k.useState)([]),[h,j]=(0,k.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,k.useState)([]),[v,N]=(0,k.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,k.useState)(e.organization_id||null),[A,M]=(0,k.useState)(e.auto_rotate||!1),[R,D]=(0,k.useState)(e.rotation_interval||""),[B,el]=(0,k.useState)(!e.expires),[er,ei]=(0,k.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,k.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);p(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,k.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let eg=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,ep={...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,k.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,k.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,k.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,k.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}B&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:ep,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(E.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:g.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{N((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:B,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:E,teams:O,onKeyDataUpdate:P,onDelete:z,backButtonText:K="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,k.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,k.useState)(!1),[es,er]=(0,k.useState)(!1),[ei,en]=(0,k.useState)(""),[eo,ed]=(0,k.useState)(!1),[ec,em]=(0,k.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[eg,ep]=(0,k.useState)(E),[eh,ej]=(0,k.useState)(null),[e_,ey]=(0,k.useState)(!1),[eb,ef]=(0,k.useState)({}),[ev,eN]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{E&&ep(E)},[E]),(0,k.useEffect)(()=>{(async()=>{let e=eg?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;eN(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eN(!1)}})()},[U,eg?.metadata?.policies]),(0,k.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!eg)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:K}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let ek=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...eg.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...eg.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);ep(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,eg.token||eg.token_id),F.default.success("Key deleted successfully"),z&&z(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"")||$===eg.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(N.KeyInfoHeader,{data:{keyName:eg.key_alias||"Virtual Key",keyId:eg.token_id||eg.token,userId:eg.user_id||"",userEmail:eg.user_email||"",createdBy:eg.user_email||eg.user_id||"",createdAt:eg.created_at?ew(eg.created_at):"",lastUpdated:eg.updated_at?ew(eg.updated_at):"",lastActive:eg.last_active?ew(eg.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:K,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:eg,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{ep(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:eg?.key_alias||"-"},{label:"Key ID",value:eg?.token_id||eg?.token||"-",code:!0},{label:"Team ID",value:eg?.team_id||"-",code:!0},{label:"Spend",value:eg?.spend?`$${(0,i.formatNumberWithCommas)(eg.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:eg?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(eg.token||eg.token_id,{onSuccess:()=>{ep(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:eg?.key_alias||eg?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(g.TabGroup,{children:[(0,t.jsxs)(p.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(eg.metadata?.guardrails)&&eg.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eg.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof eg.metadata?.disable_global_guardrails&&!0===eg.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(eg.metadata?.policies)&&eg.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:eg.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:eg,onCancel:()=>Z(!1),onSubmit:ek,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.token_id||eg.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:eg.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:eg.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:eg.project_id?(V=J?.find(e=>e.project_id===eg.project_id),V?.project_alias?`${V.project_alias} (${eg.project_id})`:eg.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(eg.organization_id??eg.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(eg.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:eg.expires?ew(eg.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.metadata?.tags)&&eg.metadata.tags.length>0?eg.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.prompts)&&eg.metadata.prompts.length>0?eg.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.allowed_routes)&&eg.allowed_routes.length>0?eg.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.allowed_passthrough_routes)&&eg.metadata.allowed_passthrough_routes.length>0?eg.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:eg.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==eg.max_parallel_requests?eg.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",eg.metadata?.model_tpm_limit?JSON.stringify(eg.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",eg.metadata?.model_rpm_limit?JSON.stringify(eg.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(eg.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4354945bbe4befc9.js b/litellm/proxy/_experimental/out/_next/static/chunks/4354945bbe4befc9.js new file mode 100644 index 00000000000..6a8e58631d8 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4354945bbe4befc9.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),l=e.i(477386),r=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var i;let n=(i=e.callback_name,Object.entries(r.callback_map).find(([e,t])=>t===i)?.[0]||i),o=r.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=r.reverse_callback_map[e]||e,n=r.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),p=e.i(72713),g=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:k}=s.Typography;function N({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:N,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(k,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(p.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),p=e.i(808613),g=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),k=e.i(237016),N=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=p.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),N.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),N.default.fromBackend(e),C(!1)}}},E=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:E,footer:_?[(0,n.jsx)(o.Button,{onClick:E,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:E,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(k.CopyToClipboard,{text:_,onCopy:()=>N.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(p.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(p.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(p.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(g.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(p.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),p=e.i(653824),g=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),k=e.i(784647),N=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),E=e.i(190702),B=e.i(891547),O=e.i(109799),P=e.i(921511),K=e.i(827252),z=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[p,g]=(0,N.useState)([]),[h,j]=(0,N.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,N.useState)([]),[v,k]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,N.useState)(e.organization_id||null),[A,M]=(0,N.useState)(e.auto_rotate||!1),[R,D]=(0,N.useState)(e.rotation_interval||""),[E,el]=(0,N.useState)(!e.expires),[er,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,N.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let ep=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,N.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,N.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}E&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(z.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(B.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:p.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{k((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:E,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:B,teams:O,onKeyDataUpdate:P,onDelete:K,backButtonText:z="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,er]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[ep,eg]=(0,N.useState)(B),[eh,ej]=(0,N.useState)(null),[e_,ey]=(0,N.useState)(!1),[eb,ef]=(0,N.useState)({}),[ev,ek]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{B&&eg(B)},[B]),(0,N.useEffect)(()=>{(async()=>{let e=ep?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;ek(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ek(!1)}})()},[U,ep?.metadata?.policies]),(0,N.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!ep)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:z}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ep.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...ep.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);eg(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,ep.token||ep.token_id),F.default.success("Key deleted successfully"),K&&K(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"")||$===ep.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(k.KeyInfoHeader,{data:{keyName:ep.key_alias||"Virtual Key",keyId:ep.token_id||ep.token,userId:ep.user_id||"",userEmail:ep.user_email||"",createdBy:ep.user_email||ep.user_id||"",createdAt:ep.created_at?ew(ep.created_at):"",lastUpdated:ep.updated_at?ew(ep.updated_at):"",lastActive:ep.last_active?ew(ep.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:z,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:ep,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ep?.key_alias||"-"},{label:"Key ID",value:ep?.token_id||ep?.token||"-",code:!0},{label:"Team ID",value:ep?.team_id||"-",code:!0},{label:"Spend",value:ep?.spend?`$${(0,i.formatNumberWithCommas)(ep.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:ep?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(ep.token||ep.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ep?.key_alias||ep?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(p.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ep.metadata?.guardrails)&&ep.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ep.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ep.metadata?.disable_global_guardrails&&!0===ep.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ep.metadata?.policies)&&ep.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ep.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:ep,onCancel:()=>Z(!1),onSubmit:eN,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.token_id||ep.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:ep.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:ep.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:ep.project_id?(V=J?.find(e=>e.project_id===ep.project_id),V?.project_alias?`${V.project_alias} (${ep.project_id})`:ep.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(ep.organization_id??ep.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(ep.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:ep.expires?ew(ep.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.metadata?.tags)&&ep.metadata.tags.length>0?ep.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.prompts)&&ep.metadata.prompts.length>0?ep.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.allowed_routes)&&ep.allowed_routes.length>0?ep.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.allowed_passthrough_routes)&&ep.metadata.allowed_passthrough_routes.length>0?ep.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:ep.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==ep.max_parallel_requests?ep.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",ep.metadata?.model_tpm_limit?JSON.stringify(ep.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",ep.metadata?.model_rpm_limit?JSON.stringify(ep.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(ep.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/48afb9a3be2b985f.js b/litellm/proxy/_experimental/out/_next/static/chunks/48afb9a3be2b985f.js new file mode 100644 index 00000000000..f3c3993d008 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/48afb9a3be2b985f.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,214541,e=>{"use strict";var t=e.i(271645),l=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,s]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:n}=(0,l.default)();return(0,t.useEffect)(()=>{(async()=>{s(await (0,a.fetchTeams)(r,i,n,null))})()},[r,i,n]),{teams:e,setTeams:s}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function l(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let s=t(e);return isNaN(a)?l(e,NaN):(a&&s.setDate(s.getDate()+a),s)}function s(e,a){let s=t(e);if(isNaN(a))return l(e,NaN);if(!a)return s;let r=s.getDate(),i=l(e,s.getTime());return(i.setMonth(s.getMonth()+a+1,0),r>=i.getDate())?i:(s.setFullYear(i.getFullYear(),i.getMonth(),r),s)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>l],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>s],497245)},891547,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,s.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:r,loading:u,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(764205);function r(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let l=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${l} (${a})${e.description?` — ${e.description}`:""}`,value:"production"===a?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(o){g(!0);try{let e=await (0,s.getPoliciesList)(o);e.policies&&(m(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{g(!1)}}})()},[o,d]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:h,className:n,allowClear:!0,options:r(u),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>r])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ClockCircleOutlined",0,r],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["ArrowLeftOutlined",0,r],447566)},954616,e=>{"use strict";var t=e.i(271645),l=e.i(114272),a=e.i(540143),s=e.i(915823),r=e.i(619273),i=class extends s.Subscribable{#e;#t=void 0;#l;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,r.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#l,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,r.hashKey)(t.mutationKey)!==(0,r.hashKey)(this.options.mutationKey)?this.reset():this.#l?.state.status==="pending"&&this.#l.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#l?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#l?.removeObserver(this),this.#l=void 0,this.#s(),this.#r()}mutate(e,t){return this.#a=t,this.#l?.removeObserver(this),this.#l=this.#e.getMutationCache().build(this.#e,this.options),this.#l.addObserver(this),this.#l.execute(e)}#s(){let e=this.#l?.state??(0,l.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#r(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,l=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,l,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,l,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,l,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,l){let s=(0,n.useQueryClient)(l),[o]=t.useState(()=>new i(s,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(a.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(r.noop)},[o]);if(c.error&&(0,r.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(343794),a=e.i(529681),s=e.i(908286),r=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],u=function(e,t){let a,s,r;return(0,l.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&o.includes(a)})),(s={},d.forEach(l=>{s[`${e}-align-${l}`]=t.align===l}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s)),(r={},c.forEach(l=>{r[`${e}-justify-${l}`]=t.justify===l}),r)))},m=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:l,paddingLG:a}=e,s=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:l,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(s),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(s),(e=>{let{componentCls:t}=e,l={};return o.forEach(e=>{l[`${t}-wrap-${e}`]={flexWrap:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return d.forEach(e=>{l[`${t}-align-${e}`]={alignItems:e}}),l})(s),(e=>{let{componentCls:t}=e,l={};return c.forEach(e=>{l[`${t}-justify-${e}`]={justifyContent:e}}),l})(s)]},()=>({}),{resetStyle:!1});var h=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let g=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:g,gap:p,vertical:f=!1,component:x="div",children:y}=e,v=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:w,direction:b,getPrefixCls:S}=t.default.useContext(r.ConfigContext),j=S("flex",n),[_,N,C]=m(j),k=null!=f?f:null==w?void 0:w.vertical,z=(0,l.default)(c,o,null==w?void 0:w.className,j,N,C,u(j,e),{[`${j}-rtl`]:"rtl"===b,[`${j}-gap-${p}`]:(0,s.isPresetSize)(p),[`${j}-vertical`]:k}),O=Object.assign(Object.assign({},null==w?void 0:w.style),d);return g&&(O.flex=g),p&&!(0,s.isPresetSize)(p)&&(O.gap=p),_(t.default.createElement(x,Object.assign({ref:i,className:z,style:O},(0,a.default)(v,["justify","wrap","align"])),y))});e.s(["Flex",0,g],525720)},633627,e=>{"use strict";var t=e.i(764205);let l=(e,t,l,a)=>{for(let s of e){let e=s?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=s?.organization_id??s?.org_id;r&&"string"==typeof r&&l.add(r.trim());let i=s?.user_id;if(i&&"string"==typeof i){let e=s?.user?.user_email||i;a.set(i,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let s=new Set,r=new Set,i=new Map,n=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;l(o,s,r,i);let d=Math.min(c,10)-1;if(d>0){let n=Array.from({length:d},(l,s)=>(0,t.keyListCall)(e,null,a,null,null,null,s+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&l(e.value?.keys||[],s,r,i)}return{keyAliases:Array.from(s).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(i.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},s=async(e,l)=>{if(!e)return[];try{let a=[],s=1,r=!0;for(;r;){let i=await (0,t.teamListCall)(e,l||null,null);a=[...a,...i],s{if(!e)return[];try{let l=[],a=1,s=!0;for(;s;){let r=await (0,t.organizationListCall)(e);l=[...l,...r],a{"use strict";var t=e.i(843476),l=e.i(271645);let a=l.forwardRef(function(e,t){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var s=e.i(464571),r=e.i(311451),i=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:d={},buttonLabel:u="Filters"})=>{let[m,h]=(0,l.useState)(!1),[g,p]=(0,l.useState)(d),[f,x]=(0,l.useState)({}),[y,v]=(0,l.useState)({}),[w,b]=(0,l.useState)({}),[S,j]=(0,l.useState)({}),_=(0,l.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let l=await t.searchFn(e);x(e=>({...e,[t.name]:l}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!S[e.name]){v(t=>({...t,[e.name]:!0})),j(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(l=>({...l,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[S]);(0,l.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!S[e.name]&&N(e)})},[m,e,N,S]);let C=(e,t)=>{let l={...g,[e]:t};p(l),o(l)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(s.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:u}),(0,t.jsx)(s.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(l=>{let a,s=e.find(e=>e.label===l||e.name===l);return s?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:s.label||s.name}),s.isSearchable?(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),onOpenChange:e=>{e&&s.isSearchable&&!S[s.name]&&N(s)},onSearch:e=>{b(t=>({...t,[s.name]:e})),s.searchFn&&_(e,s)},filterOption:!1,loading:y[s.name],options:f[s.name]||[],allowClear:!0,notFoundContent:y[s.name]?"Loading...":"No results found"}):s.options?(0,t.jsx)(i.Select,{className:"w-full",placeholder:`Select ${s.label||s.name}...`,value:g[s.name]||void 0,onChange:e=>C(s.name,e),allowClear:!0,children:s.options.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:e.label},e.value))}):s.customComponent?(a=s.customComponent,(0,t.jsx)(a,{value:g[s.name]||void 0,onChange:e=>C(s.name,e??""),placeholder:`Select ${s.label||s.name}...`,allFilters:g})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${s.label||s.name}...`,value:g[s.name]||"",onChange:e=>C(s.name,e.target.value),allowClear:!0})]},s.name):null})})]})}],969550)},584578,e=>{"use strict";var t=e.i(764205);let l=async(e,l,a,s,r)=>{let i;i="Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,s?.organization_id||null,l):await (0,t.teamListCall)(e,s?.organization_id||null),console.log(`givenTeams: ${i}`),r(i)};e.s(["fetchTeams",0,l])},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function p(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var f=e.i(175712),x=e.i(808613),y=e.i(311451),v=e.i(898586);function w({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=x.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(f.Card,{children:[(0,t.jsx)(v.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(v.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(v.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(x.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(x.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(y.Input,{type:"email",disabled:!0})}),(0,t.jsx)(x.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(y.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function b({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:f,isError:x}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:y,isPending:v}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),b=g?.token?(0,s.jwtDecode)(g.token):null,S=b?.user_email??"",j=b?.user_id??null,_=b?.key??null,N=g?.token??null;return f?(0,t.jsx)(m,{}):x?(0,t.jsx)(p,{}):(0,t.jsx)(w,{variant:e,userEmail:S,isPending:v,claimError:u,onSubmit:e=>{_&&N&&j&&d&&(h(null),y({accessToken:_,inviteId:d,userId:j,password:e.password},{onSuccess:()=>{document.cookie=`token=${N}; path=/; SameSite=Lax`;let e=(0,r.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function S(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(b,{variant:"reset_password"===e?"reset_password":"signup"})}function j(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(S,{})})}e.s(["default",()=>j],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:p=!1,allFilters:f})=>{let[x,y]=(0,d.useState)(""),[v,w]=(0,o.useDebouncedState)("",{wait:300}),{data:b,fetchNextPage:S,hasNextPage:j,isFetchingNextPage:_,isLoading:N}=((e=50,t,a)=>{let{accessToken:n}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(n,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!b?.pages)return[];let e=new Set,t=[];for(let l of b.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[b]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:p,showSearch:!0,filterOption:!1,onSearch:e=>{y(e),w(e)},searchValue:x,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&j&&!_&&S()},loading:N,notFoundContent:N?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,_&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),p=e.i(500330),f=e.i(871943),x=e.i(502547),y=e.i(360820),v=e.i(94629),w=e.i(152990),b=e.i(682830),S=e.i(389083),j=e.i(994388),_=e.i(752978),N=e.i(269200),C=e.i(942232),k=e.i(977572),z=e.i(427612),O=e.i(64848),I=e.i(496020),D=e.i(599724),T=e.i(827252),E=e.i(772345),M=e.i(464571),P=e.i(282786),A=e.i(981339),R=e.i(592968),L=e.i(355619),$=e.i(633627),U=e.i(374009),K=e.i(700514),F=e.i(135214),B=e.i(50882),V=e.i(969550),H=e.i(304911),G=e.i(20147);function W({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,W]=o.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[q,J]=o.default.useState({pageIndex:0,pageSize:50}),Q=m.length>0?m[0].id:null,Y=m.length>0?m[0].desc?"desc":"asc":null,{data:Z,isPending:X,isFetching:ee,isError:et,refetch:el}=(0,h.useKeys)(q.pageIndex+1,q.pageSize,{sortBy:Q||void 0,sortOrder:Y||void 0,expand:"user"}),[ea,es]=(0,o.useState)({}),{filters:er,filteredKeys:ei,filteredTotalCount:en,allTeams:eo,allOrganizations:ec,handleFilterChange:ed,handleFilterReset:eu}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,F.default)(),[r,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[p,f]=(0,o.useState)(null),x=(0,o.useRef)(0),y=(0,o.useCallback)((0,U.default)(async e=>{if(!s)return;let t=Date.now();x.current=t;try{let l=await (0,u.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,K.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===x.current&&l&&(g(l.keys),f(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,$.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,$.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||y({...r,...e})},handleFilterReset:()=>{i(a),f(null),y(a)}}}({keys:Z?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(ee),eh=(ee||em)&&!et,eg=en??Z?.total_count??0;(0,o.useEffect)(()=>{if(el){let e=()=>{el()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[el]);let ep=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(R.Tooltip,{title:l,children:(0,t.jsx)(j.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(P.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||s||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:i}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||s?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(H.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=s||i||l,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:s},{label:"User Email",value:i},{label:"User ID",value:l}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||i?(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(P.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(H.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(P.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(T.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(R.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,p.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,p.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(l)?(0,t.jsx)("div",{className:"flex flex-col",children:0===l.length?(0,t.jsx)(S.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(_.Icon,{icon:ea[e.row.id]?f.ChevronDownIcon:x.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{es(t=>({...t,[e.row.id]:!t[e.row.id]}))}})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,L.getModelDisplayName)(e).slice(0,30)}...`:(0,L.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(S.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(D.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.slice(3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(S.Badge,{size:"xs",color:"red",children:(0,t.jsx)(D.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(S.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(D.Text,{children:e.length>30?`${(0,L.getModelDisplayName)(e).slice(0,30)}...`:(0,L.getModelDisplayName)(e)})},l+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==l.tpm_limit?l.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==l.rpm_limit?l.rpm_limit:"Unlimited"]})]})}}],[e,n]),ef=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>eo&&0!==eo.length?eo.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:B.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ex=(0,w.useReactTable)({data:ei,columns:ep.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:q},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(W(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";ed({...er,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:J,getCoreRowModel:(0,b.getCoreRowModel)(),getSortedRowModel:(0,b.getSortedRowModel)(),getPaginationRowModel:(0,b.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(eg/q.pageSize)});o.default.useEffect(()=>{s&&W([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:ey,pageSize:ev}=ex.getState().pagination,ew=Math.min((ey+1)*ev,eg),eb=`${ey*ev+1} - ${ew}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(G.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:eo,onDelete:el}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(V.default,{options:ef,onApplyFilters:ed,initialValues:er,onResetFilters:eu})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[X?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",eb," of ",eg," results"]}),(0,t.jsx)(M.Button,{type:"default",icon:(0,t.jsx)(E.SyncOutlined,{spin:eh}),onClick:()=>{el()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[X?(0,t.jsx)(A.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",ey+1," of ",ex.getPageCount()]}),X?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ex.previousPage(),disabled:X||!ex.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),X?(0,t.jsx)(A.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ex.nextPage(),disabled:X||!ex.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(N.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ex.getCenterTotalSize()},children:[(0,t.jsx)(z.TableHead,{children:ex.getHeaderGroups().map(e=>(0,t.jsx)(I.TableRow,{children:e.headers.map(e=>(0,t.jsx)(O.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,w.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(y.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(f.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(v.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ex.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:X?(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):ei.length>0?ex.getRowModel().rows.map(e=>(0,t.jsx)(I.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,w.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(I.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:ep.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:p,setUserRole:f,userEmail:x,setUserEmail:y,setTeams:v,setKeys:w,premiumUser:b,organizations:S,addKey:j,createClicked:_,autoOpenCreate:N,prefillData:C})=>{let k,[z,O]=(0,o.useState)(null),[I,D]=(0,o.useState)(null),T=(0,n.useSearchParams)(),E=(console.log("COOKIES",document.cookie),(k=document.cookie.split("; ").find(e=>e.startsWith("token=")))?k.split("=")[1]:null),M=T.get("invitation_id"),[P,A]=(0,o.useState)(null),[R,L]=(0,o.useState)(null),[$,U]=(0,o.useState)([]),[K,F]=(0,o.useState)(null),[B,V]=(0,o.useState)(null);if((0,o.useEffect)(()=>{let e=()=>{sessionStorage.clear()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(E){let e=(0,i.jwtDecode)(E);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),A(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role);console.log("Decoded user_role:",t),f(t)}else console.log("User role not defined");e.user_email?y(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&P&&h&&!z){let t=sessionStorage.getItem("userModels"+e);t?U(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(I)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(P);F(t);let l=await (0,u.userGetInfoV2)(P,e);O(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(P,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),U(a),console.log("userModels:",$),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&H()}})(),(0,d.fetchTeams)(P,e,h,I,v))}},[e,E,P,h]),(0,o.useEffect)(()=>{P&&(async()=>{try{let e=await (0,u.keyInfoCall)(P,[P]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&H()}})()},[P]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(I)}, accessToken: ${P}, userID: ${e}, userRole: ${h}`),P&&(console.log("fetching teams"),(0,d.fetchTeams)(P,e,h,I,v))},[I]),(0,o.useEffect)(()=>{if(null!==p&&null!=B&&null!==B.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(p)}`),p))B.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===B.team_id&&(e+=t.spend);console.log(`sum: ${e}`),L(e)}else if(null!==p){let e=0;for(let t of p)e+=t.spend;L(e)}},[B]),null!=M)return(0,t.jsx)(c.default,{});function H(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==E)return console.log("All cookies before redirect:",document.cookie),H(),null;try{let e=(0,i.jwtDecode)(E);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),H(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),H(),null}if(null==P)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&f("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=r.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",B),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:B,teams:g,data:p,addKey:j,autoOpenCreate:N,prefillData:C},B?B.team_id:null),(0,t.jsx)(W,{teams:g,organizations:S})]})})})}],693569)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4a04d70d4b38780d.js b/litellm/proxy/_experimental/out/_next/static/chunks/4a04d70d4b38780d.js new file mode 100644 index 00000000000..7d85dbdd74d --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4a04d70d4b38780d.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),p=e.i(72713),g=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:k}=s.Typography;function N({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:N,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(k,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(p.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),l=e.i(477386),r=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var i;let n=(i=e.callback_name,Object.entries(r.callback_map).find(([e,t])=>t===i)?.[0]||i),o=r.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=r.reverse_callback_map[e]||e,n=r.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),p=e.i(808613),g=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),k=e.i(237016),N=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=p.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),N.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),N.default.fromBackend(e),C(!1)}}},E=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:E,footer:_?[(0,n.jsx)(o.Button,{onClick:E,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:E,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(k.CopyToClipboard,{text:_,onCopy:()=>N.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(p.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(p.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(p.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(g.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(p.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),p=e.i(653824),g=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),k=e.i(784647),N=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),E=e.i(190702),B=e.i(891547),O=e.i(109799),P=e.i(921511),K=e.i(827252),z=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[p,g]=(0,N.useState)([]),[h,j]=(0,N.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,N.useState)([]),[v,k]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,N.useState)(e.organization_id||null),[A,M]=(0,N.useState)(e.auto_rotate||!1),[R,D]=(0,N.useState)(e.rotation_interval||""),[E,el]=(0,N.useState)(!e.expires),[er,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,N.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let ep=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,N.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,N.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}E&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(z.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(B.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:p.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{k((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:E,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:B,teams:O,onKeyDataUpdate:P,onDelete:K,backButtonText:z="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,er]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[ep,eg]=(0,N.useState)(B),[eh,ej]=(0,N.useState)(null),[e_,ey]=(0,N.useState)(!1),[eb,ef]=(0,N.useState)({}),[ev,ek]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{B&&eg(B)},[B]),(0,N.useEffect)(()=>{(async()=>{let e=ep?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;ek(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ek(!1)}})()},[U,ep?.metadata?.policies]),(0,N.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!ep)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:z}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ep.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...ep.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);eg(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,ep.token||ep.token_id),F.default.success("Key deleted successfully"),K&&K(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"")||$===ep.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(k.KeyInfoHeader,{data:{keyName:ep.key_alias||"Virtual Key",keyId:ep.token_id||ep.token,userId:ep.user_id||"",userEmail:ep.user_email||"",createdBy:ep.user_email||ep.user_id||"",createdAt:ep.created_at?ew(ep.created_at):"",lastUpdated:ep.updated_at?ew(ep.updated_at):"",lastActive:ep.last_active?ew(ep.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:z,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:ep,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ep?.key_alias||"-"},{label:"Key ID",value:ep?.token_id||ep?.token||"-",code:!0},{label:"Team ID",value:ep?.team_id||"-",code:!0},{label:"Spend",value:ep?.spend?`$${(0,i.formatNumberWithCommas)(ep.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:ep?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(ep.token||ep.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ep?.key_alias||ep?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(p.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ep.metadata?.guardrails)&&ep.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ep.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ep.metadata?.disable_global_guardrails&&!0===ep.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ep.metadata?.policies)&&ep.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ep.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:ep,onCancel:()=>Z(!1),onSubmit:eN,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.token_id||ep.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:ep.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:ep.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:ep.project_id?(V=J?.find(e=>e.project_id===ep.project_id),V?.project_alias?`${V.project_alias} (${ep.project_id})`:ep.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(ep.organization_id??ep.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(ep.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:ep.expires?ew(ep.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.metadata?.tags)&&ep.metadata.tags.length>0?ep.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.prompts)&&ep.metadata.prompts.length>0?ep.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.allowed_routes)&&ep.allowed_routes.length>0?ep.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.allowed_passthrough_routes)&&ep.metadata.allowed_passthrough_routes.length>0?ep.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:ep.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==ep.max_parallel_requests?ep.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",ep.metadata?.model_tpm_limit?JSON.stringify(ep.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",ep.metadata?.model_rpm_limit?JSON.stringify(ep.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(ep.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/338e84191fe615bf.js b/litellm/proxy/_experimental/out/_next/static/chunks/4fc2d71e511309ab.js similarity index 80% rename from litellm/proxy/_experimental/out/_next/static/chunks/338e84191fe615bf.js rename to litellm/proxy/_experimental/out/_next/static/chunks/4fc2d71e511309ab.js index 3eea86ac329..004aa2468a4 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/338e84191fe615bf.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4fc2d71e511309ab.js @@ -228,4 +228,4 @@ Return a structured verdict with confidence and justification.`,t7=`{ "risk_category": "string", "suggested_action": "keep" | "adjust threshold" | "add allowlist" } -`;function t9({open:e,onClose:s,guardrailName:a,accessToken:l,onRunEvaluation:r}){let[n,o]=(0,i.useState)(t8),[d,c]=(0,i.useState)(t7),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)([]),[h,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!e||!l)return void x([]);let t=!1;return g(!0),(0,tG.fetchAvailableModels)(l).then(e=>{t||x(e)}).catch(()=>{t||x([])}).finally(()=>{t||g(!1)}),()=>{t=!0}},[e,l]);let j=p.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)(y.Modal,{title:"Evaluation Settings",open:e,onCancel:s,width:640,footer:null,closeIcon:(0,t.jsx)(t6.CloseOutlined,{}),destroyOnClose:!0,children:[(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:a?`Configure AI evaluation for ${a}`:"Configure AI evaluation for re-running on logs"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Evaluation Prompt"}),(0,t.jsx)("button",{type:"button",onClick:()=>o(t8),className:"text-xs text-indigo-600 hover:text-indigo-700",children:"Reset to default"})]}),(0,t.jsx)(C.Input.TextArea,{value:n,onChange:e=>o(e.target.value),rows:6,className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"System prompt sent to the evaluation model. Output is structured via response_format."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Response Schema"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:"response_format: json_schema"}),(0,t.jsx)(C.Input.TextArea,{value:d,onChange:e=>c(e.target.value),rows:6,className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Model"}),(0,t.jsx)(k.Select,{placeholder:h?"Loading models…":"Select a model",value:m??void 0,onChange:u,options:j,style:{width:"100%"},showSearch:!0,optionFilterProp:"label",loading:h,notFoundContent:l?"No models available":"Sign in to see models"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsx)(V.Button,{onClick:s,children:"Cancel"}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(t3.PlayCircleOutlined,{}),onClick:()=>{m&&(r?.({prompt:n,schema:d,model:m}),s())},disabled:!m,children:"Run Evaluation"})]})]})}var se=e.i(166540);e.i(3565);var st=e.i(502626);let ss={blocked:{icon:t6.CloseOutlined,color:"text-red-600",bg:"bg-red-50",border:"border-red-200",label:"Blocked"},passed:{icon:v.CheckCircleOutlined,color:"text-green-600",bg:"bg-green-50",border:"border-green-200",label:"Passed"},flagged:{icon:t0.WarningOutlined,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200",label:"Flagged"}};function sa({guardrailName:e,filterAction:s="all",logs:a=[],logsLoading:l=!1,totalLogs:r,accessToken:n=null,startDate:o="",endDate:d=""}){let[c,m]=(0,i.useState)(10),[u,p]=(0,i.useState)(s),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(!1),j=a.filter(e=>"all"===u||e.action===u).slice(0,c),f=r??a.length,b=o?(0,se.default)(o).utc().format("YYYY-MM-DD HH:mm:ss"):(0,se.default)().subtract(24,"hours").utc().format("YYYY-MM-DD HH:mm:ss"),_=d?(0,se.default)(d).utc().endOf("day").format("YYYY-MM-DD HH:mm:ss"):(0,se.default)().utc().format("YYYY-MM-DD HH:mm:ss"),{data:v}=(0,t1.useQuery)({queryKey:["spend-log-by-request",x,b,_],queryFn:async()=>n&&x?await (0,N.uiSpendLogsCall)({accessToken:n,start_date:b,end_date:_,page:1,page_size:10,params:{request_id:x}}):null,enabled:!!(n&&x&&g)}),w=v?.data?.[0]??null;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:e?`Logs — ${e}`:"Request Logs"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l?"Loading…":a.length>0?`Showing ${j.length} of ${f} entries`:"No logs for this period. Select a guardrail and date range."})]}),a.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-1",children:["all","blocked","flagged","passed"].map(e=>(0,t.jsx)(V.Button,{type:u===e?"primary":"default",size:"small",onClick:()=>p(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsx)("div",{className:"h-4 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Sample:"}),[10,50,100].map(e=>(0,t.jsx)(V.Button,{type:c===e?"primary":"default",size:"small",onClick:()=>m(e),children:e},e))]})]})]})}),l&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{})}),!l&&0===j.length&&(0,t.jsx)("div",{className:"py-12 text-center text-sm text-gray-500",children:"No logs to display. Adjust filters or date range."}),!l&&j.length>0&&(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:j.map(e=>{let s=ss[e.action],a=s.icon;return(0,t.jsxs)("button",{type:"button",onClick:()=>{h(e.id),y(!0)},className:"w-full text-left px-4 py-3 hover:bg-gray-50 transition-colors flex items-start gap-3",children:[(0,t.jsx)(a,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${s.color}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${s.bg} ${s.color} ${s.border}`,children:s.label}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"·"}),e.model&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.model})]}),(0,t.jsx)("p",{className:"text-sm text-gray-800 truncate",children:e.input_snippet??e.input??"—"})]}),(0,t.jsx)(tw.DownOutlined,{className:"w-4 h-4 text-gray-400 flex-shrink-0 mt-1"})]},e.id)})}),(0,t.jsx)(st.LogDetailsDrawer,{open:g,onClose:()=>{y(!1),h(null)},logEntry:w,accessToken:n,allLogs:w?[w]:[],startTime:b})]})}function sl({label:e,value:s,valueColor:a="text-gray-900",icon:l,subtitle:r}){return(0,t.jsxs)("div",{className:"h-full bg-white border border-gray-200 rounded-lg p-5 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-600",children:e}),l&&(0,t.jsx)("span",{className:"text-gray-400",children:l})]}),(0,t.jsx)("div",{className:`text-3xl font-semibold ${a} tracking-tight`,children:s}),r&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:r})]})}let sr={healthy:{bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},warning:{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500"},critical:{bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function si({guardrailId:e,onBack:s,accessToken:a=null,startDate:l,endDate:r}){let[n,o]=(0,i.useState)("overview"),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-detail",e,l,r],queryFn:()=>(0,N.getGuardrailsUsageDetail)(a,e,l,r),enabled:!!a&&!!e}),{data:g,isLoading:y}=(0,t1.useQuery)({queryKey:["guardrails-usage-logs",e,m,50],queryFn:()=>(0,N.getGuardrailsUsageLogs)(a,{guardrailId:e,page:m,pageSize:50,startDate:l,endDate:r}),enabled:!!a&&!!e}),j=(0,i.useMemo)(()=>(g?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:e.action,score:e.score,model:e.model,input_snippet:e.input_snippet,output_snippet:e.output_snippet,reason:e.reason})),[g?.logs]),f=p?{name:p.guardrail_name,description:p.description??"",status:p.status,provider:p.provider,type:p.type,requestsEvaluated:p.requestsEvaluated,failRate:p.failRate,avgScore:p.avgScore,avgLatency:p.avgLatency}:{name:e,description:"",status:"healthy",provider:"—",type:"—",requestsEvaluated:0,failRate:0,avgScore:void 0,avgLatency:void 0},b=sr[f.status]??sr.healthy;return x&&!p?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})}):h&&!p?(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load guardrail details."})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:f.name}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 text-xs font-medium rounded-full ${b.bg} ${b.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${b.dot}`}),f.status.charAt(0).toUpperCase()+f.status.slice(1)]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 ml-8",children:f.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:f.provider}),(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>c(!0),title:"Evaluation settings"})]})]})]}),(0,t.jsx)(t5.Tabs,{activeKey:n,onChange:o,items:[{key:"overview",label:"Overview"},{key:"logs",label:"Logs"}]}),"overview"===n&&(0,t.jsxs)("div",{className:"space-y-6 mt-4",children:[(0,t.jsxs)(t4.Grid,{numItems:2,numItemsMd:5,className:"gap-4",children:[(0,t.jsx)(t2.Col,{children:(0,t.jsx)(sl,{label:"Requests Evaluated",value:f.requestsEvaluated.toLocaleString()})}),(0,t.jsx)(t2.Col,{children:(0,t.jsx)(sl,{label:"Fail Rate",value:`${f.failRate}%`,valueColor:f.failRate>15?"text-red-600":f.failRate>5?"text-amber-600":"text-green-600",subtitle:`${Math.round(f.requestsEvaluated*f.failRate/100).toLocaleString()} blocked`,icon:f.failRate>15?(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"}):void 0})}),(0,t.jsx)(t2.Col,{children:(0,t.jsx)(sl,{label:"Avg. latency added",value:null!=f.avgLatency?`${Math.round(f.avgLatency)}ms`:"—",valueColor:null!=f.avgLatency?f.avgLatency>150?"text-red-600":f.avgLatency>50?"text-amber-600":"text-green-600":"text-gray-500",subtitle:null!=f.avgLatency?"Per request (avg)":"No data"})})]}),(0,t.jsx)(sa,{guardrailName:f.name,filterAction:"all",logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})]}),"logs"===n&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sa,{guardrailName:f.name,logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})}),(0,t.jsx)(t9,{open:d,onClose:()=>c(!1),guardrailName:f.name,accessToken:a})]})}let sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"};var so=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:sn}))}),sd=e.i(584935);function sc({data:e}){let s=e&&e.length>0?e:[];return(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200",children:[(0,t.jsx)(ew.Title,{className:"text-base font-semibold text-gray-900 mb-4",children:"Request Outcomes Over Time"}),(0,t.jsx)("div",{className:"h-80 min-h-[280px]",children:s.length>0?(0,t.jsx)(sd.BarChart,{data:s,index:"date",categories:["passed","blocked"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),yAxisWidth:48,showLegend:!0,stack:!0}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-500",children:"No chart data for this period"})})]})}let sm={Bedrock:"bg-orange-100 text-orange-700 border-orange-200","Google Cloud":"bg-sky-100 text-sky-700 border-sky-200",LiteLLM:"bg-indigo-100 text-indigo-700 border-indigo-200",Custom:"bg-gray-100 text-gray-600 border-gray-200"};function su({accessToken:e=null,startDate:s,endDate:a,onSelectGuardrail:l}){let[r,n]=(0,i.useState)("failRate"),[d,c]=(0,i.useState)("desc"),[m,u]=(0,i.useState)(!1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-overview",s,a],queryFn:()=>(0,N.getGuardrailsUsageOverview)(e,s,a),enabled:!!e}),g=p?.rows??[],y=(0,i.useMemo)(()=>{let e,t,s,a;return p?{totalRequests:p.totalRequests??0,totalBlocked:p.totalBlocked??0,passRate:String(p.passRate??0),avgLatency:g.length?Math.round(g.reduce((e,t)=>e+(t.avgLatency??0),0)/g.length):0,count:g.length}:(e=g.reduce((e,t)=>e+t.requestsEvaluated,0),t=g.reduce((e,t)=>e+Math.round(t.requestsEvaluated*t.failRate/100),0),s=e>0?((1-t/e)*100).toFixed(1):"0",{totalRequests:e,totalBlocked:t,passRate:s,avgLatency:(a=g.filter(e=>null!=e.avgLatency)).length>0?Math.round(a.reduce((e,t)=>e+(t.avgLatency??0),0)/a.length):0,count:g.length})},[p,g]),j=p?.chart,f=(0,i.useMemo)(()=>[...g].sort((e,t)=>{let s="desc"===d?-1:1,a=e[r]??0,l=t[r]??0;return(Number(a)-Number(l))*s}),[g,r,d]),b=[{title:"Guardrail",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsx)("button",{type:"button",className:"text-sm font-medium text-gray-900 hover:text-indigo-600 text-left",onClick:()=>l(s.id),children:e})},{title:"Provider",dataIndex:"provider",key:"provider",render:e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${sm[e]??sm.Custom}`,children:e})},{title:"Requests",dataIndex:"requestsEvaluated",key:"requestsEvaluated",align:"right",sorter:!0,sortOrder:"requestsEvaluated"===r?"desc"===d?"descend":"ascend":null,render:e=>e.toLocaleString()},{title:"Fail Rate",dataIndex:"failRate",key:"failRate",align:"right",sorter:!0,sortOrder:"failRate"===r?"desc"===d?"descend":"ascend":null,render:(e,s)=>(0,t.jsxs)("span",{className:e>15?"text-red-600":e>5?"text-amber-600":"text-green-600",children:[e,"%","up"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-red-400",children:"↑"}),"down"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-green-400",children:"↓"})]})},{title:"Avg. latency added",dataIndex:"avgLatency",key:"avgLatency",align:"right",sorter:!0,sortOrder:"avgLatency"===r?"desc"===d?"descend":"ascend":null,render:e=>(0,t.jsx)("span",{className:null==e?"text-gray-400":e>150?"text-red-600":e>50?"text-amber-600":"text-green-600",children:null!=e?`${e}ms`:"—"})},{title:"Status",dataIndex:"status",key:"status",align:"center",render:e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${"healthy"===e?"bg-green-500":"warning"===e?"bg-amber-500":"bg-red-500"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-600 capitalize",children:e})]})}],_=["failRate","requestsEvaluated","avgLatency"];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-lg text-indigo-500"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Guardrails Monitor"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Monitor guardrail performance across all requests"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tC.DownloadOutlined,{}),title:"Coming soon",children:"Export Data"})})]}),(0,t.jsxs)(t4.Grid,{numItems:2,numItemsLg:5,className:"gap-4 mb-6 items-stretch",children:[(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Total Evaluations",value:y.totalRequests.toLocaleString()})}),(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Blocked Requests",value:y.totalBlocked.toLocaleString(),valueColor:"text-red-600",icon:(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"})})}),(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Pass Rate",value:`${y.passRate}%`,valueColor:"text-green-600",icon:(0,t.jsx)(so,{className:"text-green-400"})})}),(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Avg. latency added",value:`${y.avgLatency}ms`,valueColor:y.avgLatency>150?"text-red-600":y.avgLatency>50?"text-amber-600":"text-green-600"})}),(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Active Guardrails",value:y.count})})]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(sc,{data:j})}),(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200 rounded-lg",children:[(x||h)&&(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center gap-2",children:[x&&(0,t.jsx)(eF.Spin,{size:"small"}),h&&(0,t.jsx)("span",{className:"text-sm text-red-600",children:"Failed to load data. Try again."})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(ew.Title,{className:"text-base font-semibold text-gray-900",children:"Guardrail Performance"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Click a guardrail to view details, logs, and configuration"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>u(!0),title:"Evaluation settings"})})]}),(0,t.jsx)(te.Table,{columns:b,dataSource:f,rowKey:"id",pagination:!1,loading:x,onChange:(e,t,s)=>{s?.field&&_.includes(s.field)&&(n(s.field),c("ascend"===s.order?"asc":"desc"))},locale:0!==g.length||x?void 0:{emptyText:"No data for this period"},onRow:e=>({onClick:()=>l(e.id),style:{cursor:"pointer"}})})]}),(0,t.jsx)(t9,{open:m,onClose:()=>u(!1),accessToken:e})]})}let sp=new Date,sx=new Date;function sh({accessToken:e=null}){let[s,a]=(0,i.useState)({type:"overview"}),l=(0,i.useMemo)(()=>new Date(sx),[]),r=(0,i.useMemo)(()=>new Date(sp),[]),[n,o]=(0,i.useState)({from:l,to:r}),d=n.from?(0,N.formatDate)(n.from):"",c=n.to?(0,N.formatDate)(n.to):"",m=(0,i.useCallback)(e=>{o(e)},[]);return(0,t.jsxs)("div",{className:"p-6 w-full min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-4",children:(0,t.jsx)(tY.default,{value:n,onValueChange:m,label:"",showTimeRange:!1})}),"overview"===s.type?(0,t.jsx)(su,{accessToken:e,startDate:d,endDate:c,onSelectGuardrail:e=>{a({type:"detail",guardrailId:e})}}):(0,t.jsx)(si,{guardrailId:s.guardrailId,onBack:()=>{a({type:"overview"})},accessToken:e,startDate:d,endDate:c})]})}sx.setDate(sx.getDate()-7);var sg=e.i(487304),sy=e.i(760221);e.i(111790);var sj=e.i(280881),sf=e.i(934879),sb=e.i(402874),s_=e.i(797305),sv=e.i(109799),sN=e.i(747871),sw=e.i(56567),sk=e.i(468133),sC=e.i(645526),sS=e.i(91979),sT=e.i(525720),sI=e.i(372943),sF=e.i(95684),sL=e.i(497650),sA=e.i(368869),sP=e.i(898586),sM=e.i(998573),sD=e.i(438100),sE=e.i(475254);let sz=(0,sE.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var sO=e.i(988846),sR=e.i(98740),sR=sR;function sB({size:e,fontSize:s}){let a=(0,t.jsx)(tN.LoadingOutlined,{style:s?{fontSize:s}:void 0,spin:!0});return(0,t.jsx)(eF.Spin,{indicator:a,size:e})}var sq=e.i(363256),s$=e.i(9314),sU=e.i(552130),sV=e.i(533882),sH=e.i(651904),sG=e.i(460285),sK=e.i(435451),sW=e.i(916940),sQ=e.i(127952),sY=e.i(162386);let sJ=(e,t,s)=>"Admin"===e||!!s&&!!t&&s.some(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)),sX=(e,t,s)=>"Admin"===e?s||[]:s&&t?s.filter(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)):[],sZ=({teams:e,searchParams:s,accessToken:a,setTeams:l,userID:r,userRole:n,organizations:o,premiumUser:d=!1})=>{let c,m,u,p;console.log(`organizations: ${JSON.stringify(o)}`);let{data:x}=(0,sv.useOrganizations)(),[h,g]=(0,i.useState)(!0),[j,b]=(0,i.useState)(null),[v,S]=(0,i.useState)(1),[T,F]=(0,i.useState)(10),[L,A]=(0,i.useState)(0),[P,M]=(0,i.useState)(null),[D,E]=(0,i.useState)(null),[O,R]=(0,i.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),q=(0,i.useRef)(null),[$,G]=(0,i.useState)(!1),K=async(e={})=>{if(!a)return;let t=e.page??v,s=e.size??T,i=e.sortBy??O.sort_by,o=e.sortOrder??O.sort_order,d=e.organizationID??O.organization_id,c=e.teamAlias??O.team_alias;g(!0),b(null);try{let e=await (0,eV.teamListCall)(a,t,s,{organizationID:d||null,team_alias:c||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:i||null,sortOrder:o||null});l(e.teams??[]),A(e.total??0)}catch(e){b(e?.message||"Failed to fetch teams")}finally{g(!1)}};(0,i.useEffect)(()=>{K()},[a]);let[W]=w.Form.useForm(),[Q]=w.Form.useForm(),[Y,J]=(0,i.useState)(""),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),[ei,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(!1),[eu,ep]=(0,i.useState)([]),[ex,eh]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(null),[eb,e_]=(0,i.useState)([]),[ev,ew]=(0,i.useState)({}),[ek,eC]=(0,i.useState)(!1),[eS,eT]=(0,i.useState)([]),[eI,eF]=(0,i.useState)([]),[eL,eA]=(0,i.useState)([]),[eP,eM]=(0,i.useState)([]),[eD,eE]=(0,i.useState)(!1),[eB,eq]=(0,i.useState)({}),[e$,eU]=(0,i.useState)(null),[eH,eY]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${D}`);let t=(e=[],D&&D.models.length>0?(console.log(`organization.models: ${D.models}`),e=D.models):e=eu,(0,B.unfurlWildcardModelsInList)(e,eu));console.log(`models: ${t}`),e_(t),W.setFieldValue("models",[])},[D,eu]),(0,i.useEffect)(()=>{if(ei){let e=sX(n,r,o);if(1===e.length){let t=e[0];W.setFieldValue("organization_id",t.organization_id),E(t)}else W.setFieldValue("organization_id",P?.organization_id||null),E(P)}},[ei,n,r,o,P]),(0,i.useEffect)(()=>{let e=async()=>{try{if(null==a)return;let e=(await (0,N.getPoliciesList)(a)).policies.map(e=>e.policy_name);eF(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==a)return;let e=(await (0,N.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eT(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[a]);let eJ=async()=>{try{if(null==a)return;let e=await (0,N.fetchMCPAccessGroups)(a);eM(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,i.useEffect)(()=>{eJ()},[a]),(0,i.useEffect)(()=>{e&&ew(e.reduce((e,t)=>(e[t.team_id]={keys:t.keys||[],team_info:{members_with_roles:t.members_with_roles||[]}},e),{}))},[e]);let eX=async e=>{ef(e),eh(!0)},eZ=async()=>{if(null!=eg&&null!=e&&null!=a)try{eC(!0),await (0,N.teamDeleteCall)(a,eg.team_id),await K(),ez.default.success("Team deleted successfully")}catch(e){ez.default.fromBackend("Error deleting the team: "+e)}finally{eC(!1),eh(!1),ef(null)}};(0,i.useEffect)(()=>{(async()=>{try{if(null===r||null===n||null===a)return;let e=await (0,B.fetchAvailableModelsForTeamOrKey)(r,n,a);e&&ep(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,r,n,e]);let e0=async t=>{try{if(console.log(`formValues: ${JSON.stringify(t)}`),null!=a){let s=t?.team_alias,l=e?.map(e=>e.team_alias)??[],r=t?.organization_id||P?.organization_id;if(""===r||"string"!=typeof r?t.organization_id=null:t.organization_id=r.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(ez.default.info("Creating Team"),eL.length>0){let e={};if(t.metadata)try{e=JSON.parse(t.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}e={...e,logging:eL.filter(e=>e.callback_name)},t.metadata=JSON.stringify(e)}if(t.secret_manager_settings&&"string"==typeof t.secret_manager_settings)if(""===t.secret_manager_settings.trim())delete t.secret_manager_settings;else try{t.secret_manager_settings=JSON.parse(t.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0||t.allowed_mcp_servers_and_groups&&(t.allowed_mcp_servers_and_groups.servers?.length>0||t.allowed_mcp_servers_and_groups.accessGroups?.length>0||t.allowed_mcp_servers_and_groups.toolPermissions)){if(t.object_permission={},t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0&&(t.object_permission.vector_stores=t.allowed_vector_store_ids,delete t.allowed_vector_store_ids),t.allowed_mcp_servers_and_groups){let{servers:e,accessGroups:s}=t.allowed_mcp_servers_and_groups;e&&e.length>0&&(t.object_permission.mcp_servers=e),s&&s.length>0&&(t.object_permission.mcp_access_groups=s),delete t.allowed_mcp_servers_and_groups}t.mcp_tool_permissions&&Object.keys(t.mcp_tool_permissions).length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_tool_permissions=t.mcp_tool_permissions,delete t.mcp_tool_permissions)}if(t.allowed_mcp_access_groups&&t.allowed_mcp_access_groups.length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_access_groups=t.allowed_mcp_access_groups,delete t.allowed_mcp_access_groups),t.allowed_agents_and_groups){let{agents:e,accessGroups:s}=t.allowed_agents_and_groups;t.object_permission||(t.object_permission={}),e&&e.length>0&&(t.object_permission.agents=e),s&&s.length>0&&(t.object_permission.agent_access_groups=s),delete t.allowed_agents_and_groups}Object.keys(eB).length>0&&(t.model_aliases=eB),e$?.router_settings&&Object.values(e$.router_settings).some(e=>null!=e&&""!==e)&&(t.router_settings=e$.router_settings),await (0,N.teamCreateCall)(a,t),ez.default.success("Team created"),await K({page:v,size:T}),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1),en(!1)}}catch(e){console.error("Error creating the team:",e),ez.default.fromBackend("Error creating the team: "+e)}},e1=async(e,t)=>{let s={...O,[e]:t};if(R(s),S(1),a)try{let e=await (0,eV.teamListCall)(a,1,T,{organizationID:s.organization_id||null,team_alias:s.team_alias||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:s.sort_by||null,sortOrder:s.sort_order||null});l(e.teams??[]),A(e.total??0)}catch(e){console.error("Error fetching teams:",e)}},{token:e2}=sA.theme.useToken(),{Title:e4,Text:e5}=sP.Typography,{Content:e6}=sI.Layout,e3=(0,i.useMemo)(()=>[{title:"Team ID",dataIndex:"team_id",key:"team_id",width:170,ellipsis:!0,render:(e,s)=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(e5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>ea(s.team_id),children:e})})},{title:"Team Alias",dataIndex:"team_alias",key:"team_alias",ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{style:{fontSize:14},children:e||(0,t.jsx)(e5,{type:"secondary",italic:!0,children:"—"})})},{title:"Organization",key:"organization",width:160,ellipsis:!0,render:(e,s)=>{let a=((e,t)=>{if(!e||!t)return e||"N/A";let s=t.find(t=>t.organization_id===e);return s?.organization_alias||e})(s.organization_id,x||o);return s.organization_id?(0,t.jsx)(e5,{ellipsis:!0,style:{fontSize:14},children:a}):(0,t.jsx)(e5,{type:"secondary",children:"—"})}},{title:"Resources",key:"resources",width:240,render:(e,s)=>{let a=ev?.[s.team_id]?.team_info?.members_with_roles?.length??0,l=s.models?.length??0,r=ev?.[s.team_id]?.keys?.length??0;return(0,t.jsxs)(sT.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a} Members`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sR.default,{size:14}),a]})})}),(0,t.jsx)(f.Tooltip,{title:`${l} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sz,{size:14}),l]})})}),(0,t.jsx)(f.Tooltip,{title:`${r} Keys`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD.KeyIcon,{size:14}),r]})})})]})}},{title:"Spend / Budget",key:"spend",width:200,sorter:!0,render:(e,s)=>{let a=s.spend??0,l=s.max_budget,r=`$${a.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`,i=null!=l?`$${l.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:"Unlimited",n=null!=l&&l>0?Math.min(a/l*100,100):null;return(0,t.jsxs)(sT.Flex,{vertical:!0,gap:2,children:[(0,t.jsxs)(e5,{style:{fontSize:13},children:[r,(0,t.jsxs)(e5,{type:"secondary",style:{fontSize:12},children:[" / ",i]})]}),null!=n&&(0,t.jsx)(sL.Progress,{percent:n,size:"small",showInfo:!1,strokeColor:n>=90?"#ff4d4f":n>=70?"#faad14":"#1677ff",style:{marginBottom:0}})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",width:130,ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"—"})},{title:"Actions",key:"actions",width:120,align:"right",render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(eR.default,{variant:"Copy",tooltipText:"Copy Team ID",onClick:()=>{navigator.clipboard.writeText(s.team_id).then(()=>sM.message.success("Team ID copied")).catch(()=>sM.message.error("Failed to copy"))}}),"Admin"===n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit team",dataTestId:"edit-team-button",onClick:()=>{ea(s.team_id),er(!0)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete team",dataTestId:"delete-team-button",onClick:()=>eX(s)})]})]})}],[n,ev,x,o]),e8=(0,i.useMemo)(()=>e??[],[e]),e7=[{key:"your-teams",label:"Your Teams",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsxs)(sT.Flex,{gap:12,align:"center",children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sO.SearchIcon,{size:16}),suffix:$?(0,t.jsx)(sB,{size:"small"}):null,placeholder:"Search teams by name...",onChange:e=>{var t;return t=e.target.value,void(q.current&&clearTimeout(q.current),G(!0),q.current=setTimeout(async()=>{try{R(e=>({...e,team_alias:t})),S(1),await K({page:1,teamAlias:t})}finally{G(!1)}},300))},allowClear:!0,style:{maxWidth:400}}),(0,t.jsx)(sq.default,{organizations:o,value:O.organization_id||void 0,onChange:e=>e1("organization_id",e||""),loading:h})]}),(0,t.jsx)(sF.Pagination,{current:v,total:L,pageSize:T,onChange:(e,t)=>{S(e),F(t),K({page:e,size:t})},size:"small",showTotal:e=>`${e} teams`,showSizeChanger:!0,pageSizeOptions:["10","20","50"]})]}),h?(0,t.jsx)(sT.Flex,{justify:"center",align:"center",style:{padding:"80px 0"},children:(0,t.jsx)(sB,{fontSize:48})}):j?(0,t.jsxs)(sT.Flex,{vertical:!0,align:"center",gap:16,style:{padding:"64px 0"},children:[(0,t.jsx)(e5,{type:"danger",style:{fontSize:15},children:"Failed to load teams"}),(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:j}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>{K()},children:"Retry"})]}):(0,t.jsx)(te.Table,{columns:e3,dataSource:e8,rowKey:"team_id",pagination:!1,onChange:(e,t,s)=>{let a=Array.isArray(s)?s[0]:s,l=a.order?a.columnKey:"created_at",r="ascend"===a.order?"asc":(a.order,"desc");R(e=>({...e,sort_by:l,sort_order:r})),K({sortBy:l,sortOrder:r})},locale:{emptyText:(0,t.jsxs)("div",{style:{padding:"64px 0",textAlign:"center"},children:[(0,t.jsx)(sC.TeamOutlined,{style:{fontSize:40,color:"#d9d9d9",marginBottom:12}}),(0,t.jsx)("div",{children:(0,t.jsx)(e5,{style:{fontSize:15,color:"#595959"},children:"No teams yet"})}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:"Create your first team to organize members and manage access to models."})}),sJ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),style:{marginTop:16},children:"Create Team"})]})},scroll:{x:1e3},size:"middle"})]}),(0,t.jsx)(sQ.default,{isOpen:ex,title:"Delete Team?",alertMessage:eg?.keys?.length===0?void 0:`Warning: This team has ${eg?.keys?.length} keys associated with it. Deleting the team will also delete all associated keys. This action is irreversible.`,message:"Are you sure you want to delete this team and all its keys? This action cannot be undone.",resourceInformationTitle:"Team Information",resourceInformation:[{label:"Team ID",value:eg?.team_id,code:!0},{label:"Team Name",value:eg?.team_alias},{label:"Keys",value:eg?.keys?.length},{label:"Members",value:eg?.members_with_roles?.length}],requiredConfirmation:eg?.team_alias,onCancel:()=>{eh(!1),ef(null)},onOk:eZ,confirmLoading:ek})]})},{key:"available-teams",label:"Available Teams",children:(0,t.jsx)(sN.default,{accessToken:a,userID:r})},...(0,eN.isProxyAdminRole)(n||"")?[{key:"default-settings",label:"Default Team Settings",children:(0,t.jsx)(sk.default,{accessToken:a,userID:r||"",userRole:n||""})}]:[]];return(0,t.jsxs)(e6,{style:{padding:e2.paddingLG,paddingInline:2*e2.paddingLG},children:[es?(0,t.jsx)(sw.default,{teamId:es,onUpdate:e=>{l(t=>null==t?t:t.map(t=>e.team_id===t.team_id?(0,eO.updateExistingKeys)(t,e):t)),K()},onClose:()=>{ea(null),er(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let t=0;te.team_id===es)),is_proxy_admin:"Admin"==n,userModels:eu,editTeam:el,premiumUser:d}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsxs)(e4,{level:2,style:{margin:0},children:[(0,t.jsx)(sC.TeamOutlined,{style:{marginRight:8}}),"Teams"]}),(0,t.jsx)(e5,{type:"secondary",children:"Manage teams, members, and their access to models and budgets"})]}),sJ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),children:"Create Team"})]}),(0,t.jsx)(t5.Tabs,{items:e7})]}),sJ(n,r,o)&&(0,t.jsx)(y.Modal,{title:"Create Team",open:ei,width:1e3,footer:null,onOk:()=>{en(!1),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1)},onCancel:()=>{en(!1),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1)},children:(0,t.jsxs)(w.Form,{form:W,onFinish:e0,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:""})}),(c=sX(n,r,o),m="Admin"!==n,u=1===c.length,p=0===c.length,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:P?P.organization_id:null,className:"mt-8",rules:m?[{required:!0,message:"Please select an organization"}]:[],help:u?"You can only create teams within this organization":m?"required":"",children:(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!m,disabled:u,placeholder:p?"No organizations available":"Search or select an Organization",onChange:e=>{W.setFieldValue("organization_id",e),E(c?.find(t=>t.organization_id===e)||null)},filterOption:(e,t)=>!!t&&(t.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:c?.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),m&&!u&&c.length>1&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(e5,{style:{color:"#1e40af",fontSize:14},children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(f.Tooltip,{title:"These are the models that your selected team has access to",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),rules:[{required:!0,message:"Please select at least one model"}],name:"models",children:(0,t.jsx)(sY.ModelSelect,{value:W.getFieldValue("models")||[],onChange:e=>W.setFieldValue("models",e),organizationID:W.getFieldValue("organization_id"),options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!W.getFieldValue("organization_id")},context:"team",dataTestId:"create-team-models-select"})}),(0,t.jsx)(w.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(sK.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(k.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(k.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(k.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(k.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(w.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(sK.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(sK.default,{step:1,width:400})}),(0,t.jsxs)(eG.Accordion,{className:"mt-20 mb-8",onClick:()=>{eD||(eJ(),eE(!0))},children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Additional Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(w.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,t.jsx)(eQ.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,t.jsx)(w.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(sK.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(w.Form.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,t.jsx)(eQ.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(w.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,t.jsx)(sK.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,t.jsx)(sK.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,t.jsx)(C.Input.TextArea,{rows:4})}),(0,t.jsx)(w.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:d?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(C.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!d})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"Setup your first guardrail",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:eS.map(e=>({value:e,label:e}))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(_.Switch,{disabled:!d,checkedChildren:d?"Yes":"Premium feature - Upgrade to disable global guardrails by team",unCheckedChildren:d?"No":"Premium feature - Upgrade to disable global guardrails by team"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(f.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:eI.map(e=>({value:e,label:e}))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(f.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-8",help:"Select access groups to assign to this team",children:(0,t.jsx)(s$.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(f.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,t.jsx)(sW.default,{onChange:e=>W.setFieldValue("allowed_vector_store_ids",e),value:W.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(f.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,t.jsx)(ey.default,{onChange:e=>W.setFieldValue("allowed_mcp_servers_and_groups",e),value:W.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(w.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(C.Input,{type:"hidden"})}),(0,t.jsx)(w.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(ej.default,{accessToken:a||"",selectedServers:W.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:W.getFieldValue("mcp_tool_permissions")||{},onChange:e=>W.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(f.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,t.jsx)(sU.default,{onChange:e=>W.setFieldValue("allowed_agents_and_groups",e),value:W.getFieldValue("allowed_agents_and_groups"),accessToken:a||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sH.default,{value:eL,onChange:eA,premiumUser:d})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(sG.default,{accessToken:a||"",value:e$||void 0,onChange:eU,modelData:eu.length>0?{data:eu.map(e=>({model_name:e}))}:void 0},eH)})})]},`router-settings-accordion-${eH}`),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(e5,{type:"secondary",style:{fontSize:14,marginBottom:16,display:"block"},children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(sV.default,{accessToken:a||"",initialModelAliases:eB,onAliasUpdate:eq,showExampleConfig:!1})]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(V.Button,{htmlType:"submit",children:"Create Team"})})]})})]})};var s0=e.i(702597),s1=e.i(846835),s2=e.i(147612),s4=e.i(191403),s5=e.i(976883),s6=e.i(657688),s3=e.i(437902);let{Text:s8}=sP.Typography,s7=({litellmParams:e,accessToken:s,onTestComplete:a})=>{let[l,r]=(0,i.useState)(!0),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{r(!0);try{let t=await (0,N.testSearchToolConnection)(s,e);o(t),"success"===t.status&&ez.default.success("Connection test successful!")}catch(e){o({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{r(!1),a&&a()}})()},[s,e,a]);let m=n?.message?(e=>{if(!e)return"Unknown error";let t=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(t.includes("")||t.includes("(.*?)<\/title>/);return e?e[1]:t.includes("401")||t.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return t.length>200?t.substring(0,200)+"...":t})(n.message):"Unknown error";return l?(0,t.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(s8,{style:{fontSize:"16px"},children:["Testing connection to ",e.search_provider||"search provider","..."]}),(0,t.jsx)(s3.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]})}):n?(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===n.status?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)("div",{style:{marginLeft:"12px"},children:[(0,t.jsxs)(s8,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",e.search_provider," successful!"]}),n.test_query&&(0,t.jsxs)(s8,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,t.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:n.test_query})]}),void 0!==n.results_count&&(0,t.jsxs)(s8,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",n.results_count]})]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(t0.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(s8,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",e.search_provider||"search provider"," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(s8,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(s8,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:m}),n.error_type&&(0,t.jsx)("div",{style:{marginTop:"8px"},children:(0,t.jsxs)(s8,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,t.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:n.error_type})]})}),n.message&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(s8,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:n.message})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,t.jsx)(s8,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,t.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,t.jsx)(F.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(V.Button,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,t.jsx)(z.InfoCircleOutlined,{}),children:"View Search Documentation"})})]}):null},{TextArea:s9}=C.Input,ae=({providerName:e,displayName:s})=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)(s6.default,{src:`../ui/assets/logos/${e}.png`,alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,t.jsx)("span",{children:s})]}),at=({userRole:e,accessToken:s,onCreateSuccess:a,isModalVisible:l,setModalVisible:r})=>{let[o]=w.Form.useForm(),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)({}),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[j,b]=(0,i.useState)(""),{data:_,isLoading:v}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,N.fetchAvailableSearchProviders)(s)},enabled:!!s&&l}),C=_?.providers||[],S=async e=>{c(!0);try{let t={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};if(console.log("Creating search tool with payload:",t),null!=s){let e=await (0,N.createSearchTool)(s,t);ez.default.success("Search tool created successfully"),o.resetFields(),u({}),r(!1),a(e)}}catch(e){ez.default.error("Error creating search tool: "+e)}finally{c(!1)}},T=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),b(`test-${Date.now()}`),x(!0)}catch(e){ez.default.error("Please fill in Search Provider and API Key before testing")}};return(i.default.useEffect(()=>{l||u({})},[l]),(0,eN.isAdminRole)(e))?(0,t.jsxs)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("span",{className:"text-2xl",children:"🔍"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:l,width:800,onCancel:()=>{o.resetFields(),u({}),r(!1)},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)(w.Form,{form:o,onFinish:S,onValuesChange:(e,t)=>u(t),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,t.jsx)(f.Tooltip,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_tool_name",rules:[{required:!0,message:"Please enter a search tool name"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Name can only contain letters, numbers, hyphens, and underscores"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,t.jsx)(f.Tooltip,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(k.Select,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:v,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:C.map(e=>(0,t.jsx)(k.Select.Option,{value:e.provider_name,label:(0,t.jsx)(ae,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,t.jsx)(ae,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,t.jsx)(f.Tooltip,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"api_key",rules:[{required:!1,message:"Please enter an API key"}],children:(0,t.jsx)(eQ.TextInput,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,t.jsx)(s9,{rows:3,placeholder:"Brief description of this search tool's purpose",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,t.jsx)(f.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(sP.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(n.Button,{onClick:T,loading:h,children:"Test Connection"}),(0,t.jsx)(n.Button,{loading:d,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,t.jsx)(y.Modal,{title:"Connection Test Results",open:p,onCancel:()=>{x(!1),g(!1)},footer:[(0,t.jsx)(n.Button,{onClick:()=>{x(!1),g(!1)},children:"Close"},"close")],width:700,children:p&&s&&(0,t.jsx)(s7,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:s,onTestComplete:()=>g(!1)},j)})]}):null};var as=e.i(678784),aa=e.i(118366),al=e.i(928685);let{Text:ar}=sP.Typography,ai=({searchToolName:e,accessToken:s,className:a=""})=>{let[l,r]=(0,i.useState)(""),[n,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)([]),[u,p]=(0,i.useState)({}),[x,h]=(0,i.useState)(!1),g=async()=>{if(!l.trim())return void A.default.warning("Please enter a search query");d(!0);let t=performance.now();try{let a=await (0,N.searchToolQueryCall)(s,e,l),r=performance.now(),i=Math.round(r-t),n={query:l,response:a,timestamp:Date.now(),latency:i};m(e=>[n,...e])}catch(e){console.error("Error querying search tool:",e),ez.default.fromBackend("Failed to query search tool")}finally{d(!1)}},y=e=>new Date(e).toLocaleString(),j=(0,t.jsx)(tN.LoadingOutlined,{style:{fontSize:24},spin:!0}),f=c.length>0?c[0]:null;return(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(ew.Title,{children:"Test Search Tool"})}),(0,t.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:x?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:x?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,t.jsx)(al.SearchOutlined,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,t.jsx)(C.Input,{value:l,onChange:e=>r(e.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),g())},placeholder:"Enter your search query...",disabled:n,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,t.jsx)(V.Button,{type:"primary",onClick:g,disabled:n||!l.trim(),icon:(0,t.jsx)(al.SearchOutlined,{}),loading:n,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:n||!l.trim()?void 0:"#1890ff",borderColor:n||!l.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,t.jsx)("div",{className:"flex-1",children:f||n?(0,t.jsxs)("div",{children:[n&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,t.jsx)(eF.Spin,{indicator:j}),(0,t.jsx)(ar,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),f&&!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(ar,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:f.query})]}),(0,t.jsxs)("div",{className:"text-right ml-4",children:[(0,t.jsx)(ar,{className:"text-xs text-gray-500",children:y(f.timestamp)}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[f.response?.results?.length||0," ",f.response?.results?.length===1?"result":"results"]}),void 0!==f.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[f.latency,"ms"]})]})]})]})]})}),f.response&&f.response.results&&f.response.results.length>0?(0,t.jsx)("div",{className:"space-y-3",children:f.response.results.map((e,s)=>{let a=u[`0-${s}`]||!1;return(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",e.currentTarget.style.borderColor="#e0e7ff"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)",e.currentTarget.style.borderColor="#e5e7eb"},children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-600 hover:text-blue-700 flex-1 leading-snug",style:{textDecoration:"none"},onMouseEnter:e=>e.currentTarget.style.textDecoration="underline",onMouseLeave:e=>e.currentTarget.style.textDecoration="none",children:e.title}),(0,t.jsx)(V.Button,{type:"text",size:"small",className:"flex-shrink-0",icon:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),onClick:()=>window.open(e.url,"_blank"),style:{color:"#6b7280"}})]}),(0,t.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,t.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:a?e.snippet:`${e.snippet.substring(0,200)}${e.snippet.length>200?"...":""}`}),e.snippet.length>200&&(0,t.jsx)(V.Button,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>{let e;return e=`0-${s}`,void p(t=>({...t,[e]:!t[e]}))},style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:a?"Show less":"Show more"})]})},s)})}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,t.jsx)(al.SearchOutlined,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,t.jsx)(ar,{className:"text-gray-600 font-medium",children:"No results found"}),(0,t.jsx)(ar,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),c.length>1&&(0,t.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)(ar,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,t.jsx)(V.Button,{onClick:()=>{m([]),p({}),ez.default.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.slice(1,6).map((e,s)=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-gray-300",onClick:()=>{r(e.query)},children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium text-blue-600",children:[e.response?.results?.length||0," ",e.response?.results?.length===1?"result":"results"]}),void 0!==e.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"•"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:y(e.timestamp)})]})]},s+1))})]})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,t.jsx)(al.SearchOutlined,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,t.jsx)(ar,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,t.jsx)(ar,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},an=({searchTool:e,onBack:s,isEditing:a,accessToken:l,availableProviders:r})=>{var d;let c,[m,u]=(0,i.useState)({}),p=async(e,t)=>{await (0,eO.copyToClipboard)(e)&&(u(e=>({...e,[t]:!0})),setTimeout(()=>{u(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Search Tools"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(ew.Title,{children:e.search_tool_name}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-name"]?(0,t.jsx)(as.CheckIcon,{size:12}):(0,t.jsx)(aa.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_name,"search-tool-name"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:e.search_tool_id}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-id"]?(0,t.jsx)(as.CheckIcon,{size:12}):(0,t.jsx)(aa.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_id,"search-tool-id"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsxs)(t4.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Provider"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(ew.Title,{children:(d=e.litellm_params.search_provider,c=r.find(e=>e.provider_name===d),c?.ui_friendly_name||d)})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"API Key"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.litellm_params.api_key?"****":"Not set"})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Created At"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleString():"Unknown"})})]})]}),e.search_tool_info?.description&&(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)(g.Text,{children:"Description"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.search_tool_info.description})})]}),(0,t.jsx)("div",{className:"mt-6",children:l&&(0,t.jsx)(ai,{searchToolName:e.search_tool_name,accessToken:l})})]})},ao=({accessToken:e,userRole:s,userID:a})=>{let{data:l,isLoading:r,refetch:o}=(0,t1.useQuery)({queryKey:["searchTools"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,N.fetchSearchTools)(e).then(e=>e.search_tools||[])},enabled:!!e}),{data:d,isLoading:c}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,N.fetchAvailableSearchProviders)(e)},enabled:!!e}),m=d?.providers||[],[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(!1),[b,_]=(0,i.useState)(null),[v,S]=(0,i.useState)(!1),[T,F]=(0,i.useState)(!1),[L,A]=(0,i.useState)(!1),[P]=w.Form.useForm(),M=i.default.useMemo(()=>{let e,s,a;return e=e=>{_(e),S(!1)},s=e=>{let t=l?.find(t=>t.search_tool_id===e);t&&(P.setFieldsValue({search_tool_name:t.search_tool_name,search_provider:t.litellm_params.search_provider,api_key:t.litellm_params.api_key,api_base:t.litellm_params.api_base,timeout:t.litellm_params.timeout,max_retries:t.litellm_params.max_retries,description:t.search_tool_info?.description}),_(e),A(!0))},a=D,[{title:"Search Tool ID",dataIndex:"search_tool_id",key:"search_tool_id",render:(s,a)=>a.is_from_config?(0,t.jsx)("span",{className:"text-xs",children:"-"}):(0,t.jsx)("button",{onClick:()=>e(a.search_tool_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left cursor-pointer max-w-40",children:(0,t.jsx)("span",{className:"truncate block",children:a.search_tool_id})})},{title:"Name",dataIndex:"search_tool_name",key:"search_tool_name",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Provider",key:"provider",render:(e,s)=>{let a=s.litellm_params.search_provider,l=m.find(e=>e.provider_name===a),r=l?.ui_friendly_name||a;return(0,t.jsx)("span",{className:"text-sm",children:r})}},{title:"Created At",dataIndex:"created_at",key:"created_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.created_at?new Date(s.created_at).toLocaleDateString():"-"})},{title:"Updated At",dataIndex:"updated_at",key:"updated_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.updated_at?new Date(s.updated_at).toLocaleDateString():"-"})},{title:"Source",key:"source",render:(e,s)=>{let a=s.is_from_config??!1;return(0,t.jsx)(I.Tag,{color:a?"default":"blue",children:a?"Config":"DB"})}},{title:"Actions",key:"actions",render:(e,l)=>{let r=l.search_tool_id,i=l.is_from_config??!1;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit search tool",disabled:i,disabledTooltipText:"Config search tool cannot be edited on the dashboard. Please edit it from the config file.",onClick:()=>{r&&!i&&s(r)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete search tool",disabled:i,disabledTooltipText:"Config search tool cannot be deleted on the dashboard. Please delete it from the config file.",onClick:()=>{r&&!i&&a(r)}})]})}}]},[m,l,P]);function D(e){p(e),h(!0)}let E=async()=>{if(null!=u&&null!=e){f(!0);try{await (0,N.deleteSearchTool)(e,u),ez.default.success("Deleted search tool successfully"),h(!1),p(null),o()}catch(e){console.error("Error deleting the search tool:",e),ez.default.error("Failed to delete search tool")}finally{f(!1)}}},z=l?.find(e=>e.search_tool_id===u),O=z?m.find(e=>e.provider_name===z.litellm_params.search_provider):null,R=async()=>{if(e&&b)try{let t=await P.validateFields(),s={search_tool_name:t.search_tool_name,litellm_params:{search_provider:t.search_provider,api_key:t.api_key,api_base:t.api_base,timeout:t.timeout?parseFloat(t.timeout):void 0,max_retries:t.max_retries?parseInt(t.max_retries):void 0},search_tool_info:t.description?{description:t.description}:void 0};await (0,N.updateSearchTool)(e,b,s),ez.default.success("Search tool updated successfully"),A(!1),P.resetFields(),_(null),o()}catch(e){console.error("Failed to update search tool:",e),ez.default.error("Failed to update search tool")}};return e&&s&&a?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(sQ.default,{isOpen:x,title:"Delete Search Tool",message:"Are you sure you want to delete this search tool? This action cannot be undone.",resourceInformationTitle:"Search Tool Information",resourceInformation:z?[{label:"Name",value:z.search_tool_name},{label:"ID",value:z.search_tool_id,code:!0},{label:"Provider",value:O?.ui_friendly_name||z.litellm_params.search_provider},{label:"Description",value:z.search_tool_info?.description||"-"}]:[],onCancel:()=>{h(!1),p(null)},onOk:E,confirmLoading:j}),(0,t.jsx)(at,{userRole:s,accessToken:e,onCreateSuccess:e=>{F(!1),o()},isModalVisible:T,setModalVisible:F}),(0,t.jsx)(y.Modal,{title:"Edit Search Tool",open:L,onOk:R,onCancel:()=>{A(!1),P.resetFields(),_(null)},width:600,children:(0,t.jsxs)(w.Form,{form:P,layout:"vertical",children:[(0,t.jsx)(w.Form.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g., my-perplexity-search"})}),(0,t.jsx)(w.Form.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(k.Select,{placeholder:"Select a search provider",loading:c,children:m.map(e=>(0,t.jsx)(k.Select.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,t.jsx)(w.Form.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,t.jsx)(C.Input.Password,{placeholder:"Enter API key"})}),(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(C.Input.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,t.jsx)(ew.Title,{children:"Search Tools"}),(0,t.jsx)(g.Text,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,eN.isAdminRole)(s)&&(0,t.jsx)(n.Button,{className:"mt-4 mb-4",onClick:()=>F(!0),children:"+ Add New Search Tool"}),(0,t.jsx)(()=>b?(0,t.jsx)(an,{searchTool:l?.find(e=>e.search_tool_id===b)||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{S(!1),_(null),o()},isEditing:v,accessToken:e,availableProviders:m}):(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(eF.Spin,{spinning:r,indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"large",children:(0,t.jsx)(te.Table,{bordered:!0,dataSource:l||[],columns:M,rowKey:e=>e.search_tool_id||e.search_tool_name,pagination:!1,locale:{emptyText:"No search tools configured"},size:"small"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:s,userID:a}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};var ad=e.i(700904),ac=e.i(686311),am=e.i(37727),au=e.i(643531),ap=e.i(636772),ax=e.i(115571);function ah({onOpen:e,onDismiss:s,isVisible:a,title:l,description:r,buttonText:n,icon:o,accentColor:d,buttonStyle:c}){let m=(0,ap.useDisableShowPrompts)(),[u,p]=(0,i.useState)(100),[x,h]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{if(!a){p(100),h(!1);return}let e=Date.now(),t=setInterval(()=>{let s=Math.max(0,100-(Date.now()-e)/15e3*100);p(s),s<=0&&clearInterval(t)},50);return()=>clearInterval(t)},[a]),(0,i.useEffect)(()=>{if(x){let e=setTimeout(()=>{h(!1),s()},5e3);return()=>clearTimeout(e)}},[x,s]),x)?(0,t.jsx)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center",children:(0,t.jsx)(au.Check,{className:"h-5 w-5 text-green-600"})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("p",{className:"text-sm text-gray-700 font-medium",children:"Got it, we will not ask again. Reactivate this at any time in the User Menu."})})]})})}):!a||m?null:(0,t.jsxs)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:[(0,t.jsx)("div",{className:"h-1 bg-gray-100 w-full",children:(0,t.jsx)("div",{className:"h-full transition-all duration-100 ease-linear",style:{width:`${u}%`,backgroundColor:d}})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",style:{color:d},children:[(0,t.jsx)(o,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm",children:l})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-0.5 rounded hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:r}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V.Button,{type:"primary",block:!0,onClick:e,style:c,children:n}),(0,t.jsx)(V.Button,{variant:"outlined",danger:!0,block:!0,onClick:()=>{(0,ax.setLocalStorageItem)("disableShowPrompts","true"),(0,ax.emitLocalStorageChange)("disableShowPrompts"),h(!0)},className:"text-xs",children:"Don't ask me again"})]})]})]})}function ag({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ah,{onOpen:e,onDismiss:s,isVisible:a,title:"Quick feedback",description:"Help us improve LiteLLM! Share your experience in 5 quick questions.",buttonText:"Share feedback",icon:ac.MessageSquare,accentColor:"#3b82f6"})}var ay=e.i(972520),aj=e.i(180127),aj=aj,af=e.i(536916);let ab=[{id:"oss_adoption",label:"OSS Adoption",description:"Stars, contributors, forks, community support"},{id:"ai_integration",label:"AI Integration",description:"LiteLLM had the logging/guardrail integration we needed - Langfuse, OTEL, S3 logging, Azure Content Safety guardrails"},{id:"unified_api",label:"Unified API",description:"LiteLLM had the best OpenAI-compatible API across providers - OpenAI, Anthropic, Gemini, etc."},{id:"breadth_of_models",label:"Breadth of Models/Providers",description:"LiteLLM had the provider + endpoint combinations we needed - /ocr endpoint with Mistral OCR, /batches endppint with Bedrock API, etc."},{id:"other",label:"Other",description:"Something else not listed above"}];function a_({isOpen:e,onClose:s,onComplete:a}){let[l,r]=(0,i.useState)(1),[n,o]=(0,i.useState)({usingAtCompany:null,companyName:"",startDate:"",reasons:[],otherReason:"",email:""}),[d,c]=(0,i.useState)(!1),m=!0===n.usingAtCompany?5:4;if(!e)return null;let u=async()=>{c(!0);try{let e={oss_adoption:"OSS Adoption (stars, contributors, forks)",ai_integration:"AI Integration (Langfuse, OTEL, S3, Azure Content Safety)",unified_api:"Unified API (OpenAI-compatible)",breadth_of_models:"Breadth of Models/Providers (/ocr, /batches, Bedrock, Azure OCR)"},t=n.reasons.map(t=>"other"===t&&n.otherReason?`Other: ${n.otherReason}`:e[t]||t),s=new URLSearchParams({"entry.2015264290":n.usingAtCompany?"Yes":"No","entry.1876243786":n.companyName||"","entry.1282591459":n.startDate,"entry.393456108":t.join(", "),"entry.928142208":n.email||""});await fetch("https://feedback.litellm.ai/survey",{method:"POST",mode:"no-cors",body:s})}catch(e){console.error("Failed to submit survey:",e)}c(!1),a()},p=(e,t)=>{o(s=>({...s,[e]:t}))},x=e=>{o(t=>({...t,reasons:t.reasons.includes(e)?t.reasons.filter(t=>t!==e):[...t.reasons,e]}))},h=()=>{if(!1===n.usingAtCompany){if(1===l)return 1;if(3===l)return 2;if(4===l)return 3;if(5===l)return 4}return l},g=5===l;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-lg bg-white rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[90vh] transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-blue-600",children:[(0,t.jsx)(ac.MessageSquare,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Quick Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-5 w-5"})})]}),(0,t.jsx)(sL.Progress,{percent:h()/m*100,showInfo:!1,strokeColor:"#2563eb",className:"m-0"}),(0,t.jsx)("div",{className:"p-8 flex-1 overflow-y-auto",children:1===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Are you using LiteLLM at your company?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Help us understand how our product is being used in professional environments."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-4",children:[(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!0),className:`p-6 rounded-lg border-2 text-left transition-all ${!0===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"Yes"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"We use it for work"})]}),(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!1),className:`p-6 rounded-lg border-2 text-left transition-all ${!1===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"No"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Personal project / Hobby"})]})]})]}):2===l&&!0===n.usingAtCompany?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"What company are you using LiteLLM at?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"This helps us understand our user base better."}),(0,t.jsx)(C.Input,{size:"large",placeholder:"Enter your company name",value:n.companyName,onChange:e=>p("companyName",e.target.value),autoFocus:!0})]}):3===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"When did you start using LiteLLM?"}),(0,t.jsx)(T.Radio.Group,{value:n.startDate,onChange:e=>p("startDate",e.target.value),className:"w-full",children:(0,t.jsx)(U.Space,{direction:"vertical",className:"w-full",children:["Less than a month ago","1-3 months ago","3-6 months ago","More than 6 months ago"].map(e=>(0,t.jsx)("label",{className:`flex items-center p-4 rounded-lg border cursor-pointer transition-all w-full ${n.startDate===e?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:(0,t.jsx)(T.Radio,{value:e,children:e})},e))})})]}):4===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Why did you pick LiteLLM over other AI Gateways?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Select all that apply."}),(0,t.jsx)("div",{className:"space-y-3",children:ab.map(e=>{let s=n.reasons.includes(e.id);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>x(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),x(e.id))},className:`flex items-start p-4 rounded-lg border cursor-pointer transition-all ${s?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:[(0,t.jsx)(af.Checkbox,{checked:s,className:"mt-0.5 pointer-events-none"}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900",children:e.label}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]}),"other"===e.id&&s&&(0,t.jsx)(C.Input,{className:"mt-2 ml-7",placeholder:"Please specify...",value:n.otherReason,onChange:e=>p("otherReason",e.target.value),onClick:e=>e.stopPropagation(),autoFocus:!0})]},e.id)})})]}):5===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Want to share more?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Leave your email and we may reach out to learn more about your experience. This is completely optional."}),(0,t.jsx)(C.Input,{size:"large",type:"email",placeholder:"your@email.com (optional)",value:n.email,onChange:e=>p("email",e.target.value),autoFocus:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"We will only use this to follow up on your feedback. No spam, ever."})]}):null}),(0,t.jsxs)("div",{className:"px-6 py-4 bg-gray-50 border-t border-gray-200 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-gray-500 font-medium",children:["Step ",h()," of ",m]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[l>1&&(0,t.jsx)(V.Button,{onClick:()=>{3===l&&!1===n.usingAtCompany?r(1):r(l-1)},disabled:d,icon:(0,t.jsx)(aj.default,{className:"h-4 w-4"}),children:"Back"}),(0,t.jsxs)(V.Button,{type:"primary",onClick:()=>{1===l&&!1===n.usingAtCompany?r(3):l<5?r(l+1):u()},disabled:!(1===l?null!==n.usingAtCompany:2===l?n.companyName.trim().length>0:3===l?""!==n.startDate:4===l?n.reasons.includes("other")?n.reasons.length>0&&n.otherReason.trim().length>0:n.reasons.length>0:5===l)||d,loading:d,className:"min-w-[100px]",children:[g?"Submit":"Next",!g&&(0,t.jsx)(ay.ArrowRight,{className:"ml-2 h-4 w-4"})]})]})]})]})]})}var av=e.i(758472);function aN({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ah,{onOpen:e,onDismiss:s,isVisible:a,title:"Claude Code Feedback",description:"Help us improve your Claude Code experience with LiteLLM! Share your feedback in 4 quick questions.",buttonText:"Share feedback",icon:av.Code,accentColor:"#7c3aed",buttonStyle:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"}})}function aw({isOpen:e,onClose:s,onComplete:a}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-md bg-white rounded-xl shadow-2xl overflow-hidden transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-purple-600",children:[(0,t.jsx)(av.Code,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Claude Code Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"p-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Help us improve your experience"}),(0,t.jsx)("p",{className:"text-gray-600 mb-6",children:"We'd love to hear about your experience using LiteLLM with Claude Code. Your feedback helps us improve the product for everyone."}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-6",children:"This brief survey takes about 2-3 minutes to complete."}),(0,t.jsx)(V.Button,{type:"primary",size:"large",block:!0,onClick:()=>{window.open("https://forms.gle/LZeJQ3XytBakckYa9","_blank","noopener,noreferrer"),a()},icon:(0,t.jsx)(tq.ExternalLink,{className:"h-4 w-4"}),style:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"},children:"Open Feedback Form"})]})]})]}):null}var ak=e.i(345244),aC=e.i(662316),aS=e.i(208075),aT=e.i(735042),aI=e.i(693569),aF=e.i(263147),aL=e.i(954616),aA=e.i(912598);let aP=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"DELETE",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}};var aM=e.i(152990),aD=e.i(682830),aE=e.i(657150),aE=aE,az=e.i(302202),aO=e.i(446891);let aR=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};var aB=e.i(21548),aq=e.i(573421),a$=e.i(516430),aE=aE,aU=e.i(823429),aU=aU,sR=sR,aV=e.i(304911),aH=e.i(289793),aG=e.i(500727),aE=aE,aK=e.i(168118);let{TextArea:aW}=C.Input;function aQ({form:e,isNameDisabled:s=!1}){let{data:a}=(0,aH.useAgents)(),{data:l}=(0,aG.useMCPServers)(),r=a?.agents??[],i=[{key:"1",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aK.InfoIcon,{size:16}),"General Info"]}),children:(0,t.jsxs)("div",{style:{paddingTop:16},children:[(0,t.jsx)(w.Form.Item,{name:"name",label:"Group Name",rules:[{required:!0,message:"Please enter the access group name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g. Engineering Team",disabled:s})}),(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(aW,{rows:4,placeholder:"Describe the purpose of this access group..."})})]})},{key:"2",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(sz,{size:16}),"Models"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"modelIds",label:"Allowed Models",children:(0,t.jsx)(sY.ModelSelect,{context:"global",value:e.getFieldValue("modelIds")??[],onChange:t=>e.setFieldsValue({modelIds:t}),style:{width:"100%"}})})})},{key:"3",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(az.ServerIcon,{size:16}),"MCP Servers"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"mcpServerIds",label:"Allowed MCP Servers",children:(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"Select MCP servers",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:(l??[]).map(e=>({label:e.server_name??e.server_id,value:e.server_id}))})})})},{key:"4",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aE.default,{size:16}),"Agents"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"agentIds",label:"Allowed Agents",children:(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"Select agents",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:r.map(e=>({label:e.agent_name,value:e.agent_id}))})})})}];return(0,t.jsx)(w.Form,{form:e,layout:"vertical",name:"access_group_form",initialValues:{modelIds:[],mcpServerIds:[],agentIds:[]},children:(0,t.jsx)(t5.Tabs,{defaultActiveKey:"1",items:i})})}let aY=async(e,t,s)=>{let a=(0,N.getProxyBaseUrl)(),l=`${a}/v1/access_group/${encodeURIComponent(t)}`,r=await fetch(l,{method:"PUT",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){let e=await r.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return r.json()};function aJ({visible:e,accessGroup:s,onCancel:a,onSuccess:l}){let[r]=w.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async({accessGroupId:t,params:s})=>{if(!e)throw Error("Access token is required");return aY(e,t,s)},onSuccess:(e,{accessGroupId:s})=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all}),t.invalidateQueries({queryKey:aF.accessGroupKeys.detail(s)})}})})();return(0,i.useEffect)(()=>{e&&s&&r.setFieldsValue({name:s.access_group_name,description:s.description??"",modelIds:s.access_model_names??[],mcpServerIds:s.access_mcp_server_ids??[],agentIds:s.access_agent_ids??[]})},[e,s,r]),(0,t.jsx)(y.Modal,{title:"Edit Access Group",open:e,onOk:()=>{r.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};n.mutate({accessGroupId:s.access_group_id,params:t},{onSuccess:()=>{A.default.success("Access group updated successfully"),l?.(),a()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:a,width:700,okText:"Save Changes",cancelText:"Cancel",confirmLoading:n.isPending,destroyOnHidden:!0,children:(0,t.jsx)(aQ,{form:r})})}let{Title:aX,Text:aZ}=sP.Typography,{Content:a0}=sI.Layout;function a1({accessGroupId:e,onBack:s}){let{data:a,isLoading:l}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aA.useQueryClient)();return(0,t1.useQuery)({queryKey:aF.accessGroupKeys.detail(e),queryFn:async()=>aR(t,e),enabled:!!(t&&e)&&eN.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(aF.accessGroupKeys.list({}));return t?.find(t=>t.access_group_id===e)}})})(e),{token:r}=sA.theme.useToken(),[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1);if(l)return(0,t.jsx)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:(0,t.jsx)(sT.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!a)return(0,t.jsxs)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aB.Empty,{description:"Access group not found"})]});let p=a.access_model_names??[],x=a.access_mcp_server_ids??[],h=a.access_agent_ids??[],g=a.assigned_key_ids??[],y=a.assigned_team_ids??[],j=d?g:g.slice(0,5),f=m?y:y.slice(0,5),b=[{key:"models",label:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sz,{size:16}),"Models",(0,t.jsx)(I.Tag,{style:{marginInlineEnd:0},children:p?.length})]}),children:p?.length>0?(0,t.jsx)(aq.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:p,renderItem:e=>(0,t.jsx)(aq.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No models assigned to this group"})},{key:"mcp",label:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(az.ServerIcon,{size:16}),"MCP Servers",(0,t.jsx)(I.Tag,{children:x?.length})]}),children:x?.length>0?(0,t.jsx)(aq.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:x,renderItem:e=>(0,t.jsx)(aq.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No MCP servers assigned to this group"})},{key:"agents",label:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aE.default,{size:16}),"Agents",(0,t.jsx)(I.Tag,{children:h?.length})]}),children:h?.length>0?(0,t.jsx)(aq.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:h,renderItem:e=>(0,t.jsx)(aq.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No agents assigned to this group"})}];return(0,t.jsxs)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(aX,{level:2,style:{margin:0},children:a.access_group_name}),(0,t.jsxs)(aZ,{type:"secondary",children:["ID: ",(0,t.jsx)(aZ,{copyable:!0,children:a.access_group_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aU.default,{size:16}),onClick:()=>{o(!0)},children:"Edit Access Group"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Group Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:a.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(a.created_at).toLocaleString(),a.created_by&&(0,t.jsxs)(aZ,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:a.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(a.updated_at).toLocaleString(),a.updated_by&&(0,t.jsxs)(aZ,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:a.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD.KeyIcon,{size:16}),"Attached Keys",(0,t.jsx)(I.Tag,{children:g?.length})]}),extra:g?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),children:d?"Show Less":`View All (${g?.length})`}):null,children:g?.length>0?(0,t.jsx)(sT.Flex,{wrap:"wrap",gap:8,children:j.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aZ,{code:!0,style:{fontSize:12},children:e.length>20?`${e.slice(0,10)}...${e.slice(-6)}`:e})},e))}):(0,t.jsx)(aB.Empty,{description:"No keys attached",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sR.default,{size:16}),"Attached Teams",(0,t.jsx)(I.Tag,{children:y?.length})]}),extra:y?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>u(!m),children:m?"Show Less":`View All (${y?.length})`}):null,children:y?.length>0?(0,t.jsx)(sT.Flex,{wrap:"wrap",gap:8,children:f.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aZ,{code:!0,style:{fontSize:12},children:e})},e))}):(0,t.jsx)(aB.Empty,{description:"No teams attached",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ts.Card,{children:(0,t.jsx)(t5.Tabs,{defaultActiveKey:"models",items:b})}),(0,t.jsx)(aJ,{visible:n,accessGroup:a,onCancel:()=>o(!1)})]})}let a2=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group`,l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};function a4({visible:e,onCancel:s,onSuccess:a}){let[l]=w.Form.useForm(),r=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return a2(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all})}})})();return(0,t.jsx)(y.Modal,{title:"Create Access Group",open:e,onOk:()=>{l.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};r.mutate(t,{onSuccess:()=>{A.default.success("Access group created successfully"),l.resetFields(),a?.(),s()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:s,width:700,okText:"Create Group",cancelText:"Cancel",confirmLoading:r.isPending,destroyOnClose:!0,children:(0,t.jsx)(aQ,{form:l})})}let{Title:a5,Text:a6}=sP.Typography,{Content:a3}=sI.Layout;function a8(e){return{id:e.access_group_id,name:e.access_group_name,description:e.description??"",modelIds:e.access_model_names,mcpServerIds:e.access_mcp_server_ids,agentIds:e.access_agent_ids,keyIds:e.assigned_key_ids,teamIds:e.assigned_team_ids,createdAt:e.created_at,createdBy:e.created_by??"",updatedAt:e.updated_at,updatedBy:e.updated_by??""}}function a7(){let{token:e}=sA.theme.useToken(),{data:s,isLoading:a}=(0,aF.useAccessGroups)(),l=(0,i.useMemo)(()=>(s??[]).map(a8),[s]),[r,n]=(0,i.useState)(null),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[u,p]=(0,i.useState)(1),[x,h]=(0,i.useState)([]),[g,y]=(0,i.useState)(null),j=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return aP(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all})}})})();(0,i.useEffect)(()=>{p(1)},[c]);let b=(0,i.useMemo)(()=>l.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())||e.description.toLowerCase().includes(c.toLowerCase())),[l,c]),_=(0,i.useMemo)(()=>[{id:"id",accessorKey:"id",header:()=>(0,t.jsx)("span",{children:"ID"}),enableSorting:!1,size:170,cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.id,children:(0,t.jsx)(a6,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>n(s.id),children:s.id})})}},{id:"name",accessorKey:"name",header:()=>(0,t.jsx)("span",{children:"Name"}),enableSorting:!0,cell:({getValue:e})=>e()},{id:"resources",header:()=>(0,t.jsx)("span",{children:"Resources"}),enableSorting:!1,cell:({row:e})=>{let s=e.original,a=s.modelIds??[],l=s.mcpServerIds??[],r=s.agentIds??[];return(0,t.jsxs)(sT.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a?.length} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sz,{size:14}),a?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${l?.length} MCP Servers`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(az.ServerIcon,{size:14}),l?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${r?.length} Agents`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aE.default,{size:14}),r?.length]})})})]})}},{id:"createdAt",accessorKey:"createdAt",header:()=>(0,t.jsx)("span",{children:"Created"}),enableSorting:!0,sortingFn:"datetime",cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["lg"]}},{id:"updatedAt",accessorKey:"updatedAt",header:()=>(0,t.jsx)("span",{children:"Updated"}),enableSorting:!1,cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["xl"]}},{id:"actions",header:()=>(0,t.jsx)("span",{children:"Actions"}),enableSorting:!1,cell:({row:e})=>(0,t.jsx)(U.Space,{children:(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete access group",onClick:()=>y(e.original)})})}],[]),v=(0,aM.useReactTable)({data:b,columns:_,state:{sorting:x},onSortingChange:h,getCoreRowModel:(0,aD.getCoreRowModel)(),getSortedRowModel:(0,aD.getSortedRowModel)(),getRowId:e=>e.id}),N=v.getRowModel().rows,w=N.slice((u-1)*10,10*u),k=(0,i.useMemo)(()=>new Map(w.map(e=>[e.original.id,e])),[w]),S=(v.getHeaderGroups()[0]?.headers??[]).map(e=>{let s=e.column.getCanSort(),a=e.column.getIsSorted(),l=e.column.columnDef.meta,r={title:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[e.isPlaceholder?null:(0,aM.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)(aO.TableHeaderSortDropdown,{sortState:!1!==a&&a,onSortChange:t=>{h(!1===t?[]:[{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),key:e.id,width:e.column.columnDef.size,render:(t,s)=>{let a=k.get(s.id);if(!a)return null;let l=a.getVisibleCells().find(t=>t.column.id===e.id);return l?(0,aM.flexRender)(l.column.columnDef.cell,l.getContext()):null}};return l?.responsive&&(r.responsive=l.responsive),r}),T=w.map(e=>e.original);return r?(0,t.jsx)(a1,{accessGroupId:r,onBack:()=>n(null)}):(0,t.jsxs)(a3,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(a5,{level:2,style:{margin:0},children:"Access Groups"}),(0,t.jsx)(a6,{type:"secondary",children:"Manage resource permissions for your organization"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>d(!0),children:"Create Access Group"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sO.SearchIcon,{size:16}),placeholder:"Search groups by name, ID, or description...",style:{maxWidth:400},value:c,onChange:e=>m(e.target.value),allowClear:!0}),(0,t.jsx)(sF.Pagination,{current:u,total:N?.length,pageSize:10,onChange:e=>p(e),size:"small",showTotal:e=>`${e} groups`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:S,dataSource:T,rowKey:"id",loading:a,pagination:!1})]}),(0,t.jsx)(a4,{visible:o,onCancel:()=>d(!1)}),(0,t.jsx)(sQ.default,{isOpen:!!g,title:"Delete Access Group",message:"Are you sure you want to delete this access group? This action cannot be undone.",resourceInformationTitle:"Access Group Information",resourceInformation:[{label:"ID",value:g?.id,code:!0},{label:"Name",value:g?.name},{label:"Description",value:g?.description||"—"}],onCancel:()=>y(null),onOk:()=>{g&&j.mutate(g.id,{onSuccess:()=>{y(null)}})},confirmLoading:j.isPending})]})}var a9=e.i(510674);let le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"};var lt=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:le}))});let ls=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/project/new`,l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};function la({form:e}){let{accessToken:s,userId:a,userRole:l}=(0,R.default)(),{data:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),m=w.Form.useWatch("team_id",e);return(0,i.useEffect)(()=>{if(m&&r){let e=r.find(e=>e.team_id===m)??null;e&&e.team_id!==n?.team_id&&o(e)}},[m,r,n?.team_id]),(0,i.useEffect)(()=>{a&&l&&s&&n?(0,s0.fetchTeamModels)(a,l,s,n.team_id).then(e=>{c(Array.from(new Set([...n.models??[],...e])))}):c([])},[n,s,a,l]),(0,t.jsxs)(w.Form,{form:e,layout:"vertical",name:"project_form",initialValues:{isBlocked:!1},style:{marginTop:24},children:[(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{fontSize:13,color:"#374151",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Basic Information"}),(0,t.jsx)(F.Divider,{style:{marginTop:8,marginBottom:16}}),(0,t.jsxs)(t_.Row,{gutter:24,children:[(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"project_alias",label:"Project Name",rules:[{required:!0,message:"Please enter a project name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g. Customer Support Bot"})})}),(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"team_id",label:"Team",rules:[{required:!0,message:"Please select a team"}],children:(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Search or select a team",onChange:t=>{o(r?.find(e=>e.team_id===t)??null),e.setFieldValue("models",[])},allowClear:!0,optionLabelProp:"label",filterOption:(e,t)=>{let s=r?.find(e=>e.team_id===t?.value);if(!s)return!1;let a=e.toLowerCase().trim();return(s.team_alias||"").toLowerCase().includes(a)||s.team_id.toLowerCase().includes(a)},children:r?.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,label:e.team_alias||e.team_id,children:[(0,t.jsx)("span",{style:{fontWeight:500},children:e.team_alias})," ",(0,t.jsxs)("span",{style:{color:"#9ca3af"},children:["(",e.team_id,")"]})]},e.team_id))})})})]}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(C.Input.TextArea,{placeholder:"Describe the purpose of this project",rows:3})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(w.Form.Item,{name:"models",label:"Allowed Models (scoped to selected team's models)",help:n?void 0:"Select a team first to see available models",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:n?"Select models":"Select a team first",disabled:!n,allowClear:!0,maxTagCount:"responsive",onChange:t=>{t.includes("all-team-models")&&e.setFieldsValue({models:["all-team-models"]})},children:[(0,t.jsx)(k.Select.Option,{value:"all-team-models",children:"All Team Models"},"all-team-models"),d.map(e=>(0,t.jsx)(k.Select.Option,{value:e,children:(0,B.getModelDisplayName)(e)},e))]})})})}),(0,t.jsx)(t_.Row,{gutter:24,children:(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,t.jsx)(L.InputNumber,{prefix:"$",style:{width:"100%"},placeholder:"0.00",min:0,precision:2})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)($.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"1",label:(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{color:"#374151"},children:"Advanced Settings"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sT.Flex,{align:"center",gap:12,children:[(0,t.jsx)(sP.Typography.Text,{strong:!0,children:"Block Project"}),(0,t.jsx)(w.Form.Item,{name:"isBlocked",valuePropName:"checked",noStyle:!0,children:(0,t.jsx)(_.Switch,{})})]}),(0,t.jsx)(w.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.isBlocked!==t.isBlocked,children:({getFieldValue:e})=>e("isBlocked")?(0,t.jsx)(j.Alert,{banner:!0,type:"warning",showIcon:!0,message:"All API requests using keys under this project will be rejected.",style:{marginTop:12}}):null}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Model-Specific Limits"}),(0,t.jsx)(w.Form.List,{name:"modelLimits",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(w.Form.Item,{...r,name:[a,"model"],rules:[{required:!0,message:"Missing model"},{validator:(t,s)=>s&&(e.getFieldValue("modelLimits")??[]).filter(e=>e?.model===s).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],children:(0,t.jsx)(C.Input,{placeholder:"Model name (e.g. gpt-4)"})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"tpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"rpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(w.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Model Limit"})})]})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Metadata"}),(0,t.jsx)(w.Form.List,{name:"metadata",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(w.Form.Item,{...r,name:[a,"key"],rules:[{required:!0,message:"Missing key"},{validator:(t,s)=>s&&(e.getFieldValue("metadata")??[]).filter(e=>e?.key===s).length>1?Promise.reject(Error("Duplicate key")):Promise.resolve()}],children:(0,t.jsx)(C.Input,{placeholder:"Key"})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"value"],rules:[{required:!0,message:"Missing value"}],children:(0,t.jsx)(C.Input,{placeholder:"Value"})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(w.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Key-Value Pair"})})]})})]})}]})})})]})}function ll(e){let t={},s={};for(let a of e.modelLimits??[])a.model&&(null!=a.rpm&&(t[a.model]=a.rpm),null!=a.tpm&&(s[a.model]=a.tpm));let a={};for(let t of e.metadata??[])t.key&&(a[t.key]=t.value);return{project_alias:e.project_alias,description:e.description,models:e.models??[],max_budget:e.max_budget,blocked:e.isBlocked??!1,...Object.keys(t).length>0&&{model_rpm_limit:t},...Object.keys(s).length>0&&{model_tpm_limit:s},...Object.keys(a).length>0&&{metadata:a}}}function lr({isOpen:e,onClose:s}){let[a]=w.Form.useForm(),l=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return ls(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:a9.projectKeys.all})}})})(),r=async()=>{try{let e=await a.validateFields(),t={...ll(e),team_id:e.team_id};l.mutate(t,{onSuccess:()=>{A.default.success("Project created successfully"),a.resetFields(),s()},onError:e=>{A.default.error(e.message||"Failed to create project")}})}catch(e){console.error("Validation failed:",e)}},i=()=>{a.resetFields(),s()};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{fontSize:18},children:"Create New Project"}),open:e,onCancel:i,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:i,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(lt,{}),loading:l.isPending,onClick:r,children:"Create Project"},"submit")],children:(0,t.jsx)(la,{form:a})})}let li=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/project/info?project_id=${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()},ln=(0,sE.default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var aU=aU,sR=sR,lo=e.i(987432);let ld=async(e,t,s)=>{let a=(0,N.getProxyBaseUrl)(),l=`${a}/project/update`,r=await fetch(l,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({project_id:t,...s})});if(!r.ok){let e=await r.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return r.json()};function lc({isOpen:e,project:s,onClose:a,onSuccess:l}){let[r]=w.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async({projectId:t,params:s})=>{if(!e)throw Error("Access token is required");return ld(e,t,s)},onSuccess:()=>{t.invalidateQueries({queryKey:a9.projectKeys.all})}})})();(0,i.useEffect)(()=>{if(e&&s){let e=s.metadata??{},t=e.model_rpm_limit??{},a=e.model_tpm_limit??{},l=[];for(let e of new Set([...Object.keys(t),...Object.keys(a)]))l.push({model:e,rpm:t[e],tpm:a[e]});let i=new Set(["model_rpm_limit","model_tpm_limit"]),n=[];for(let[t,s]of Object.entries(e))i.has(t)||n.push({key:t,value:String(s)});r.setFieldsValue({project_alias:s.project_alias??"",team_id:s.team_id??"",description:s.description??"",models:s.models??[],max_budget:s.litellm_budget_table?.max_budget??void 0,isBlocked:s.blocked,modelLimits:l.length>0?l:void 0,metadata:n.length>0?n:void 0})}},[e,s,r]);let o=async()=>{try{let e=await r.validateFields(),t={...ll(e),team_id:e.team_id};n.mutate({projectId:s.project_id,params:t},{onSuccess:()=>{A.default.success("Project updated successfully"),l?.(),a()},onError:e=>{A.default.error(e.message||"Failed to update project")}})}catch(e){console.error("Validation failed:",e)}};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{fontSize:18},children:"Edit Project"}),open:e,onCancel:a,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:a,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(lo.SaveOutlined,{}),loading:n.isPending,onClick:o,children:"Save Changes"},"submit")],children:(0,t.jsx)(la,{form:r})})}let{Title:lm,Text:lu}=sP.Typography,{Content:lp}=sI.Layout;function lx({projectId:e,onBack:s}){let a,l,r,n,{data:o,isLoading:d}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aA.useQueryClient)();return(0,t1.useQuery)({queryKey:a9.projectKeys.detail(e),queryFn:async()=>li(t,e),enabled:!!(t&&e)&&eN.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(a9.projectKeys.list({}));return t?.find(t=>t.project_id===e)}})})(e),{data:c}=(0,eV.useTeam)(o?.team_id??void 0),m=c?.team_info??c,{token:u}=sA.theme.useToken(),[p,x]=(0,i.useState)(!1),h=o?.spend??0,g=o?.litellm_budget_table?.max_budget??null,y=null!=g&&g>0,j=y?Math.min(h/g*100,100):0,f=(0,i.useMemo)(()=>Object.entries(o?.model_spend??{}).map(([e,t])=>({model:e,spend:t})).sort((e,t)=>t.spend-e.spend),[o?.model_spend]);return d?(0,t.jsx)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:(0,t.jsx)(sT.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"large"})})}):o?(0,t.jsxs)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(lm,{level:2,style:{margin:0},children:o.project_alias??o.project_id}),(0,t.jsx)(I.Tag,{color:o.blocked?"red":"green",children:o.blocked?"Blocked":"Active"})]}),(0,t.jsxs)(lu,{type:"secondary",children:["ID: ",(0,t.jsx)(lu,{copyable:!0,children:o.project_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aU.default,{size:16}),onClick:()=>x(!0),children:"Edit Project"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Project Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:o.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(o.created_at).toLocaleString(),o.created_by&&(0,t.jsxs)(lu,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:o.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(o.updated_at).toLocaleString(),o.updated_by&&(0,t.jsxs)(lu,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:o.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:8,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(ln,{size:16}),"Budget"]}),style:{height:"100%"},children:(0,t.jsxs)(sT.Flex,{vertical:!0,gap:16,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(lu,{strong:!0,style:{fontSize:28,lineHeight:1},children:["$",h.toFixed(2)]}),(0,t.jsx)("br",{}),(0,t.jsx)(lu,{type:"secondary",children:y?`of $${g.toFixed(2)} budget`:"No budget limit"})]}),y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(sL.Progress,{percent:Math.round(10*j)/10,strokeColor:j>=90?"#f5222d":j>=70?"#faad14":"#52c41a",showInfo:!1}),(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[(Math.round(10*j)/10).toFixed(1),"% utilized"]})]})]})})}),(0,t.jsx)(tv.Col,{xs:24,lg:16,children:(0,t.jsx)(ts.Card,{title:"Spend by Model",style:{height:"100%"},children:f.length>0?(0,t.jsx)(sd.BarChart,{data:f,index:"model",categories:["spend"],colors:["cyan"],layout:"vertical",valueFormatter:e=>`$${e.toFixed(4)}`,yAxisWidth:140,showLegend:!1,style:{height:Math.max(40*f.length,120)}}):(0,t.jsx)(aB.Empty,{description:"No model spend recorded yet",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD.KeyIcon,{size:16}),"Keys"]}),style:{height:"100%"},children:(0,t.jsx)(aB.Empty,{description:"No keys to display",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sR.default,{size:16}),"Team"]}),style:{height:"100%"},children:m?(a=m.max_budget??null,l=m.spend??0,n=(r=null!=a&&a>0)?Math.min(l/a*100,100):0,(0,t.jsxs)(sT.Flex,{vertical:!0,gap:12,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lu,{strong:!0,style:{fontSize:16},children:m.team_alias||m.team_id}),(0,t.jsx)("br",{}),(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:["ID:"," ",(0,t.jsx)(lu,{copyable:!0,style:{fontSize:12},children:m.team_id})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"Models"}),(m.models?.length??0)>0?(0,t.jsx)(sT.Flex,{wrap:"wrap",gap:4,style:{maxHeight:60,overflow:"hidden"},children:m.models?.map(e=>(0,t.jsx)(I.Tag,{style:{margin:0},children:e},e))}):(0,t.jsx)(lu,{type:"secondary",children:"All models"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{marginBottom:2},children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12},children:"Spend"}),(0,t.jsxs)(lu,{style:{fontSize:12},children:["$",l.toFixed(2),r?(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[" ","/ $",a.toFixed(2)]}):(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[" ","(Unlimited)"]})]})]}),r&&(0,t.jsx)(sL.Progress,{percent:Math.round(10*n)/10,strokeColor:n>=90?"#f5222d":n>=70?"#faad14":"#52c41a",size:"small",showInfo:!1})]}),(0,t.jsxs)(sT.Flex,{justify:"space-between",children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12},children:"Members"}),(0,t.jsx)(lu,{style:{fontSize:12},children:m.members_with_roles?.length??0})]})]})):o.team_id?(0,t.jsx)(sT.Flex,{justify:"center",align:"center",style:{padding:16},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"})}):(0,t.jsx)(aB.Empty,{description:"No team assigned",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(lc,{isOpen:p,project:o,onClose:()=>x(!1)})]}):(0,t.jsxs)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aB.Empty,{description:"Project not found"})]})}let{Title:lh,Text:lg}=sP.Typography,{Content:ly}=sI.Layout;function lj(){let{token:e}=sA.theme.useToken(),{data:s,isLoading:a}=(0,a9.useProjects)(),{data:l,isLoading:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(""),[p,x]=(0,i.useState)(1);(0,i.useEffect)(()=>{x(1)},[m]);let h=(0,i.useMemo)(()=>{let e=new Map;for(let t of l??[])e.set(t.team_id,t.team_alias??t.team_id);return e},[l]),g=(0,i.useMemo)(()=>{let e=s??[];if(!m)return e;let t=m.toLowerCase();return e.filter(e=>{let s=h.get(e.team_id??"")??"";return(e.project_alias??"").toLowerCase().includes(t)||e.project_id.toLowerCase().includes(t)||(e.description??"").toLowerCase().includes(t)||s.toLowerCase().includes(t)})},[s,m,h]),y=[{title:"ID",dataIndex:"project_id",key:"project_id",width:170,render:e=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(lg,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>o(e),children:e})})},{title:"Name",dataIndex:"project_alias",key:"project_alias",sorter:(e,t)=>(e.project_alias??"").localeCompare(t.project_alias??""),render:e=>e??"—"},{title:"Team",key:"team",sorter:(e,t)=>{let s=h.get(e.team_id??"")??"",a=h.get(t.team_id??"")??"";return s.localeCompare(a)},render:(e,s)=>{if(!s.team_id)return"—";let a=h.get(s.team_id);return a||(r?(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"}):s.team_id)}},{title:"Models",key:"models",render:(e,s)=>{let a=s.models??[];return(0,t.jsx)(f.Tooltip,{title:a.length>0?a.join(", "):"No models",children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sz,{size:14}),a.length]})})})}},{title:"Status",dataIndex:"blocked",key:"status",render:e=>(0,t.jsx)(I.Tag,{color:e?"red":"green",children:e?"Blocked":"Active"})},{title:"Created",dataIndex:"created_at",key:"created_at",sorter:(e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime(),responsive:["lg"],render:e=>new Date(e).toLocaleDateString()},{title:"Updated",dataIndex:"updated_at",key:"updated_at",responsive:["xl"],render:e=>new Date(e).toLocaleDateString()}];return n?(0,t.jsx)(lx,{projectId:n,onBack:()=>o(null)}):(0,t.jsxs)(ly,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(lh,{level:2,style:{margin:0},children:"Projects"}),(0,t.jsx)(lg,{type:"secondary",children:"Manage projects within your teams"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>c(!0),children:"Create Project"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sO.SearchIcon,{size:16}),placeholder:"Search projects by name, ID, description, or team...",style:{maxWidth:400},value:m,onChange:e=>u(e.target.value),allowClear:!0}),(0,t.jsx)(sF.Pagination,{current:p,total:g.length,pageSize:10,onChange:e=>x(e),size:"small",showTotal:e=>`${e} projects`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:y,dataSource:g.slice((p-1)*10,10*p),rowKey:"project_id",loading:a,pagination:!1})]}),(0,t.jsx)(lr,{isOpen:d,onClose:()=>c(!1)})]})}var lf=e.i(241902);let lb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"};var l_=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:lb}))}),lv=e.i(366308);let lN=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"},{value:"blocked",label:"blocked",color:"#991b1b",bg:"#fee2e2",border:"#fca5a5"}],lw=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"}],lk=({value:e,toolName:s,saving:a,onChange:l,policyType:r="input",size:i="small",minWidth:n=110,stopPropagation:o=!0})=>{let d="output"===r?lw:lN,c=lN.find(t=>t.value===e)??lN[0];return(0,t.jsx)(k.Select,{size:i,value:e,disabled:a,loading:a,onChange:e=>l(s,e),onClick:e=>o&&e.stopPropagation(),style:{minWidth:n,fontWeight:500,backgroundColor:c.bg,borderColor:c.border,color:c.color,borderRadius:999,fontSize:"small"===i?11:12},popupMatchSelectWidth:!1,options:d.map(e=>({value:e.value,label:(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:e.color},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,display:"inline-block",flexShrink:0}}),e.label]})}))})},lC="tool-detail";function lS({toolName:e,onBack:s,accessToken:a}){let l=(0,aA.useQueryClient)(),[r,n]=(0,i.useState)(!1),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)("team"),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(null),j=(0,i.useMemo)(()=>{let e,t,s;return e=new Date,(t=new Date).setDate(t.getDate()-90),{start:(s=e=>e.toISOString().slice(0,19).replace("T"," "))(t),end:s(e)}},[]),{data:f,isLoading:b,error:_}=(0,t1.useQuery)({queryKey:[lC,e],queryFn:()=>(0,N.fetchToolDetail)(a,e),enabled:!!a&&!!e}),{data:v}=(0,t1.useQuery)({queryKey:["tool-policy-options"],queryFn:()=>(0,N.fetchToolPolicyOptions)(a),enabled:!!a,staleTime:6e4}),{data:w}=(0,t1.useQuery)({queryKey:["teams-list-tool-detail"],queryFn:()=>(0,N.teamListCall)(a,null,null),enabled:!!a}),{data:C}=(0,t1.useQuery)({queryKey:["keys-list-tool-detail"],queryFn:()=>(0,N.keyListCall)(a,null,null,null,null,null,1,100),enabled:!!a}),{data:S,isLoading:T}=(0,t1.useQuery)({queryKey:["tool-usage-logs",e,j.start,j.end],queryFn:()=>(0,N.getToolUsageLogs)(a,e,{page:1,pageSize:50,startDate:j.start,endDate:j.end}),enabled:!!a&&!!e}),I=(0,i.useMemo)(()=>(S?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:"passed",model:e.model??void 0,input_snippet:e.input_snippet??void 0})),[S?.logs]);(0,i.useMemo)(()=>(Array.isArray(w)?w:w?.data??[]).map(e=>({team_id:e.team_id??e.id??"",team_alias:e.team_alias??e.team_id??"",models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:"",created_at:"",keys:[],members_with_roles:[],spend:0})),[w]);let F=(0,i.useMemo)(()=>(C?.keys??C?.data??[]).map(e=>({token:e.token??e.api_key??e.key_hash??"",key_alias:e.key_alias??(e.token??e.api_key??e.key_hash)?.toString?.()?.substring?.(0,8)})),[C]),L=(0,i.useCallback)(()=>{l.invalidateQueries({queryKey:[lC,e]})},[l,e]),A=(0,i.useCallback)(async(t,s)=>{if(a){d(!0);try{await (0,N.updateToolPolicy)(a,e,{input_policy:s}),L()}catch(e){alert(`Failed to update input policy: ${e instanceof Error?e.message:String(e)}`)}finally{d(!1)}}},[a,e,L]),P=(0,i.useCallback)(async(t,s)=>{if(a){m(!0);try{await (0,N.updateToolPolicy)(a,e,{output_policy:s}),L()}catch(e){alert(`Failed to update output policy: ${e instanceof Error?e.message:String(e)}`)}finally{m(!1)}}},[a,e,L]),M=(0,i.useCallback)(async()=>{if(!a||!e)return;let t="team"===u;if((!t||x)&&(t||g?.token)){n(!0);try{await (0,N.updateToolPolicy)(a,e,{input_policy:"blocked"},{team_id:t?x:void 0,key_hash:t?void 0:g.token,key_alias:t?void 0:g.key_alias}),L(),h(null),y(null)}catch(e){alert(`Failed to add override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,u,x,g,L]),D=(0,i.useCallback)(async t=>{if(a&&e){n(!0);try{await (0,N.deleteToolPolicyOverride)(a,e,{team_id:t.team_id??void 0,key_hash:t.key_hash??void 0}),L()}catch(e){alert(`Failed to remove override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,L]);if(b&&!f)return(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})});if(_&&!f)return(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load tool details."})]});if(!f)return null;let{tool:E,overrides:z}=f,O=v?.input_policies?.find(e=>e.value===E.input_policy)?.description,R=v?.output_policies?.find(e=>e.value===E.output_policy)?.description;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[(0,t.jsx)(lv.ToolOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900 font-mono",children:E.tool_name}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-gray-100 text-gray-700 border border-gray-200",children:E.origin??"—"}),(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:[(E.call_count??0).toLocaleString()," calls"]})]}),(0,t.jsxs)("dl",{className:"mt-3 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-600",children:[E.user_agent&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"User Agent:"}),(0,t.jsx)("dd",{className:"font-mono truncate max-w-[40ch]",title:E.user_agent,children:E.user_agent})]}),E.created_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"First Discovered:"}),(0,t.jsx)("dd",{children:new Date(E.created_at).toLocaleString()})]}),E.last_used_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"Last Used:"}),(0,t.jsx)("dd",{children:new Date(E.last_used_at).toLocaleString()})]})]})]})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Input Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:O??"Controls what data this tool is allowed to accept."}),(0,t.jsx)(lk,{value:E.input_policy,toolName:E.tool_name,saving:o,onChange:A,policyType:"input",size:"middle",minWidth:140,stopPropagation:!1})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Output Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:R??"Controls how this tool's output is trusted by downstream tools."}),(0,t.jsx)(lk,{value:E.output_policy,toolName:E.tool_name,saving:c,onChange:P,policyType:"output",size:"middle",minWidth:140,stopPropagation:!1})]})]}),z.length>0&&(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Blocked for team or key"}),(0,t.jsx)("ul",{className:"border rounded-md divide-y divide-gray-100 bg-red-50/30",children:z.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between px-3 py-2.5 text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-700",children:[e.team_id?`Team: ${e.team_id}`:"",e.team_id&&e.key_hash?" · ":"",e.key_hash?`Key: ${e.key_alias||e.key_hash.substring(0,8)}`:"",e.team_id||e.key_hash?"":"—"]}),(0,t.jsx)(V.Button,{type:"link",danger:!0,size:"small",disabled:r,onClick:()=>D(e),children:"Remove"})]},e.override_id))})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Block for team or key"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 max-w-md",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Scope"}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"team"===u,onChange:()=>p("team"),className:"align-middle"}),"Team"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"key"===u,onChange:()=>p("key"),className:"align-middle"}),"Key"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"team"===u?"Team":"Key"}),"team"===u?(0,t.jsx)(q.default,{value:x??void 0,onChange:e=>h(e||null)}):(0,t.jsx)(k.Select,{placeholder:"Select key",allowClear:!0,showSearch:!0,optionFilterProp:"label",value:g?g.token:void 0,onChange:e=>{y(F.find(t=>t.token===e)??null)},options:F.map(e=>({value:e.token,label:e.key_alias||e.token?.substring?.(0,12)||e.token})),className:"w-full",style:{minWidth:200}})]}),(0,t.jsxs)(V.Button,{type:"primary",danger:!0,disabled:r||("team"===u?!x:!g?.token),loading:r,onClick:M,children:["Block for ",u]})]})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2",children:[(0,t.jsx)(l_,{}),"Recent logs"]}),(0,t.jsx)(sa,{guardrailName:E.tool_name,filterAction:"passed",logs:I,logsLoading:T,totalLogs:S?.total??0,accessToken:a,startDate:j.start,endDate:j.end})]})]})]})}var lT=e.i(307582),lI=e.i(969550);function lF(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`}function lL(e,t){if(!e)return!1;try{let s=new Date(e);return lF(s)===t}catch{return!1}}function lA(e,t){return e.filter(e=>lL(e.created_at,t)).length}let lP=({accessToken:e,onSelectTool:s})=>{let[a,l]=(0,i.useState)([]),[r,n]=(0,i.useState)(!0),[o,h]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[j,b]=(0,i.useState)(null),[v,w]=(0,i.useState)(null),[k,C]=(0,i.useState)(""),[S,T]=(0,i.useState)("created_at"),[I,F]=(0,i.useState)("desc"),[L,A]=(0,i.useState)(1),[P,M]=(0,i.useState)(!0),[D,E]=(0,i.useState)({}),z=(0,i.useDeferredValue)(o),O=o||z,R=(0,i.useCallback)(async()=>{if(e){h(!0),y(null);try{let t=await (0,N.fetchToolsList)(e);l(t)}catch(e){y(e.message??"Failed to load tools")}finally{h(!1),n(!1)}}},[e]);(0,i.useEffect)(()=>{R()},[R]),(0,i.useEffect)(()=>{if(!P)return;let e=setInterval(R,15e3);return()=>clearInterval(e)},[P,R]);let B=async(t,s)=>{if(e){b(t);try{await (0,N.updateToolPolicy)(e,t,{input_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,input_policy:s}:e))}catch(e){alert(`Failed to update input policy: ${e.message}`)}finally{b(null)}}},q=async(t,s)=>{if(e){w(t);try{await (0,N.updateToolPolicy)(e,t,{output_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,output_policy:s}:e))}catch(e){alert(`Failed to update output policy: ${e.message}`)}finally{w(null)}}},$=Array.from(new Set(a.map(e=>e.team_id).filter(Boolean))).map(e=>({label:e,value:e})),U=Array.from(new Set(a.map(e=>e.key_alias).filter(Boolean))).map(e=>({label:e,value:e})),V=[{name:"Input Policy",label:"Input Policy",options:lN.map(e=>({label:e.label,value:e.value}))},{name:"Output Policy",label:"Output Policy",options:lw.map(e=>({label:e.label,value:e.value}))},{name:"Team Name",label:"Team Name",options:$},{name:"Key Name",label:"Key Name",options:U}],{newToday:H,newYesterday:G,trendSubtitle:K,totalTools:W,blockedCount:Q,activeTeamsCount:Y,needsReviewTools:J}=(0,i.useMemo)(()=>{let e=new Date,t=lF(e),s=new Date(e);s.setUTCDate(s.getUTCDate()-1);let l=lF(s),r=lA(a,t),i=lA(a,l),n=function(e,t){let s=e-t;if(0!==s)return s>0?`+${s} since yesterday`:`${s} since yesterday`}(r,i),o=a.length,d=a.filter(e=>"blocked"===e.input_policy).length;return{newToday:r,newYesterday:i,trendSubtitle:n,totalTools:o,blockedCount:d,activeTeamsCount:new Set(a.map(e=>e.team_id).filter(Boolean)).size,needsReviewTools:a.filter(e=>lL(e.created_at,t)&&"untrusted"===e.input_policy)}},[a]),X=({label:e,field:s})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(aO.TableHeaderSortDropdown,{sortState:S===s&&I,onSortChange:e=>{!1===e?(T("created_at"),F("desc")):(T(s),F(e)),A(1)}})]}),Z=a.filter(e=>{if(k){let t=k.toLowerCase();if(!(e.tool_name.toLowerCase().includes(t)||(e.team_id??"").toLowerCase().includes(t)||(e.key_alias??"").toLowerCase().includes(t)||(e.key_hash??"").toLowerCase().includes(t)||e.input_policy.toLowerCase().includes(t)||e.output_policy.toLowerCase().includes(t)))return!1}return(!D["Input Policy"]||e.input_policy===D["Input Policy"])&&(!D["Output Policy"]||e.output_policy===D["Output Policy"])&&(!D["Team Name"]||e.team_id===D["Team Name"])&&(!D["Key Name"]||e.key_alias===D["Key Name"])}),ee=[...Z].sort((e,t)=>{let s=e[S]??"",a=t[S]??"";return sa?"desc"===I?-1:1:0}),et=Math.max(1,Math.ceil(ee.length/50)),es=ee.slice((L-1)*50,50*L);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Tool Policies"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(sl,{label:"New Today",value:H,valueColor:"text-green-600",subtitle:K,icon:(0,t.jsx)("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}),(0,t.jsx)(sl,{label:"Total Tools Discovered",value:W}),(0,t.jsx)(sl,{label:"Blocked Tools",value:Q,valueColor:Q>0?"text-red-600":void 0}),(0,t.jsx)(sl,{label:"Active Teams",value:Y>0?Y:"—"})]}),J.length>0&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-amber-900 mb-1",children:"Needs Review"}),(0,t.jsxs)("p",{className:"text-sm text-amber-800 mb-3",children:[J.length," new tool",1!==J.length?"s":""," discovered that require policy decisions."]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-white border border-amber-200 rounded-md text-sm",children:[(0,t.jsx)("span",{className:"font-mono text-amber-900 truncate max-w-[200px]",title:e.tool_name,children:e.tool_name}),(0,t.jsx)("button",{type:"button",onClick:()=>(e=>{let t=ee.findIndex(t=>t.tool_id===e);if(t>=0){let s=Math.floor(t/50)+1;s!==L&&A(s),requestAnimationFrame(()=>{setTimeout(()=>{document.getElementById(`tool-row-${e}`)?.scrollIntoView({behavior:"smooth",block:"center"})},100)})}})(e.tool_id),className:"text-amber-700 hover:text-amber-900 font-medium text-xs whitespace-nowrap",children:"Review"})]},e.tool_id))})]}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Tool Name",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:k,onChange:e=>{C(e.target.value),A(1)}}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(_.Switch,{checked:P,onChange:M})]}),(0,t.jsxs)("button",{onClick:R,disabled:O,className:"flex items-center gap-1.5 px-3 py-2 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-60",children:[(0,t.jsx)("svg",{className:`w-4 h-4 ${O?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),O?"Fetching":"Fetch"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm text-gray-600 whitespace-nowrap",children:[(0,t.jsxs)("span",{children:["Showing ",0===Z.length?0:(L-1)*50+1," -"," ",Math.min(50*L,Z.length)," of ",Z.length," results"]}),(0,t.jsxs)("span",{children:["Page ",L," of ",et]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(lI.default,{options:V,onApplyFilters:e=>{E(e),A(1)},onResetFilters:()=>{E({}),A(1)},buttonLabel:"Filters"})})]}),P&&(0,t.jsxs)("div",{className:"bg-green-50 border-b border-green-100 px-6 py-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"}),(0,t.jsx)("button",{onClick:()=>M(!1),className:"text-xs text-green-600 underline",children:"Stop"})]}),g&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:g}),(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 w-full",children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Discovered",field:"created_at"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Tool Name",field:"tool_name"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Input Policy",field:"input_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Output Policy",field:"output_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"# Calls",field:"call_count"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Team Name",field:"team_id"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"Key Hash"}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Key Name",field:"key_alias"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"User Agent"})]})}),(0,t.jsx)(c.TableBody,{children:r?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"Loading tools…"})}):0===es.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"No tools discovered yet. Make a chat completion that returns tool_calls to start auto-discovery."})}):es.map(e=>(0,t.jsxs)(x.TableRow,{id:`tool-row-${e.tool_id}`,className:"h-8 hover:bg-gray-50",children:[(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(lT.TimeCell,{utcTime:e.created_at??""})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden",children:(0,t.jsx)("button",{type:"button",onClick:()=>s?.(e.tool_name),className:"text-left w-full font-mono text-xs max-w-[20ch] truncate block font-medium text-blue-600 hover:text-blue-800 hover:underline focus:outline-none focus:ring-0",children:(0,t.jsx)(f.Tooltip,{title:s?"Click to view details and block for team/key":e.tool_name,children:(0,t.jsx)("span",{children:e.tool_name})})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lk,{value:e.input_policy,toolName:e.tool_name,saving:j===e.tool_name,onChange:B,policyType:"input"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lk,{value:e.output_policy,toolName:e.tool_name,saving:v===e.tool_name,onChange:q,policyType:"output"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)("div",{className:"flex items-center justify-end h-8 tabular-nums text-sm font-mono text-gray-700",children:(e.call_count??0).toLocaleString()})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.team_id??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.team_id??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_hash??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block text-blue-600",children:e.key_hash??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_alias??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.key_alias??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.user_agent??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[20ch] truncate block text-xs text-gray-500",children:e.user_agent??"-"})})})]},e.tool_id))})]}),et>1&&(0,t.jsxs)("div",{className:"border-t px-6 py-3 flex items-center justify-between text-sm text-gray-600",children:[(0,t.jsxs)("span",{children:["Showing ",(L-1)*50+1," - ",Math.min(50*L,ee.length)," of"," ",ee.length]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]})]})};function lM({accessToken:e,userRole:s}){let[a,l]=(0,i.useState)({type:"overview"});return(0,t.jsx)("div",{className:"p-6 w-full min-w-0 flex-1",children:"detail"===a.type?(0,t.jsx)(lS,{toolName:a.toolName,onBack:()=>{l({type:"overview"})},accessToken:e}):(0,t.jsx)(lP,{accessToken:e,userRole:s,onSelectTool:e=>{l({type:"detail",toolName:e})}})})}var lD=e.i(936190),lE=e.i(910119),lz=e.i(275144),lO=e.i(161281),lR=e.i(321836),lB=e.i(947293),lq=e.i(618566),l$=e.i(592143);function lU(e,t="/"){document.cookie=`${e}=; Max-Age=0; Path=${t}`}let lV={api_ref:"api-reference","api-reference":"api-reference"};function lH(){let[e,n]=(0,i.useState)(""),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)([]),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)([]),[v,w]=(0,i.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[k,C]=(0,i.useState)(!0),S=(0,lq.useRouter)(),T=(0,lq.useSearchParams)(),[I,F]=(0,i.useState)({data:[]}),[L,A]=(0,i.useState)(null),[P,M]=(0,i.useState)(!1),[D,E]=(0,i.useState)(!0),[z,O]=(0,i.useState)(null),[R,B]=(0,i.useState)(!0),[q,$]=(0,i.useState)(!1),[U,V]=(0,i.useState)(!1),[H,G]=(0,i.useState)(!1),[K,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(!1),J=T.get("invitation_id"),X="true"===T.get("create"),Z=(0,i.useMemo)(()=>{if(!X)return;let e=T.get("owned_by"),t=T.get("team_id"),s=T.get("key_alias"),a=T.get("models"),l=T.get("key_type");if(!e&&!t&&!s&&!a&&!l)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,i=l&&["default","llm_api","management"].includes(l)?l:void 0,n=s?s.trim().slice(0,256):void 0,o=a?a.split(",").slice(0,100).map(e=>e.trim().slice(0,256)).filter(e=>e.length>0):void 0;return{owned_by:r,team_id:t?.trim()||void 0,key_alias:n,models:o&&o.length>0?o:void 0,key_type:i}},[T,X]),[ee,et]=(0,i.useState)(()=>T.get("page")||"api-keys"),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),ei=(0,i.useRef)(!1),en=e=>{y(t=>t?[...t,e]:[e]),M(()=>!P)},eo=!1===D&&null===L&&null===J;(0,i.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,N.getUiConfig)()}catch{}if(e)return;let t=function(e){let t=document.cookie.split("; ").find(t=>t.startsWith(e+"="));if(!t)return null;let s=t.slice(e.length+1);try{return decodeURIComponent(s)}catch{return s}}("token"),s=t&&!(0,lO.isJwtExpired)(t)?t:null;t&&!s&&lU("token","/"),e||(A(s),E(!1))})(),()=>{e=!0}},[]),(0,i.useEffect)(()=>{if(eo){(0,lR.storeReturnUrl)();let e=(N.proxyBaseUrl||"")+"/ui/login",t=(0,lR.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[eo]);let ed=ee in lV;return((0,i.useEffect)(()=>{if(!D&&ed){let e=(N.proxyBaseUrl||"")+"/ui";S.replace(`${e}/${lV[ee]}`)}},[D,ed,ee,S]),(0,i.useEffect)(()=>{if(D||!L||ei.current)return;ei.current=!0;let e=(0,lR.consumeReturnUrl)();if(e){let t=window.location.href;(0,lR.normalizeUrlForCompare)(e)!==(0,lR.normalizeUrlForCompare)(t)&&window.location.replace(e)}},[D,L]),(0,i.useEffect)(()=>{L||(ei.current=!1)},[L]),(0,i.useEffect)(()=>{if(!L)return;if((0,lO.isJwtExpired)(L)){lU("token","/"),A(null);return}let e=null;try{e=(0,lB.jwtDecode)(L)}catch{lU("token","/"),A(null);return}if(e){if(ea(e.key),m(e.disabled_non_admin_personal_key_creation),e.user_role){let t=(0,eN.formatUserRole)(e.user_role);n(t),"Admin Viewer"==t&&et("usage")}e.user_email&&p(e.user_email),e.login_method&&C("username_password"==e.login_method),e.premium_user&&d(e.premium_user),e.auth_header_name&&(0,N.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&O(e.user_id)}},[L]),(0,i.useEffect)(()=>{es&&z&&e&&(0,s0.fetchUserModels)(z,e,es,_),es&&z&&e&&(0,eV.teamListCall)(es,1,100,{userID:"Admin"!==e&&"Admin Viewer"!==e?z:null}).then(e=>h(e.teams??[])).catch(console.error),es&&(0,s1.fetchOrganizations)(es,f)},[es,z,e]),(0,i.useEffect)(()=>{es&&L&&(async()=>{try{let e=await (0,N.getInProductNudgesCall)(es),t=e?.is_claude_code_enabled||!1;V(t),t&&(G(!0),B(!1))}catch(e){console.error("Failed to fetch in-product nudges:",e)}})()},[es,L]),(0,i.useEffect)(()=>{if(R&&!q){let e=setTimeout(()=>{B(!1)},15e3);return()=>clearTimeout(e)}},[R,q]),(0,i.useEffect)(()=>{if(H&&!K){let e=setTimeout(()=>{G(!1)},15e3);return()=>clearTimeout(e)}},[H,K]),D||eo||ed)?(0,t.jsx)(eH.default,{}):(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(l$.ConfigProvider,{theme:{algorithm:Q?sA.theme.darkAlgorithm:sA.theme.defaultAlgorithm},children:(0,t.jsx)(lz.ThemeProvider,{accessToken:es,children:J?(0,t.jsx)(aI.default,{userID:z,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:P}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(sb.default,{userID:z,userRole:e,premiumUser:o,userEmail:u,setProxySettings:w,proxySettings:v,accessToken:es,isPublicPage:!1,sidebarCollapsed:el,onToggleSidebar:()=>{er(!el)},isDarkMode:Q,toggleDarkMode:()=>{Y(!Q)}}),(0,t.jsxs)("div",{className:"flex flex-1",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{setPage:e=>{let t=new URLSearchParams(T);t.set("page",e),window.history.pushState(null,"",`?${t.toString()}`),et(e)},defaultSelectedKey:ee,sidebarCollapsed:el})}),"api-keys"==ee?(0,t.jsx)(aI.default,{userID:z,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:P,autoOpenCreate:X,prefillData:Z}):"models"==ee?(0,t.jsx)(a.default,{token:L,keys:g,modelData:I,setModelData:F,premiumUser:o,teams:x}):"llm-playground"==ee?(0,t.jsx)(l.default,{}):"users"==ee?(0,t.jsx)(lE.default,{userID:z,userRole:e,token:L,keys:g,teams:x,accessToken:es,setKeys:y}):"teams"==ee?(0,t.jsx)(sZ,{teams:x,setTeams:h,accessToken:es,userID:z,userRole:e,organizations:j,premiumUser:o,searchParams:T}):"organizations"==ee?(0,t.jsx)(s1.default,{organizations:j,setOrganizations:f,userModels:b,accessToken:es,userRole:e,premiumUser:o}):"admin-panel"==ee?(0,t.jsx)(r.default,{proxySettings:v}):"logging-and-alerts"==ee?(0,t.jsx)(ad.default,{userID:z,userRole:e,accessToken:es,premiumUser:o}):"budgets"==ee?(0,t.jsx)(eq.default,{accessToken:es}):"guardrails"==ee?(0,t.jsx)(sg.default,{accessToken:es,userRole:e}):"policies"==ee?(0,t.jsx)(sy.default,{accessToken:es,userRole:e}):"agents"==ee?(0,t.jsx)(eB,{accessToken:es,userRole:e,teams:x}):"prompts"==ee?(0,t.jsx)(s4.default,{accessToken:es,userRole:e}):"transform-request"==ee?(0,t.jsx)(aC.default,{accessToken:es}):"router-settings"==ee?(0,t.jsx)(tQ.default,{userID:z,userRole:e,accessToken:es,modelData:I}):"ui-theme"==ee?(0,t.jsx)(aS.default,{userID:z,userRole:e,accessToken:es}):"cost-tracking"==ee?(0,t.jsx)(tW,{userID:z,userRole:e,accessToken:es}):"model-hub-table"==ee?(0,eN.isAdminRole)(e)?(0,t.jsx)(sf.default,{accessToken:es,publicPage:!1,premiumUser:o,userRole:e}):(0,t.jsx)(s5.default,{accessToken:es,isEmbedded:!0}):"caching"==ee?(0,t.jsx)(e$.default,{userID:z,userRole:e,token:L,accessToken:es,premiumUser:o}):"pass-through-settings"==ee?(0,t.jsx)(s2.default,{userID:z,userRole:e,accessToken:es,modelData:I,premiumUser:o}):"logs"==ee?(0,t.jsx)(lD.default,{userID:z,userRole:e,token:L,accessToken:es,allTeams:x??[],premiumUser:o}):"mcp-servers"==ee?(0,t.jsx)(sj.MCPServers,{accessToken:es,userRole:e,userID:z}):"search-tools"==ee?(0,t.jsx)(ao,{accessToken:es,userRole:e,userID:z}):"tag-management"==ee?(0,t.jsx)(ak.default,{accessToken:es,userRole:e,userID:z}):"claude-code-plugins"==ee?(0,t.jsx)(eU.default,{accessToken:es,userRole:e}):"access-groups"==ee?(0,t.jsx)(a7,{}):"projects"==ee?(0,t.jsx)(lj,{}):"vector-stores"==ee?(0,t.jsx)(lf.default,{accessToken:es,userRole:e,userID:z}):"tool-policies"==ee?(0,t.jsx)(lM,{accessToken:es,userRole:e}):"guardrails-monitor"==ee?(0,t.jsx)(sh,{accessToken:es}):"new_usage"==ee?(0,t.jsx)(s_.default,{teams:x??[],organizations:j??[]}):(0,t.jsx)(aT.default,{userID:z,userRole:e,token:L,accessToken:es,keys:g,premiumUser:o})]}),(0,t.jsx)(ag,{isVisible:R,onOpen:()=>{B(!1),$(!0)},onDismiss:()=>{B(!1)}}),(0,t.jsx)(a_,{isOpen:q,onClose:()=>{$(!1),B(!0)},onComplete:()=>{$(!1)}}),(0,t.jsx)(aN,{isVisible:H,onOpen:()=>{G(!1),W(!0)},onDismiss:()=>{G(!1)}}),(0,t.jsx)(aw,{isOpen:K,onClose:()=>{W(!1),G(!0)},onComplete:()=>{W(!1)}})]})})})})}function lG(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(lH,{})})}e.s(["default",()=>lG],952683)}]); \ No newline at end of file +`;function t9({open:e,onClose:s,guardrailName:a,accessToken:l,onRunEvaluation:r}){let[n,o]=(0,i.useState)(t8),[d,c]=(0,i.useState)(t7),[m,u]=(0,i.useState)(null),[p,x]=(0,i.useState)([]),[h,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!e||!l)return void x([]);let t=!1;return g(!0),(0,tG.fetchAvailableModels)(l).then(e=>{t||x(e)}).catch(()=>{t||x([])}).finally(()=>{t||g(!1)}),()=>{t=!0}},[e,l]);let j=p.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)(y.Modal,{title:"Evaluation Settings",open:e,onCancel:s,width:640,footer:null,closeIcon:(0,t.jsx)(t6.CloseOutlined,{}),destroyOnClose:!0,children:[(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:a?`Configure AI evaluation for ${a}`:"Configure AI evaluation for re-running on logs"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Evaluation Prompt"}),(0,t.jsx)("button",{type:"button",onClick:()=>o(t8),className:"text-xs text-indigo-600 hover:text-indigo-700",children:"Reset to default"})]}),(0,t.jsx)(C.Input.TextArea,{value:n,onChange:e=>o(e.target.value),rows:6,className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"System prompt sent to the evaluation model. Output is structured via response_format."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Response Schema"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:"response_format: json_schema"}),(0,t.jsx)(C.Input.TextArea,{value:d,onChange:e=>c(e.target.value),rows:6,className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Model"}),(0,t.jsx)(k.Select,{placeholder:h?"Loading models…":"Select a model",value:m??void 0,onChange:u,options:j,style:{width:"100%"},showSearch:!0,optionFilterProp:"label",loading:h,notFoundContent:l?"No models available":"Sign in to see models"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsx)(V.Button,{onClick:s,children:"Cancel"}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(t3.PlayCircleOutlined,{}),onClick:()=>{m&&(r?.({prompt:n,schema:d,model:m}),s())},disabled:!m,children:"Run Evaluation"})]})]})}var se=e.i(166540);e.i(3565);var st=e.i(502626);let ss={blocked:{icon:t6.CloseOutlined,color:"text-red-600",bg:"bg-red-50",border:"border-red-200",label:"Blocked"},passed:{icon:v.CheckCircleOutlined,color:"text-green-600",bg:"bg-green-50",border:"border-green-200",label:"Passed"},flagged:{icon:t0.WarningOutlined,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200",label:"Flagged"}};function sa({guardrailName:e,filterAction:s="all",logs:a=[],logsLoading:l=!1,totalLogs:r,accessToken:n=null,startDate:o="",endDate:d=""}){let[c,m]=(0,i.useState)(10),[u,p]=(0,i.useState)(s),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(!1),j=a.filter(e=>"all"===u||e.action===u).slice(0,c),f=r??a.length,b=o?(0,se.default)(o).utc().format("YYYY-MM-DD HH:mm:ss"):(0,se.default)().subtract(24,"hours").utc().format("YYYY-MM-DD HH:mm:ss"),_=d?(0,se.default)(d).utc().endOf("day").format("YYYY-MM-DD HH:mm:ss"):(0,se.default)().utc().format("YYYY-MM-DD HH:mm:ss"),{data:v}=(0,t1.useQuery)({queryKey:["spend-log-by-request",x,b,_],queryFn:async()=>n&&x?await (0,N.uiSpendLogsCall)({accessToken:n,start_date:b,end_date:_,page:1,page_size:10,params:{request_id:x}}):null,enabled:!!(n&&x&&g)}),w=v?.data?.[0]??null;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:e?`Logs — ${e}`:"Request Logs"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l?"Loading…":a.length>0?`Showing ${j.length} of ${f} entries`:"No logs for this period. Select a guardrail and date range."})]}),a.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-1",children:["all","blocked","flagged","passed"].map(e=>(0,t.jsx)(V.Button,{type:u===e?"primary":"default",size:"small",onClick:()=>p(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsx)("div",{className:"h-4 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Sample:"}),[10,50,100].map(e=>(0,t.jsx)(V.Button,{type:c===e?"primary":"default",size:"small",onClick:()=>m(e),children:e},e))]})]})]})}),l&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{})}),!l&&0===j.length&&(0,t.jsx)("div",{className:"py-12 text-center text-sm text-gray-500",children:"No logs to display. Adjust filters or date range."}),!l&&j.length>0&&(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:j.map(e=>{let s=ss[e.action],a=s.icon;return(0,t.jsxs)("button",{type:"button",onClick:()=>{h(e.id),y(!0)},className:"w-full text-left px-4 py-3 hover:bg-gray-50 transition-colors flex items-start gap-3",children:[(0,t.jsx)(a,{className:`w-4 h-4 mt-0.5 flex-shrink-0 ${s.color}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${s.bg} ${s.color} ${s.border}`,children:s.label}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"·"}),e.model&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.model})]}),(0,t.jsx)("p",{className:"text-sm text-gray-800 truncate",children:e.input_snippet??e.input??"—"})]}),(0,t.jsx)(tw.DownOutlined,{className:"w-4 h-4 text-gray-400 flex-shrink-0 mt-1"})]},e.id)})}),(0,t.jsx)(st.LogDetailsDrawer,{open:g,onClose:()=>{y(!1),h(null)},logEntry:w,accessToken:n,allLogs:w?[w]:[],startTime:b})]})}function sl({label:e,value:s,valueColor:a="text-gray-900",icon:l,subtitle:r}){return(0,t.jsxs)("div",{className:"h-full bg-white border border-gray-200 rounded-lg p-5 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-600",children:e}),l&&(0,t.jsx)("span",{className:"text-gray-400",children:l})]}),(0,t.jsx)("div",{className:`text-3xl font-semibold ${a} tracking-tight`,children:s}),r&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:r})]})}let sr={healthy:{bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},warning:{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500"},critical:{bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function si({guardrailId:e,onBack:s,accessToken:a=null,startDate:l,endDate:r}){let[n,o]=(0,i.useState)("overview"),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-detail",e,l,r],queryFn:()=>(0,N.getGuardrailsUsageDetail)(a,e,l,r),enabled:!!a&&!!e}),{data:g,isLoading:y}=(0,t1.useQuery)({queryKey:["guardrails-usage-logs",e,m,50],queryFn:()=>(0,N.getGuardrailsUsageLogs)(a,{guardrailId:e,page:m,pageSize:50,startDate:l,endDate:r}),enabled:!!a&&!!e}),j=(0,i.useMemo)(()=>(g?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:e.action,score:e.score,model:e.model,input_snippet:e.input_snippet,output_snippet:e.output_snippet,reason:e.reason})),[g?.logs]),f=p?{name:p.guardrail_name,description:p.description??"",status:p.status,provider:p.provider,type:p.type,requestsEvaluated:p.requestsEvaluated,failRate:p.failRate,avgScore:p.avgScore,avgLatency:p.avgLatency}:{name:e,description:"",status:"healthy",provider:"—",type:"—",requestsEvaluated:0,failRate:0,avgScore:void 0,avgLatency:void 0},b=sr[f.status]??sr.healthy;return x&&!p?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})}):h&&!p?(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load guardrail details."})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:f.name}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 text-xs font-medium rounded-full ${b.bg} ${b.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${b.dot}`}),f.status.charAt(0).toUpperCase()+f.status.slice(1)]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 ml-8",children:f.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:f.provider}),(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>c(!0),title:"Evaluation settings"})]})]})]}),(0,t.jsx)(t5.Tabs,{activeKey:n,onChange:o,items:[{key:"overview",label:"Overview"},{key:"logs",label:"Logs"}]}),"overview"===n&&(0,t.jsxs)("div",{className:"space-y-6 mt-4",children:[(0,t.jsxs)(t4.Grid,{numItems:2,numItemsMd:5,className:"gap-4",children:[(0,t.jsx)(t2.Col,{children:(0,t.jsx)(sl,{label:"Requests Evaluated",value:f.requestsEvaluated.toLocaleString()})}),(0,t.jsx)(t2.Col,{children:(0,t.jsx)(sl,{label:"Fail Rate",value:`${f.failRate}%`,valueColor:f.failRate>15?"text-red-600":f.failRate>5?"text-amber-600":"text-green-600",subtitle:`${Math.round(f.requestsEvaluated*f.failRate/100).toLocaleString()} blocked`,icon:f.failRate>15?(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"}):void 0})}),(0,t.jsx)(t2.Col,{children:(0,t.jsx)(sl,{label:"Avg. latency added",value:null!=f.avgLatency?`${Math.round(f.avgLatency)}ms`:"—",valueColor:null!=f.avgLatency?f.avgLatency>150?"text-red-600":f.avgLatency>50?"text-amber-600":"text-green-600":"text-gray-500",subtitle:null!=f.avgLatency?"Per request (avg)":"No data"})})]}),(0,t.jsx)(sa,{guardrailName:f.name,filterAction:"all",logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})]}),"logs"===n&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sa,{guardrailName:f.name,logs:j,logsLoading:y,totalLogs:g?.total??0,accessToken:a,startDate:l,endDate:r})}),(0,t.jsx)(t9,{open:d,onClose:()=>c(!1),guardrailName:f.name,accessToken:a})]})}let sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"};var so=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:sn}))}),sd=e.i(584935);function sc({data:e}){let s=e&&e.length>0?e:[];return(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200",children:[(0,t.jsx)(ew.Title,{className:"text-base font-semibold text-gray-900 mb-4",children:"Request Outcomes Over Time"}),(0,t.jsx)("div",{className:"h-80 min-h-[280px]",children:s.length>0?(0,t.jsx)(sd.BarChart,{data:s,index:"date",categories:["passed","blocked"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),yAxisWidth:48,showLegend:!0,stack:!0}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-500",children:"No chart data for this period"})})]})}let sm={Bedrock:"bg-orange-100 text-orange-700 border-orange-200","Google Cloud":"bg-sky-100 text-sky-700 border-sky-200",LiteLLM:"bg-indigo-100 text-indigo-700 border-indigo-200",Custom:"bg-gray-100 text-gray-600 border-gray-200"};function su({accessToken:e=null,startDate:s,endDate:a,onSelectGuardrail:l}){let[r,n]=(0,i.useState)("failRate"),[d,c]=(0,i.useState)("desc"),[m,u]=(0,i.useState)(!1),{data:p,isLoading:x,error:h}=(0,t1.useQuery)({queryKey:["guardrails-usage-overview",s,a],queryFn:()=>(0,N.getGuardrailsUsageOverview)(e,s,a),enabled:!!e}),g=p?.rows??[],y=(0,i.useMemo)(()=>{let e,t,s,a;return p?{totalRequests:p.totalRequests??0,totalBlocked:p.totalBlocked??0,passRate:String(p.passRate??0),avgLatency:g.length?Math.round(g.reduce((e,t)=>e+(t.avgLatency??0),0)/g.length):0,count:g.length}:(e=g.reduce((e,t)=>e+t.requestsEvaluated,0),t=g.reduce((e,t)=>e+Math.round(t.requestsEvaluated*t.failRate/100),0),s=e>0?((1-t/e)*100).toFixed(1):"0",{totalRequests:e,totalBlocked:t,passRate:s,avgLatency:(a=g.filter(e=>null!=e.avgLatency)).length>0?Math.round(a.reduce((e,t)=>e+(t.avgLatency??0),0)/a.length):0,count:g.length})},[p,g]),j=p?.chart,f=(0,i.useMemo)(()=>[...g].sort((e,t)=>{let s="desc"===d?-1:1,a=e[r]??0,l=t[r]??0;return(Number(a)-Number(l))*s}),[g,r,d]),b=[{title:"Guardrail",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsx)("button",{type:"button",className:"text-sm font-medium text-gray-900 hover:text-indigo-600 text-left",onClick:()=>l(s.id),children:e})},{title:"Provider",dataIndex:"provider",key:"provider",render:e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${sm[e]??sm.Custom}`,children:e})},{title:"Requests",dataIndex:"requestsEvaluated",key:"requestsEvaluated",align:"right",sorter:!0,sortOrder:"requestsEvaluated"===r?"desc"===d?"descend":"ascend":null,render:e=>e.toLocaleString()},{title:"Fail Rate",dataIndex:"failRate",key:"failRate",align:"right",sorter:!0,sortOrder:"failRate"===r?"desc"===d?"descend":"ascend":null,render:(e,s)=>(0,t.jsxs)("span",{className:e>15?"text-red-600":e>5?"text-amber-600":"text-green-600",children:[e,"%","up"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-red-400",children:"↑"}),"down"===s.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-green-400",children:"↓"})]})},{title:"Avg. latency added",dataIndex:"avgLatency",key:"avgLatency",align:"right",sorter:!0,sortOrder:"avgLatency"===r?"desc"===d?"descend":"ascend":null,render:e=>(0,t.jsx)("span",{className:null==e?"text-gray-400":e>150?"text-red-600":e>50?"text-amber-600":"text-green-600",children:null!=e?`${e}ms`:"—"})},{title:"Status",dataIndex:"status",key:"status",align:"center",render:e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${"healthy"===e?"bg-green-500":"warning"===e?"bg-amber-500":"bg-red-500"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-600 capitalize",children:e})]})}],_=["failRate","requestsEvaluated","avgLatency"];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(tX.SafetyOutlined,{className:"text-lg text-indigo-500"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Guardrails Monitor"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Monitor guardrail performance across all requests"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tC.DownloadOutlined,{}),title:"Coming soon",children:"Export Data"})})]}),(0,t.jsxs)(t4.Grid,{numItems:2,numItemsLg:5,className:"gap-4 mb-6 items-stretch",children:[(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Total Evaluations",value:y.totalRequests.toLocaleString()})}),(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Blocked Requests",value:y.totalBlocked.toLocaleString(),valueColor:"text-red-600",icon:(0,t.jsx)(t0.WarningOutlined,{className:"text-red-400"})})}),(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Pass Rate",value:`${y.passRate}%`,valueColor:"text-green-600",icon:(0,t.jsx)(so,{className:"text-green-400"})})}),(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Avg. latency added",value:`${y.avgLatency}ms`,valueColor:y.avgLatency>150?"text-red-600":y.avgLatency>50?"text-amber-600":"text-green-600"})}),(0,t.jsx)(t2.Col,{className:"flex flex-col",children:(0,t.jsx)(sl,{label:"Active Guardrails",value:y.count})})]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(sc,{data:j})}),(0,t.jsxs)(o.Card,{className:"bg-white border border-gray-200 rounded-lg",children:[(x||h)&&(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center gap-2",children:[x&&(0,t.jsx)(eF.Spin,{size:"small"}),h&&(0,t.jsx)("span",{className:"text-sm text-red-600",children:"Failed to load data. Try again."})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(ew.Title,{className:"text-base font-semibold text-gray-900",children:"Guardrail Performance"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Click a guardrail to view details, logs, and configuration"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(V.Button,{type:"default",icon:(0,t.jsx)(tZ.SettingOutlined,{}),onClick:()=>u(!0),title:"Evaluation settings"})})]}),(0,t.jsx)(te.Table,{columns:b,dataSource:f,rowKey:"id",pagination:!1,loading:x,onChange:(e,t,s)=>{s?.field&&_.includes(s.field)&&(n(s.field),c("ascend"===s.order?"asc":"desc"))},locale:0!==g.length||x?void 0:{emptyText:"No data for this period"},onRow:e=>({onClick:()=>l(e.id),style:{cursor:"pointer"}})})]}),(0,t.jsx)(t9,{open:m,onClose:()=>u(!1),accessToken:e})]})}let sp=new Date,sx=new Date;function sh({accessToken:e=null}){let[s,a]=(0,i.useState)({type:"overview"}),l=(0,i.useMemo)(()=>new Date(sx),[]),r=(0,i.useMemo)(()=>new Date(sp),[]),[n,o]=(0,i.useState)({from:l,to:r}),d=n.from?(0,N.formatDate)(n.from):"",c=n.to?(0,N.formatDate)(n.to):"",m=(0,i.useCallback)(e=>{o(e)},[]);return(0,t.jsxs)("div",{className:"p-6 w-full min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-4",children:(0,t.jsx)(tY.default,{value:n,onValueChange:m,label:"",showTimeRange:!1})}),"overview"===s.type?(0,t.jsx)(su,{accessToken:e,startDate:d,endDate:c,onSelectGuardrail:e=>{a({type:"detail",guardrailId:e})}}):(0,t.jsx)(si,{guardrailId:s.guardrailId,onBack:()=>{a({type:"overview"})},accessToken:e,startDate:d,endDate:c})]})}sx.setDate(sx.getDate()-7);var sg=e.i(487304),sy=e.i(760221);e.i(111790);var sj=e.i(280881),sf=e.i(934879),sb=e.i(402874),s_=e.i(797305),sv=e.i(109799),sN=e.i(747871),sw=e.i(56567),sk=e.i(468133),sC=e.i(645526),sS=e.i(91979),sT=e.i(525720),sI=e.i(372943),sF=e.i(95684),sL=e.i(497650),sA=e.i(368869),sP=e.i(898586),sM=e.i(998573),sD=e.i(438100),sE=e.i(475254);let sz=(0,sE.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var sO=e.i(988846),sR=e.i(98740),sR=sR;function sB({size:e,fontSize:s}){let a=(0,t.jsx)(tN.LoadingOutlined,{style:s?{fontSize:s}:void 0,spin:!0});return(0,t.jsx)(eF.Spin,{indicator:a,size:e})}var sq=e.i(363256),s$=e.i(9314),sU=e.i(552130),sV=e.i(533882),sH=e.i(651904),sG=e.i(460285),sK=e.i(435451),sW=e.i(916940),sQ=e.i(127952),sY=e.i(162386);let sJ=(e,t,s)=>"Admin"===e||!!s&&!!t&&s.some(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)),sX=(e,t,s)=>"Admin"===e?s||[]:s&&t?s.filter(e=>e.members?.some(e=>e.user_id===t&&"org_admin"===e.user_role)):[],sZ=({teams:e,searchParams:s,accessToken:a,setTeams:l,userID:r,userRole:n,organizations:o,premiumUser:d=!1})=>{let c,m,u,p;console.log(`organizations: ${JSON.stringify(o)}`);let{data:x}=(0,sv.useOrganizations)(),[h,g]=(0,i.useState)(!0),[j,b]=(0,i.useState)(null),[v,S]=(0,i.useState)(1),[T,F]=(0,i.useState)(10),[L,A]=(0,i.useState)(0),[P,M]=(0,i.useState)(null),[D,E]=(0,i.useState)(null),[O,R]=(0,i.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),q=(0,i.useRef)(null),[$,G]=(0,i.useState)(!1),K=async(e={})=>{if(!a)return;let t=e.page??v,s=e.size??T,i=e.sortBy??O.sort_by,o=e.sortOrder??O.sort_order,d=e.organizationID??O.organization_id,c=e.teamAlias??O.team_alias;g(!0),b(null);try{let e=await (0,eV.teamListCall)(a,t,s,{organizationID:d||null,team_alias:c||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:i||null,sortOrder:o||null});l(e.teams??[]),A(e.total??0)}catch(e){b(e?.message||"Failed to fetch teams")}finally{g(!1)}};(0,i.useEffect)(()=>{K()},[a]);let[W]=w.Form.useForm(),[Q]=w.Form.useForm(),[Y,J]=(0,i.useState)(""),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(null),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),[ei,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(!1),[ec,em]=(0,i.useState)(!1),[eu,ep]=(0,i.useState)([]),[ex,eh]=(0,i.useState)(!1),[eg,ef]=(0,i.useState)(null),[eb,e_]=(0,i.useState)([]),[ev,ew]=(0,i.useState)({}),[ek,eC]=(0,i.useState)(!1),[eS,eT]=(0,i.useState)([]),[eI,eF]=(0,i.useState)([]),[eL,eA]=(0,i.useState)([]),[eP,eM]=(0,i.useState)([]),[eD,eE]=(0,i.useState)(!1),[eB,eq]=(0,i.useState)({}),[e$,eU]=(0,i.useState)(null),[eH,eY]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${D}`);let t=(e=[],D&&D.models.length>0?(console.log(`organization.models: ${D.models}`),e=D.models):e=eu,(0,B.unfurlWildcardModelsInList)(e,eu));console.log(`models: ${t}`),e_(t),W.setFieldValue("models",[])},[D,eu]),(0,i.useEffect)(()=>{if(ei){let e=sX(n,r,o);if(1===e.length){let t=e[0];W.setFieldValue("organization_id",t.organization_id),E(t)}else W.setFieldValue("organization_id",P?.organization_id||null),E(P)}},[ei,n,r,o,P]),(0,i.useEffect)(()=>{let e=async()=>{try{if(null==a)return;let e=(await (0,N.getPoliciesList)(a)).policies.map(e=>e.policy_name);eF(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==a)return;let e=(await (0,N.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eT(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[a]);let eJ=async()=>{try{if(null==a)return;let e=await (0,N.fetchMCPAccessGroups)(a);eM(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,i.useEffect)(()=>{eJ()},[a]),(0,i.useEffect)(()=>{e&&ew(e.reduce((e,t)=>(e[t.team_id]={keys:t.keys||[],team_info:{members_with_roles:t.members_with_roles||[]}},e),{}))},[e]);let eX=async e=>{ef(e),eh(!0)},eZ=async()=>{if(null!=eg&&null!=e&&null!=a)try{eC(!0),await (0,N.teamDeleteCall)(a,eg.team_id),await K(),ez.default.success("Team deleted successfully")}catch(e){ez.default.fromBackend("Error deleting the team: "+e)}finally{eC(!1),eh(!1),ef(null)}};(0,i.useEffect)(()=>{(async()=>{try{if(null===r||null===n||null===a)return;let e=await (0,B.fetchAvailableModelsForTeamOrKey)(r,n,a);e&&ep(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,r,n,e]);let e0=async t=>{try{if(console.log(`formValues: ${JSON.stringify(t)}`),null!=a){let s=t?.team_alias,l=e?.map(e=>e.team_alias)??[],r=t?.organization_id||P?.organization_id;if(""===r||"string"!=typeof r?t.organization_id=null:t.organization_id=r.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(ez.default.info("Creating Team"),eL.length>0){let e={};if(t.metadata)try{e=JSON.parse(t.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}e={...e,logging:eL.filter(e=>e.callback_name)},t.metadata=JSON.stringify(e)}if(t.secret_manager_settings&&"string"==typeof t.secret_manager_settings)if(""===t.secret_manager_settings.trim())delete t.secret_manager_settings;else try{t.secret_manager_settings=JSON.parse(t.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0||t.allowed_mcp_servers_and_groups&&(t.allowed_mcp_servers_and_groups.servers?.length>0||t.allowed_mcp_servers_and_groups.accessGroups?.length>0||t.allowed_mcp_servers_and_groups.toolPermissions)){if(t.object_permission={},t.allowed_vector_store_ids&&t.allowed_vector_store_ids.length>0&&(t.object_permission.vector_stores=t.allowed_vector_store_ids,delete t.allowed_vector_store_ids),t.allowed_mcp_servers_and_groups){let{servers:e,accessGroups:s}=t.allowed_mcp_servers_and_groups;e&&e.length>0&&(t.object_permission.mcp_servers=e),s&&s.length>0&&(t.object_permission.mcp_access_groups=s),delete t.allowed_mcp_servers_and_groups}t.mcp_tool_permissions&&Object.keys(t.mcp_tool_permissions).length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_tool_permissions=t.mcp_tool_permissions,delete t.mcp_tool_permissions)}if(t.allowed_mcp_access_groups&&t.allowed_mcp_access_groups.length>0&&(t.object_permission||(t.object_permission={}),t.object_permission.mcp_access_groups=t.allowed_mcp_access_groups,delete t.allowed_mcp_access_groups),t.allowed_agents_and_groups){let{agents:e,accessGroups:s}=t.allowed_agents_and_groups;t.object_permission||(t.object_permission={}),e&&e.length>0&&(t.object_permission.agents=e),s&&s.length>0&&(t.object_permission.agent_access_groups=s),delete t.allowed_agents_and_groups}Object.keys(eB).length>0&&(t.model_aliases=eB),e$?.router_settings&&Object.values(e$.router_settings).some(e=>null!=e&&""!==e)&&(t.router_settings=e$.router_settings),await (0,N.teamCreateCall)(a,t),ez.default.success("Team created"),await K({page:v,size:T}),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1),en(!1)}}catch(e){console.error("Error creating the team:",e),ez.default.fromBackend("Error creating the team: "+e)}},e1=async(e,t)=>{let s={...O,[e]:t};if(R(s),S(1),a)try{let e=await (0,eV.teamListCall)(a,1,T,{organizationID:s.organization_id||null,team_alias:s.team_alias||null,userID:"Admin"!==n&&"Admin Viewer"!==n?r:null,sortBy:s.sort_by||null,sortOrder:s.sort_order||null});l(e.teams??[]),A(e.total??0)}catch(e){console.error("Error fetching teams:",e)}},{token:e2}=sA.theme.useToken(),{Title:e4,Text:e5}=sP.Typography,{Content:e6}=sI.Layout,e3=(0,i.useMemo)(()=>[{title:"Team ID",dataIndex:"team_id",key:"team_id",width:170,ellipsis:!0,render:(e,s)=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(e5,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>ea(s.team_id),children:e})})},{title:"Team Alias",dataIndex:"team_alias",key:"team_alias",ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{style:{fontSize:14},children:e||(0,t.jsx)(e5,{type:"secondary",italic:!0,children:"—"})})},{title:"Organization",key:"organization",width:160,ellipsis:!0,render:(e,s)=>{let a=((e,t)=>{if(!e||!t)return e||"N/A";let s=t.find(t=>t.organization_id===e);return s?.organization_alias||e})(s.organization_id,x||o);return s.organization_id?(0,t.jsx)(e5,{ellipsis:!0,style:{fontSize:14},children:a}):(0,t.jsx)(e5,{type:"secondary",children:"—"})}},{title:"Resources",key:"resources",width:240,render:(e,s)=>{let a=ev?.[s.team_id]?.team_info?.members_with_roles?.length??0,l=s.models?.length??0,r=ev?.[s.team_id]?.keys?.length??0;return(0,t.jsxs)(sT.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a} Members`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sR.default,{size:14}),a]})})}),(0,t.jsx)(f.Tooltip,{title:`${l} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sz,{size:14}),l]})})}),(0,t.jsx)(f.Tooltip,{title:`${r} Keys`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sD.KeyIcon,{size:14}),r]})})})]})}},{title:"Spend / Budget",key:"spend",width:200,sorter:!0,render:(e,s)=>{let a=s.spend??0,l=s.max_budget,r=`$${a.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`,i=null!=l?`$${l.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:"Unlimited",n=null!=l&&l>0?Math.min(a/l*100,100):null;return(0,t.jsxs)(sT.Flex,{vertical:!0,gap:2,children:[(0,t.jsxs)(e5,{style:{fontSize:13},children:[r,(0,t.jsxs)(e5,{type:"secondary",style:{fontSize:12},children:[" / ",i]})]}),null!=n&&(0,t.jsx)(sL.Progress,{percent:n,size:"small",showInfo:!1,strokeColor:n>=90?"#ff4d4f":n>=70?"#faad14":"#1677ff",style:{marginBottom:0}})]})}},{title:"Created",dataIndex:"created_at",key:"created_at",width:130,ellipsis:!0,sorter:!0,render:e=>(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:e?new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"—"})},{title:"Actions",key:"actions",width:120,align:"right",render:(e,s)=>(0,t.jsxs)(U.Space,{size:4,children:[(0,t.jsx)(eR.default,{variant:"Copy",tooltipText:"Copy Team ID",onClick:()=>{navigator.clipboard.writeText(s.team_id).then(()=>sM.message.success("Team ID copied")).catch(()=>sM.message.error("Failed to copy"))}}),"Admin"===n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit team",dataTestId:"edit-team-button",onClick:()=>{ea(s.team_id),er(!0)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete team",dataTestId:"delete-team-button",onClick:()=>eX(s)})]})]})}],[n,ev,x,o]),e8=(0,i.useMemo)(()=>e??[],[e]),e7=[{key:"your-teams",label:"Your Teams",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsxs)(sT.Flex,{gap:12,align:"center",children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sO.SearchIcon,{size:16}),suffix:$?(0,t.jsx)(sB,{size:"small"}):null,placeholder:"Search teams by name...",onChange:e=>{var t;return t=e.target.value,void(q.current&&clearTimeout(q.current),G(!0),q.current=setTimeout(async()=>{try{R(e=>({...e,team_alias:t})),S(1),await K({page:1,teamAlias:t})}finally{G(!1)}},300))},allowClear:!0,style:{maxWidth:400}}),(0,t.jsx)(sq.default,{organizations:o,value:O.organization_id||void 0,onChange:e=>e1("organization_id",e||""),loading:h})]}),(0,t.jsx)(sF.Pagination,{current:v,total:L,pageSize:T,onChange:(e,t)=>{S(e),F(t),K({page:e,size:t})},size:"small",showTotal:e=>`${e} teams`,showSizeChanger:!0,pageSizeOptions:["10","20","50"]})]}),h?(0,t.jsx)(sT.Flex,{justify:"center",align:"center",style:{padding:"80px 0"},children:(0,t.jsx)(sB,{fontSize:48})}):j?(0,t.jsxs)(sT.Flex,{vertical:!0,align:"center",gap:16,style:{padding:"64px 0"},children:[(0,t.jsx)(e5,{type:"danger",style:{fontSize:15},children:"Failed to load teams"}),(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:j}),(0,t.jsx)(V.Button,{icon:(0,t.jsx)(sS.ReloadOutlined,{}),onClick:()=>{K()},children:"Retry"})]}):(0,t.jsx)(te.Table,{columns:e3,dataSource:e8,rowKey:"team_id",pagination:!1,onChange:(e,t,s)=>{let a=Array.isArray(s)?s[0]:s,l=a.order?a.columnKey:"created_at",r="ascend"===a.order?"asc":(a.order,"desc");R(e=>({...e,sort_by:l,sort_order:r})),K({sortBy:l,sortOrder:r})},locale:{emptyText:(0,t.jsxs)("div",{style:{padding:"64px 0",textAlign:"center"},children:[(0,t.jsx)(sC.TeamOutlined,{style:{fontSize:40,color:"#d9d9d9",marginBottom:12}}),(0,t.jsx)("div",{children:(0,t.jsx)(e5,{style:{fontSize:15,color:"#595959"},children:"No teams yet"})}),(0,t.jsx)("div",{style:{marginTop:4},children:(0,t.jsx)(e5,{type:"secondary",style:{fontSize:13},children:"Create your first team to organize members and manage access to models."})}),sJ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),style:{marginTop:16},children:"Create Team"})]})},scroll:{x:1e3},size:"middle"})]}),(0,t.jsx)(sQ.default,{isOpen:ex,title:"Delete Team?",alertMessage:eg?.keys?.length===0?void 0:`Warning: This team has ${eg?.keys?.length} keys associated with it. Deleting the team will also delete all associated keys. This action is irreversible.`,message:"Are you sure you want to delete this team and all its keys? This action cannot be undone.",resourceInformationTitle:"Team Information",resourceInformation:[{label:"Team ID",value:eg?.team_id,code:!0},{label:"Team Name",value:eg?.team_alias},{label:"Keys",value:eg?.keys?.length},{label:"Members",value:eg?.members_with_roles?.length}],requiredConfirmation:eg?.team_alias,onCancel:()=>{eh(!1),ef(null)},onOk:eZ,confirmLoading:ek})]})},{key:"available-teams",label:"Available Teams",children:(0,t.jsx)(sN.default,{accessToken:a,userID:r})},...(0,eN.isProxyAdminRole)(n||"")?[{key:"default-settings",label:"Default Team Settings",children:(0,t.jsx)(sk.default,{accessToken:a,userID:r||"",userRole:n||""})}]:[]];return(0,t.jsxs)(e6,{style:{padding:e2.paddingLG,paddingInline:2*e2.paddingLG},children:[es?(0,t.jsx)(sw.default,{teamId:es,onUpdate:e=>{l(t=>null==t?t:t.map(t=>e.team_id===t.team_id?(0,eO.updateExistingKeys)(t,e):t)),K()},onClose:()=>{ea(null),er(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let t=0;te.team_id===es)),is_proxy_admin:"Admin"==n,userModels:eu,editTeam:el,premiumUser:d}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsxs)(e4,{level:2,style:{margin:0},children:[(0,t.jsx)(sC.TeamOutlined,{style:{marginRight:8}}),"Teams"]}),(0,t.jsx)(e5,{type:"secondary",children:"Manage teams, members, and their access to models and budgets"})]}),sJ(n,r,o)&&(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>en(!0),children:"Create Team"})]}),(0,t.jsx)(t5.Tabs,{items:e7})]}),sJ(n,r,o)&&(0,t.jsx)(y.Modal,{title:"Create Team",open:ei,width:1e3,footer:null,onOk:()=>{en(!1),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1)},onCancel:()=>{en(!1),W.resetFields(),eA([]),eq({}),eU(null),eY(e=>e+1)},children:(0,t.jsxs)(w.Form,{form:W,onFinish:e0,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:""})}),(c=sX(n,r,o),m="Admin"!==n,u=1===c.length,p=0===c.length,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(f.Tooltip,{title:(0,t.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:P?P.organization_id:null,className:"mt-8",rules:m?[{required:!0,message:"Please select an organization"}]:[],help:u?"You can only create teams within this organization":m?"required":"",children:(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!m,disabled:u,placeholder:p?"No organizations available":"Search or select an Organization",onChange:e=>{W.setFieldValue("organization_id",e),E(c?.find(t=>t.organization_id===e)||null)},filterOption:(e,t)=>!!t&&(t.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:c?.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),m&&!u&&c.length>1&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(e5,{style:{color:"#1e40af",fontSize:14},children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(f.Tooltip,{title:"These are the models that your selected team has access to",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),rules:[{required:!0,message:"Please select at least one model"}],name:"models",children:(0,t.jsx)(sY.ModelSelect,{value:W.getFieldValue("models")||[],onChange:e=>W.setFieldValue("models",e),organizationID:W.getFieldValue("organization_id"),options:{includeSpecialOptions:!0,showAllProxyModelsOverride:!W.getFieldValue("organization_id")},context:"team",dataTestId:"create-team-models-select"})}),(0,t.jsx)(w.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(sK.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(w.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(k.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(k.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(k.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(k.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(w.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(sK.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(sK.default,{step:1,width:400})}),(0,t.jsxs)(eG.Accordion,{className:"mt-20 mb-8",onClick:()=>{eD||(eJ(),eE(!0))},children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Additional Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(w.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,t.jsx)(eQ.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,t.jsx)(w.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(sK.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(w.Form.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,t.jsx)(eQ.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(w.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,t.jsx)(sK.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,t.jsx)(sK.default,{step:1,width:400})}),(0,t.jsx)(w.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,t.jsx)(C.Input.TextArea,{rows:4})}),(0,t.jsx)(w.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:d?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(C.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!d})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"Setup your first guardrail",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:eS.map(e=>({value:e,label:e}))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(f.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(_.Switch,{disabled:!d,checkedChildren:d?"Yes":"Premium feature - Upgrade to disable global guardrails by team",unCheckedChildren:d?"No":"Premium feature - Upgrade to disable global guardrails by team"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(f.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:eI.map(e=>({value:e,label:e}))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(f.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-8",help:"Select access groups to assign to this team",children:(0,t.jsx)(s$.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(f.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,t.jsx)(sW.default,{onChange:e=>W.setFieldValue("allowed_vector_store_ids",e),value:W.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(eW.AccordionBody,{children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(f.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,t.jsx)(ey.default,{onChange:e=>W.setFieldValue("allowed_mcp_servers_and_groups",e),value:W.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(w.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(C.Input,{type:"hidden"})}),(0,t.jsx)(w.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(ej.default,{accessToken:a||"",selectedServers:W.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:W.getFieldValue("mcp_tool_permissions")||{},onChange:e=>W.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(f.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,t.jsx)(sU.default,{onChange:e=>W.setFieldValue("allowed_agents_and_groups",e),value:W.getFieldValue("allowed_agents_and_groups"),accessToken:a||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(sH.default,{value:eL,onChange:eA,premiumUser:d})})})]}),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(sG.default,{accessToken:a||"",value:e$||void 0,onChange:eU,modelData:eu.length>0?{data:eu.map(e=>({model_name:e}))}:void 0},eH)})})]},`router-settings-accordion-${eH}`),(0,t.jsxs)(eG.Accordion,{className:"mt-8 mb-8",children:[(0,t.jsx)(eK.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(eW.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(e5,{type:"secondary",style:{fontSize:14,marginBottom:16,display:"block"},children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(sV.default,{accessToken:a||"",initialModelAliases:eB,onAliasUpdate:eq,showExampleConfig:!1})]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(V.Button,{htmlType:"submit",children:"Create Team"})})]})})]})};var s0=e.i(702597),s1=e.i(846835),s2=e.i(147612),s4=e.i(191403),s5=e.i(976883),s6=e.i(657688),s3=e.i(437902);let{Text:s8}=sP.Typography,s7=({litellmParams:e,accessToken:s,onTestComplete:a})=>{let[l,r]=(0,i.useState)(!0),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{r(!0);try{let t=await (0,N.testSearchToolConnection)(s,e);o(t),"success"===t.status&&ez.default.success("Connection test successful!")}catch(e){o({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{r(!1),a&&a()}})()},[s,e,a]);let m=n?.message?(e=>{if(!e)return"Unknown error";let t=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(t.includes("")||t.includes("(.*?)<\/title>/);return e?e[1]:t.includes("401")||t.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return t.length>200?t.substring(0,200)+"...":t})(n.message):"Unknown error";return l?(0,t.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,t.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,t.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,t.jsxs)(s8,{style:{fontSize:"16px"},children:["Testing connection to ",e.search_provider||"search provider","..."]}),(0,t.jsx)(s3.default,{id:"dc9a0e2d897fe63b",children:"@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"})]})}):n?(0,t.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===n.status?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,t.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,t.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,t.jsxs)("div",{style:{marginLeft:"12px"},children:[(0,t.jsxs)(s8,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",e.search_provider," successful!"]}),n.test_query&&(0,t.jsxs)(s8,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,t.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:n.test_query})]}),void 0!==n.results_count&&(0,t.jsxs)(s8,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",n.results_count]})]})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,t.jsx)(t0.WarningOutlined,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,t.jsxs)(s8,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",e.search_provider||"search provider"," failed"]})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,t.jsxs)(s8,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,t.jsx)(s8,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:m}),n.error_type&&(0,t.jsx)("div",{style:{marginTop:"8px"},children:(0,t.jsxs)(s8,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,t.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:n.error_type})]})}),n.message&&(0,t.jsx)("div",{style:{marginTop:"12px"},children:(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,t.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,t.jsx)(s8,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error Details"}),(0,t.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:n.message})]}),(0,t.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,t.jsx)(s8,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,t.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,t.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,t.jsx)(F.Divider,{style:{margin:"24px 0 16px"}}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,t.jsx)(V.Button,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,t.jsx)(z.InfoCircleOutlined,{}),children:"View Search Documentation"})})]}):null},{TextArea:s9}=C.Input,ae=({providerName:e,displayName:s})=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)(s6.default,{src:`../ui/assets/logos/${e}.png`,alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,t.jsx)("span",{children:s})]}),at=({userRole:e,accessToken:s,onCreateSuccess:a,isModalVisible:l,setModalVisible:r})=>{let[o]=w.Form.useForm(),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)({}),[p,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[j,b]=(0,i.useState)(""),{data:_,isLoading:v}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,N.fetchAvailableSearchProviders)(s)},enabled:!!s&&l}),C=_?.providers||[],S=async e=>{c(!0);try{let t={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};if(console.log("Creating search tool with payload:",t),null!=s){let e=await (0,N.createSearchTool)(s,t);ez.default.success("Search tool created successfully"),o.resetFields(),u({}),r(!1),a(e)}}catch(e){ez.default.error("Error creating search tool: "+e)}finally{c(!1)}},T=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),b(`test-${Date.now()}`),x(!0)}catch(e){ez.default.error("Please fill in Search Provider and API Key before testing")}};return(i.default.useEffect(()=>{l||u({})},[l]),(0,eN.isAdminRole)(e))?(0,t.jsxs)(y.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("span",{className:"text-2xl",children:"🔍"}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:l,width:800,onCancel:()=>{o.resetFields(),u({}),r(!1)},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)(w.Form,{form:o,onFinish:S,onValuesChange:(e,t)=>u(t),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,t.jsx)(f.Tooltip,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_tool_name",rules:[{required:!0,message:"Please enter a search tool name"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Name can only contain letters, numbers, hyphens, and underscores"}],children:(0,t.jsx)(eQ.TextInput,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,t.jsx)(f.Tooltip,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(k.Select,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:v,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:C.map(e=>(0,t.jsx)(k.Select.Option,{value:e.provider_name,label:(0,t.jsx)(ae,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,t.jsx)(ae,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,t.jsx)(f.Tooltip,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,t.jsx)(z.InfoCircleOutlined,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"api_key",rules:[{required:!1,message:"Please enter an API key"}],children:(0,t.jsx)(eQ.TextInput,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(w.Form.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,t.jsx)(s9,{rows:3,placeholder:"Brief description of this search tool's purpose",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,t.jsx)(f.Tooltip,{title:"Get help on our github",children:(0,t.jsx)(sP.Typography.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,t.jsxs)("div",{className:"space-x-2",children:[(0,t.jsx)(n.Button,{onClick:T,loading:h,children:"Test Connection"}),(0,t.jsx)(n.Button,{loading:d,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,t.jsx)(y.Modal,{title:"Connection Test Results",open:p,onCancel:()=>{x(!1),g(!1)},footer:[(0,t.jsx)(n.Button,{onClick:()=>{x(!1),g(!1)},children:"Close"},"close")],width:700,children:p&&s&&(0,t.jsx)(s7,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:s,onTestComplete:()=>g(!1)},j)})]}):null};var as=e.i(678784),aa=e.i(118366),al=e.i(928685);let{Text:ar}=sP.Typography,ai=({searchToolName:e,accessToken:s,className:a=""})=>{let[l,r]=(0,i.useState)(""),[n,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)([]),[u,p]=(0,i.useState)({}),[x,h]=(0,i.useState)(!1),g=async()=>{if(!l.trim())return void A.default.warning("Please enter a search query");d(!0);let t=performance.now();try{let a=await (0,N.searchToolQueryCall)(s,e,l),r=performance.now(),i=Math.round(r-t),n={query:l,response:a,timestamp:Date.now(),latency:i};m(e=>[n,...e])}catch(e){console.error("Error querying search tool:",e),ez.default.fromBackend("Failed to query search tool")}finally{d(!1)}},y=e=>new Date(e).toLocaleString(),j=(0,t.jsx)(tN.LoadingOutlined,{style:{fontSize:24},spin:!0}),f=c.length>0?c[0]:null;return(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(ew.Title,{children:"Test Search Tool"})}),(0,t.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:x?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:x?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,t.jsx)(al.SearchOutlined,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,t.jsx)(C.Input,{value:l,onChange:e=>r(e.target.value),onFocus:()=>h(!0),onBlur:()=>h(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),g())},placeholder:"Enter your search query...",disabled:n,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,t.jsx)(V.Button,{type:"primary",onClick:g,disabled:n||!l.trim(),icon:(0,t.jsx)(al.SearchOutlined,{}),loading:n,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:n||!l.trim()?void 0:"#1890ff",borderColor:n||!l.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,t.jsx)("div",{className:"flex-1",children:f||n?(0,t.jsxs)("div",{children:[n&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,t.jsx)(eF.Spin,{indicator:j}),(0,t.jsx)(ar,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),f&&!n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(ar,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,t.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:f.query})]}),(0,t.jsxs)("div",{className:"text-right ml-4",children:[(0,t.jsx)(ar,{className:"text-xs text-gray-500",children:y(f.timestamp)}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,t.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[f.response?.results?.length||0," ",f.response?.results?.length===1?"result":"results"]}),void 0!==f.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[f.latency,"ms"]})]})]})]})]})}),f.response&&f.response.results&&f.response.results.length>0?(0,t.jsx)("div",{className:"space-y-3",children:f.response.results.map((e,s)=>{let a=u[`0-${s}`]||!1;return(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",e.currentTarget.style.borderColor="#e0e7ff"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)",e.currentTarget.style.borderColor="#e5e7eb"},children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-600 hover:text-blue-700 flex-1 leading-snug",style:{textDecoration:"none"},onMouseEnter:e=>e.currentTarget.style.textDecoration="underline",onMouseLeave:e=>e.currentTarget.style.textDecoration="none",children:e.title}),(0,t.jsx)(V.Button,{type:"text",size:"small",className:"flex-shrink-0",icon:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),onClick:()=>window.open(e.url,"_blank"),style:{color:"#6b7280"}})]}),(0,t.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,t.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:a?e.snippet:`${e.snippet.substring(0,200)}${e.snippet.length>200?"...":""}`}),e.snippet.length>200&&(0,t.jsx)(V.Button,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>{let e;return e=`0-${s}`,void p(t=>({...t,[e]:!t[e]}))},style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:a?"Show less":"Show more"})]})},s)})}):(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,t.jsx)(al.SearchOutlined,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,t.jsx)(ar,{className:"text-gray-600 font-medium",children:"No results found"}),(0,t.jsx)(ar,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),c.length>1&&(0,t.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)(ar,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,t.jsx)(V.Button,{onClick:()=>{m([]),p({}),ez.default.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.slice(1,6).map((e,s)=>(0,t.jsxs)("div",{className:"p-3 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-gray-300",onClick:()=>{r(e.query)},children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,t.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-medium text-blue-600",children:[e.response?.results?.length||0," ",e.response?.results?.length===1?"result":"results"]}),void 0!==e.latency&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"•"}),(0,t.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,t.jsx)("span",{children:"•"}),(0,t.jsx)("span",{children:y(e.timestamp)})]})]},s+1))})]})]}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,t.jsx)(al.SearchOutlined,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,t.jsx)(ar,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,t.jsx)(ar,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},an=({searchTool:e,onBack:s,isEditing:a,accessToken:l,availableProviders:r})=>{var d;let c,[m,u]=(0,i.useState)({}),p=async(e,t)=>{await (0,eO.copyToClipboard)(e)&&(u(e=>({...e,[t]:!0})),setTimeout(()=>{u(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Button,{icon:eA.ArrowLeftIcon,variant:"light",className:"mb-4",onClick:s,children:"Back to All Search Tools"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(ew.Title,{children:e.search_tool_name}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-name"]?(0,t.jsx)(as.CheckIcon,{size:12}):(0,t.jsx)(aa.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_name,"search-tool-name"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(g.Text,{className:"text-gray-500 font-mono",children:e.search_tool_id}),(0,t.jsx)(V.Button,{type:"text",size:"small",icon:m["search-tool-id"]?(0,t.jsx)(as.CheckIcon,{size:12}):(0,t.jsx)(aa.CopyIcon,{size:12}),onClick:()=>p(e.search_tool_id,"search-tool-id"),className:`left-2 z-10 transition-all duration-200 ${m["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsxs)(t4.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Provider"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(ew.Title,{children:(d=e.litellm_params.search_provider,c=r.find(e=>e.provider_name===d),c?.ui_friendly_name||d)})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"API Key"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.litellm_params.api_key?"****":"Not set"})})]}),(0,t.jsxs)(o.Card,{children:[(0,t.jsx)(g.Text,{children:"Created At"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.created_at?new Date(e.created_at).toLocaleString():"Unknown"})})]})]}),e.search_tool_info?.description&&(0,t.jsxs)(o.Card,{className:"mt-6",children:[(0,t.jsx)(g.Text,{children:"Description"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(g.Text,{children:e.search_tool_info.description})})]}),(0,t.jsx)("div",{className:"mt-6",children:l&&(0,t.jsx)(ai,{searchToolName:e.search_tool_name,accessToken:l})})]})},ao=({accessToken:e,userRole:s,userID:a})=>{let{data:l,isLoading:r,refetch:o}=(0,t1.useQuery)({queryKey:["searchTools"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,N.fetchSearchTools)(e).then(e=>e.search_tools||[])},enabled:!!e}),{data:d,isLoading:c}=(0,t1.useQuery)({queryKey:["searchProviders"],queryFn:()=>{if(!e)throw Error("Access Token required");return(0,N.fetchAvailableSearchProviders)(e)},enabled:!!e}),m=d?.providers||[],[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[j,f]=(0,i.useState)(!1),[b,_]=(0,i.useState)(null),[v,S]=(0,i.useState)(!1),[T,F]=(0,i.useState)(!1),[L,A]=(0,i.useState)(!1),[P]=w.Form.useForm(),M=i.default.useMemo(()=>{let e,s,a;return e=e=>{_(e),S(!1)},s=e=>{let t=l?.find(t=>t.search_tool_id===e);t&&(P.setFieldsValue({search_tool_name:t.search_tool_name,search_provider:t.litellm_params.search_provider,api_key:t.litellm_params.api_key,api_base:t.litellm_params.api_base,timeout:t.litellm_params.timeout,max_retries:t.litellm_params.max_retries,description:t.search_tool_info?.description}),_(e),A(!0))},a=D,[{title:"Search Tool ID",dataIndex:"search_tool_id",key:"search_tool_id",render:(s,a)=>a.is_from_config?(0,t.jsx)("span",{className:"text-xs",children:"-"}):(0,t.jsx)("button",{onClick:()=>e(a.search_tool_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left cursor-pointer max-w-40",children:(0,t.jsx)("span",{className:"truncate block",children:a.search_tool_id})})},{title:"Name",dataIndex:"search_tool_name",key:"search_tool_name",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Provider",key:"provider",render:(e,s)=>{let a=s.litellm_params.search_provider,l=m.find(e=>e.provider_name===a),r=l?.ui_friendly_name||a;return(0,t.jsx)("span",{className:"text-sm",children:r})}},{title:"Created At",dataIndex:"created_at",key:"created_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.created_at?new Date(s.created_at).toLocaleDateString():"-"})},{title:"Updated At",dataIndex:"updated_at",key:"updated_at",render:(e,s)=>(0,t.jsx)("span",{className:"text-xs",children:s.updated_at?new Date(s.updated_at).toLocaleDateString():"-"})},{title:"Source",key:"source",render:(e,s)=>{let a=s.is_from_config??!1;return(0,t.jsx)(I.Tag,{color:a?"default":"blue",children:a?"Config":"DB"})}},{title:"Actions",key:"actions",render:(e,l)=>{let r=l.search_tool_id,i=l.is_from_config??!1;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eR.default,{variant:"Edit",tooltipText:"Edit search tool",disabled:i,disabledTooltipText:"Config search tool cannot be edited on the dashboard. Please edit it from the config file.",onClick:()=>{r&&!i&&s(r)}}),(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete search tool",disabled:i,disabledTooltipText:"Config search tool cannot be deleted on the dashboard. Please delete it from the config file.",onClick:()=>{r&&!i&&a(r)}})]})}}]},[m,l,P]);function D(e){p(e),h(!0)}let E=async()=>{if(null!=u&&null!=e){f(!0);try{await (0,N.deleteSearchTool)(e,u),ez.default.success("Deleted search tool successfully"),h(!1),p(null),o()}catch(e){console.error("Error deleting the search tool:",e),ez.default.error("Failed to delete search tool")}finally{f(!1)}}},z=l?.find(e=>e.search_tool_id===u),O=z?m.find(e=>e.provider_name===z.litellm_params.search_provider):null,R=async()=>{if(e&&b)try{let t=await P.validateFields(),s={search_tool_name:t.search_tool_name,litellm_params:{search_provider:t.search_provider,api_key:t.api_key,api_base:t.api_base,timeout:t.timeout?parseFloat(t.timeout):void 0,max_retries:t.max_retries?parseInt(t.max_retries):void 0},search_tool_info:t.description?{description:t.description}:void 0};await (0,N.updateSearchTool)(e,b,s),ez.default.success("Search tool updated successfully"),A(!1),P.resetFields(),_(null),o()}catch(e){console.error("Failed to update search tool:",e),ez.default.error("Failed to update search tool")}};return e&&s&&a?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(sQ.default,{isOpen:x,title:"Delete Search Tool",message:"Are you sure you want to delete this search tool? This action cannot be undone.",resourceInformationTitle:"Search Tool Information",resourceInformation:z?[{label:"Name",value:z.search_tool_name},{label:"ID",value:z.search_tool_id,code:!0},{label:"Provider",value:O?.ui_friendly_name||z.litellm_params.search_provider},{label:"Description",value:z.search_tool_info?.description||"-"}]:[],onCancel:()=>{h(!1),p(null)},onOk:E,confirmLoading:j}),(0,t.jsx)(at,{userRole:s,accessToken:e,onCreateSuccess:e=>{F(!1),o()},isModalVisible:T,setModalVisible:F}),(0,t.jsx)(y.Modal,{title:"Edit Search Tool",open:L,onOk:R,onCancel:()=>{A(!1),P.resetFields(),_(null)},width:600,children:(0,t.jsxs)(w.Form,{form:P,layout:"vertical",children:[(0,t.jsx)(w.Form.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g., my-perplexity-search"})}),(0,t.jsx)(w.Form.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,t.jsx)(k.Select,{placeholder:"Select a search provider",loading:c,children:m.map(e=>(0,t.jsx)(k.Select.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,t.jsx)(w.Form.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,t.jsx)(C.Input.Password,{placeholder:"Enter API key"})}),(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(C.Input.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,t.jsx)(ew.Title,{children:"Search Tools"}),(0,t.jsx)(g.Text,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,eN.isAdminRole)(s)&&(0,t.jsx)(n.Button,{className:"mt-4 mb-4",onClick:()=>F(!0),children:"+ Add New Search Tool"}),(0,t.jsx)(()=>b?(0,t.jsx)(an,{searchTool:l?.find(e=>e.search_tool_id===b)||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{S(!1),_(null),o()},isEditing:v,accessToken:e,availableProviders:m}):(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(eF.Spin,{spinning:r,indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"large",children:(0,t.jsx)(te.Table,{bordered:!0,dataSource:l||[],columns:M,rowKey:e=>e.search_tool_id||e.search_tool_name,pagination:!1,locale:{emptyText:"No search tools configured"},size:"small"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:e,userRole:s,userID:a}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};var ad=e.i(700904),ac=e.i(686311),am=e.i(37727),au=e.i(643531),ap=e.i(636772),ax=e.i(115571);function ah({onOpen:e,onDismiss:s,isVisible:a,title:l,description:r,buttonText:n,icon:o,accentColor:d,buttonStyle:c}){let m=(0,ap.useDisableShowPrompts)(),[u,p]=(0,i.useState)(100),[x,h]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{if(!a){p(100),h(!1);return}let e=Date.now(),t=setInterval(()=>{let s=Math.max(0,100-(Date.now()-e)/15e3*100);p(s),s<=0&&clearInterval(t)},50);return()=>clearInterval(t)},[a]),(0,i.useEffect)(()=>{if(x){let e=setTimeout(()=>{h(!1),s()},5e3);return()=>clearTimeout(e)}},[x,s]),x)?(0,t.jsx)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-green-100 flex items-center justify-center",children:(0,t.jsx)(au.Check,{className:"h-5 w-5 text-green-600"})}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)("p",{className:"text-sm text-gray-700 font-medium",children:"Got it, we will not ask again. Reactivate this at any time in the User Menu."})})]})})}):!a||m?null:(0,t.jsxs)("div",{className:`fixed bottom-6 right-6 z-40 w-80 bg-white rounded-lg shadow-xl border border-gray-200 overflow-hidden transform transition-all duration-300 ease-out ${a?"translate-y-0 opacity-100 scale-100":"translate-y-4 opacity-0 scale-95"}`,children:[(0,t.jsx)("div",{className:"h-1 bg-gray-100 w-full",children:(0,t.jsx)("div",{className:"h-full transition-all duration-100 ease-linear",style:{width:`${u}%`,backgroundColor:d}})}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",style:{color:d},children:[(0,t.jsx)(o,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm",children:l})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-0.5 rounded hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:r}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(V.Button,{type:"primary",block:!0,onClick:e,style:c,children:n}),(0,t.jsx)(V.Button,{variant:"outlined",danger:!0,block:!0,onClick:()=>{(0,ax.setLocalStorageItem)("disableShowPrompts","true"),(0,ax.emitLocalStorageChange)("disableShowPrompts"),h(!0)},className:"text-xs",children:"Don't ask me again"})]})]})]})}function ag({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ah,{onOpen:e,onDismiss:s,isVisible:a,title:"Quick feedback",description:"Help us improve LiteLLM! Share your experience in 5 quick questions.",buttonText:"Share feedback",icon:ac.MessageSquare,accentColor:"#3b82f6"})}var ay=e.i(972520),aj=e.i(180127),aj=aj,af=e.i(536916);let ab=[{id:"oss_adoption",label:"OSS Adoption",description:"Stars, contributors, forks, community support"},{id:"ai_integration",label:"AI Integration",description:"LiteLLM had the logging/guardrail integration we needed - Langfuse, OTEL, S3 logging, Azure Content Safety guardrails"},{id:"unified_api",label:"Unified API",description:"LiteLLM had the best OpenAI-compatible API across providers - OpenAI, Anthropic, Gemini, etc."},{id:"breadth_of_models",label:"Breadth of Models/Providers",description:"LiteLLM had the provider + endpoint combinations we needed - /ocr endpoint with Mistral OCR, /batches endppint with Bedrock API, etc."},{id:"other",label:"Other",description:"Something else not listed above"}];function a_({isOpen:e,onClose:s,onComplete:a}){let[l,r]=(0,i.useState)(1),[n,o]=(0,i.useState)({usingAtCompany:null,companyName:"",startDate:"",reasons:[],otherReason:"",email:""}),[d,c]=(0,i.useState)(!1),m=!0===n.usingAtCompany?5:4;if(!e)return null;let u=async()=>{c(!0);try{let e={oss_adoption:"OSS Adoption (stars, contributors, forks)",ai_integration:"AI Integration (Langfuse, OTEL, S3, Azure Content Safety)",unified_api:"Unified API (OpenAI-compatible)",breadth_of_models:"Breadth of Models/Providers (/ocr, /batches, Bedrock, Azure OCR)"},t=n.reasons.map(t=>"other"===t&&n.otherReason?`Other: ${n.otherReason}`:e[t]||t),s=new URLSearchParams({"entry.2015264290":n.usingAtCompany?"Yes":"No","entry.1876243786":n.companyName||"","entry.1282591459":n.startDate,"entry.393456108":t.join(", "),"entry.928142208":n.email||""});await fetch("https://feedback.litellm.ai/survey",{method:"POST",mode:"no-cors",body:s})}catch(e){console.error("Failed to submit survey:",e)}c(!1),a()},p=(e,t)=>{o(s=>({...s,[e]:t}))},x=e=>{o(t=>({...t,reasons:t.reasons.includes(e)?t.reasons.filter(t=>t!==e):[...t.reasons,e]}))},h=()=>{if(!1===n.usingAtCompany){if(1===l)return 1;if(3===l)return 2;if(4===l)return 3;if(5===l)return 4}return l},g=5===l;return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-lg bg-white rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[90vh] transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-blue-600",children:[(0,t.jsx)(ac.MessageSquare,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Quick Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-5 w-5"})})]}),(0,t.jsx)(sL.Progress,{percent:h()/m*100,showInfo:!1,strokeColor:"#2563eb",className:"m-0"}),(0,t.jsx)("div",{className:"p-8 flex-1 overflow-y-auto",children:1===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Are you using LiteLLM at your company?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Help us understand how our product is being used in professional environments."}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-4",children:[(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!0),className:`p-6 rounded-lg border-2 text-left transition-all ${!0===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"Yes"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"We use it for work"})]}),(0,t.jsxs)("button",{onClick:()=>p("usingAtCompany",!1),className:`p-6 rounded-lg border-2 text-left transition-all ${!1===n.usingAtCompany?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:border-blue-300 hover:bg-gray-50"}`,children:[(0,t.jsx)("span",{className:"block text-lg font-semibold text-gray-900 mb-1",children:"No"}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Personal project / Hobby"})]})]})]}):2===l&&!0===n.usingAtCompany?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"What company are you using LiteLLM at?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"This helps us understand our user base better."}),(0,t.jsx)(C.Input,{size:"large",placeholder:"Enter your company name",value:n.companyName,onChange:e=>p("companyName",e.target.value),autoFocus:!0})]}):3===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"When did you start using LiteLLM?"}),(0,t.jsx)(T.Radio.Group,{value:n.startDate,onChange:e=>p("startDate",e.target.value),className:"w-full",children:(0,t.jsx)(U.Space,{direction:"vertical",className:"w-full",children:["Less than a month ago","1-3 months ago","3-6 months ago","More than 6 months ago"].map(e=>(0,t.jsx)("label",{className:`flex items-center p-4 rounded-lg border cursor-pointer transition-all w-full ${n.startDate===e?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:(0,t.jsx)(T.Radio,{value:e,children:e})},e))})})]}):4===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Why did you pick LiteLLM over other AI Gateways?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Select all that apply."}),(0,t.jsx)("div",{className:"space-y-3",children:ab.map(e=>{let s=n.reasons.includes(e.id);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>x(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),x(e.id))},className:`flex items-start p-4 rounded-lg border cursor-pointer transition-all ${s?"border-blue-600 bg-blue-50 ring-1 ring-blue-600":"border-gray-200 hover:bg-gray-50"}`,children:[(0,t.jsx)(af.Checkbox,{checked:s,className:"mt-0.5 pointer-events-none"}),(0,t.jsxs)("div",{className:"ml-3",children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900",children:e.label}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]}),"other"===e.id&&s&&(0,t.jsx)(C.Input,{className:"mt-2 ml-7",placeholder:"Please specify...",value:n.otherReason,onChange:e=>p("otherReason",e.target.value),onClick:e=>e.stopPropagation(),autoFocus:!0})]},e.id)})})]}):5===l?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Want to share more?"}),(0,t.jsx)("p",{className:"text-gray-500",children:"Leave your email and we may reach out to learn more about your experience. This is completely optional."}),(0,t.jsx)(C.Input,{size:"large",type:"email",placeholder:"your@email.com (optional)",value:n.email,onChange:e=>p("email",e.target.value),autoFocus:!0}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"We will only use this to follow up on your feedback. No spam, ever."})]}):null}),(0,t.jsxs)("div",{className:"px-6 py-4 bg-gray-50 border-t border-gray-200 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-gray-500 font-medium",children:["Step ",h()," of ",m]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[l>1&&(0,t.jsx)(V.Button,{onClick:()=>{3===l&&!1===n.usingAtCompany?r(1):r(l-1)},disabled:d,icon:(0,t.jsx)(aj.default,{className:"h-4 w-4"}),children:"Back"}),(0,t.jsxs)(V.Button,{type:"primary",onClick:()=>{1===l&&!1===n.usingAtCompany?r(3):l<5?r(l+1):u()},disabled:!(1===l?null!==n.usingAtCompany:2===l?n.companyName.trim().length>0:3===l?""!==n.startDate:4===l?n.reasons.includes("other")?n.reasons.length>0&&n.otherReason.trim().length>0:n.reasons.length>0:5===l)||d,loading:d,className:"min-w-[100px]",children:[g?"Submit":"Next",!g&&(0,t.jsx)(ay.ArrowRight,{className:"ml-2 h-4 w-4"})]})]})]})]})]})}var av=e.i(758472);function aN({onOpen:e,onDismiss:s,isVisible:a}){return(0,t.jsx)(ah,{onOpen:e,onDismiss:s,isVisible:a,title:"Claude Code Feedback",description:"Help us improve your Claude Code experience with LiteLLM! Share your feedback in 4 quick questions.",buttonText:"Share feedback",icon:av.Code,accentColor:"#7c3aed",buttonStyle:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"}})}function aw({isOpen:e,onClose:s,onComplete:a}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:s}),(0,t.jsxs)("div",{className:"relative w-full max-w-md bg-white rounded-xl shadow-2xl overflow-hidden transform transition-all duration-300 ease-out",children:[(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-100 flex items-center justify-between bg-gray-50/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-purple-600",children:[(0,t.jsx)(av.Code,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-semibold text-sm tracking-wide uppercase",children:"Claude Code Feedback"})]}),(0,t.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",children:(0,t.jsx)(am.X,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"p-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Help us improve your experience"}),(0,t.jsx)("p",{className:"text-gray-600 mb-6",children:"We'd love to hear about your experience using LiteLLM with Claude Code. Your feedback helps us improve the product for everyone."}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-6",children:"This brief survey takes about 2-3 minutes to complete."}),(0,t.jsx)(V.Button,{type:"primary",size:"large",block:!0,onClick:()=>{window.open("https://forms.gle/LZeJQ3XytBakckYa9","_blank","noopener,noreferrer"),a()},icon:(0,t.jsx)(tq.ExternalLink,{className:"h-4 w-4"}),style:{backgroundColor:"#7c3aed",borderColor:"#7c3aed"},children:"Open Feedback Form"})]})]})]}):null}var ak=e.i(345244),aC=e.i(662316),aS=e.i(208075),aT=e.i(735042),aI=e.i(693569),aF=e.i(263147),aL=e.i(954616),aA=e.i(912598);let aP=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"DELETE",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}};var aM=e.i(152990),aD=e.i(682830),aE=e.i(657150),aE=aE,az=e.i(302202),aO=e.i(446891);let aR=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group/${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};var aB=e.i(21548),aq=e.i(573421),a$=e.i(516430),aE=aE,aU=e.i(823429),aU=aU,sR=sR,aV=e.i(304911),aH=e.i(289793),aG=e.i(500727),aE=aE,aK=e.i(168118);let{TextArea:aW}=C.Input;function aQ({form:e,isNameDisabled:s=!1}){let{data:a}=(0,aH.useAgents)(),{data:l}=(0,aG.useMCPServers)(),r=a?.agents??[],i=[{key:"1",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aK.InfoIcon,{size:16}),"General Info"]}),children:(0,t.jsxs)("div",{style:{paddingTop:16},children:[(0,t.jsx)(w.Form.Item,{name:"name",label:"Group Name",rules:[{required:!0,message:"Please enter the access group name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g. Engineering Team",disabled:s})}),(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(aW,{rows:4,placeholder:"Describe the purpose of this access group..."})})]})},{key:"2",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(sz,{size:16}),"Models"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"modelIds",label:"Allowed Models",children:(0,t.jsx)(sY.ModelSelect,{context:"global",value:e.getFieldValue("modelIds")??[],onChange:t=>e.setFieldsValue({modelIds:t}),style:{width:"100%"}})})})},{key:"3",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(az.ServerIcon,{size:16}),"MCP Servers"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"mcpServerIds",label:"Allowed MCP Servers",children:(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"Select MCP servers",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:(l??[]).map(e=>({label:e.server_name??e.server_id,value:e.server_id}))})})})},{key:"4",label:(0,t.jsxs)(U.Space,{align:"center",size:4,children:[(0,t.jsx)(aE.default,{size:16}),"Agents"]}),children:(0,t.jsx)("div",{style:{paddingTop:16},children:(0,t.jsx)(w.Form.Item,{name:"agentIds",label:"Allowed Agents",children:(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"Select agents",style:{width:"100%"},optionFilterProp:"label",allowClear:!0,options:r.map(e=>({label:e.agent_name,value:e.agent_id}))})})})}];return(0,t.jsx)(w.Form,{form:e,layout:"vertical",name:"access_group_form",initialValues:{modelIds:[],mcpServerIds:[],agentIds:[]},children:(0,t.jsx)(t5.Tabs,{defaultActiveKey:"1",items:i})})}let aY=async(e,t,s)=>{let a=(0,N.getProxyBaseUrl)(),l=`${a}/v1/access_group/${encodeURIComponent(t)}`,r=await fetch(l,{method:"PUT",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(s)});if(!r.ok){let e=await r.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return r.json()};function aJ({visible:e,accessGroup:s,onCancel:a,onSuccess:l}){let[r]=w.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async({accessGroupId:t,params:s})=>{if(!e)throw Error("Access token is required");return aY(e,t,s)},onSuccess:(e,{accessGroupId:s})=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all}),t.invalidateQueries({queryKey:aF.accessGroupKeys.detail(s)})}})})();return(0,i.useEffect)(()=>{e&&s&&r.setFieldsValue({name:s.access_group_name,description:s.description??"",modelIds:s.access_model_names??[],mcpServerIds:s.access_mcp_server_ids??[],agentIds:s.access_agent_ids??[]})},[e,s,r]),(0,t.jsx)(y.Modal,{title:"Edit Access Group",open:e,onOk:()=>{r.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};n.mutate({accessGroupId:s.access_group_id,params:t},{onSuccess:()=>{A.default.success("Access group updated successfully"),l?.(),a()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:a,width:700,okText:"Save Changes",cancelText:"Cancel",confirmLoading:n.isPending,destroyOnHidden:!0,children:(0,t.jsx)(aQ,{form:r})})}let{Title:aX,Text:aZ}=sP.Typography,{Content:a0}=sI.Layout;function a1({accessGroupId:e,onBack:s}){let{data:a,isLoading:l}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aA.useQueryClient)();return(0,t1.useQuery)({queryKey:aF.accessGroupKeys.detail(e),queryFn:async()=>aR(t,e),enabled:!!(t&&e)&&eN.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(aF.accessGroupKeys.list({}));return t?.find(t=>t.access_group_id===e)}})})(e),{token:r}=sA.theme.useToken(),[n,o]=(0,i.useState)(!1),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(!1);if(l)return(0,t.jsx)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:(0,t.jsx)(sT.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{size:"large"})})});if(!a)return(0,t.jsxs)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aB.Empty,{description:"Access group not found"})]});let p=a.access_model_names??[],x=a.access_mcp_server_ids??[],h=a.access_agent_ids??[],g=a.assigned_key_ids??[],y=a.assigned_team_ids??[],j=d?g:g.slice(0,5),f=m?y:y.slice(0,5),b=[{key:"models",label:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sz,{size:16}),"Models",(0,t.jsx)(I.Tag,{style:{marginInlineEnd:0},children:p?.length})]}),children:p?.length>0?(0,t.jsx)(aq.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:p,renderItem:e=>(0,t.jsx)(aq.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No models assigned to this group"})},{key:"mcp",label:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(az.ServerIcon,{size:16}),"MCP Servers",(0,t.jsx)(I.Tag,{children:x?.length})]}),children:x?.length>0?(0,t.jsx)(aq.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:x,renderItem:e=>(0,t.jsx)(aq.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No MCP servers assigned to this group"})},{key:"agents",label:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(aE.default,{size:16}),"Agents",(0,t.jsx)(I.Tag,{children:h?.length})]}),children:h?.length>0?(0,t.jsx)(aq.List,{grid:{gutter:16,xs:1,sm:2,md:3,lg:4},dataSource:h,renderItem:e=>(0,t.jsx)(aq.List.Item,{children:(0,t.jsx)(ts.Card,{size:"small",children:(0,t.jsx)(aZ,{code:!0,children:e})})})}):(0,t.jsx)(aB.Empty,{description:"No agents assigned to this group"})}];return(0,t.jsxs)(a0,{style:{padding:r.paddingLG,paddingInline:2*r.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(aX,{level:2,style:{margin:0},children:a.access_group_name}),(0,t.jsxs)(aZ,{type:"secondary",children:["ID: ",(0,t.jsx)(aZ,{copyable:!0,children:a.access_group_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aU.default,{size:16}),onClick:()=>{o(!0)},children:"Edit Access Group"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Group Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:a.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(a.created_at).toLocaleString(),a.created_by&&(0,t.jsxs)(aZ,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:a.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(a.updated_at).toLocaleString(),a.updated_by&&(0,t.jsxs)(aZ,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:a.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD.KeyIcon,{size:16}),"Attached Keys",(0,t.jsx)(I.Tag,{children:g?.length})]}),extra:g?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>c(!d),children:d?"Show Less":`View All (${g?.length})`}):null,children:g?.length>0?(0,t.jsx)(sT.Flex,{wrap:"wrap",gap:8,children:j.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aZ,{code:!0,style:{fontSize:12},children:e.length>20?`${e.slice(0,10)}...${e.slice(-6)}`:e})},e))}):(0,t.jsx)(aB.Empty,{description:"No keys attached",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sR.default,{size:16}),"Attached Teams",(0,t.jsx)(I.Tag,{children:y?.length})]}),extra:y?.length>5?(0,t.jsx)(V.Button,{type:"link",onClick:()=>u(!m),children:m?"Show Less":`View All (${y?.length})`}):null,children:y?.length>0?(0,t.jsx)(sT.Flex,{wrap:"wrap",gap:8,children:f.map(e=>(0,t.jsx)(I.Tag,{children:(0,t.jsx)(aZ,{code:!0,style:{fontSize:12},children:e})},e))}):(0,t.jsx)(aB.Empty,{description:"No teams attached",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(ts.Card,{children:(0,t.jsx)(t5.Tabs,{defaultActiveKey:"models",items:b})}),(0,t.jsx)(aJ,{visible:n,accessGroup:a,onCancel:()=>o(!1)})]})}let a2=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/v1/access_group`,l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};function a4({visible:e,onCancel:s,onSuccess:a}){let[l]=w.Form.useForm(),r=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return a2(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all})}})})();return(0,t.jsx)(y.Modal,{title:"Create Access Group",open:e,onOk:()=>{l.validateFields().then(e=>{let t={access_group_name:e.name,description:e.description,access_model_names:e.modelIds,access_mcp_server_ids:e.mcpServerIds,access_agent_ids:e.agentIds};r.mutate(t,{onSuccess:()=>{A.default.success("Access group created successfully"),l.resetFields(),a?.(),s()}})}).catch(e=>{console.log("Validate Failed:",e)})},onCancel:s,width:700,okText:"Create Group",cancelText:"Cancel",confirmLoading:r.isPending,destroyOnClose:!0,children:(0,t.jsx)(aQ,{form:l})})}let{Title:a5,Text:a6}=sP.Typography,{Content:a3}=sI.Layout;function a8(e){return{id:e.access_group_id,name:e.access_group_name,description:e.description??"",modelIds:e.access_model_names,mcpServerIds:e.access_mcp_server_ids,agentIds:e.access_agent_ids,keyIds:e.assigned_key_ids,teamIds:e.assigned_team_ids,createdAt:e.created_at,createdBy:e.created_by??"",updatedAt:e.updated_at,updatedBy:e.updated_by??""}}function a7(){let{token:e}=sA.theme.useToken(),{data:s,isLoading:a}=(0,aF.useAccessGroups)(),l=(0,i.useMemo)(()=>(s??[]).map(a8),[s]),[r,n]=(0,i.useState)(null),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[u,p]=(0,i.useState)(1),[x,h]=(0,i.useState)([]),[g,y]=(0,i.useState)(null),j=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return aP(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:aF.accessGroupKeys.all})}})})();(0,i.useEffect)(()=>{p(1)},[c]);let b=(0,i.useMemo)(()=>l.filter(e=>e.name.toLowerCase().includes(c.toLowerCase())||e.id.toLowerCase().includes(c.toLowerCase())||e.description.toLowerCase().includes(c.toLowerCase())),[l,c]),_=(0,i.useMemo)(()=>[{id:"id",accessorKey:"id",header:()=>(0,t.jsx)("span",{children:"ID"}),enableSorting:!1,size:170,cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.id,children:(0,t.jsx)(a6,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>n(s.id),children:s.id})})}},{id:"name",accessorKey:"name",header:()=>(0,t.jsx)("span",{children:"Name"}),enableSorting:!0,cell:({getValue:e})=>e()},{id:"resources",header:()=>(0,t.jsx)("span",{children:"Resources"}),enableSorting:!1,cell:({row:e})=>{let s=e.original,a=s.modelIds??[],l=s.mcpServerIds??[],r=s.agentIds??[];return(0,t.jsxs)(sT.Flex,{gap:12,align:"center",children:[(0,t.jsx)(f.Tooltip,{title:`${a?.length} Models`,children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sz,{size:14}),a?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${l?.length} MCP Servers`,children:(0,t.jsx)(I.Tag,{color:"cyan",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(az.ServerIcon,{size:14}),l?.length]})})}),(0,t.jsx)(f.Tooltip,{title:`${r?.length} Agents`,children:(0,t.jsx)(I.Tag,{color:"purple",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(aE.default,{size:14}),r?.length]})})})]})}},{id:"createdAt",accessorKey:"createdAt",header:()=>(0,t.jsx)("span",{children:"Created"}),enableSorting:!0,sortingFn:"datetime",cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["lg"]}},{id:"updatedAt",accessorKey:"updatedAt",header:()=>(0,t.jsx)("span",{children:"Updated"}),enableSorting:!1,cell:({getValue:e})=>new Date(e()).toLocaleDateString(),meta:{responsive:["xl"]}},{id:"actions",header:()=>(0,t.jsx)("span",{children:"Actions"}),enableSorting:!1,cell:({row:e})=>(0,t.jsx)(U.Space,{children:(0,t.jsx)(eR.default,{variant:"Delete",tooltipText:"Delete access group",onClick:()=>y(e.original)})})}],[]),v=(0,aM.useReactTable)({data:b,columns:_,state:{sorting:x},onSortingChange:h,getCoreRowModel:(0,aD.getCoreRowModel)(),getSortedRowModel:(0,aD.getSortedRowModel)(),getRowId:e=>e.id}),N=v.getRowModel().rows,w=N.slice((u-1)*10,10*u),k=(0,i.useMemo)(()=>new Map(w.map(e=>[e.original.id,e])),[w]),S=(v.getHeaderGroups()[0]?.headers??[]).map(e=>{let s=e.column.getCanSort(),a=e.column.getIsSorted(),l=e.column.columnDef.meta,r={title:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[e.isPlaceholder?null:(0,aM.flexRender)(e.column.columnDef.header,e.getContext()),s&&(0,t.jsx)(aO.TableHeaderSortDropdown,{sortState:!1!==a&&a,onSortChange:t=>{h(!1===t?[]:[{id:e.column.id,desc:"desc"===t}])},columnId:e.column.id})]}),key:e.id,width:e.column.columnDef.size,render:(t,s)=>{let a=k.get(s.id);if(!a)return null;let l=a.getVisibleCells().find(t=>t.column.id===e.id);return l?(0,aM.flexRender)(l.column.columnDef.cell,l.getContext()):null}};return l?.responsive&&(r.responsive=l.responsive),r}),T=w.map(e=>e.original);return r?(0,t.jsx)(a1,{accessGroupId:r,onBack:()=>n(null)}):(0,t.jsxs)(a3,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(a5,{level:2,style:{margin:0},children:"Access Groups"}),(0,t.jsx)(a6,{type:"secondary",children:"Manage resource permissions for your organization"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>d(!0),children:"Create Access Group"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sO.SearchIcon,{size:16}),placeholder:"Search groups by name, ID, or description...",style:{maxWidth:400},value:c,onChange:e=>m(e.target.value),allowClear:!0}),(0,t.jsx)(sF.Pagination,{current:u,total:N?.length,pageSize:10,onChange:e=>p(e),size:"small",showTotal:e=>`${e} groups`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:S,dataSource:T,rowKey:"id",loading:a,pagination:!1})]}),(0,t.jsx)(a4,{visible:o,onCancel:()=>d(!1)}),(0,t.jsx)(sQ.default,{isOpen:!!g,title:"Delete Access Group",message:"Are you sure you want to delete this access group? This action cannot be undone.",resourceInformationTitle:"Access Group Information",resourceInformation:[{label:"ID",value:g?.id,code:!0},{label:"Name",value:g?.name},{label:"Description",value:g?.description||"—"}],onCancel:()=>y(null),onOk:()=>{g&&j.mutate(g.id,{onSuccess:()=>{y(null)}})},confirmLoading:j.isPending})]})}var a9=e.i(510674);let le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"};var lt=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:le}))});let ls=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/project/new`,l=await fetch(a,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()};function la({form:e}){let{accessToken:s,userId:a,userRole:l}=(0,R.default)(),{data:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)([]),[m,u]=(0,i.useState)([]);(0,i.useEffect)(()=>{(async()=>{if(s)try{let e=(await (0,N.getGuardrailsList)(s)).guardrails.map(e=>e.guardrail_name);u(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[s]);let p=w.Form.useWatch("team_id",e);return(0,i.useEffect)(()=>{if(p&&r){let e=r.find(e=>e.team_id===p)??null;e&&e.team_id!==n?.team_id&&o(e)}},[p,r,n?.team_id]),(0,i.useEffect)(()=>{a&&l&&s&&n?(0,s0.fetchTeamModels)(a,l,s,n.team_id).then(e=>{c(Array.from(new Set([...n.models??[],...e])))}):c([])},[n,s,a,l]),(0,t.jsxs)(w.Form,{form:e,layout:"vertical",name:"project_form",initialValues:{isBlocked:!1},style:{marginTop:24},children:[(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{fontSize:13,color:"#374151",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Basic Information"}),(0,t.jsx)(F.Divider,{style:{marginTop:8,marginBottom:16}}),(0,t.jsxs)(t_.Row,{gutter:24,children:[(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"project_alias",label:"Project Name",rules:[{required:!0,message:"Please enter a project name"}],children:(0,t.jsx)(C.Input,{placeholder:"e.g. Customer Support Bot"})})}),(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"team_id",label:"Team",rules:[{required:!0,message:"Please select a team"}],children:(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Search or select a team",onChange:t=>{o(r?.find(e=>e.team_id===t)??null),e.setFieldValue("models",[])},allowClear:!0,optionLabelProp:"label",filterOption:(e,t)=>{let s=r?.find(e=>e.team_id===t?.value);if(!s)return!1;let a=e.toLowerCase().trim();return(s.team_alias||"").toLowerCase().includes(a)||s.team_id.toLowerCase().includes(a)},children:r?.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,label:e.team_alias||e.team_id,children:[(0,t.jsx)("span",{style:{fontWeight:500},children:e.team_alias})," ",(0,t.jsxs)("span",{style:{color:"#9ca3af"},children:["(",e.team_id,")"]})]},e.team_id))})})})]}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(w.Form.Item,{name:"description",label:"Description",children:(0,t.jsx)(C.Input.TextArea,{placeholder:"Describe the purpose of this project",rows:3})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)(w.Form.Item,{name:"models",label:"Allowed Models (scoped to selected team's models)",help:n?void 0:"Select a team first to see available models",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:n?"Select models":"Select a team first",disabled:!n,allowClear:!0,maxTagCount:"responsive",onChange:t=>{t.includes("all-team-models")&&e.setFieldsValue({models:["all-team-models"]})},children:[(0,t.jsx)(k.Select.Option,{value:"all-team-models",children:"All Team Models"},"all-team-models"),d.map(e=>(0,t.jsx)(k.Select.Option,{value:e,children:(0,B.getModelDisplayName)(e)},e))]})})})}),(0,t.jsx)(t_.Row,{gutter:24,children:(0,t.jsx)(tv.Col,{span:12,children:(0,t.jsx)(w.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,t.jsx)(L.InputNumber,{prefix:"$",style:{width:"100%"},placeholder:"0.00",min:0,precision:2})})})}),(0,t.jsx)(t_.Row,{children:(0,t.jsx)(tv.Col,{span:24,children:(0,t.jsx)($.Collapse,{ghost:!0,style:{background:"#f9fafb",borderRadius:8,border:"1px solid #e5e7eb"},items:[{key:"1",label:(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{color:"#374151"},children:"Advanced Settings"}),children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(sT.Flex,{align:"center",gap:12,children:[(0,t.jsx)(sP.Typography.Text,{strong:!0,children:"Block Project"}),(0,t.jsx)(w.Form.Item,{name:"isBlocked",valuePropName:"checked",noStyle:!0,children:(0,t.jsx)(_.Switch,{})})]}),(0,t.jsx)(w.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.isBlocked!==t.isBlocked,children:({getFieldValue:e})=>e("isBlocked")?(0,t.jsx)(j.Alert,{banner:!0,type:"warning",showIcon:!0,message:"All API requests using keys under this project will be rejected.",style:{marginTop:12}}):null}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(w.Form.Item,{label:"Guardrails",name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:m.map(e=>({value:e,label:e}))})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Model-Specific Limits"}),(0,t.jsx)(w.Form.List,{name:"modelLimits",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(w.Form.Item,{...r,name:[a,"model"],rules:[{required:!0,message:"Missing model"},{validator:(t,s)=>s&&(e.getFieldValue("modelLimits")??[]).filter(e=>e?.model===s).length>1?Promise.reject(Error("Duplicate model")):Promise.resolve()}],children:(0,t.jsx)(C.Input,{placeholder:"Model name (e.g. gpt-4)"})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"tpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"TPM Limit",min:0})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"rpm"],children:(0,t.jsx)(L.InputNumber,{placeholder:"RPM Limit",min:0})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(w.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Model Limit"})})]})}),(0,t.jsx)(F.Divider,{}),(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{display:"block",marginBottom:12},children:"Metadata"}),(0,t.jsx)(w.Form.List,{name:"metadata",children:(s,{add:a,remove:l})=>(0,t.jsxs)(t.Fragment,{children:[s.map(({key:s,name:a,...r})=>(0,t.jsxs)(U.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[(0,t.jsx)(w.Form.Item,{...r,name:[a,"key"],rules:[{required:!0,message:"Missing key"},{validator:(t,s)=>s&&(e.getFieldValue("metadata")??[]).filter(e=>e?.key===s).length>1?Promise.reject(Error("Duplicate key")):Promise.resolve()}],children:(0,t.jsx)(C.Input,{placeholder:"Key"})}),(0,t.jsx)(w.Form.Item,{...r,name:[a,"value"],rules:[{required:!0,message:"Missing value"}],children:(0,t.jsx)(C.Input,{placeholder:"Value"})}),(0,t.jsx)(G.MinusCircleOutlined,{onClick:()=>l(a),style:{color:"#ef4444"}})]},s)),(0,t.jsx)(w.Form.Item,{children:(0,t.jsx)(V.Button,{type:"dashed",onClick:()=>a(),block:!0,icon:(0,t.jsx)(H.PlusOutlined,{}),children:"Add Key-Value Pair"})})]})})]})}]})})})]})}function ll(e){let t={},s={};for(let a of e.modelLimits??[])a.model&&(null!=a.rpm&&(t[a.model]=a.rpm),null!=a.tpm&&(s[a.model]=a.tpm));let a={};for(let t of e.metadata??[])t.key&&(a[t.key]=t.value);return{project_alias:e.project_alias,description:e.description,models:e.models??[],max_budget:e.max_budget,blocked:e.isBlocked??!1,...e.guardrails&&e.guardrails.length>0&&{guardrails:e.guardrails},...Object.keys(t).length>0&&{model_rpm_limit:t},...Object.keys(s).length>0&&{model_tpm_limit:s},...Object.keys(a).length>0&&{metadata:a}}}function lr({isOpen:e,onClose:s}){let[a]=w.Form.useForm(),l=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return ls(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:a9.projectKeys.all})}})})(),r=async()=>{try{let e=await a.validateFields(),t={...ll(e),team_id:e.team_id};l.mutate(t,{onSuccess:()=>{A.default.success("Project created successfully"),a.resetFields(),s()},onError:e=>{A.default.error(e.message||"Failed to create project")}})}catch(e){console.error("Validation failed:",e)}},i=()=>{a.resetFields(),s()};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{fontSize:18},children:"Create New Project"}),open:e,onCancel:i,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:i,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(lt,{}),loading:l.isPending,onClick:r,children:"Create Project"},"submit")],children:(0,t.jsx)(la,{form:a})})}let li=async(e,t)=>{let s=(0,N.getProxyBaseUrl)(),a=`${s}/project/info?project_id=${encodeURIComponent(t)}`,l=await fetch(a,{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return l.json()},ln=(0,sE.default)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var aU=aU,sR=sR,lo=e.i(987432);let ld=async(e,t,s)=>{let a=(0,N.getProxyBaseUrl)(),l=`${a}/project/update`,r=await fetch(l,{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({project_id:t,...s})});if(!r.ok){let e=await r.json(),t=(0,N.deriveErrorMessage)(e);throw(0,N.handleError)(t),Error(t)}return r.json()};function lc({isOpen:e,project:s,onClose:a,onSuccess:l}){let[r]=w.Form.useForm(),n=(()=>{let{accessToken:e}=(0,R.default)(),t=(0,aA.useQueryClient)();return(0,aL.useMutation)({mutationFn:async({projectId:t,params:s})=>{if(!e)throw Error("Access token is required");return ld(e,t,s)},onSuccess:()=>{t.invalidateQueries({queryKey:a9.projectKeys.all})}})})();(0,i.useEffect)(()=>{if(e&&s){let e=s.metadata??{},t=e.model_rpm_limit??{},a=e.model_tpm_limit??{},l=Array.isArray(e.guardrails)?e.guardrails:[],i=[];for(let e of new Set([...Object.keys(t),...Object.keys(a)]))i.push({model:e,rpm:t[e],tpm:a[e]});let n=new Set(["model_rpm_limit","model_tpm_limit","guardrails"]),o=[];for(let[t,s]of Object.entries(e))n.has(t)||o.push({key:t,value:String(s)});r.setFieldsValue({project_alias:s.project_alias??"",team_id:s.team_id??"",description:s.description??"",models:s.models??[],max_budget:s.litellm_budget_table?.max_budget??void 0,isBlocked:s.blocked,guardrails:l.length>0?l:void 0,modelLimits:i.length>0?i:void 0,metadata:o.length>0?o:void 0})}},[e,s,r]);let o=async()=>{try{let e=await r.validateFields(),t={...ll(e),team_id:e.team_id};n.mutate({projectId:s.project_id,params:t},{onSuccess:()=>{A.default.success("Project updated successfully"),l?.(),a()},onError:e=>{A.default.error(e.message||"Failed to update project")}})}catch(e){console.error("Validation failed:",e)}};return(0,t.jsx)(y.Modal,{title:(0,t.jsx)(sP.Typography.Text,{strong:!0,style:{fontSize:18},children:"Edit Project"}),open:e,onCancel:a,width:720,destroyOnHidden:!0,footer:[(0,t.jsx)(V.Button,{onClick:a,children:"Cancel"},"cancel"),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(lo.SaveOutlined,{}),loading:n.isPending,onClick:o,children:"Save Changes"},"submit")],children:(0,t.jsx)(la,{form:r})})}let{Title:lm,Text:lu}=sP.Typography,{Content:lp}=sI.Layout;function lx({projectId:e,onBack:s}){let a,l,r,n,{data:o,isLoading:d}=(e=>{let{accessToken:t,userRole:s}=(0,R.default)(),a=(0,aA.useQueryClient)();return(0,t1.useQuery)({queryKey:a9.projectKeys.detail(e),queryFn:async()=>li(t,e),enabled:!!(t&&e)&&eN.all_admin_roles.includes(s||""),initialData:()=>{if(!e)return;let t=a.getQueryData(a9.projectKeys.list({}));return t?.find(t=>t.project_id===e)}})})(e),{data:c}=(0,eV.useTeam)(o?.team_id??void 0),m=c?.team_info??c,{token:u}=sA.theme.useToken(),[p,x]=(0,i.useState)(!1),h=o?.spend??0,g=o?.litellm_budget_table?.max_budget??null,y=null!=g&&g>0,j=y?Math.min(h/g*100,100):0,f=(0,i.useMemo)(()=>Object.entries(o?.model_spend??{}).map(([e,t])=>({model:e,spend:t})).sort((e,t)=>t.spend-e.spend),[o?.model_spend]);return d?(0,t.jsx)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:(0,t.jsx)(sT.Flex,{justify:"center",align:"center",style:{minHeight:300},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"large"})})}):o?(0,t.jsxs)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(lm,{level:2,style:{margin:0},children:o.project_alias??o.project_id}),(0,t.jsx)(I.Tag,{color:o.blocked?"red":"green",children:o.blocked?"Blocked":"Active"})]}),(0,t.jsxs)(lu,{type:"secondary",children:["ID: ",(0,t.jsx)(lu,{copyable:!0,children:o.project_id})]})]})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(aU.default,{size:16}),onClick:()=>x(!0),children:"Edit Project"})]}),(0,t.jsx)(t_.Row,{style:{marginBottom:24},children:(0,t.jsx)(ts.Card,{children:(0,t.jsxs)(eL.Descriptions,{title:"Project Details",column:1,children:[(0,t.jsx)(eL.Descriptions.Item,{label:"Description",children:o.description||"—"}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Created",children:[new Date(o.created_at).toLocaleString(),o.created_by&&(0,t.jsxs)(lu,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:o.created_by})]})]}),(0,t.jsxs)(eL.Descriptions.Item,{label:"Last Updated",children:[new Date(o.updated_at).toLocaleString(),o.updated_by&&(0,t.jsxs)(lu,{children:[" ","by"," ",(0,t.jsx)(aV.default,{userId:o.updated_by})]})]})]})})}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:8,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(ln,{size:16}),"Budget"]}),style:{height:"100%"},children:(0,t.jsxs)(sT.Flex,{vertical:!0,gap:16,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(lu,{strong:!0,style:{fontSize:28,lineHeight:1},children:["$",h.toFixed(2)]}),(0,t.jsx)("br",{}),(0,t.jsx)(lu,{type:"secondary",children:y?`of $${g.toFixed(2)} budget`:"No budget limit"})]}),y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(sL.Progress,{percent:Math.round(10*j)/10,strokeColor:j>=90?"#f5222d":j>=70?"#faad14":"#52c41a",showInfo:!1}),(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[(Math.round(10*j)/10).toFixed(1),"% utilized"]})]})]})})}),(0,t.jsx)(tv.Col,{xs:24,lg:16,children:(0,t.jsx)(ts.Card,{title:"Spend by Model",style:{height:"100%"},children:f.length>0?(0,t.jsx)(sd.BarChart,{data:f,index:"model",categories:["spend"],colors:["cyan"],layout:"vertical",valueFormatter:e=>`$${e.toFixed(4)}`,yAxisWidth:140,showLegend:!1,style:{height:Math.max(40*f.length,120)}}):(0,t.jsx)(aB.Empty,{description:"No model spend recorded yet",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsxs)(t_.Row,{gutter:[16,16],style:{marginBottom:24},children:[(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sD.KeyIcon,{size:16}),"Keys"]}),style:{height:"100%"},children:(0,t.jsx)(aB.Empty,{description:"No keys to display",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})}),(0,t.jsx)(tv.Col,{xs:24,lg:12,children:(0,t.jsx)(ts.Card,{title:(0,t.jsxs)(sT.Flex,{align:"center",gap:8,children:[(0,t.jsx)(sR.default,{size:16}),"Team"]}),style:{height:"100%"},children:m?(a=m.max_budget??null,l=m.spend??0,n=(r=null!=a&&a>0)?Math.min(l/a*100,100):0,(0,t.jsxs)(sT.Flex,{vertical:!0,gap:12,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(lu,{strong:!0,style:{fontSize:16},children:m.team_alias||m.team_id}),(0,t.jsx)("br",{}),(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:["ID:"," ",(0,t.jsx)(lu,{copyable:!0,style:{fontSize:12},children:m.team_id})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:4},children:"Models"}),(m.models?.length??0)>0?(0,t.jsx)(sT.Flex,{wrap:"wrap",gap:4,style:{maxHeight:60,overflow:"hidden"},children:m.models?.map(e=>(0,t.jsx)(I.Tag,{style:{margin:0},children:e},e))}):(0,t.jsx)(lu,{type:"secondary",children:"All models"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{marginBottom:2},children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12},children:"Spend"}),(0,t.jsxs)(lu,{style:{fontSize:12},children:["$",l.toFixed(2),r?(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[" ","/ $",a.toFixed(2)]}):(0,t.jsxs)(lu,{type:"secondary",style:{fontSize:12},children:[" ","(Unlimited)"]})]})]}),r&&(0,t.jsx)(sL.Progress,{percent:Math.round(10*n)/10,strokeColor:n>=90?"#f5222d":n>=70?"#faad14":"#52c41a",size:"small",showInfo:!1})]}),(0,t.jsxs)(sT.Flex,{justify:"space-between",children:[(0,t.jsx)(lu,{type:"secondary",style:{fontSize:12},children:"Members"}),(0,t.jsx)(lu,{style:{fontSize:12},children:m.members_with_roles?.length??0})]})]})):o.team_id?(0,t.jsx)(sT.Flex,{justify:"center",align:"center",style:{padding:16},children:(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"})}):(0,t.jsx)(aB.Empty,{description:"No team assigned",image:aB.Empty.PRESENTED_IMAGE_SIMPLE})})})]}),(0,t.jsx)(lc,{isOpen:p,project:o,onClose:()=>x(!1)})]}):(0,t.jsxs)(lp,{style:{padding:u.paddingLG,paddingInline:2*u.paddingLG},children:[(0,t.jsx)(V.Button,{icon:(0,t.jsx)(a$.ArrowLeftIcon,{size:16}),onClick:s,type:"text",style:{marginBottom:16}}),(0,t.jsx)(aB.Empty,{description:"Project not found"})]})}let{Title:lh,Text:lg}=sP.Typography,{Content:ly}=sI.Layout;function lj(){let{token:e}=sA.theme.useToken(),{data:s,isLoading:a}=(0,a9.useProjects)(),{data:l,isLoading:r}=(0,eV.useTeams)(),[n,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!1),[m,u]=(0,i.useState)(""),[p,x]=(0,i.useState)(1);(0,i.useEffect)(()=>{x(1)},[m]);let h=(0,i.useMemo)(()=>{let e=new Map;for(let t of l??[])e.set(t.team_id,t.team_alias??t.team_id);return e},[l]),g=(0,i.useMemo)(()=>{let e=s??[];if(!m)return e;let t=m.toLowerCase();return e.filter(e=>{let s=h.get(e.team_id??"")??"";return(e.project_alias??"").toLowerCase().includes(t)||e.project_id.toLowerCase().includes(t)||(e.description??"").toLowerCase().includes(t)||s.toLowerCase().includes(t)})},[s,m,h]),y=[{title:"ID",dataIndex:"project_id",key:"project_id",width:170,render:e=>(0,t.jsx)(f.Tooltip,{title:e,children:(0,t.jsx)(lg,{ellipsis:!0,className:"text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs cursor-pointer",style:{fontSize:14,padding:"1px 8px"},onClick:()=>o(e),children:e})})},{title:"Name",dataIndex:"project_alias",key:"project_alias",sorter:(e,t)=>(e.project_alias??"").localeCompare(t.project_alias??""),render:e=>e??"—"},{title:"Team",key:"team",sorter:(e,t)=>{let s=h.get(e.team_id??"")??"",a=h.get(t.team_id??"")??"";return s.localeCompare(a)},render:(e,s)=>{if(!s.team_id)return"—";let a=h.get(s.team_id);return a||(r?(0,t.jsx)(eF.Spin,{indicator:(0,t.jsx)(tN.LoadingOutlined,{spin:!0}),size:"small"}):s.team_id)}},{title:"Models",key:"models",render:(e,s)=>{let a=s.models??[];return(0,t.jsx)(f.Tooltip,{title:a.length>0?a.join(", "):"No models",children:(0,t.jsx)(I.Tag,{color:"blue",style:{fontSize:14,padding:"2px 8px",margin:0},children:(0,t.jsxs)(sT.Flex,{align:"center",gap:6,children:[(0,t.jsx)(sz,{size:14}),a.length]})})})}},{title:"Status",dataIndex:"blocked",key:"status",render:e=>(0,t.jsx)(I.Tag,{color:e?"red":"green",children:e?"Blocked":"Active"})},{title:"Created",dataIndex:"created_at",key:"created_at",sorter:(e,t)=>new Date(e.created_at).getTime()-new Date(t.created_at).getTime(),responsive:["lg"],render:e=>new Date(e).toLocaleDateString()},{title:"Updated",dataIndex:"updated_at",key:"updated_at",responsive:["xl"],render:e=>new Date(e).toLocaleDateString()}];return n?(0,t.jsx)(lx,{projectId:n,onBack:()=>o(null)}):(0,t.jsxs)(ly,{style:{padding:e.paddingLG,paddingInline:2*e.paddingLG},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{marginBottom:16},children:[(0,t.jsxs)(U.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(lh,{level:2,style:{margin:0},children:"Projects"}),(0,t.jsx)(lg,{type:"secondary",children:"Manage projects within your teams"})]}),(0,t.jsx)(V.Button,{type:"primary",icon:(0,t.jsx)(H.PlusOutlined,{}),onClick:()=>c(!0),children:"Create Project"})]}),(0,t.jsxs)(ts.Card,{styles:{body:{padding:0}},children:[(0,t.jsxs)(sT.Flex,{justify:"space-between",align:"center",style:{padding:"12px 16px"},children:[(0,t.jsx)(C.Input,{prefix:(0,t.jsx)(sO.SearchIcon,{size:16}),placeholder:"Search projects by name, ID, description, or team...",style:{maxWidth:400},value:m,onChange:e=>u(e.target.value),allowClear:!0}),(0,t.jsx)(sF.Pagination,{current:p,total:g.length,pageSize:10,onChange:e=>x(e),size:"small",showTotal:e=>`${e} projects`,showSizeChanger:!1})]}),(0,t.jsx)(te.Table,{columns:y,dataSource:g.slice((p-1)*10,10*p),rowKey:"project_id",loading:a,pagination:!1})]}),(0,t.jsx)(lr,{isOpen:d,onClose:()=>c(!1)})]})}var lf=e.i(241902);let lb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"};var l_=i.forwardRef(function(e,t){return i.createElement(tF.default,(0,tT.default)({},e,{ref:t,icon:lb}))}),lv=e.i(366308);let lN=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"},{value:"blocked",label:"blocked",color:"#991b1b",bg:"#fee2e2",border:"#fca5a5"}],lw=[{value:"untrusted",label:"untrusted",color:"#92400e",bg:"#fef3c7",border:"#fcd34d"},{value:"trusted",label:"trusted",color:"#065f46",bg:"#d1fae5",border:"#6ee7b7"}],lk=({value:e,toolName:s,saving:a,onChange:l,policyType:r="input",size:i="small",minWidth:n=110,stopPropagation:o=!0})=>{let d="output"===r?lw:lN,c=lN.find(t=>t.value===e)??lN[0];return(0,t.jsx)(k.Select,{size:i,value:e,disabled:a,loading:a,onChange:e=>l(s,e),onClick:e=>o&&e.stopPropagation(),style:{minWidth:n,fontWeight:500,backgroundColor:c.bg,borderColor:c.border,color:c.color,borderRadius:999,fontSize:"small"===i?11:12},popupMatchSelectWidth:!1,options:d.map(e=>({value:e.value,label:(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12,fontWeight:500,color:e.color},children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:e.color,display:"inline-block",flexShrink:0}}),e.label]})}))})},lC="tool-detail";function lS({toolName:e,onBack:s,accessToken:a}){let l=(0,aA.useQueryClient)(),[r,n]=(0,i.useState)(!1),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)("team"),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)(null),j=(0,i.useMemo)(()=>{let e,t,s;return e=new Date,(t=new Date).setDate(t.getDate()-90),{start:(s=e=>e.toISOString().slice(0,19).replace("T"," "))(t),end:s(e)}},[]),{data:f,isLoading:b,error:_}=(0,t1.useQuery)({queryKey:[lC,e],queryFn:()=>(0,N.fetchToolDetail)(a,e),enabled:!!a&&!!e}),{data:v}=(0,t1.useQuery)({queryKey:["tool-policy-options"],queryFn:()=>(0,N.fetchToolPolicyOptions)(a),enabled:!!a,staleTime:6e4}),{data:w}=(0,t1.useQuery)({queryKey:["teams-list-tool-detail"],queryFn:()=>(0,N.teamListCall)(a,null,null),enabled:!!a}),{data:C}=(0,t1.useQuery)({queryKey:["keys-list-tool-detail"],queryFn:()=>(0,N.keyListCall)(a,null,null,null,null,null,1,100),enabled:!!a}),{data:S,isLoading:T}=(0,t1.useQuery)({queryKey:["tool-usage-logs",e,j.start,j.end],queryFn:()=>(0,N.getToolUsageLogs)(a,e,{page:1,pageSize:50,startDate:j.start,endDate:j.end}),enabled:!!a&&!!e}),I=(0,i.useMemo)(()=>(S?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:"passed",model:e.model??void 0,input_snippet:e.input_snippet??void 0})),[S?.logs]);(0,i.useMemo)(()=>(Array.isArray(w)?w:w?.data??[]).map(e=>({team_id:e.team_id??e.id??"",team_alias:e.team_alias??e.team_id??"",models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:"",created_at:"",keys:[],members_with_roles:[],spend:0})),[w]);let F=(0,i.useMemo)(()=>(C?.keys??C?.data??[]).map(e=>({token:e.token??e.api_key??e.key_hash??"",key_alias:e.key_alias??(e.token??e.api_key??e.key_hash)?.toString?.()?.substring?.(0,8)})),[C]),L=(0,i.useCallback)(()=>{l.invalidateQueries({queryKey:[lC,e]})},[l,e]),A=(0,i.useCallback)(async(t,s)=>{if(a){d(!0);try{await (0,N.updateToolPolicy)(a,e,{input_policy:s}),L()}catch(e){alert(`Failed to update input policy: ${e instanceof Error?e.message:String(e)}`)}finally{d(!1)}}},[a,e,L]),P=(0,i.useCallback)(async(t,s)=>{if(a){m(!0);try{await (0,N.updateToolPolicy)(a,e,{output_policy:s}),L()}catch(e){alert(`Failed to update output policy: ${e instanceof Error?e.message:String(e)}`)}finally{m(!1)}}},[a,e,L]),M=(0,i.useCallback)(async()=>{if(!a||!e)return;let t="team"===u;if((!t||x)&&(t||g?.token)){n(!0);try{await (0,N.updateToolPolicy)(a,e,{input_policy:"blocked"},{team_id:t?x:void 0,key_hash:t?void 0:g.token,key_alias:t?void 0:g.key_alias}),L(),h(null),y(null)}catch(e){alert(`Failed to add override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,u,x,g,L]),D=(0,i.useCallback)(async t=>{if(a&&e){n(!0);try{await (0,N.deleteToolPolicyOverride)(a,e,{team_id:t.team_id??void 0,key_hash:t.key_hash??void 0}),L()}catch(e){alert(`Failed to remove override: ${e instanceof Error?e.message:String(e)}`)}finally{n(!1)}}},[a,e,L]);if(b&&!f)return(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(eF.Spin,{size:"large"})});if(_&&!f)return(0,t.jsxs)("div",{children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load tool details."})]});if(!f)return null;let{tool:E,overrides:z}=f,O=v?.input_policies?.find(e=>e.value===E.input_policy)?.description,R=v?.output_policies?.find(e=>e.value===E.output_policy)?.description;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(V.Button,{type:"link",icon:(0,t.jsx)(tJ.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Tool Policies"}),(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1 flex-wrap",children:[(0,t.jsx)(lv.ToolOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900 font-mono",children:E.tool_name}),(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-gray-100 text-gray-700 border border-gray-200",children:E.origin??"—"}),(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:[(E.call_count??0).toLocaleString()," calls"]})]}),(0,t.jsxs)("dl",{className:"mt-3 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-600",children:[E.user_agent&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"User Agent:"}),(0,t.jsx)("dd",{className:"font-mono truncate max-w-[40ch]",title:E.user_agent,children:E.user_agent})]}),E.created_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"First Discovered:"}),(0,t.jsx)("dd",{children:new Date(E.created_at).toLocaleString()})]}),E.last_used_at&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("dt",{className:"font-medium text-gray-500 whitespace-nowrap",children:"Last Used:"}),(0,t.jsx)("dd",{children:new Date(E.last_used_at).toLocaleString()})]})]})]})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Input Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:O??"Controls what data this tool is allowed to accept."}),(0,t.jsx)(lk,{value:E.input_policy,toolName:E.tool_name,saving:o,onChange:A,policyType:"input",size:"middle",minWidth:140,stopPropagation:!1})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-1",children:"Output Policy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:R??"Controls how this tool's output is trusted by downstream tools."}),(0,t.jsx)(lk,{value:E.output_policy,toolName:E.tool_name,saving:c,onChange:P,policyType:"output",size:"middle",minWidth:140,stopPropagation:!1})]})]}),z.length>0&&(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Blocked for team or key"}),(0,t.jsx)("ul",{className:"border rounded-md divide-y divide-gray-100 bg-red-50/30",children:z.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between px-3 py-2.5 text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-700",children:[e.team_id?`Team: ${e.team_id}`:"",e.team_id&&e.key_hash?" · ":"",e.key_hash?`Key: ${e.key_alias||e.key_hash.substring(0,8)}`:"",e.team_id||e.key_hash?"":"—"]}),(0,t.jsx)(V.Button,{type:"link",danger:!0,size:"small",disabled:r,onClick:()=>D(e),children:"Remove"})]},e.override_id))})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Block for team or key"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 max-w-md",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Scope"}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"team"===u,onChange:()=>p("team"),className:"align-middle"}),"Team"]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-gray-700",children:[(0,t.jsx)("input",{type:"radio",checked:"key"===u,onChange:()=>p("key"),className:"align-middle"}),"Key"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700 block mb-2",children:"team"===u?"Team":"Key"}),"team"===u?(0,t.jsx)(q.default,{value:x??void 0,onChange:e=>h(e||null)}):(0,t.jsx)(k.Select,{placeholder:"Select key",allowClear:!0,showSearch:!0,optionFilterProp:"label",value:g?g.token:void 0,onChange:e=>{y(F.find(t=>t.token===e)??null)},options:F.map(e=>({value:e.token,label:e.key_alias||e.token?.substring?.(0,12)||e.token})),className:"w-full",style:{minWidth:200}})]}),(0,t.jsxs)(V.Button,{type:"primary",danger:!0,disabled:r||("team"===u?!x:!g?.token),loading:r,onClick:M,children:["Block for ",u]})]})]}),(0,t.jsxs)("section",{className:"bg-white rounded-lg border border-gray-200 p-5 shadow-sm",children:[(0,t.jsxs)("h2",{className:"text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2",children:[(0,t.jsx)(l_,{}),"Recent logs"]}),(0,t.jsx)(sa,{guardrailName:E.tool_name,filterAction:"passed",logs:I,logsLoading:T,totalLogs:S?.total??0,accessToken:a,startDate:j.start,endDate:j.end})]})]})]})}var lT=e.i(307582),lI=e.i(969550);function lF(e){return`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`}function lL(e,t){if(!e)return!1;try{let s=new Date(e);return lF(s)===t}catch{return!1}}function lA(e,t){return e.filter(e=>lL(e.created_at,t)).length}let lP=({accessToken:e,onSelectTool:s})=>{let[a,l]=(0,i.useState)([]),[r,n]=(0,i.useState)(!0),[o,h]=(0,i.useState)(!1),[g,y]=(0,i.useState)(null),[j,b]=(0,i.useState)(null),[v,w]=(0,i.useState)(null),[k,C]=(0,i.useState)(""),[S,T]=(0,i.useState)("created_at"),[I,F]=(0,i.useState)("desc"),[L,A]=(0,i.useState)(1),[P,M]=(0,i.useState)(!0),[D,E]=(0,i.useState)({}),z=(0,i.useDeferredValue)(o),O=o||z,R=(0,i.useCallback)(async()=>{if(e){h(!0),y(null);try{let t=await (0,N.fetchToolsList)(e);l(t)}catch(e){y(e.message??"Failed to load tools")}finally{h(!1),n(!1)}}},[e]);(0,i.useEffect)(()=>{R()},[R]),(0,i.useEffect)(()=>{if(!P)return;let e=setInterval(R,15e3);return()=>clearInterval(e)},[P,R]);let B=async(t,s)=>{if(e){b(t);try{await (0,N.updateToolPolicy)(e,t,{input_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,input_policy:s}:e))}catch(e){alert(`Failed to update input policy: ${e.message}`)}finally{b(null)}}},q=async(t,s)=>{if(e){w(t);try{await (0,N.updateToolPolicy)(e,t,{output_policy:s}),l(e=>e.map(e=>e.tool_name===t?{...e,output_policy:s}:e))}catch(e){alert(`Failed to update output policy: ${e.message}`)}finally{w(null)}}},$=Array.from(new Set(a.map(e=>e.team_id).filter(Boolean))).map(e=>({label:e,value:e})),U=Array.from(new Set(a.map(e=>e.key_alias).filter(Boolean))).map(e=>({label:e,value:e})),V=[{name:"Input Policy",label:"Input Policy",options:lN.map(e=>({label:e.label,value:e.value}))},{name:"Output Policy",label:"Output Policy",options:lw.map(e=>({label:e.label,value:e.value}))},{name:"Team Name",label:"Team Name",options:$},{name:"Key Name",label:"Key Name",options:U}],{newToday:H,newYesterday:G,trendSubtitle:K,totalTools:W,blockedCount:Q,activeTeamsCount:Y,needsReviewTools:J}=(0,i.useMemo)(()=>{let e=new Date,t=lF(e),s=new Date(e);s.setUTCDate(s.getUTCDate()-1);let l=lF(s),r=lA(a,t),i=lA(a,l),n=function(e,t){let s=e-t;if(0!==s)return s>0?`+${s} since yesterday`:`${s} since yesterday`}(r,i),o=a.length,d=a.filter(e=>"blocked"===e.input_policy).length;return{newToday:r,newYesterday:i,trendSubtitle:n,totalTools:o,blockedCount:d,activeTeamsCount:new Set(a.map(e=>e.team_id).filter(Boolean)).size,needsReviewTools:a.filter(e=>lL(e.created_at,t)&&"untrusted"===e.input_policy)}},[a]),X=({label:e,field:s})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(aO.TableHeaderSortDropdown,{sortState:S===s&&I,onSortChange:e=>{!1===e?(T("created_at"),F("desc")):(T(s),F(e)),A(1)}})]}),Z=a.filter(e=>{if(k){let t=k.toLowerCase();if(!(e.tool_name.toLowerCase().includes(t)||(e.team_id??"").toLowerCase().includes(t)||(e.key_alias??"").toLowerCase().includes(t)||(e.key_hash??"").toLowerCase().includes(t)||e.input_policy.toLowerCase().includes(t)||e.output_policy.toLowerCase().includes(t)))return!1}return(!D["Input Policy"]||e.input_policy===D["Input Policy"])&&(!D["Output Policy"]||e.output_policy===D["Output Policy"])&&(!D["Team Name"]||e.team_id===D["Team Name"])&&(!D["Key Name"]||e.key_alias===D["Key Name"])}),ee=[...Z].sort((e,t)=>{let s=e[S]??"",a=t[S]??"";return sa?"desc"===I?-1:1:0}),et=Math.max(1,Math.ceil(ee.length/50)),es=ee.slice((L-1)*50,50*L);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-gray-900 mb-6",children:"Tool Policies"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(sl,{label:"New Today",value:H,valueColor:"text-green-600",subtitle:K,icon:(0,t.jsx)("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"})})}),(0,t.jsx)(sl,{label:"Total Tools Discovered",value:W}),(0,t.jsx)(sl,{label:"Blocked Tools",value:Q,valueColor:Q>0?"text-red-600":void 0}),(0,t.jsx)(sl,{label:"Active Teams",value:Y>0?Y:"—"})]}),J.length>0&&(0,t.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-6",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-amber-900 mb-1",children:"Needs Review"}),(0,t.jsxs)("p",{className:"text-sm text-amber-800 mb-3",children:[J.length," new tool",1!==J.length?"s":""," discovered that require policy decisions."]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-white border border-amber-200 rounded-md text-sm",children:[(0,t.jsx)("span",{className:"font-mono text-amber-900 truncate max-w-[200px]",title:e.tool_name,children:e.tool_name}),(0,t.jsx)("button",{type:"button",onClick:()=>(e=>{let t=ee.findIndex(t=>t.tool_id===e);if(t>=0){let s=Math.floor(t/50)+1;s!==L&&A(s),requestAnimationFrame(()=>{setTimeout(()=>{document.getElementById(`tool-row-${e}`)?.scrollIntoView({behavior:"smooth",block:"center"})},100)})}})(e.tool_id),className:"text-amber-700 hover:text-amber-900 font-medium text-xs whitespace-nowrap",children:"Review"})]},e.tool_id))})]}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"relative w-64",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Tool Name",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:k,onChange:e=>{C(e.target.value),A(1)}}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(_.Switch,{checked:P,onChange:M})]}),(0,t.jsxs)("button",{onClick:R,disabled:O,className:"flex items-center gap-1.5 px-3 py-2 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-60",children:[(0,t.jsx)("svg",{className:`w-4 h-4 ${O?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),O?"Fetching":"Fetch"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm text-gray-600 whitespace-nowrap",children:[(0,t.jsxs)("span",{children:["Showing ",0===Z.length?0:(L-1)*50+1," -"," ",Math.min(50*L,Z.length)," of ",Z.length," results"]}),(0,t.jsxs)("span",{children:["Page ",L," of ",et]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md text-sm hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(lI.default,{options:V,onApplyFilters:e=>{E(e),A(1)},onResetFilters:()=>{E({}),A(1)},buttonLabel:"Filters"})})]}),P&&(0,t.jsxs)("div",{className:"bg-green-50 border-b border-green-100 px-6 py-2 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"}),(0,t.jsx)("button",{onClick:()=>M(!1),className:"text-xs text-green-600 underline",children:"Stop"})]}),g&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:g}),(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 w-full",children:[(0,t.jsx)(u.TableHead,{children:(0,t.jsxs)(x.TableRow,{children:[(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Discovered",field:"created_at"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Tool Name",field:"tool_name"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Input Policy",field:"input_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Output Policy",field:"output_policy"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"# Calls",field:"call_count"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Team Name",field:"team_id"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"Key Hash"}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:(0,t.jsx)(X,{label:"Key Name",field:"key_alias"})}),(0,t.jsx)(p.TableHeaderCell,{className:"py-1 h-8",children:"User Agent"})]})}),(0,t.jsx)(c.TableBody,{children:r?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"Loading tools…"})}):0===es.length?(0,t.jsx)(x.TableRow,{children:(0,t.jsx)(m.TableCell,{colSpan:9,className:"h-8 text-center text-gray-500",children:"No tools discovered yet. Make a chat completion that returns tool_calls to start auto-discovery."})}):es.map(e=>(0,t.jsxs)(x.TableRow,{id:`tool-row-${e.tool_id}`,className:"h-8 hover:bg-gray-50",children:[(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(lT.TimeCell,{utcTime:e.created_at??""})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden",children:(0,t.jsx)("button",{type:"button",onClick:()=>s?.(e.tool_name),className:"text-left w-full font-mono text-xs max-w-[20ch] truncate block font-medium text-blue-600 hover:text-blue-800 hover:underline focus:outline-none focus:ring-0",children:(0,t.jsx)(f.Tooltip,{title:s?"Click to view details and block for team/key":e.tool_name,children:(0,t.jsx)("span",{children:e.tool_name})})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lk,{value:e.input_policy,toolName:e.tool_name,saving:j===e.tool_name,onChange:B,policyType:"input"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)(lk,{value:e.output_policy,toolName:e.tool_name,saving:v===e.tool_name,onChange:q,policyType:"output"})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8",children:(0,t.jsx)("div",{className:"flex items-center justify-end h-8 tabular-nums text-sm font-mono text-gray-700",children:(e.call_count??0).toLocaleString()})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.team_id??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.team_id??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_hash??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block text-blue-600",children:e.key_hash??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.key_alias??"-",children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:e.key_alias??"-"})})}),(0,t.jsx)(m.TableCell,{className:"py-0.5 max-h-8 overflow-hidden whitespace-nowrap",children:(0,t.jsx)(f.Tooltip,{title:e.user_agent??"-",children:(0,t.jsx)("span",{className:"font-mono max-w-[20ch] truncate block text-xs text-gray-500",children:e.user_agent??"-"})})})]},e.tool_id))})]}),et>1&&(0,t.jsxs)("div",{className:"border-t px-6 py-3 flex items-center justify-between text-sm text-gray-600",children:[(0,t.jsxs)("span",{children:["Showing ",(L-1)*50+1," - ",Math.min(50*L,ee.length)," of"," ",ee.length]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:()=>A(e=>Math.max(1,e-1)),disabled:1===L,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>A(e=>Math.min(et,e+1)),disabled:L===et,className:"px-3 py-1.5 border rounded-md hover:bg-gray-50 disabled:opacity-40",children:"Next"})]})]})]})]})};function lM({accessToken:e,userRole:s}){let[a,l]=(0,i.useState)({type:"overview"});return(0,t.jsx)("div",{className:"p-6 w-full min-w-0 flex-1",children:"detail"===a.type?(0,t.jsx)(lS,{toolName:a.toolName,onBack:()=>{l({type:"overview"})},accessToken:e}):(0,t.jsx)(lP,{accessToken:e,userRole:s,onSelectTool:e=>{l({type:"detail",toolName:e})}})})}var lD=e.i(936190),lE=e.i(910119),lz=e.i(275144),lO=e.i(161281),lR=e.i(321836),lB=e.i(947293),lq=e.i(618566),l$=e.i(592143);function lU(e,t="/"){document.cookie=`${e}=; Max-Age=0; Path=${t}`}let lV={api_ref:"api-reference","api-reference":"api-reference"};function lH(){let[e,n]=(0,i.useState)(""),[o,d]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[x,h]=(0,i.useState)(null),[g,y]=(0,i.useState)([]),[j,f]=(0,i.useState)([]),[b,_]=(0,i.useState)([]),[v,w]=(0,i.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[k,C]=(0,i.useState)(!0),S=(0,lq.useRouter)(),T=(0,lq.useSearchParams)(),[I,F]=(0,i.useState)({data:[]}),[L,A]=(0,i.useState)(null),[P,M]=(0,i.useState)(!1),[D,E]=(0,i.useState)(!0),[z,O]=(0,i.useState)(null),[R,B]=(0,i.useState)(!0),[q,$]=(0,i.useState)(!1),[U,V]=(0,i.useState)(!1),[H,G]=(0,i.useState)(!1),[K,W]=(0,i.useState)(!1),[Q,Y]=(0,i.useState)(!1),J=T.get("invitation_id"),X="true"===T.get("create"),Z=(0,i.useMemo)(()=>{if(!X)return;let e=T.get("owned_by"),t=T.get("team_id"),s=T.get("key_alias"),a=T.get("models"),l=T.get("key_type");if(!e&&!t&&!s&&!a&&!l)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,i=l&&["default","llm_api","management"].includes(l)?l:void 0,n=s?s.trim().slice(0,256):void 0,o=a?a.split(",").slice(0,100).map(e=>e.trim().slice(0,256)).filter(e=>e.length>0):void 0;return{owned_by:r,team_id:t?.trim()||void 0,key_alias:n,models:o&&o.length>0?o:void 0,key_type:i}},[T,X]),[ee,et]=(0,i.useState)(()=>T.get("page")||"api-keys"),[es,ea]=(0,i.useState)(null),[el,er]=(0,i.useState)(!1),ei=(0,i.useRef)(!1),en=e=>{y(t=>t?[...t,e]:[e]),M(()=>!P)},eo=!1===D&&null===L&&null===J;(0,i.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,N.getUiConfig)()}catch{}if(e)return;let t=function(e){let t=document.cookie.split("; ").find(t=>t.startsWith(e+"="));if(!t)return null;let s=t.slice(e.length+1);try{return decodeURIComponent(s)}catch{return s}}("token"),s=t&&!(0,lO.isJwtExpired)(t)?t:null;t&&!s&&lU("token","/"),e||(A(s),E(!1))})(),()=>{e=!0}},[]),(0,i.useEffect)(()=>{if(eo){(0,lR.storeReturnUrl)();let e=(N.proxyBaseUrl||"")+"/ui/login",t=(0,lR.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[eo]);let ed=ee in lV;return((0,i.useEffect)(()=>{if(!D&&ed){let e=(N.proxyBaseUrl||"")+"/ui";S.replace(`${e}/${lV[ee]}`)}},[D,ed,ee,S]),(0,i.useEffect)(()=>{if(D||!L||ei.current)return;ei.current=!0;let e=(0,lR.consumeReturnUrl)();if(e&&(0,lR.isValidReturnUrl)(e)){let t=window.location.href;(0,lR.normalizeUrlForCompare)(e)!==(0,lR.normalizeUrlForCompare)(t)&&window.location.replace(e)}},[D,L]),(0,i.useEffect)(()=>{L||(ei.current=!1)},[L]),(0,i.useEffect)(()=>{if(!L)return;if((0,lO.isJwtExpired)(L)){lU("token","/"),A(null);return}let e=null;try{e=(0,lB.jwtDecode)(L)}catch{lU("token","/"),A(null);return}if(e){if(ea(e.key),m(e.disabled_non_admin_personal_key_creation),e.user_role){let t=(0,eN.formatUserRole)(e.user_role);n(t),"Admin Viewer"==t&&et("usage")}e.user_email&&p(e.user_email),e.login_method&&C("username_password"==e.login_method),e.premium_user&&d(e.premium_user),e.auth_header_name&&(0,N.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&O(e.user_id)}},[L]),(0,i.useEffect)(()=>{es&&z&&e&&(0,s0.fetchUserModels)(z,e,es,_),es&&z&&e&&(0,eV.teamListCall)(es,1,100,{userID:"Admin"!==e&&"Admin Viewer"!==e?z:null}).then(e=>h(e.teams??[])).catch(console.error),es&&(0,s1.fetchOrganizations)(es,f)},[es,z,e]),(0,i.useEffect)(()=>{es&&L&&(async()=>{try{let e=await (0,N.getInProductNudgesCall)(es),t=e?.is_claude_code_enabled||!1;V(t),t&&(G(!0),B(!1))}catch(e){console.error("Failed to fetch in-product nudges:",e)}})()},[es,L]),(0,i.useEffect)(()=>{if(R&&!q){let e=setTimeout(()=>{B(!1)},15e3);return()=>clearTimeout(e)}},[R,q]),(0,i.useEffect)(()=>{if(H&&!K){let e=setTimeout(()=>{G(!1)},15e3);return()=>clearTimeout(e)}},[H,K]),D||eo||ed)?(0,t.jsx)(eH.default,{}):(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(l$.ConfigProvider,{theme:{algorithm:Q?sA.theme.darkAlgorithm:sA.theme.defaultAlgorithm},children:(0,t.jsx)(lz.ThemeProvider,{accessToken:es,children:J?(0,t.jsx)(aI.default,{userID:z,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:P}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,t.jsx)(sb.default,{userID:z,userRole:e,premiumUser:o,userEmail:u,setProxySettings:w,proxySettings:v,accessToken:es,isPublicPage:!1,sidebarCollapsed:el,onToggleSidebar:()=>{er(!el)},isDarkMode:Q,toggleDarkMode:()=>{Y(!Q)}}),(0,t.jsxs)("div",{className:"flex flex-1",children:[(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.default,{setPage:e=>{let t=new URLSearchParams(T);t.set("page",e),window.history.pushState(null,"",`?${t.toString()}`),et(e)},defaultSelectedKey:ee,sidebarCollapsed:el})}),"api-keys"==ee?(0,t.jsx)(aI.default,{userID:z,userRole:e,premiumUser:o,teams:x,keys:g,setUserRole:n,userEmail:u,setUserEmail:p,setTeams:h,setKeys:y,organizations:j,addKey:en,createClicked:P,autoOpenCreate:X,prefillData:Z}):"models"==ee?(0,t.jsx)(a.default,{token:L,keys:g,modelData:I,setModelData:F,premiumUser:o,teams:x}):"llm-playground"==ee?(0,t.jsx)(l.default,{}):"users"==ee?(0,t.jsx)(lE.default,{userID:z,userRole:e,token:L,keys:g,teams:x,accessToken:es,setKeys:y}):"teams"==ee?(0,t.jsx)(sZ,{teams:x,setTeams:h,accessToken:es,userID:z,userRole:e,organizations:j,premiumUser:o,searchParams:T}):"organizations"==ee?(0,t.jsx)(s1.default,{organizations:j,setOrganizations:f,userModels:b,accessToken:es,userRole:e,premiumUser:o}):"admin-panel"==ee?(0,t.jsx)(r.default,{proxySettings:v}):"logging-and-alerts"==ee?(0,t.jsx)(ad.default,{userID:z,userRole:e,accessToken:es,premiumUser:o}):"budgets"==ee?(0,t.jsx)(eq.default,{accessToken:es}):"guardrails"==ee?(0,t.jsx)(sg.default,{accessToken:es,userRole:e}):"policies"==ee?(0,t.jsx)(sy.default,{accessToken:es,userRole:e}):"agents"==ee?(0,t.jsx)(eB,{accessToken:es,userRole:e,teams:x}):"prompts"==ee?(0,t.jsx)(s4.default,{accessToken:es,userRole:e}):"transform-request"==ee?(0,t.jsx)(aC.default,{accessToken:es}):"router-settings"==ee?(0,t.jsx)(tQ.default,{userID:z,userRole:e,accessToken:es,modelData:I}):"ui-theme"==ee?(0,t.jsx)(aS.default,{userID:z,userRole:e,accessToken:es}):"cost-tracking"==ee?(0,t.jsx)(tW,{userID:z,userRole:e,accessToken:es}):"model-hub-table"==ee?(0,eN.isAdminRole)(e)?(0,t.jsx)(sf.default,{accessToken:es,publicPage:!1,premiumUser:o,userRole:e}):(0,t.jsx)(s5.default,{accessToken:es,isEmbedded:!0}):"caching"==ee?(0,t.jsx)(e$.default,{userID:z,userRole:e,token:L,accessToken:es,premiumUser:o}):"pass-through-settings"==ee?(0,t.jsx)(s2.default,{userID:z,userRole:e,accessToken:es,modelData:I,premiumUser:o}):"logs"==ee?(0,t.jsx)(lD.default,{userID:z,userRole:e,token:L,accessToken:es,allTeams:x??[],premiumUser:o}):"mcp-servers"==ee?(0,t.jsx)(sj.MCPServers,{accessToken:es,userRole:e,userID:z}):"search-tools"==ee?(0,t.jsx)(ao,{accessToken:es,userRole:e,userID:z}):"tag-management"==ee?(0,t.jsx)(ak.default,{accessToken:es,userRole:e,userID:z}):"claude-code-plugins"==ee?(0,t.jsx)(eU.default,{accessToken:es,userRole:e}):"access-groups"==ee?(0,t.jsx)(a7,{}):"projects"==ee?(0,t.jsx)(lj,{}):"vector-stores"==ee?(0,t.jsx)(lf.default,{accessToken:es,userRole:e,userID:z}):"tool-policies"==ee?(0,t.jsx)(lM,{accessToken:es,userRole:e}):"guardrails-monitor"==ee?(0,t.jsx)(sh,{accessToken:es}):"new_usage"==ee?(0,t.jsx)(s_.default,{teams:x??[],organizations:j??[]}):(0,t.jsx)(aT.default,{userID:z,userRole:e,token:L,accessToken:es,keys:g,premiumUser:o})]}),(0,t.jsx)(ag,{isVisible:R,onOpen:()=>{B(!1),$(!0)},onDismiss:()=>{B(!1)}}),(0,t.jsx)(a_,{isOpen:q,onClose:()=>{$(!1),B(!0)},onComplete:()=>{$(!1)}}),(0,t.jsx)(aN,{isVisible:H,onOpen:()=>{G(!1),W(!0)},onDismiss:()=>{G(!1)}}),(0,t.jsx)(aw,{isOpen:K,onClose:()=>{W(!1),G(!0)},onComplete:()=>{W(!1)}})]})})})})}function lG(){return(0,t.jsx)(i.Suspense,{fallback:(0,t.jsx)(eH.default,{}),children:(0,t.jsx)(lH,{})})}e.s(["default",()=>lG],952683)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e1e3f652dbc5be03.js b/litellm/proxy/_experimental/out/_next/static/chunks/4fc5bd834120bcc4.js similarity index 53% rename from litellm/proxy/_experimental/out/_next/static/chunks/e1e3f652dbc5be03.js rename to litellm/proxy/_experimental/out/_next/static/chunks/4fc5bd834120bcc4.js index 7c788146dc6..3f7f2d5170e 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e1e3f652dbc5be03.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/4fc5bd834120bcc4.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},621192,e=>{"use strict";let t=e.i(264042).Row;e.s(["Row",0,t],621192)},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var r=e.i(9583),s=a.forwardRef(function(e,s){return a.createElement(r.default,(0,t.default)({},e,{ref:s,icon:l}))});e.s(["ReloadOutlined",0,s],91979)},551332,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,a],551332)},122577,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,a],122577)},902555,e=>{"use strict";var t=e.i(843476),a=e.i(591935),l=e.i(122577),r=e.i(278587),s=e.i(68155),i=e.i(360820),n=e.i(871943),o=e.i(434626),d=e.i(551332),m=e.i(592968),c=e.i(115504),u=e.i(752978);function g({icon:e,onClick:a,className:l,disabled:r,dataTestId:s}){return r?(0,t.jsx)(u.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":s}):(0,t.jsx)(u.Icon,{icon:e,size:"sm",onClick:a,className:(0,c.cx)("cursor-pointer",l),"data-testid":s})}let h={Edit:{icon:a.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:s.TrashIcon,className:"hover:text-red-600"},Test:{icon:l.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:r.RefreshIcon,className:"hover:text-green-600"},Up:{icon:i.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:n.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function x({onClick:e,tooltipText:a,disabled:l=!1,disabledTooltipText:r,dataTestId:s,variant:i}){let{icon:n,className:o}=h[i];return(0,t.jsx)(m.Tooltip,{title:l?r:a,children:(0,t.jsx)("span",{children:(0,t.jsx)(g,{icon:n,onClick:e,className:o,disabled:l,dataTestId:s})})})}e.s(["default",()=>x],902555)},434626,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,a],434626)},278587,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,a],278587)},207670,e=>{"use strict";function t(){for(var e,t,a=0,l="",r=arguments.length;at,"default",0,t])},728889,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(829087),r=e.i(480731),s=e.i(444755),i=e.i(673706),n=e.i(95779);let o={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},c=(0,i.makeClassName)("Icon"),u=a.default.forwardRef((e,u)=>{let{icon:g,variant:h="simple",tooltip:x,size:p=r.Sizes.SM,color:b,className:_}=e,f=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,i.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,n.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.tremorTwMerge)((0,i.getColorClassNames)(t,n.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,b),{tooltipProps:j,getReferenceProps:v}=(0,l.useTooltip)();return a.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([u,j.refs.setReference]),className:(0,s.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",y.bgColor,y.textColor,y.borderColor,y.ringColor,m[h].rounded,m[h].border,m[h].shadow,m[h].ring,o[p].paddingX,o[p].paddingY,_)},v,f),a.default.createElement(l.default,Object.assign({text:x},j)),a.default.createElement(g,{className:(0,s.tremorTwMerge)(c("icon"),"shrink-0",d[p].height,d[p].width)}))});u.displayName="Icon",e.s(["default",()=>u],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,a],591935)},738014,e=>{"use strict";var t=e.i(135214),a=e.i(764205),l=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:s}=(0,t.default)();return(0,l.useQuery)({queryKey:r.detail(s),queryFn:async()=>await (0,a.userGetInfoV2)(e),enabled:!!(e&&s)})}])},625901,e=>{"use strict";var t=e.i(266027),a=e.i(621482),l=e.i(243652),r=e.i(764205),s=e.i(135214);let i=(0,l.createQueryKeys)("models"),n=(0,l.createQueryKeys)("modelHub"),o=(0,l.createQueryKeys)("allProxyModels");(0,l.createQueryKeys)("selectedTeamModels");let d=(0,l.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:l}=(0,s.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,a,l,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&l)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:l,userId:i,userRole:n}=(0,s.default)();return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{...i&&{userId:i},...n&&{userRole:n},size:e,...t&&{search:t}}}),queryFn:async({pageParam:a})=>await (0,r.modelInfoCall)(l,i,n,a,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,l,n,o,d,m)=>{let{accessToken:c,userId:u,userRole:g}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({filters:{...u&&{userId:u},...g&&{userRole:g},page:e,size:a,...l&&{search:l},...n&&{modelId:n},...o&&{teamId:o},...d&&{sortBy:d},...m&&{sortOrder:m}}}),queryFn:async()=>await (0,r.modelInfoCall)(c,u,g,e,a,l,n,o,d,m),enabled:!!(c&&u&&g)})}])},907308,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(212931),r=e.i(808613),s=e.i(464571),i=e.i(199133),n=e.i(592968),o=e.i(213205),d=e.i(374009),m=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:c,onSubmit:u,accessToken:g,title:h="Add Team Member",roles:x=[{label:"admin",value:"admin",description:"Admin role. Can create team keys, add members, and manage settings."},{label:"user",value:"user",description:"User role. Can view team info, but not manage it."}],defaultRole:p="user",teamId:b})=>{let[_]=r.Form.useForm(),[f,y]=(0,a.useState)([]),[j,v]=(0,a.useState)(!1),[w,C]=(0,a.useState)("user_email"),[S,N]=(0,a.useState)(!1),k=async(e,t)=>{if(!e)return void y([]);v(!0);try{let a=new URLSearchParams;if(a.append(t,e),b&&a.append("team_id",b),null==g)return;let l=(await (0,m.userFilterUICall)(g,a)).map(e=>({label:"user_email"===t?`${e.user_email}`:`${e.user_id}`,value:"user_email"===t?e.user_email:e.user_id,user:e}));y(l)}catch(e){console.error("Error fetching users:",e)}finally{v(!1)}},T=(0,a.useCallback)((0,d.default)((e,t)=>k(e,t),300),[]),I=(e,t)=>{C(t),T(e,t)},M=(e,t)=>{let a=t.user;_.setFieldsValue({user_email:a.user_email,user_id:a.user_id,role:_.getFieldValue("role")})},z=async e=>{N(!0);try{await u(e)}finally{N(!1)}};return(0,t.jsx)(l.Modal,{title:h,open:e,onCancel:()=>{_.resetFields(),y([]),c()},footer:null,width:800,maskClosable:!S,children:(0,t.jsxs)(r.Form,{form:_,onFinish:z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:p},children:[(0,t.jsx)(r.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>I(e,"user_email"),onSelect:(e,t)=>M(e,t),options:"user_email"===w?f:[],loading:j,allowClear:!0})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(r.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(i.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>I(e,"user_id"),onSelect:(e,t)=>M(e,t),options:"user_id"===w?f:[],loading:j,allowClear:!0})}),(0,t.jsx)(r.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(i.Select,{defaultValue:p,children:x.map(e=>(0,t.jsx)(i.Select.Option,{value:e.value,children:(0,t.jsxs)(n.Tooltip,{title:e.description,children:[(0,t.jsx)("span",{className:"font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(s.Button,{type:"primary",htmlType:"submit",icon:(0,t.jsx)(o.UserAddOutlined,{}),loading:S,children:S?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var t=e.i(843476),a=e.i(625901),l=e.i(109799),r=e.i(785242),s=e.i(738014),i=e.i(199133),n=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},m={label:"No Default Models",value:"no-default-models"},c=[d,m],u={user:({allProxyModels:e,userModels:t,options:a})=>t&&a?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:a})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:g,organizationID:h,options:x,context:p,dataTestId:b,value:_=[],onChange:f,style:y}=e,{includeUserModels:j,showAllTeamModelsOption:v,showAllProxyModelsOverride:w,includeSpecialOptions:C}=x||{},{data:S,isLoading:N}=(0,a.useAllProxyModels)(),{data:k,isLoading:T}=(0,r.useTeam)(g),{data:I,isLoading:M}=(0,l.useOrganization)(h),{data:z,isLoading:P}=(0,s.useCurrentUser)(),O=e=>c.some(t=>t.value===e),F=_.some(O),A=I?.models.includes(d.value)||I?.models.length===0;if(N||T||M||P)return(0,t.jsx)(n.Skeleton.Input,{active:!0,block:!0});let{wildcard:D,regular:L}=(e=>{let t=[],a=[];for(let l of e)l.endsWith("/*")?t.push(l):a.push(l);return{wildcard:t,regular:a}})(((e,t,a)=>{let l=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return l;let r=u[t.context];return r?r({allProxyModels:l,...a,options:t.options}):[]})(S?.data??[],e,{selectedTeam:k,selectedOrganization:I,userModels:z?.models}));return(0,t.jsx)(i.Select,{"data-testid":b,value:_,onChange:e=>{let t=e.filter(O);f(t.length>0?[t[t.length-1]]:e)},style:y,options:[C?{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...w||A&&C||"global"===p?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:_.length>0&&_.some(e=>O(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:m.value,disabled:_.length>0&&_.some(e=>O(e)&&e!==m.value),key:m.value}]}:[],...D.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:D.map(e=>{let a=e.replace("/*",""),l=a.charAt(0).toUpperCase()+a.slice(1);return{label:(0,t.jsx)("span",{children:`All ${l} models`}),value:e,disabled:F}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:L.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:F}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},276173,e=>{"use strict";var t=e.i(843476),a=e.i(599724),l=e.i(779241),r=e.i(464571),s=e.i(808613),i=e.i(212931),n=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:m,onSubmit:c,initialData:u,mode:g,config:h})=>{let x,[p]=s.Form.useForm(),[b,_]=(0,o.useState)(!1);console.log("Initial Data:",u),(0,o.useEffect)(()=>{if(e)if("edit"===g&&u){let e={...u,role:u.role||h.defaultRole,max_budget_in_team:u.max_budget_in_team||null,tpm_limit:u.tpm_limit||null,rpm_limit:u.rpm_limit||null};console.log("Setting form values:",e),p.setFieldsValue(e)}else p.resetFields(),p.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,u,g,p,h.defaultRole,h.roleOptions]);let f=async e=>{try{_(!0);let t=Object.entries(e).reduce((e,[t,a])=>{if("string"==typeof a){let l=a.trim();return""===l&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:l}}return{...e,[t]:a}},{});console.log("Submitting form data:",t),await Promise.resolve(c(t)),p.resetFields()}catch(e){console.error("Form submission error:",e)}finally{_(!1)}};return(0,t.jsx)(i.Modal,{title:h.title||("add"===g?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:m,children:(0,t.jsxs)(s.Form,{form:p,onFinish:f,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,t.jsx)(s.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(l.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(a.Text,{children:"OR"})}),h.showUserId&&(0,t.jsx)(s.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(l.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===g&&u&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(x=u.role,h.roleOptions.find(e=>e.value===x)?.label||x),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(n.Select,{children:"edit"===g&&u?[...h.roleOptions.filter(e=>e.value===u.role),...h.roleOptions.filter(e=>e.value!==u.role)].map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,t.jsx)(s.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,t.jsx)(l.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,t.jsx)(n.Select,{children:e.options?.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(r.Button,{onClick:m,className:"mr-2",disabled:b,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"default",htmlType:"submit",loading:b,children:"add"===g?b?"Adding...":"Add Member":b?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var t=e.i(843476),a=e.i(100486),l=e.i(827252),r=e.i(213205),s=e.i(771674),i=e.i(464571),n=e.i(770914),o=e.i(291542),d=e.i(262218),m=e.i(592968),c=e.i(898586),u=e.i(902555);let{Text:g}=c.Typography;function h({members:e,canEdit:c,onEdit:h,onDelete:x,onAddMember:p,roleColumnTitle:b="Role",roleTooltip:_,extraColumns:f=[],showDeleteForMember:y,emptyText:j}){let v=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(g,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,t.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(g,{children:e||"-"})},{title:_?(0,t.jsxs)(n.Space,{direction:"horizontal",children:[b,(0,t.jsx)(m.Tooltip,{title:_,children:(0,t.jsx)(l.InfoCircleOutlined,{})})]}):b,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(n.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(a.CrownOutlined,{}):(0,t.jsx)(s.UserOutlined,{}),(0,t.jsx)(g,{style:{textTransform:"capitalize"},children:e||"-"})]})},...f,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,a)=>c?(0,t.jsxs)(n.Space,{children:[(0,t.jsx)(u.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(a)}),(!y||y(a))&&(0,t.jsx)(u.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>x(a)})]}):null}];return(0,t.jsxs)(n.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,t.jsx)(o.Table,{columns:v,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),p&&c&&(0,t.jsx)(i.Button,{icon:(0,t.jsx)(r.UserAddOutlined,{}),type:"primary",onClick:p,children:"Add Member"})]})}e.s(["default",()=>h])},56567,e=>{"use strict";var t=e.i(843476),a=e.i(135214),l=e.i(109799),r=e.i(907308),s=e.i(764205),i=e.i(500330),n=e.i(11751),o=e.i(708347),d=e.i(751904),m=e.i(827252),c=e.i(987432),u=e.i(530212),g=e.i(389083),h=e.i(304967),x=e.i(350967),p=e.i(599724),b=e.i(779241),_=e.i(629569),f=e.i(464571),y=e.i(808613),j=e.i(311451),v=e.i(199133),w=e.i(790848),C=e.i(653496),S=e.i(592968),N=e.i(888259),k=e.i(678784),T=e.i(118366),I=e.i(271645),M=e.i(9314),z=e.i(552130),P=e.i(127952);function O({className:e,value:a,onChange:l}){return(0,t.jsxs)(v.Select,{className:e,value:a,onChange:l,children:[(0,t.jsx)(v.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(v.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(v.Select.Option,{value:"30d",children:"Monthly"})]})}var F=e.i(844565),A=e.i(355619),D=e.i(643449),L=e.i(75921),R=e.i(390605),B=e.i(162386),E=e.i(727749),U=e.i(384767),V=e.i(435451),K=e.i(916940),$=e.i(183588),q=e.i(276173),W=e.i(91979),G=e.i(269200),H=e.i(942232),Q=e.i(977572),J=e.i(427612),Y=e.i(64848),X=e.i(496020),Z=e.i(536916),ee=e.i(21548);let et={"/key/generate":"Member can generate a virtual key for this team","/key/service-account/generate":"Member can generate a service account key (not belonging to any user) for this team","/key/update":"Member can update a virtual key belonging to this team","/key/delete":"Member can delete a virtual key belonging to this team","/key/info":"Member can get info about a virtual key belonging to this team","/key/regenerate":"Member can regenerate a virtual key belonging to this team","/key/{key_id}/regenerate":"Member can regenerate a virtual key belonging to this team","/key/list":"Member can list virtual keys belonging to this team","/key/block":"Member can block a virtual key belonging to this team","/key/unblock":"Member can unblock a virtual key belonging to this team","/team/daily/activity":"Member can view all team usage data (not just their own)"},ea=({teamId:e,accessToken:a,canEditTeam:l})=>{let[r,i]=(0,I.useState)([]),[n,o]=(0,I.useState)([]),[d,m]=(0,I.useState)(!0),[u,g]=(0,I.useState)(!1),[x,b]=(0,I.useState)(!1),y=async()=>{try{if(m(!0),!a)return;let t=await (0,s.getTeamPermissionsCall)(a,e),l=t.all_available_permissions||[];i(l);let r=t.team_member_permissions||[];o(r),b(!1)}catch(e){E.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,I.useEffect)(()=>{y()},[e,a]);let j=async()=>{try{if(!a)return;g(!0),await (0,s.teamPermissionsUpdateCall)(a,e,n),E.default.success("Permissions updated successfully"),b(!1)}catch(e){E.default.fromBackend("Failed to update permissions"),console.error("Error updating permissions:",e)}finally{g(!1)}};if(d)return(0,t.jsx)("div",{className:"p-6 text-center",children:"Loading permissions..."});let v=r.length>0;return(0,t.jsxs)(h.Card,{className:"bg-white shadow-md rounded-md p-6",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b pb-4 mb-6",children:[(0,t.jsx)(_.Title,{className:"mb-2 sm:mb-0",children:"Member Permissions"}),l&&x&&(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(f.Button,{icon:(0,t.jsx)(W.ReloadOutlined,{}),onClick:()=>{y()},children:"Reset"}),(0,t.jsx)(f.Button,{onClick:j,loading:u,type:"primary",icon:(0,t.jsx)(c.SaveOutlined,{}),children:"Save Changes"})]})]}),(0,t.jsx)(p.Text,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),v?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(G.Table,{className:" min-w-full",children:[(0,t.jsx)(J.TableHead,{children:(0,t.jsxs)(X.TableRow,{children:[(0,t.jsx)(Y.TableHeaderCell,{children:"Method"}),(0,t.jsx)(Y.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(Y.TableHeaderCell,{children:"Description"}),(0,t.jsx)(Y.TableHeaderCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:"Allow Access"})]})}),(0,t.jsx)(H.TableBody,{children:r.map(e=>{let a=(e=>{let t=e.includes("/info")||e.includes("/list")||e.includes("/activity")?"GET":"POST",a=et[e];if(!a){for(let[t,l]of Object.entries(et))if(e.includes(t)){a=l;break}}return a||(a=`Access ${e}`),{method:t,endpoint:e,description:a,route:e}})(e);return(0,t.jsxs)(X.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(Q.TableCell,{children:(0,t.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${"GET"===a.method?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"}`,children:a.method})}),(0,t.jsx)(Q.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:a.endpoint})}),(0,t.jsx)(Q.TableCell,{className:"text-gray-700",children:a.description}),(0,t.jsx)(Q.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(Z.Checkbox,{checked:n.includes(e),onChange:t=>{o(t.target.checked?[...n,e]:n.filter(t=>t!==e)),b(!0)},disabled:!l})})]},e)})})]})}):(0,t.jsx)("div",{className:"py-12",children:(0,t.jsx)(ee.Empty,{description:"No permissions available"})})]})},el="overview",er="virtual-keys",es="members",ei="member-permissions",en="settings",eo={[el]:"Overview",[er]:"Virtual Keys",[es]:"Members",[ei]:"Member Permissions",[en]:"Settings"};var ed=e.i(292639),em=e.i(770914),ec=e.i(898586),eu=e.i(294612);function eg({teamData:e,canEditTeam:l,handleMemberDelete:r,setSelectedEditMember:s,setIsEditMemberModalVisible:n,setIsAddMemberModalVisible:d}){let c=e=>{if(null==e)return"0";if("number"==typeof e){let t=Number(e);return t===Math.floor(t)?t.toString():(0,i.formatNumberWithCommas)(t,8).replace(/\.?0+$/,"")}return"0"},{data:u}=(0,ed.useUISettings)(),{userId:g,userRole:h}=(0,a.default)(),x=!!u?.values?.disable_team_admin_delete_team_user,p=(0,o.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,g||""),b=(0,o.isProxyAdminRole)(h||""),_=[{title:(0,t.jsxs)(em.Space,{direction:"horizontal",children:["Team Member Spend (USD)",(0,t.jsx)(S.Tooltip,{title:"This is the amount spent by a user in the team.",children:(0,t.jsx)(m.InfoCircleOutlined,{})})]}),key:"spend",render:(a,l)=>(0,t.jsxs)(ec.Typography.Text,{children:["$",(0,i.formatNumberWithCommas)((t=>{if(!t)return 0;let a=e.team_memberships.find(e=>e.user_id===t);return a?.spend||0})(l.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",render:(a,l)=>{let r=(t=>{if(!t)return null;let a=e.team_memberships.find(e=>e.user_id===t),l=a?.litellm_budget_table?.max_budget;return null==l?null:c(l)})(l.user_id);return(0,t.jsx)(ec.Typography.Text,{children:r?`$${(0,i.formatNumberWithCommas)(Number(r),4)}`:"No Limit"})}},{title:(0,t.jsxs)(em.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(S.Tooltip,{title:"Rate limits for this member's usage within this team.",children:(0,t.jsx)(m.InfoCircleOutlined,{})})]}),key:"rate_limits",render:(a,l)=>(0,t.jsx)(ec.Typography.Text,{children:(t=>{if(!t)return"No Limits";let a=e.team_memberships.find(e=>e.user_id===t),l=a?.litellm_budget_table?.rpm_limit,r=a?.litellm_budget_table?.tpm_limit,s=[l?`${c(l)} RPM`:null,r?`${c(r)} TPM`:null].filter(Boolean);return s.length>0?s.join(" / "):"No Limits"})(l.user_id)})}];return(0,t.jsx)(eu.default,{members:e.team_info.members_with_roles,canEdit:l,onEdit:t=>{let a=e.team_memberships.find(e=>e.user_id===t.user_id);s({...t,max_budget_in_team:a?.litellm_budget_table?.max_budget||null,tpm_limit:a?.litellm_budget_table?.tpm_limit||null,rpm_limit:a?.litellm_budget_table?.rpm_limit||null}),n(!0)},onDelete:r,onAddMember:()=>d(!0),roleColumnTitle:"Team Role",roleTooltip:"This role applies only to this team and is independent from the user's proxy-level role.",extraColumns:_,showDeleteForMember:()=>b||l&&!p||p&&!x})}var eh=e.i(207082),ex=e.i(871943),ep=e.i(502547),eb=e.i(360820),e_=e.i(94629),ef=e.i(152990),ey=e.i(682830),ej=e.i(994388),ev=e.i(752978),ew=e.i(282786),eC=e.i(981339),eS=e.i(969550),eN=e.i(20147),ek=e.i(266027),eT=e.i(633627);function eI({teamId:e,teamAlias:l,organization:r}){let{accessToken:s}=(0,a.default)(),[n,o]=(0,I.useState)(null),[d,c]=(0,I.useState)([{id:"created_at",desc:!0}]),[u,h]=(0,I.useState)({pageIndex:0,pageSize:50}),[x,b]=(0,I.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),_=d.length>0?d[0].id:"created_at",f=d.length>0?d[0].desc?"desc":"asc":"desc",y=u.pageIndex,j=u.pageSize,{data:v,isPending:w,isFetching:C,refetch:N}=(0,eh.useKeys)(y+1,j,{teamID:e,organizationID:x["Organization ID"]?.trim()||void 0,selectedKeyAlias:x["Key Alias"]?.trim()||void 0,userID:x["User ID"]?.trim()||void 0,sortBy:_||void 0,sortOrder:f||void 0,expand:"user"}),k=(0,I.useMemo)(()=>{let e=v?.keys||[],t=r?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[v?.keys,r?.organization_id]),T=v?.total_pages??0,[M,z]=(0,I.useState)({}),P=(0,I.useMemo)(()=>({team_id:e,team_alias:l||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:r?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,l,r]),O=(0,ek.useQuery)({queryKey:["teamFilterOptions",e,s],queryFn:async()=>(0,eT.fetchTeamFilterOptions)(s,e),enabled:!!s&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},F=(0,I.useCallback)(()=>{N?.()},[N]);(0,I.useEffect)(()=>(window.addEventListener("storage",F),()=>window.removeEventListener("storage",F)),[F]);let D=(0,I.useCallback)((e,t=!1)=>{b(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||h(e=>({...e,pageIndex:0}))},[]),L=(0,I.useCallback)(()=>{b({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),h(e=>({...e,pageIndex:0}))},[]),R=(0,I.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=O;if(!t.length)return[];let a=e.toLowerCase();return(a?t.filter(e=>e.toLowerCase().includes(a)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=O,a=e.toLowerCase();return(a?t.filter(e=>e.toLowerCase().includes(a)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=O,a=e.toLowerCase();return(a?t.filter(e=>e.id.toLowerCase().includes(a)||e.email.toLowerCase().includes(a)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[O]),B=(0,I.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let a=e.getValue(),l=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:a,children:(0,t.jsx)(ej.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:l,overflow:"hidden"},onClick:()=>o(e.row.original),children:a??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let a=e.getValue(),l=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:l,overflow:"hidden"},children:a??"-"})})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"organization_id",accessorKey:"organization_id",header:"Organization ID",size:140,enableSorting:!1,cell:e=>e.getValue()?e.renderValue():"-"},{id:"user_email",accessorKey:"user",header:"User Email",size:160,enableSorting:!1,cell:e=>{let a=e.getValue(),l=a?.user_email,r=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:l??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:70,enableSorting:!1,cell:e=>{let a=e.getValue(),l="default_user_id"===a?"Default Proxy Admin":a,r=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:l??"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:70,enableSorting:!1,cell:e=>{let a=e.getValue(),l="default_user_id"===a?"Default Proxy Admin":a,r=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:l??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(ew.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(m.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let a=e.getValue();if(!a)return"Unknown";let l=new Date(a);return(0,t.jsx)(S.Tooltip,{title:l.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:l.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,i.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,i.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let a=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(a)?(0,t.jsx)("div",{className:"flex flex-col",children:0===a.length?(0,t.jsx)(g.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[a.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(ev.Icon,{icon:M[e.row.id]?ex.ChevronDownIcon:ep.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>z(t=>({...t,[e.row.id]:!t[e.row.id]}))})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[a.slice(0,3).map((e,a)=>"all-proxy-models"===e?(0,t.jsx)(g.Badge,{size:"xs",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})},a):(0,t.jsx)(g.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(p.Text,{children:e.length>30?`${(0,A.getModelDisplayName)(e).slice(0,30)}...`:(0,A.getModelDisplayName)(e)})},a)),a.length>3&&!M[e.row.id]&&(0,t.jsx)(g.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(p.Text,{children:["+",a.length-3," ",a.length-3==1?"more model":"more models"]})}),M[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.slice(3).map((e,a)=>"all-proxy-models"===e?(0,t.jsx)(g.Badge,{size:"xs",color:"red",children:(0,t.jsx)(p.Text,{children:"All Proxy Models"})},a+3):(0,t.jsx)(g.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(p.Text,{children:e.length>30?`${(0,A.getModelDisplayName)(e).slice(0,30)}...`:(0,A.getModelDisplayName)(e)})},a+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==a.tpm_limit?a.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==a.rpm_limit?a.rpm_limit:"Unlimited"]})]})}}],[M]),E=(0,I.useCallback)(e=>{let t="function"==typeof e?e(d):e;if(c(t),t?.length>0){let e=t[0];D({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[d,D]),U=(0,ef.useReactTable)({data:k,columns:B,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:u},onSortingChange:E,onPaginationChange:h,getCoreRowModel:(0,ey.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:T});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:n?(0,t.jsx)(eN.default,{keyId:n.token,onClose:()=>o(null),keyData:n,teams:[P],onDelete:N}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eS.default,{options:R,onApplyFilters:D,initialValues:x,onResetFilters:L})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[w||C?(0,t.jsx)(eC.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",y+1," of ",U.getPageCount()]}),w||C?(0,t.jsx)(eC.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>U.previousPage(),disabled:w||C||!U.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),w||C?(0,t.jsx)(eC.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>U.nextPage(),disabled:w||C||!U.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(G.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:U.getCenterTotalSize()},children:[(0,t.jsx)(J.TableHead,{children:U.getHeaderGroups().map(e=>(0,t.jsx)(X.TableRow,{children:e.headers.map(e=>(0,t.jsx)(Y.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,ef.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eb.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ex.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(e_.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${U.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(H.TableBody,{children:w||C?(0,t.jsx)(X.TableRow,{children:(0,t.jsx)(Q.TableCell,{colSpan:B.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):k.length>0?U.getRowModel().rows.map(e=>(0,t.jsx)(X.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(Q.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,ef.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(X.TableRow,{children:(0,t.jsx)(Q.TableCell,{colSpan:B.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:W,accessToken:G,is_team_admin:H,is_proxy_admin:Q,is_org_admin:J=!1,userModels:Y,editTeam:X,premiumUser:Z=!1,onUpdate:ee})=>{let[et,ed]=(0,I.useState)(null),[em,ec]=(0,I.useState)(!0),[eu,eh]=(0,I.useState)(!1),[ex]=y.Form.useForm(),[ep,eb]=(0,I.useState)(!1),[e_,ef]=(0,I.useState)(null),[ey,ej]=(0,I.useState)(!1),[ev,ew]=(0,I.useState)([]),[eC,eS]=(0,I.useState)(!1),[eN,ek]=(0,I.useState)({}),[eT,eM]=(0,I.useState)([]),[ez,eP]=(0,I.useState)([]),[eO,eF]=(0,I.useState)({}),[eA,eD]=(0,I.useState)(!1),[eL,eR]=(0,I.useState)(null),[eB,eE]=(0,I.useState)(!1),[eU,eV]=(0,I.useState)(!1),[eK,e$]=(0,I.useState)(!1),[eq,eW]=(0,I.useState)(null),{userRole:eG,userId:eH}=(0,a.default)(),{data:eQ=[]}=(0,l.useOrganizations)(),eJ=(0,I.useMemo)(()=>{let e=et?.team_info?.organization_id;if(!e||!eH)return!1;let t=eQ.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===eH&&"org_admin"===e.user_role)??!1},[et,eQ,eH]),eY=H||Q||J||eJ,eX=(0,I.useMemo)(()=>{let e;return e=[el,er],eY?[...e,es,ei,en]:e},[eY]),eZ=(0,I.useMemo)(()=>X&&eY?en:el,[X,eY]),e0=async()=>{try{if(ec(!0),!G)return;let t=await (0,s.teamInfoCall)(G,e);ed(t)}catch(e){E.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{ec(!1)}};(0,I.useEffect)(()=>{e0()},[e,G]),(0,I.useEffect)(()=>{(async()=>{if(!G||!et?.team_info?.organization_id)return eW(null);try{let e=await (0,s.organizationInfoCall)(G,et.team_info.organization_id);eW(e)}catch(e){console.error("Error fetching organization info:",e),eW(null)}})()},[G,et?.team_info?.organization_id]),(0,I.useMemo)(()=>{let e;return e=[],e=eq?eq.models.includes("all-proxy-models")?Y:eq.models.length>0?eq.models:Y:Y,(0,A.unfurlWildcardModelsInList)(e,Y)},[eq,Y]),(0,I.useEffect)(()=>{let e=async()=>{try{if(!G)return;let e=(await (0,s.getPoliciesList)(G)).policies.map(e=>e.policy_name);eP(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(!G)return;let e=(await (0,s.getGuardrailsList)(G)).guardrails.map(e=>e.guardrail_name);eM(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[G]),(0,I.useEffect)(()=>{(async()=>{if(!G||!et?.team_info?.policies||0===et.team_info.policies.length)return;eD(!0);let e={};try{await Promise.all(et.team_info.policies.map(async t=>{try{let a=await (0,s.getPolicyInfoWithGuardrails)(G,t);e[t]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${t}:`,a),e[t]=[]}})),eF(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eD(!1)}})()},[G,et?.team_info?.policies]);let e1=async t=>{try{if(null==G)return;let a={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,s.teamMemberAddCall)(G,e,a),E.default.success("Team member added successfully"),eh(!1),ex.resetFields();let l=await (0,s.teamInfoCall)(G,e);ed(l),ee(l)}catch(t){let e="Failed to add team member";t?.raw?.detail?.error?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),E.default.fromBackend(e),console.error("Error adding team member:",t)}},e2=async t=>{try{if(null==G)return;let a={user_email:t.user_email,user_id:t.user_id,role:t.role,max_budget_in_team:t.max_budget_in_team,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit};N.default.destroy(),await (0,s.teamMemberUpdateCall)(G,e,a),E.default.success("Team member updated successfully"),eb(!1);let l=await (0,s.teamInfoCall)(G,e);ed(l),ee(l)}catch(t){let e="Failed to update team member";t?.raw?.detail?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),eb(!1),N.default.destroy(),E.default.fromBackend(e),console.error("Error updating team member:",t)}},e4=async()=>{if(eL&&G){eV(!0);try{await (0,s.teamMemberDeleteCall)(G,e,eL),E.default.success("Team member removed successfully");let t=await (0,s.teamInfoCall)(G,e);ed(t),ee(t)}catch(e){E.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{eV(!1),eE(!1),eR(null)}}},e5=async t=>{try{let a;if(!G)return;e$(!0);let l={};try{let{soft_budget_alerting_emails:e,...a}=t.metadata?JSON.parse(t.metadata):{};l=a}catch(e){E.default.fromBackend("Invalid JSON in metadata field");return}if("string"==typeof t.secret_manager_settings&&t.secret_manager_settings.trim().length>0)try{a=JSON.parse(t.secret_manager_settings)}catch(e){E.default.fromBackend("Invalid JSON in secret manager settings");return}let r=e=>null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&Number.isNaN(e)?null:e,i={team_id:e,team_alias:t.team_alias,models:t.models,tpm_limit:r(t.tpm_limit),rpm_limit:r(t.rpm_limit),max_budget:t.max_budget,soft_budget:r(t.soft_budget),budget_duration:t.budget_duration,metadata:{...l,...t.guardrails?.length>0?{guardrails:t.guardrails}:{},...t.logging_settings?.length>0?{logging:t.logging_settings}:{},disable_global_guardrails:t.disable_global_guardrails||!1,soft_budget_alerting_emails:"string"==typeof t.soft_budget_alerting_emails?t.soft_budget_alerting_emails.split(",").map(e=>e.trim()).filter(e=>e.length>0):t.soft_budget_alerting_emails||[],...void 0!==a?{secret_manager_settings:a}:{}},...t.policies?.length>0?{policies:t.policies}:{},organization_id:t.organization_id};i.max_budget=(0,n.mapEmptyStringToNull)(i.max_budget),i.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(i.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(i.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(i.team_member_tpm_limit=r(t.team_member_tpm_limit),i.team_member_rpm_limit=r(t.team_member_rpm_limit));let{servers:o,accessGroups:d}=t.mcp_servers_and_groups||{servers:[],accessGroups:[]},m=new Set(o||[]),c=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>m.has(e)));i.object_permission={},o&&(i.object_permission.mcp_servers=o),d&&(i.object_permission.mcp_access_groups=d),c&&(i.object_permission.mcp_tool_permissions=c),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:u,accessGroups:g}=t.agents_and_groups||{agents:[],accessGroups:[]};u&&u.length>0&&(i.object_permission.agents=u),g&&g.length>0&&(i.object_permission.agent_access_groups=g),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(i.object_permission.vector_stores=t.vector_stores),void 0!==t.access_group_ids&&(i.access_group_ids=t.access_group_ids),await (0,s.teamUpdateCall)(G,i),E.default.success("Team settings updated successfully"),ej(!1),e0()}catch(e){console.error("Error updating team:",e)}finally{e$(!1)}};if(em)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!et?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:e3}=et,e7=async(e,t)=>{await (0,i.copyToClipboard)(e)&&(ek(e=>({...e,[t]:!0})),setTimeout(()=>{ek(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Button,{type:"text",icon:(0,t.jsx)(u.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:W,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(_.Title,{children:e3.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(p.Text,{className:"text-gray-500 font-mono",children:e3.team_id}),(0,t.jsx)(f.Button,{type:"text",size:"small",icon:eN["team-id"]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>e7(e3.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${eN["team-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsx)(C.Tabs,{defaultActiveKey:eZ,className:"mb-4",items:[{key:el,label:eo[el],children:(0,t.jsxs)(x.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Title,{children:["$",(0,i.formatNumberWithCommas)(e3.spend,4)]}),(0,t.jsxs)(p.Text,{children:["of ",null===e3.max_budget?"Unlimited":`$${(0,i.formatNumberWithCommas)(e3.max_budget,4)}`]}),e3.budget_duration&&(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Reset: ",e3.budget_duration]}),(0,t.jsx)("br",{}),e3.team_member_budget_table&&(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,i.formatNumberWithCommas)(e3.team_member_budget_table.max_budget,4)]})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(p.Text,{children:["TPM: ",e3.tpm_limit||"Unlimited"]}),(0,t.jsxs)(p.Text,{children:["RPM: ",e3.rpm_limit||"Unlimited"]}),e3.max_parallel_requests&&(0,t.jsxs)(p.Text,{children:["Max Parallel Requests: ",e3.max_parallel_requests]})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===e3.models.length?(0,t.jsx)(g.Badge,{color:"red",children:"All proxy models"}):e3.models.map((e,a)=>(0,t.jsx)(g.Badge,{color:"red",children:e},a))})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(p.Text,{children:["User Keys: ",et.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(p.Text,{children:["Service Account Keys: ",et.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(p.Text,{className:"text-gray-500",children:["Total: ",et.keys.length]})]})]}),(0,t.jsx)(U.default,{objectPermission:e3.object_permission,variant:"card",accessToken:G}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900 mb-3",children:"Guardrails"}),e3.guardrails&&e3.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e3.guardrails.map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(p.Text,{className:"text-gray-500",children:"No guardrails configured"}),e3.metadata?.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(g.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(p.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),e3.policies&&e3.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:e3.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Badge,{color:"purple",children:e}),eA&&(0,t.jsx)(p.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!eA&&eO[e]&&eO[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(p.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eO[e].map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(p.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(D.default,{loggingConfigs:e3.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:er,label:eo[er],children:(0,t.jsx)(eI,{teamId:e,teamAlias:e3.team_alias,organization:eq})},{key:es,label:eo[es],children:(0,t.jsx)(eg,{teamData:et,canEditTeam:eY,handleMemberDelete:e=>{eR(e),eE(!0)},setSelectedEditMember:ef,setIsEditMemberModalVisible:eb,setIsAddMemberModalVisible:eh})},{key:ei,label:eo[ei],children:(0,t.jsx)(ea,{teamId:e,accessToken:G,canEditTeam:eY})},{key:en,label:eo[en],children:(0,t.jsxs)(h.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(_.Title,{children:"Team Settings"}),eY&&!ey&&(0,t.jsx)(f.Button,{icon:(0,t.jsx)(d.EditOutlined,{className:"h-4 w-4"}),onClick:()=>ej(!0),children:"Edit Settings"})]}),ey?(0,t.jsxs)(y.Form,{form:ex,onFinish:e5,initialValues:{...e3,team_alias:e3.team_alias,models:e3.models,tpm_limit:e3.tpm_limit,rpm_limit:e3.rpm_limit,max_budget:e3.max_budget,soft_budget:e3.soft_budget,budget_duration:e3.budget_duration,team_member_tpm_limit:e3.team_member_budget_table?.tpm_limit,team_member_rpm_limit:e3.team_member_budget_table?.rpm_limit,team_member_budget:e3.team_member_budget_table?.max_budget,team_member_budget_duration:e3.team_member_budget_table?.budget_duration,guardrails:e3.metadata?.guardrails||[],policies:e3.policies||[],disable_global_guardrails:e3.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(e3.metadata?.soft_budget_alerting_emails)?e3.metadata.soft_budget_alerting_emails.join(", "):"",metadata:e3.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:a,...l})=>l)(e3.metadata),null,2):"",logging_settings:e3.metadata?.logging||[],secret_manager_settings:e3.metadata?.secret_manager_settings?JSON.stringify(e3.metadata.secret_manager_settings,null,2):"",organization_id:e3.organization_id,vector_stores:e3.object_permission?.vector_stores||[],mcp_servers:e3.object_permission?.mcp_servers||[],mcp_access_groups:e3.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:e3.object_permission?.mcp_servers||[],accessGroups:e3.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e3.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e3.object_permission?.agents||[],accessGroups:e3.object_permission?.agent_access_groups||[]},access_group_ids:e3.access_group_ids||[]},layout:"vertical",children:[(0,t.jsx)(y.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(j.Input,{type:""})}),(0,t.jsx)(y.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(B.ModelSelect,{value:ex.getFieldValue("models")||[],onChange:e=>ex.setFieldValue("models",e),teamID:e,organizationID:et?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!et?.team_info?.organization_id,showAllProxyModelsOverride:(0,o.isProxyAdminRole)(eG)&&!et?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(y.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(V.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(V.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:"Soft Budget Alerting Emails",name:"soft_budget_alerting_emails",tooltip:"Comma-separated email addresses to receive alerts when the soft budget is reached",children:(0,t.jsx)(j.Input,{placeholder:"example1@test.com, example2@test.com"})}),(0,t.jsx)(y.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(V.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:"Team Member Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(O,{onChange:e=>ex.setFieldValue("team_member_budget_duration",e),value:ex.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(y.Form.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,t.jsx)(b.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(y.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"Default tokens per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,t.jsx)(V.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(y.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"Default requests per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,t.jsx)(V.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})}),(0,t.jsx)(y.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(v.Select,{placeholder:"n/a",children:[(0,t.jsx)(v.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(v.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(v.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(y.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(V.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(V.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(S.Tooltip,{title:"Setup your first guardrail",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(v.Select,{mode:"tags",placeholder:"Select or enter guardrails",options:eT.map(e=>({value:e,label:e}))})}),(0,t.jsx)(y.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails",(0,t.jsx)(S.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(w.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(y.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(S.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",help:"Select existing policies or enter new ones",children:(0,t.jsx)(v.Select,{mode:"tags",placeholder:"Select or enter policies",options:ez.map(e=>({value:e,label:e}))})}),(0,t.jsx)(y.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(S.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(y.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(K.default,{onChange:e=>ex.setFieldValue("vector_stores",e),value:ex.getFieldValue("vector_stores"),accessToken:G||"",placeholder:"Select vector stores"})}),(0,t.jsx)(y.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(F.default,{onChange:e=>ex.setFieldValue("allowed_passthrough_routes",e),value:ex.getFieldValue("allowed_passthrough_routes"),accessToken:G||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(y.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(L.default,{onChange:e=>ex.setFieldValue("mcp_servers_and_groups",e),value:ex.getFieldValue("mcp_servers_and_groups"),accessToken:G||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(y.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(j.Input,{type:"hidden"})}),(0,t.jsx)(y.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(R.default,{accessToken:G||"",selectedServers:ex.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:ex.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ex.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(y.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(z.default,{onChange:e=>ex.setFieldValue("agents_and_groups",e),value:ex.getFieldValue("agents_and_groups"),accessToken:G||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(y.Form.Item,{label:"Organization ID",name:"organization_id",children:(0,t.jsx)(j.Input,{type:"",disabled:!0})}),(0,t.jsx)(y.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)($.default,{value:ex.getFieldValue("logging_settings"),onChange:e=>ex.setFieldValue("logging_settings",e)})}),(0,t.jsx)(y.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:Z?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!Z})}),(0,t.jsx)(y.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(j.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(f.Button,{onClick:()=>ej(!1),disabled:eK,children:"Cancel"}),(0,t.jsx)(f.Button,{icon:(0,t.jsx)(c.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:eK,children:"Save Changes"})]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team Name"}),(0,t.jsx)("div",{children:e3.team_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"font-mono",children:e3.team_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:new Date(e3.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:e3.models.map((e,a)=>(0,t.jsx)(g.Badge,{color:"red",children:e},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",e3.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",e3.rpm_limit||"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Team Budget"}),(0,t.jsxs)("div",{children:["Max Budget:"," ",null!==e3.max_budget?`$${(0,i.formatNumberWithCommas)(e3.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==e3.soft_budget&&void 0!==e3.soft_budget?`$${(0,i.formatNumberWithCommas)(e3.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",e3.budget_duration||"Never"]}),e3.metadata?.soft_budget_alerting_emails&&Array.isArray(e3.metadata.soft_budget_alerting_emails)&&e3.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",e3.metadata.soft_budget_alerting_emails.join(", ")]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(p.Text,{className:"font-medium",children:["Team Member Settings"," ",(0,t.jsx)(S.Tooltip,{title:"These are limits on individual team members",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),(0,t.jsxs)("div",{children:["Max Budget: ",e3.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",e3.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",e3.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",e3.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",e3.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Organization ID"}),(0,t.jsx)("div",{children:e3.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(g.Badge,{color:e3.blocked?"red":"green",children:e3.blocked?"Blocked":"Active"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)("div",{children:e3.metadata?.disable_global_guardrails===!0?(0,t.jsx)(g.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(g.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsx)(U.default,{objectPermission:e3.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:G}),(0,t.jsx)(D.default,{loggingConfigs:e3.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),e3.metadata?.secret_manager_settings&&(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(p.Text,{className:"font-medium",children:"Secret Manager Settings"}),(0,t.jsx)("pre",{className:"mt-2 bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(e3.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>eX.includes(e.key))}),(0,t.jsx)(q.default,{visible:ep,onCancel:()=>eb(!1),onSubmit:e2,initialData:e_,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Admin",value:"admin"},{label:"User",value:"user"}],additionalFields:[{name:"max_budget_in_team",label:(0,t.jsxs)("span",{children:["Team Member Budget (USD)"," ",(0,t.jsx)(S.Tooltip,{title:"Maximum amount in USD this member can spend within this team. This is separate from any global user budget limits",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(S.Tooltip,{title:"Maximum tokens per minute this member can use within this team. This is separate from any global user TPM limit",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Tokens per minute limit for this member in this team"},{name:"rpm_limit",label:(0,t.jsxs)("span",{children:["Team Member RPM Limit"," ",(0,t.jsx)(S.Tooltip,{title:"Maximum requests per minute this member can make within this team. This is separate from any global user RPM limit",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Requests per minute limit for this member in this team"}]}}),(0,t.jsx)(r.default,{isVisible:eu,onCancel:()=>eh(!1),onSubmit:e1,accessToken:G,teamId:e}),(0,t.jsx)(P.default,{isOpen:eB,title:"Delete Team Member",alertMessage:"Removing team members will also delete any keys created by or created for this member.",message:"Are you sure you want to remove this member from the team? This action cannot be undone.",resourceInformationTitle:"Team Member Information",resourceInformation:[{label:"User ID",value:eL?.user_id,code:!0},{label:"Email",value:eL?.user_email},{label:"Role",value:eL?.role}],onCancel:()=>{eE(!1),eR(null)},onOk:e4,confirmLoading:eU})]})}],56567)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},621192,e=>{"use strict";let t=e.i(264042).Row;e.s(["Row",0,t],621192)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var r=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(r.default,(0,t.default)({},e,{ref:i,icon:l}))});e.s(["ReloadOutlined",0,i],91979)},551332,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});e.s(["ClipboardCopyIcon",0,a],551332)},122577,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,a],122577)},902555,e=>{"use strict";var t=e.i(843476),a=e.i(591935),l=e.i(122577),r=e.i(278587),i=e.i(68155),s=e.i(360820),n=e.i(871943),o=e.i(434626),d=e.i(551332),m=e.i(592968),c=e.i(115504),u=e.i(752978);function g({icon:e,onClick:a,className:l,disabled:r,dataTestId:i}){return r?(0,t.jsx)(u.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":i}):(0,t.jsx)(u.Icon,{icon:e,size:"sm",onClick:a,className:(0,c.cx)("cursor-pointer",l),"data-testid":i})}let h={Edit:{icon:a.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:i.TrashIcon,className:"hover:text-red-600"},Test:{icon:l.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:r.RefreshIcon,className:"hover:text-green-600"},Up:{icon:s.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:n.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:d.ClipboardCopyIcon,className:"hover:text-blue-600"}};function p({onClick:e,tooltipText:a,disabled:l=!1,disabledTooltipText:r,dataTestId:i,variant:s}){let{icon:n,className:o}=h[s];return(0,t.jsx)(m.Tooltip,{title:l?r:a,children:(0,t.jsx)("span",{children:(0,t.jsx)(g,{icon:n,onClick:e,className:o,disabled:l,dataTestId:i})})})}e.s(["default",()=>p],902555)},434626,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,a],434626)},278587,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,a],278587)},207670,e=>{"use strict";function t(){for(var e,t,a=0,l="",r=arguments.length;at,"default",0,t])},728889,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(829087),r=e.i(480731),i=e.i(444755),s=e.i(673706),n=e.i(95779);let o={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},c=(0,s.makeClassName)("Icon"),u=a.default.forwardRef((e,u)=>{let{icon:g,variant:h="simple",tooltip:p,size:x=r.Sizes.SM,color:b,className:_}=e,f=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,s.getColorClassNames)(t,n.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,s.getColorClassNames)(t,n.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,i.tremorTwMerge)((0,s.getColorClassNames)(t,n.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,b),{tooltipProps:j,getReferenceProps:v}=(0,l.useTooltip)();return a.default.createElement("span",Object.assign({ref:(0,s.mergeRefs)([u,j.refs.setReference]),className:(0,i.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",y.bgColor,y.textColor,y.borderColor,y.ringColor,m[h].rounded,m[h].border,m[h].shadow,m[h].ring,o[x].paddingX,o[x].paddingY,_)},v,f),a.default.createElement(l.default,Object.assign({text:p},j)),a.default.createElement(g,{className:(0,i.tremorTwMerge)(c("icon"),"shrink-0",d[x].height,d[x].width)}))});u.displayName="Icon",e.s(["default",()=>u],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,a],591935)},738014,e=>{"use strict";var t=e.i(135214),a=e.i(764205),l=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:i}=(0,t.default)();return(0,l.useQuery)({queryKey:r.detail(i),queryFn:async()=>await (0,a.userGetInfoV2)(e),enabled:!!(e&&i)})}])},625901,e=>{"use strict";var t=e.i(266027),a=e.i(621482),l=e.i(243652),r=e.i(764205),i=e.i(135214);let s=(0,l.createQueryKeys)("models"),n=(0,l.createQueryKeys)("modelHub"),o=(0,l.createQueryKeys)("allProxyModels");(0,l.createQueryKeys)("selectedTeamModels");let d=(0,l.createQueryKeys)("infiniteModels");e.s(["useAllProxyModels",0,()=>{let{accessToken:e,userId:a,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:o.list({}),queryFn:async()=>await (0,r.modelAvailableCall)(e,a,l,!0,null,!0,!1,"expand"),enabled:!!(e&&a&&l)})},"useInfiniteModelInfo",0,(e=50,t)=>{let{accessToken:l,userId:s,userRole:n}=(0,i.default)();return(0,a.useInfiniteQuery)({queryKey:d.list({filters:{...s&&{userId:s},...n&&{userRole:n},size:e,...t&&{search:t}}}),queryFn:async({pageParam:a})=>await (0,r.modelInfoCall)(l,s,n,a,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{let{accessToken:e}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,r.modelHubCall)(e),enabled:!!e})},"useModelsInfo",0,(e=1,a=50,l,n,o,d,m)=>{let{accessToken:c,userId:u,userRole:g}=(0,i.default)();return(0,t.useQuery)({queryKey:s.list({filters:{...u&&{userId:u},...g&&{userRole:g},page:e,size:a,...l&&{search:l},...n&&{modelId:n},...o&&{teamId:o},...d&&{sortBy:d},...m&&{sortOrder:m}}}),queryFn:async()=>await (0,r.modelInfoCall)(c,u,g,e,a,l,n,o,d,m),enabled:!!(c&&u&&g)})}])},907308,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(212931),r=e.i(808613),i=e.i(464571),s=e.i(199133),n=e.i(592968),o=e.i(213205),d=e.i(374009),m=e.i(764205);e.s(["default",0,({isVisible:e,onCancel:c,onSubmit:u,accessToken:g,title:h="Add Team Member",roles:p=[{label:"admin",value:"admin",description:"Admin role. Can create team keys, add members, and manage settings."},{label:"user",value:"user",description:"User role. Can view team info, but not manage it."}],defaultRole:x="user",teamId:b})=>{let[_]=r.Form.useForm(),[f,y]=(0,a.useState)([]),[j,v]=(0,a.useState)(!1),[w,C]=(0,a.useState)("user_email"),[S,N]=(0,a.useState)(!1),k=async(e,t)=>{if(!e)return void y([]);v(!0);try{let a=new URLSearchParams;if(a.append(t,e),b&&a.append("team_id",b),null==g)return;let l=(await (0,m.userFilterUICall)(g,a)).map(e=>({label:"user_email"===t?`${e.user_email}`:`${e.user_id}`,value:"user_email"===t?e.user_email:e.user_id,user:e}));y(l)}catch(e){console.error("Error fetching users:",e)}finally{v(!1)}},T=(0,a.useCallback)((0,d.default)((e,t)=>k(e,t),300),[]),I=(e,t)=>{C(t),T(e,t)},M=(e,t)=>{let a=t.user;_.setFieldsValue({user_email:a.user_email,user_id:a.user_id,role:_.getFieldValue("role")})},z=async e=>{N(!0);try{await u(e)}finally{N(!1)}};return(0,t.jsx)(l.Modal,{title:h,open:e,onCancel:()=>{_.resetFields(),y([]),c()},footer:null,width:800,maskClosable:!S,children:(0,t.jsxs)(r.Form,{form:_,onFinish:z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:x},children:[(0,t.jsx)(r.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>I(e,"user_email"),onSelect:(e,t)=>M(e,t),options:"user_email"===w?f:[],loading:j,allowClear:!0})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(r.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(s.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>I(e,"user_id"),onSelect:(e,t)=>M(e,t),options:"user_id"===w?f:[],loading:j,allowClear:!0})}),(0,t.jsx)(r.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(s.Select,{defaultValue:x,children:p.map(e=>(0,t.jsx)(s.Select.Option,{value:e.value,children:(0,t.jsxs)(n.Tooltip,{title:e.description,children:[(0,t.jsx)("span",{className:"font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(i.Button,{type:"primary",htmlType:"submit",icon:(0,t.jsx)(o.UserAddOutlined,{}),loading:S,children:S?"Adding...":"Add Member"})})]})})}])},162386,e=>{"use strict";var t=e.i(843476),a=e.i(625901),l=e.i(109799),r=e.i(785242),i=e.i(738014),s=e.i(199133),n=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},m={label:"No Default Models",value:"no-default-models"},c=[d,m],u={user:({allProxyModels:e,userModels:t,options:a})=>t&&a?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:a})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["ModelSelect",0,e=>{let{teamID:g,organizationID:h,options:p,context:x,dataTestId:b,value:_=[],onChange:f,style:y}=e,{includeUserModels:j,showAllTeamModelsOption:v,showAllProxyModelsOverride:w,includeSpecialOptions:C}=p||{},{data:S,isLoading:N}=(0,a.useAllProxyModels)(),{data:k,isLoading:T}=(0,r.useTeam)(g),{data:I,isLoading:M}=(0,l.useOrganization)(h),{data:z,isLoading:P}=(0,i.useCurrentUser)(),F=e=>c.some(t=>t.value===e),O=_.some(F),A=I?.models.includes(d.value)||I?.models.length===0;if(N||T||M||P)return(0,t.jsx)(n.Skeleton.Input,{active:!0,block:!0});let{wildcard:D,regular:L}=(e=>{let t=[],a=[];for(let l of e)l.endsWith("/*")?t.push(l):a.push(l);return{wildcard:t,regular:a}})(((e,t,a)=>{let l=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return l;let r=u[t.context];return r?r({allProxyModels:l,...a,options:t.options}):[]})(S?.data??[],e,{selectedTeam:k,selectedOrganization:I,userModels:z?.models}));return(0,t.jsx)(s.Select,{"data-testid":b,value:_,onChange:e=>{let t=e.filter(F);f(t.length>0?[t[t.length-1]]:e)},style:y,options:[C?{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...w||A&&C||"global"===x?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:_.length>0&&_.some(e=>F(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:m.value,disabled:_.length>0&&_.some(e=>F(e)&&e!==m.value),key:m.value}]}:[],...D.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:D.map(e=>{let a=e.replace("/*",""),l=a.charAt(0).toUpperCase()+a.slice(1);return{label:(0,t.jsx)("span",{children:`All ${l} models`}),value:e,disabled:O}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:L.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:O}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},276173,e=>{"use strict";var t=e.i(843476),a=e.i(599724),l=e.i(779241),r=e.i(464571),i=e.i(808613),s=e.i(212931),n=e.i(199133),o=e.i(271645),d=e.i(435451);e.s(["default",0,({visible:e,onCancel:m,onSubmit:c,initialData:u,mode:g,config:h})=>{let p,[x]=i.Form.useForm(),[b,_]=(0,o.useState)(!1);console.log("Initial Data:",u),(0,o.useEffect)(()=>{if(e)if("edit"===g&&u){let e={...u,role:u.role||h.defaultRole,max_budget_in_team:u.max_budget_in_team||null,tpm_limit:u.tpm_limit||null,rpm_limit:u.rpm_limit||null};console.log("Setting form values:",e),x.setFieldsValue(e)}else x.resetFields(),x.setFieldsValue({role:h.defaultRole||h.roleOptions[0]?.value})},[e,u,g,x,h.defaultRole,h.roleOptions]);let f=async e=>{try{_(!0);let t=Object.entries(e).reduce((e,[t,a])=>{if("string"==typeof a){let l=a.trim();return""===l&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:l}}return{...e,[t]:a}},{});console.log("Submitting form data:",t),await Promise.resolve(c(t)),x.resetFields()}catch(e){console.error("Form submission error:",e)}finally{_(!1)}};return(0,t.jsx)(s.Modal,{title:h.title||("add"===g?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:m,children:(0,t.jsxs)(i.Form,{form:x,onFinish:f,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[h.showEmail&&(0,t.jsx)(i.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(l.TextInput,{placeholder:"user@example.com"})}),h.showEmail&&h.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(a.Text,{children:"OR"})}),h.showUserId&&(0,t.jsx)(i.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(l.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(i.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===g&&u&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(p=u.role,h.roleOptions.find(e=>e.value===p)?.label||p),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(n.Select,{children:"edit"===g&&u?[...h.roleOptions.filter(e=>e.value===u.role),...h.roleOptions.filter(e=>e.value!==u.role)].map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value)):h.roleOptions.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))})}),h.additionalFields?.map(e=>(0,t.jsx)(i.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,t.jsx)(l.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(d.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,t.jsx)(n.Select,{children:e.options?.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(r.Button,{onClick:m,className:"mr-2",disabled:b,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"default",htmlType:"submit",loading:b,children:"add"===g?b?"Adding...":"Add Member":b?"Saving...":"Save Changes"})]})]})})}])},294612,e=>{"use strict";var t=e.i(843476),a=e.i(100486),l=e.i(827252),r=e.i(213205),i=e.i(771674),s=e.i(464571),n=e.i(770914),o=e.i(291542),d=e.i(262218),m=e.i(592968),c=e.i(898586),u=e.i(902555);let{Text:g}=c.Typography;function h({members:e,canEdit:c,onEdit:h,onDelete:p,onAddMember:x,roleColumnTitle:b="Role",roleTooltip:_,extraColumns:f=[],showDeleteForMember:y,emptyText:j}){let v=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(g,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,t.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(g,{children:e||"-"})},{title:_?(0,t.jsxs)(n.Space,{direction:"horizontal",children:[b,(0,t.jsx)(m.Tooltip,{title:_,children:(0,t.jsx)(l.InfoCircleOutlined,{})})]}):b,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(n.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(a.CrownOutlined,{}):(0,t.jsx)(i.UserOutlined,{}),(0,t.jsx)(g,{style:{textTransform:"capitalize"},children:e||"-"})]})},...f,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,a)=>c?(0,t.jsxs)(n.Space,{children:[(0,t.jsx)(u.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>h(a)}),(!y||y(a))&&(0,t.jsx)(u.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>p(a)})]}):null}];return(0,t.jsxs)(n.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,t.jsx)(o.Table,{columns:v,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:j?{emptyText:j}:void 0}),x&&c&&(0,t.jsx)(s.Button,{icon:(0,t.jsx)(r.UserAddOutlined,{}),type:"primary",onClick:x,children:"Add Member"})]})}e.s(["default",()=>h])},56567,e=>{"use strict";var t=e.i(843476),a=e.i(135214),l=e.i(109799),r=e.i(907308),i=e.i(764205),s=e.i(500330),n=e.i(11751),o=e.i(708347),d=e.i(751904),m=e.i(827252),c=e.i(987432),u=e.i(530212),g=e.i(389083),h=e.i(304967),p=e.i(350967),x=e.i(599724),b=e.i(779241),_=e.i(629569),f=e.i(464571),y=e.i(808613),j=e.i(311451),v=e.i(199133),w=e.i(790848),C=e.i(653496),S=e.i(592968),N=e.i(888259),k=e.i(678784),T=e.i(118366),I=e.i(271645),M=e.i(9314),z=e.i(552130),P=e.i(127952);function F({className:e,value:a,onChange:l}){return(0,t.jsxs)(v.Select,{className:e,value:a,onChange:l,children:[(0,t.jsx)(v.Select.Option,{value:"24h",children:"Daily"}),(0,t.jsx)(v.Select.Option,{value:"7d",children:"Weekly"}),(0,t.jsx)(v.Select.Option,{value:"30d",children:"Monthly"})]})}var O=e.i(844565),A=e.i(355619),D=e.i(643449),L=e.i(75921),B=e.i(390605),R=e.i(162386),E=e.i(727749),U=e.i(384767),V=e.i(435451),K=e.i(916940),$=e.i(183588),q=e.i(276173),W=e.i(91979),G=e.i(269200),H=e.i(942232),Q=e.i(977572),J=e.i(427612),Y=e.i(64848),X=e.i(496020),Z=e.i(536916),ee=e.i(21548);let et={"/key/generate":"Member can generate a virtual key for this team","/key/service-account/generate":"Member can generate a service account key (not belonging to any user) for this team","/key/update":"Member can update a virtual key belonging to this team","/key/delete":"Member can delete a virtual key belonging to this team","/key/info":"Member can get info about a virtual key belonging to this team","/key/regenerate":"Member can regenerate a virtual key belonging to this team","/key/{key_id}/regenerate":"Member can regenerate a virtual key belonging to this team","/key/list":"Member can list virtual keys belonging to this team","/key/block":"Member can block a virtual key belonging to this team","/key/unblock":"Member can unblock a virtual key belonging to this team","/team/daily/activity":"Member can view all team usage data (not just their own)"},ea=({teamId:e,accessToken:a,canEditTeam:l})=>{let[r,s]=(0,I.useState)([]),[n,o]=(0,I.useState)([]),[d,m]=(0,I.useState)(!0),[u,g]=(0,I.useState)(!1),[p,b]=(0,I.useState)(!1),y=async()=>{try{if(m(!0),!a)return;let t=await (0,i.getTeamPermissionsCall)(a,e),l=t.all_available_permissions||[];s(l);let r=t.team_member_permissions||[];o(r),b(!1)}catch(e){E.default.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{m(!1)}};(0,I.useEffect)(()=>{y()},[e,a]);let j=async()=>{try{if(!a)return;g(!0),await (0,i.teamPermissionsUpdateCall)(a,e,n),E.default.success("Permissions updated successfully"),b(!1)}catch(e){E.default.fromBackend("Failed to update permissions"),console.error("Error updating permissions:",e)}finally{g(!1)}};if(d)return(0,t.jsx)("div",{className:"p-6 text-center",children:"Loading permissions..."});let v=r.length>0;return(0,t.jsxs)(h.Card,{className:"bg-white shadow-md rounded-md p-6",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b pb-4 mb-6",children:[(0,t.jsx)(_.Title,{className:"mb-2 sm:mb-0",children:"Member Permissions"}),l&&p&&(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(f.Button,{icon:(0,t.jsx)(W.ReloadOutlined,{}),onClick:()=>{y()},children:"Reset"}),(0,t.jsx)(f.Button,{onClick:j,loading:u,type:"primary",icon:(0,t.jsx)(c.SaveOutlined,{}),children:"Save Changes"})]})]}),(0,t.jsx)(x.Text,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),v?(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(G.Table,{className:" min-w-full",children:[(0,t.jsx)(J.TableHead,{children:(0,t.jsxs)(X.TableRow,{children:[(0,t.jsx)(Y.TableHeaderCell,{children:"Method"}),(0,t.jsx)(Y.TableHeaderCell,{children:"Endpoint"}),(0,t.jsx)(Y.TableHeaderCell,{children:"Description"}),(0,t.jsx)(Y.TableHeaderCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:"Allow Access"})]})}),(0,t.jsx)(H.TableBody,{children:r.map(e=>{let a=(e=>{let t=e.includes("/info")||e.includes("/list")||e.includes("/activity")?"GET":"POST",a=et[e];if(!a){for(let[t,l]of Object.entries(et))if(e.includes(t)){a=l;break}}return a||(a=`Access ${e}`),{method:t,endpoint:e,description:a,route:e}})(e);return(0,t.jsxs)(X.TableRow,{className:"hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(Q.TableCell,{children:(0,t.jsx)("span",{className:`px-2 py-1 rounded text-xs font-medium ${"GET"===a.method?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"}`,children:a.method})}),(0,t.jsx)(Q.TableCell,{children:(0,t.jsx)("span",{className:"font-mono text-sm text-gray-800",children:a.endpoint})}),(0,t.jsx)(Q.TableCell,{className:"text-gray-700",children:a.description}),(0,t.jsx)(Q.TableCell,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,t.jsx)(Z.Checkbox,{checked:n.includes(e),onChange:t=>{o(t.target.checked?[...n,e]:n.filter(t=>t!==e)),b(!0)},disabled:!l})})]},e)})})]})}):(0,t.jsx)("div",{className:"py-12",children:(0,t.jsx)(ee.Empty,{description:"No permissions available"})})]})},el="overview",er="virtual-keys",ei="members",es="member-permissions",en="settings",eo={[el]:"Overview",[er]:"Virtual Keys",[ei]:"Members",[es]:"Member Permissions",[en]:"Settings"};var ed=e.i(292639),em=e.i(770914),ec=e.i(898586),eu=e.i(294612);function eg({teamData:e,canEditTeam:l,handleMemberDelete:r,setSelectedEditMember:i,setIsEditMemberModalVisible:n,setIsAddMemberModalVisible:d}){let c=e=>{if(null==e)return"0";if("number"==typeof e){let t=Number(e);return t===Math.floor(t)?t.toString():(0,s.formatNumberWithCommas)(t,8).replace(/\.?0+$/,"")}return"0"},{data:u}=(0,ed.useUISettings)(),{userId:g,userRole:h}=(0,a.default)(),p=!!u?.values?.disable_team_admin_delete_team_user,x=(0,o.isUserTeamAdminForSingleTeam)(e.team_info.members_with_roles,g||""),b=(0,o.isProxyAdminRole)(h||""),_=[{title:(0,t.jsxs)(em.Space,{direction:"horizontal",children:["Team Member Spend (USD)",(0,t.jsx)(S.Tooltip,{title:"This is the amount spent by a user in the team.",children:(0,t.jsx)(m.InfoCircleOutlined,{})})]}),key:"spend",render:(a,l)=>(0,t.jsxs)(ec.Typography.Text,{children:["$",(0,s.formatNumberWithCommas)((t=>{if(!t)return 0;let a=e.team_memberships.find(e=>e.user_id===t);return a?.spend||0})(l.user_id),4)]})},{title:"Team Member Budget (USD)",key:"budget",render:(a,l)=>{let r=(t=>{if(!t)return null;let a=e.team_memberships.find(e=>e.user_id===t),l=a?.litellm_budget_table?.max_budget;return null==l?null:c(l)})(l.user_id);return(0,t.jsx)(ec.Typography.Text,{children:r?`$${(0,s.formatNumberWithCommas)(Number(r),4)}`:"No Limit"})}},{title:(0,t.jsxs)(em.Space,{direction:"horizontal",children:["Team Member Rate Limits",(0,t.jsx)(S.Tooltip,{title:"Rate limits for this member's usage within this team.",children:(0,t.jsx)(m.InfoCircleOutlined,{})})]}),key:"rate_limits",render:(a,l)=>(0,t.jsx)(ec.Typography.Text,{children:(t=>{if(!t)return"No Limits";let a=e.team_memberships.find(e=>e.user_id===t),l=a?.litellm_budget_table?.rpm_limit,r=a?.litellm_budget_table?.tpm_limit,i=[l?`${c(l)} RPM`:null,r?`${c(r)} TPM`:null].filter(Boolean);return i.length>0?i.join(" / "):"No Limits"})(l.user_id)})}];return(0,t.jsx)(eu.default,{members:e.team_info.members_with_roles,canEdit:l,onEdit:t=>{let a=e.team_memberships.find(e=>e.user_id===t.user_id);i({...t,max_budget_in_team:a?.litellm_budget_table?.max_budget||null,tpm_limit:a?.litellm_budget_table?.tpm_limit||null,rpm_limit:a?.litellm_budget_table?.rpm_limit||null}),n(!0)},onDelete:r,onAddMember:()=>d(!0),roleColumnTitle:"Team Role",roleTooltip:"This role applies only to this team and is independent from the user's proxy-level role.",extraColumns:_,showDeleteForMember:()=>b||l&&!x||x&&!p})}var eh=e.i(207082),ep=e.i(871943),ex=e.i(502547),eb=e.i(360820),e_=e.i(94629),ef=e.i(152990),ey=e.i(682830),ej=e.i(994388),ev=e.i(752978),ew=e.i(282786),eC=e.i(981339),eS=e.i(969550),eN=e.i(20147),ek=e.i(266027),eT=e.i(633627);function eI({teamId:e,teamAlias:l,organization:r}){let{accessToken:i}=(0,a.default)(),[n,o]=(0,I.useState)(null),[d,c]=(0,I.useState)([{id:"created_at",desc:!0}]),[u,h]=(0,I.useState)({pageIndex:0,pageSize:50}),[p,b]=(0,I.useState)({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),_=d.length>0?d[0].id:"created_at",f=d.length>0?d[0].desc?"desc":"asc":"desc",y=u.pageIndex,j=u.pageSize,{data:v,isPending:w,isFetching:C,refetch:N}=(0,eh.useKeys)(y+1,j,{teamID:e,organizationID:p["Organization ID"]?.trim()||void 0,selectedKeyAlias:p["Key Alias"]?.trim()||void 0,userID:p["User ID"]?.trim()||void 0,sortBy:_||void 0,sortOrder:f||void 0,expand:"user"}),k=(0,I.useMemo)(()=>{let e=v?.keys||[],t=r?.organization_id;return t?e.map(e=>({...e,organization_id:(e.organization_id??e.org_id)||t})):e},[v?.keys,r?.organization_id]),T=v?.total_pages??0,[M,z]=(0,I.useState)({}),P=(0,I.useMemo)(()=>({team_id:e,team_alias:l||e,models:[],max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,organization_id:r?.organization_id||"",created_at:"",keys:[],members_with_roles:[],spend:0}),[e,l,r]),F=(0,ek.useQuery)({queryKey:["teamFilterOptions",e,i],queryFn:async()=>(0,eT.fetchTeamFilterOptions)(i,e),enabled:!!i&&!!e,staleTime:3e4}).data||{keyAliases:[],organizationIds:[],userIds:[]},O=(0,I.useCallback)(()=>{N?.()},[N]);(0,I.useEffect)(()=>(window.addEventListener("storage",O),()=>window.removeEventListener("storage",O)),[O]);let D=(0,I.useCallback)((e,t=!1)=>{b(t=>({...t,"Organization ID":e["Organization ID"]??t["Organization ID"],"Key Alias":e["Key Alias"]??t["Key Alias"],"User ID":e["User ID"]??t["User ID"],"Sort By":e["Sort By"]??t["Sort By"]??"created_at","Sort Order":e["Sort Order"]??t["Sort Order"]??"desc"})),t||h(e=>({...e,pageIndex:0}))},[]),L=(0,I.useCallback)(()=>{b({"Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"}),h(e=>({...e,pageIndex:0}))},[]),B=(0,I.useMemo)(()=>[{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>{let{organizationIds:t}=F;if(!t.length)return[];let a=e.toLowerCase();return(a?t.filter(e=>e.toLowerCase().includes(a)):t).map(e=>({label:e,value:e}))}},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>{let{keyAliases:t}=F,a=e.toLowerCase();return(a?t.filter(e=>e.toLowerCase().includes(a)):t).map(e=>({label:e,value:e}))}},{name:"User ID",label:"User ID",isSearchable:!0,searchFn:async e=>{let{userIds:t}=F,a=e.toLowerCase();return(a?t.filter(e=>e.id.toLowerCase().includes(a)||e.email.toLowerCase().includes(a)):t).map(e=>({label:e.email?`${e.id} (${e.email})`:e.id,value:e.id}))}}],[F]),R=(0,I.useMemo)(()=>[{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let a=e.getValue(),l=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:a,children:(0,t.jsx)(ej.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:l,overflow:"hidden"},onClick:()=>o(e.row.original),children:a??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let a=e.getValue(),l=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:a,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:l,overflow:"hidden"},children:a??"-"})})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"organization_id",accessorKey:"organization_id",header:"Organization ID",size:140,enableSorting:!1,cell:e=>e.getValue()?e.renderValue():"-"},{id:"user_email",accessorKey:"user",header:"User Email",size:160,enableSorting:!1,cell:e=>{let a=e.getValue(),l=a?.user_email,r=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:l??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:70,enableSorting:!1,cell:e=>{let a=e.getValue(),l="default_user_id"===a?"Default Proxy Admin":a,r=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:l??"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:70,enableSorting:!1,cell:e=>{let a=e.getValue(),l="default_user_id"===a?"Default Proxy Admin":a,r=e.cell.column.getSize();return(0,t.jsx)(S.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:l??"-"})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(ew.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(m.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let a=e.getValue();if(!a)return"Unknown";let l=new Date(a);return(0,t.jsx)(S.Tooltip,{title:l.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:l.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,s.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,s.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let a=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(a)?(0,t.jsx)("div",{className:"flex flex-col",children:0===a.length?(0,t.jsx)(g.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(x.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[a.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(ev.Icon,{icon:M[e.row.id]?ep.ChevronDownIcon:ex.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>z(t=>({...t,[e.row.id]:!t[e.row.id]}))})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[a.slice(0,3).map((e,a)=>"all-proxy-models"===e?(0,t.jsx)(g.Badge,{size:"xs",color:"red",children:(0,t.jsx)(x.Text,{children:"All Proxy Models"})},a):(0,t.jsx)(g.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(x.Text,{children:e.length>30?`${(0,A.getModelDisplayName)(e).slice(0,30)}...`:(0,A.getModelDisplayName)(e)})},a)),a.length>3&&!M[e.row.id]&&(0,t.jsx)(g.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(x.Text,{children:["+",a.length-3," ",a.length-3==1?"more model":"more models"]})}),M[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.slice(3).map((e,a)=>"all-proxy-models"===e?(0,t.jsx)(g.Badge,{size:"xs",color:"red",children:(0,t.jsx)(x.Text,{children:"All Proxy Models"})},a+3):(0,t.jsx)(g.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(x.Text,{children:e.length>30?`${(0,A.getModelDisplayName)(e).slice(0,30)}...`:(0,A.getModelDisplayName)(e)})},a+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==a.tpm_limit?a.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==a.rpm_limit?a.rpm_limit:"Unlimited"]})]})}}],[M]),E=(0,I.useCallback)(e=>{let t="function"==typeof e?e(d):e;if(c(t),t?.length>0){let e=t[0];D({"Sort By":e.id,"Sort Order":e.desc?"desc":"asc"},!0)}},[d,D]),U=(0,ef.useReactTable)({data:k,columns:R,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:u},onSortingChange:E,onPaginationChange:h,getCoreRowModel:(0,ey.getCoreRowModel)(),enableSorting:!0,manualSorting:!0,manualPagination:!0,pageCount:T});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:n?(0,t.jsx)(eN.default,{keyId:n.token,onClose:()=>o(null),keyData:n,teams:[P],onDelete:N}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)(eS.default,{options:B,onApplyFilters:D,initialValues:p,onResetFilters:L})}),(0,t.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[w||C?(0,t.jsx)(eC.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",y+1," of ",U.getPageCount()]}),w||C?(0,t.jsx)(eC.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>U.previousPage(),disabled:w||C||!U.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),w||C?(0,t.jsx)(eC.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>U.nextPage(),disabled:w||C||!U.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(G.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:U.getCenterTotalSize()},children:[(0,t.jsx)(J.TableHead,{children:U.getHeaderGroups().map(e=>(0,t.jsx)(X.TableRow,{children:e.headers.map(e=>(0,t.jsx)(Y.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,ef.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eb.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(ep.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(e_.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${U.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(H.TableBody,{children:w||C?(0,t.jsx)(X.TableRow,{children:(0,t.jsx)(Q.TableCell,{colSpan:R.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading keys..."})})})}):k.length>0?U.getRowModel().rows.map(e=>(0,t.jsx)(X.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(Q.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,ef.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(X.TableRow,{children:(0,t.jsx)(Q.TableCell,{colSpan:R.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({teamId:e,onClose:W,accessToken:G,is_team_admin:H,is_proxy_admin:Q,is_org_admin:J=!1,userModels:Y,editTeam:X,premiumUser:Z=!1,onUpdate:ee})=>{let[et,ed]=(0,I.useState)(null),[em,ec]=(0,I.useState)(!0),[eu,eh]=(0,I.useState)(!1),[ep]=y.Form.useForm(),[ex,eb]=(0,I.useState)(!1),[e_,ef]=(0,I.useState)(null),[ey,ej]=(0,I.useState)(!1),[ev,ew]=(0,I.useState)([]),[eC,eS]=(0,I.useState)(!1),[eN,ek]=(0,I.useState)({}),[eT,eM]=(0,I.useState)([]),[ez,eP]=(0,I.useState)([]),[eF,eO]=(0,I.useState)({}),[eA,eD]=(0,I.useState)(!1),[eL,eB]=(0,I.useState)(null),[eR,eE]=(0,I.useState)(!1),[eU,eV]=(0,I.useState)(!1),[eK,e$]=(0,I.useState)(!1),[eq,eW]=(0,I.useState)(null),{userRole:eG,userId:eH}=(0,a.default)(),{data:eQ=[]}=(0,l.useOrganizations)(),eJ=(0,I.useMemo)(()=>{let e=et?.team_info?.organization_id;if(!e||!eH)return!1;let t=eQ.find(t=>t.organization_id===e);return t?.members?.some(e=>e.user_id===eH&&"org_admin"===e.user_role)??!1},[et,eQ,eH]),eY=H||Q||J||eJ,eX=(0,I.useMemo)(()=>{let e;return e=[el,er],eY?[...e,ei,es,en]:e},[eY]),eZ=(0,I.useMemo)(()=>X&&eY?en:el,[X,eY]),e0=async()=>{try{if(ec(!0),!G)return;let t=await (0,i.teamInfoCall)(G,e);ed(t)}catch(e){E.default.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{ec(!1)}};(0,I.useEffect)(()=>{e0()},[e,G]),(0,I.useEffect)(()=>{(async()=>{if(!G||!et?.team_info?.organization_id)return eW(null);try{let e=await (0,i.organizationInfoCall)(G,et.team_info.organization_id);eW(e)}catch(e){console.error("Error fetching organization info:",e),eW(null)}})()},[G,et?.team_info?.organization_id]),(0,I.useMemo)(()=>{let e;return e=[],e=eq?eq.models.includes("all-proxy-models")?Y:eq.models.length>0?eq.models:Y:Y,(0,A.unfurlWildcardModelsInList)(e,Y)},[eq,Y]),(0,I.useEffect)(()=>{let e=async()=>{try{if(!G)return;let e=(await (0,i.getPoliciesList)(G)).policies.map(e=>e.policy_name);eP(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(!G)return;let e=(await (0,i.getGuardrailsList)(G)).guardrails.map(e=>e.guardrail_name);eM(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[G]),(0,I.useEffect)(()=>{(async()=>{if(!G||!et?.team_info?.policies||0===et.team_info.policies.length)return;eD(!0);let e={};try{await Promise.all(et.team_info.policies.map(async t=>{try{let a=await (0,i.getPolicyInfoWithGuardrails)(G,t);e[t]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${t}:`,a),e[t]=[]}})),eO(e)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eD(!1)}})()},[G,et?.team_info?.policies]);let e1=async t=>{try{if(null==G)return;let a={user_email:t.user_email,user_id:t.user_id,role:t.role};await (0,i.teamMemberAddCall)(G,e,a),E.default.success("Team member added successfully"),eh(!1),ep.resetFields();let l=await (0,i.teamInfoCall)(G,e);ed(l),ee(l)}catch(t){let e="Failed to add team member";t?.raw?.detail?.error?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),E.default.fromBackend(e),console.error("Error adding team member:",t)}},e2=async t=>{try{if(null==G)return;let a={user_email:t.user_email,user_id:t.user_id,role:t.role,max_budget_in_team:t.max_budget_in_team,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit};N.default.destroy(),await (0,i.teamMemberUpdateCall)(G,e,a),E.default.success("Team member updated successfully"),eb(!1);let l=await (0,i.teamInfoCall)(G,e);ed(l),ee(l)}catch(t){let e="Failed to update team member";t?.raw?.detail?.includes("Assigning team admins is a premium feature")?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":t?.message&&(e=t.message),eb(!1),N.default.destroy(),E.default.fromBackend(e),console.error("Error updating team member:",t)}},e4=async()=>{if(eL&&G){eV(!0);try{await (0,i.teamMemberDeleteCall)(G,e,eL),E.default.success("Team member removed successfully");let t=await (0,i.teamInfoCall)(G,e);ed(t),ee(t)}catch(e){E.default.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}finally{eV(!1),eE(!1),eB(null)}}},e5=async t=>{try{let a;if(!G)return;e$(!0);let l={};try{let{soft_budget_alerting_emails:e,...a}=t.metadata?JSON.parse(t.metadata):{};l=a}catch(e){E.default.fromBackend("Invalid JSON in metadata field");return}if("string"==typeof t.secret_manager_settings&&t.secret_manager_settings.trim().length>0)try{a=JSON.parse(t.secret_manager_settings)}catch(e){E.default.fromBackend("Invalid JSON in secret manager settings");return}let r=e=>null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&Number.isNaN(e)?null:e,s={team_id:e,team_alias:t.team_alias,models:t.models,tpm_limit:r(t.tpm_limit),rpm_limit:r(t.rpm_limit),max_budget:t.max_budget,soft_budget:r(t.soft_budget),budget_duration:t.budget_duration,metadata:{...l,...t.guardrails?.length>0?{guardrails:t.guardrails}:{},...t.logging_settings?.length>0?{logging:t.logging_settings}:{},disable_global_guardrails:t.disable_global_guardrails||!1,soft_budget_alerting_emails:"string"==typeof t.soft_budget_alerting_emails?t.soft_budget_alerting_emails.split(",").map(e=>e.trim()).filter(e=>e.length>0):t.soft_budget_alerting_emails||[],...void 0!==a?{secret_manager_settings:a}:{}},...t.policies?.length>0?{policies:t.policies}:{},...t.organization_id!==e3.organization_id?{organization_id:t.organization_id??null}:{}};s.max_budget=(0,n.mapEmptyStringToNull)(s.max_budget),s.team_member_budget_duration=t.team_member_budget_duration,void 0!==t.team_member_budget&&(s.team_member_budget=Number(t.team_member_budget)),void 0!==t.team_member_key_duration&&(s.team_member_key_duration=t.team_member_key_duration),(void 0!==t.team_member_tpm_limit||void 0!==t.team_member_rpm_limit)&&(s.team_member_tpm_limit=r(t.team_member_tpm_limit),s.team_member_rpm_limit=r(t.team_member_rpm_limit));let{servers:o,accessGroups:d}=t.mcp_servers_and_groups||{servers:[],accessGroups:[]},m=new Set(o||[]),c=Object.fromEntries(Object.entries(t.mcp_tool_permissions||{}).filter(([e])=>m.has(e)));s.object_permission={},o&&(s.object_permission.mcp_servers=o),d&&(s.object_permission.mcp_access_groups=d),c&&(s.object_permission.mcp_tool_permissions=c),delete t.mcp_servers_and_groups,delete t.mcp_tool_permissions;let{agents:u,accessGroups:g}=t.agents_and_groups||{agents:[],accessGroups:[]};u&&u.length>0&&(s.object_permission.agents=u),g&&g.length>0&&(s.object_permission.agent_access_groups=g),delete t.agents_and_groups,t.vector_stores&&t.vector_stores.length>0&&(s.object_permission.vector_stores=t.vector_stores),void 0!==t.access_group_ids&&(s.access_group_ids=t.access_group_ids),await (0,i.teamUpdateCall)(G,s),E.default.success("Team settings updated successfully"),ej(!1),e0()}catch(e){console.error("Error updating team:",e)}finally{e$(!1)}};if(em)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!et?.team_info)return(0,t.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:e3}=et,e7=async(e,t)=>{await (0,s.copyToClipboard)(e)&&(ek(e=>({...e,[t]:!0})),setTimeout(()=>{ek(e=>({...e,[t]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Button,{type:"text",icon:(0,t.jsx)(u.ArrowLeftIcon,{className:"h-4 w-4"}),onClick:W,className:"mb-4",children:"Back to Teams"}),(0,t.jsx)(_.Title,{children:e3.team_alias}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(x.Text,{className:"text-gray-500 font-mono",children:e3.team_id}),(0,t.jsx)(f.Button,{type:"text",size:"small",icon:eN["team-id"]?(0,t.jsx)(k.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>e7(e3.team_id,"team-id"),className:`left-2 z-10 transition-all duration-200 ${eN["team-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]})}),(0,t.jsx)(C.Tabs,{defaultActiveKey:eZ,className:"mb-4",items:[{key:el,label:eo[el],children:(0,t.jsxs)(p.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(x.Text,{children:"Budget Status"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Title,{children:["$",(0,s.formatNumberWithCommas)(e3.spend,4)]}),(0,t.jsxs)(x.Text,{children:["of ",null===e3.max_budget?"Unlimited":`$${(0,s.formatNumberWithCommas)(e3.max_budget,4)}`]}),e3.budget_duration&&(0,t.jsxs)(x.Text,{className:"text-gray-500",children:["Reset: ",e3.budget_duration]}),(0,t.jsx)("br",{}),e3.team_member_budget_table&&(0,t.jsxs)(x.Text,{className:"text-gray-500",children:["Team Member Budget: $",(0,s.formatNumberWithCommas)(e3.team_member_budget_table.max_budget,4)]})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(x.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(x.Text,{children:["TPM: ",e3.tpm_limit||"Unlimited"]}),(0,t.jsxs)(x.Text,{children:["RPM: ",e3.rpm_limit||"Unlimited"]}),e3.max_parallel_requests&&(0,t.jsxs)(x.Text,{children:["Max Parallel Requests: ",e3.max_parallel_requests]})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(x.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===e3.models.length||e3.models.includes("all-proxy-models")?(0,t.jsx)(g.Badge,{color:"red",children:"All proxy models"}):(0,t.jsxs)(t.Fragment,{children:[e3.models.map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",children:e},`direct-${a}`)),(e3.access_group_models||[]).map((e,a)=>(0,t.jsx)(g.Badge,{color:"green",title:"From access group",children:e},`ag-${a}`))]})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(x.Text,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(x.Text,{children:["User Keys: ",et.keys.filter(e=>e.user_id).length]}),(0,t.jsxs)(x.Text,{children:["Service Account Keys: ",et.keys.filter(e=>!e.user_id).length]}),(0,t.jsxs)(x.Text,{className:"text-gray-500",children:["Total: ",et.keys.length]})]})]}),(0,t.jsx)(U.default,{objectPermission:e3.object_permission,variant:"card",accessToken:G}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(x.Text,{className:"font-semibold text-gray-900 mb-3",children:"Guardrails"}),e3.guardrails&&e3.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e3.guardrails.map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(x.Text,{className:"text-gray-500",children:"No guardrails configured"}),e3.metadata?.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(g.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(x.Text,{className:"font-semibold text-gray-900 mb-3",children:"Policies"}),e3.policies&&e3.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:e3.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Badge,{color:"purple",children:e}),eA&&(0,t.jsx)(x.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!eA&&eF[e]&&eF[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(x.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eF[e].map((e,a)=>(0,t.jsx)(g.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(x.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(D.default,{loggingConfigs:e3.metadata?.logging||[],disabledCallbacks:[],variant:"card"})]})},{key:er,label:eo[er],children:(0,t.jsx)(eI,{teamId:e,teamAlias:e3.team_alias,organization:eq})},{key:ei,label:eo[ei],children:(0,t.jsx)(eg,{teamData:et,canEditTeam:eY,handleMemberDelete:e=>{eB(e),eE(!0)},setSelectedEditMember:ef,setIsEditMemberModalVisible:eb,setIsAddMemberModalVisible:eh})},{key:es,label:eo[es],children:(0,t.jsx)(ea,{teamId:e,accessToken:G,canEditTeam:eY})},{key:en,label:eo[en],children:(0,t.jsxs)(h.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(_.Title,{children:"Team Settings"}),eY&&!ey&&(0,t.jsx)(f.Button,{icon:(0,t.jsx)(d.EditOutlined,{className:"h-4 w-4"}),onClick:()=>ej(!0),children:"Edit Settings"})]}),ey?(0,t.jsxs)(y.Form,{form:ep,onFinish:e5,initialValues:{...e3,team_alias:e3.team_alias,models:e3.models,tpm_limit:e3.tpm_limit,rpm_limit:e3.rpm_limit,max_budget:e3.max_budget,soft_budget:e3.soft_budget,budget_duration:e3.budget_duration,team_member_tpm_limit:e3.team_member_budget_table?.tpm_limit,team_member_rpm_limit:e3.team_member_budget_table?.rpm_limit,team_member_budget:e3.team_member_budget_table?.max_budget,team_member_budget_duration:e3.team_member_budget_table?.budget_duration,guardrails:e3.metadata?.guardrails||[],policies:e3.policies||[],disable_global_guardrails:e3.metadata?.disable_global_guardrails||!1,soft_budget_alerting_emails:Array.isArray(e3.metadata?.soft_budget_alerting_emails)?e3.metadata.soft_budget_alerting_emails.join(", "):"",metadata:e3.metadata?JSON.stringify((({logging:e,secret_manager_settings:t,soft_budget_alerting_emails:a,...l})=>l)(e3.metadata),null,2):"",logging_settings:e3.metadata?.logging||[],secret_manager_settings:e3.metadata?.secret_manager_settings?JSON.stringify(e3.metadata.secret_manager_settings,null,2):"",organization_id:e3.organization_id,vector_stores:e3.object_permission?.vector_stores||[],mcp_servers:e3.object_permission?.mcp_servers||[],mcp_access_groups:e3.object_permission?.mcp_access_groups||[],mcp_servers_and_groups:{servers:e3.object_permission?.mcp_servers||[],accessGroups:e3.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e3.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e3.object_permission?.agents||[],accessGroups:e3.object_permission?.agent_access_groups||[]},access_group_ids:e3.access_group_ids||[]},layout:"vertical",children:[(0,t.jsx)(y.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,t.jsx)(j.Input,{type:""})}),(0,t.jsx)(y.Form.Item,{label:"Models",name:"models",rules:[{required:!0,message:"Please select at least one model"}],children:(0,t.jsx)(R.ModelSelect,{value:ep.getFieldValue("models")||[],onChange:e=>ep.setFieldValue("models",e),teamID:e,organizationID:et?.team_info?.organization_id||void 0,options:{includeSpecialOptions:!0,includeUserModels:!et?.team_info?.organization_id,showAllProxyModelsOverride:(0,o.isProxyAdminRole)(eG)&&!et?.team_info?.organization_id},context:"team",dataTestId:"models-select"})}),(0,t.jsx)(y.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(V.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:"Soft Budget (USD)",name:"soft_budget",children:(0,t.jsx)(V.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:"Soft Budget Alerting Emails",name:"soft_budget_alerting_emails",tooltip:"Comma-separated email addresses to receive alerts when the soft budget is reached",children:(0,t.jsx)(j.Input,{placeholder:"example1@test.com, example2@test.com"})}),(0,t.jsx)(y.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",tooltip:"This is the individual budget for a user in the team.",children:(0,t.jsx)(V.default,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:"Team Member Budget Duration",name:"team_member_budget_duration",children:(0,t.jsx)(F,{onChange:e=>ep.setFieldValue("team_member_budget_duration",e),value:ep.getFieldValue("team_member_budget_duration")})}),(0,t.jsx)(y.Form.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,t.jsx)(b.TextInput,{placeholder:"e.g., 30d"})}),(0,t.jsx)(y.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"Default tokens per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,t.jsx)(V.default,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,t.jsx)(y.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"Default requests per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,t.jsx)(V.default,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})}),(0,t.jsx)(y.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(v.Select,{placeholder:"n/a",children:[(0,t.jsx)(v.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(v.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(v.Select.Option,{value:"30d",children:"monthly"})]})}),(0,t.jsx)(y.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,t.jsx)(V.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,t.jsx)(V.default,{step:1,style:{width:"100%"}})}),(0,t.jsx)(y.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(S.Tooltip,{title:"Setup your first guardrail",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,t.jsx)(v.Select,{mode:"tags",placeholder:"Select or enter guardrails",options:eT.map(e=>({value:e,label:e}))})}),(0,t.jsx)(y.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails",(0,t.jsx)(S.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,t.jsx)(w.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(y.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(S.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",help:"Select existing policies or enter new ones",children:(0,t.jsx)(v.Select,{mode:"tags",placeholder:"Select or enter policies",options:ez.map(e=>({value:e,label:e}))})}),(0,t.jsx)(y.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(S.Tooltip,{title:"Assign access groups to this team. Access groups control which models, MCP servers, and agents this team can use",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(M.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(y.Form.Item,{label:"Vector Stores",name:"vector_stores","aria-label":"Vector Stores",children:(0,t.jsx)(K.default,{onChange:e=>ep.setFieldValue("vector_stores",e),value:ep.getFieldValue("vector_stores"),accessToken:G||"",placeholder:"Select vector stores"})}),(0,t.jsx)(y.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(O.default,{onChange:e=>ep.setFieldValue("allowed_passthrough_routes",e),value:ep.getFieldValue("allowed_passthrough_routes"),accessToken:G||"",placeholder:"Select pass through routes"})}),(0,t.jsx)(y.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(L.default,{onChange:e=>ep.setFieldValue("mcp_servers_and_groups",e),value:ep.getFieldValue("mcp_servers_and_groups"),accessToken:G||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(y.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(j.Input,{type:"hidden"})}),(0,t.jsx)(y.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(B.default,{accessToken:G||"",selectedServers:ep.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:ep.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ep.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(y.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(z.default,{onChange:e=>ep.setFieldValue("agents_and_groups",e),value:ep.getFieldValue("agents_and_groups"),accessToken:G||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(y.Form.Item,{label:"Organization",name:"organization_id",children:(0,t.jsx)(v.Select,{allowClear:!0,placeholder:"Select an organization",showSearch:!0,optionFilterProp:"label",options:eQ.map(e=>({value:e.organization_id,label:e.organization_alias||e.organization_id}))})}),(0,t.jsx)(y.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)($.default,{value:ep.getFieldValue("logging_settings"),onChange:e=>ep.setFieldValue("logging_settings",e)})}),(0,t.jsx)(y.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:Z?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,t.jsx)(j.Input.TextArea,{rows:6,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!Z})}),(0,t.jsx)(y.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(j.Input.TextArea,{rows:10})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 pr-0 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(f.Button,{onClick:()=>ej(!1),disabled:eK,children:"Cancel"}),(0,t.jsx)(f.Button,{icon:(0,t.jsx)(c.SaveOutlined,{className:"h-4 w-4"}),type:"primary",htmlType:"submit",loading:eK,children:"Save Changes"})]})})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Team Name"}),(0,t.jsx)("div",{children:e3.team_alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)("div",{className:"font-mono",children:e3.team_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:new Date(e3.created_at).toLocaleString()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:e3.models.map((e,a)=>(0,t.jsx)(g.Badge,{color:"red",children:e},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)("div",{children:["TPM: ",e3.tpm_limit||"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",e3.rpm_limit||"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Team Budget"}),(0,t.jsxs)("div",{children:["Max Budget:"," ",null!==e3.max_budget?`$${(0,s.formatNumberWithCommas)(e3.max_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Soft Budget:"," ",null!==e3.soft_budget&&void 0!==e3.soft_budget?`$${(0,s.formatNumberWithCommas)(e3.soft_budget,4)}`:"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Reset: ",e3.budget_duration||"Never"]}),e3.metadata?.soft_budget_alerting_emails&&Array.isArray(e3.metadata.soft_budget_alerting_emails)&&e3.metadata.soft_budget_alerting_emails.length>0&&(0,t.jsxs)("div",{children:["Soft Budget Alerting Emails: ",e3.metadata.soft_budget_alerting_emails.join(", ")]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(x.Text,{className:"font-medium",children:["Team Member Settings"," ",(0,t.jsx)(S.Tooltip,{title:"These are limits on individual team members",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),(0,t.jsxs)("div",{children:["Max Budget: ",e3.team_member_budget_table?.max_budget||"No Limit"]}),(0,t.jsxs)("div",{children:["Budget Duration: ",e3.team_member_budget_table?.budget_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["Key Duration: ",e3.metadata?.team_member_key_duration||"No Limit"]}),(0,t.jsxs)("div",{children:["TPM Limit: ",e3.team_member_budget_table?.tpm_limit||"No Limit"]}),(0,t.jsxs)("div",{children:["RPM Limit: ",e3.team_member_budget_table?.rpm_limit||"No Limit"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Organization ID"}),(0,t.jsx)("div",{children:e3.organization_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Status"}),(0,t.jsx)(g.Badge,{color:e3.blocked?"red":"green",children:e3.blocked?"Blocked":"Active"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)("div",{children:e3.metadata?.disable_global_guardrails===!0?(0,t.jsx)(g.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(g.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsx)(U.default,{objectPermission:e3.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:G}),(0,t.jsx)(D.default,{loggingConfigs:e3.metadata?.logging||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"}),e3.metadata?.secret_manager_settings&&(0,t.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,t.jsx)(x.Text,{className:"font-medium",children:"Secret Manager Settings"}),(0,t.jsx)("pre",{className:"mt-2 bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(e3.metadata.secret_manager_settings,null,2)})]})]})]})}].filter(e=>eX.includes(e.key))}),(0,t.jsx)(q.default,{visible:ex,onCancel:()=>eb(!1),onSubmit:e2,initialData:e_,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Admin",value:"admin"},{label:"User",value:"user"}],additionalFields:[{name:"max_budget_in_team",label:(0,t.jsxs)("span",{children:["Team Member Budget (USD)"," ",(0,t.jsx)(S.Tooltip,{title:"Maximum amount in USD this member can spend within this team. This is separate from any global user budget limits",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"tpm_limit",label:(0,t.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,t.jsx)(S.Tooltip,{title:"Maximum tokens per minute this member can use within this team. This is separate from any global user TPM limit",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Tokens per minute limit for this member in this team"},{name:"rpm_limit",label:(0,t.jsxs)("span",{children:["Team Member RPM Limit"," ",(0,t.jsx)(S.Tooltip,{title:"Maximum requests per minute this member can make within this team. This is separate from any global user RPM limit",children:(0,t.jsx)(m.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Requests per minute limit for this member in this team"}]}}),(0,t.jsx)(r.default,{isVisible:eu,onCancel:()=>eh(!1),onSubmit:e1,accessToken:G,teamId:e}),(0,t.jsx)(P.default,{isOpen:eR,title:"Delete Team Member",alertMessage:"Removing team members will also delete any keys created by or created for this member.",message:"Are you sure you want to remove this member from the team? This action cannot be undone.",resourceInformationTitle:"Team Member Information",resourceInformation:[{label:"User ID",value:eL?.user_id,code:!0},{label:"Email",value:eL?.user_email},{label:"Role",value:eL?.role}],onCancel:()=>{eE(!1),eB(null)},onOk:e4,confirmLoading:eU})]})}],56567)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5023bf9fd490e7e0.js b/litellm/proxy/_experimental/out/_next/static/chunks/5023bf9fd490e7e0.js new file mode 100644 index 00000000000..115b00c5a79 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/5023bf9fd490e7e0.js @@ -0,0 +1,167 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,191403,180127,516430,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(994388),l=e.i(212931),a=e.i(199133),n=e.i(764205),o=e.i(269200),i=e.i(942232),c=e.i(977572),d=e.i(427612),m=e.i(64848),p=e.i(496020),x=e.i(94629),u=e.i(360820),h=e.i(871943),g=e.i(68155),f=e.i(592968),v=e.i(166406),j=e.i(152990),b=e.i(682830),y=e.i(916925);let N=e=>{let t=new Set,s=/\{\{(\w+)\}\}/g;if(e.messages.forEach(e=>{let r;for(;null!==(r=s.exec(e.content));)t.add(r[1])}),e.developerMessage){let r;for(;null!==(r=s.exec(e.developerMessage));)t.add(r[1])}return Array.from(t)},w=e=>{let t=N(e),s=`--- +model: ${e.model} +`;return void 0!==e.config.temperature&&(s+=`temperature: ${e.config.temperature} +`),void 0!==e.config.max_tokens&&(s+=`max_tokens: ${e.config.max_tokens} +`),void 0!==e.config.top_p&&(s+=`top_p: ${e.config.top_p} +`),s+=`input: + schema: +`,t.forEach(e=>{s+=` ${e}: string +`}),s+=`output: + format: text +`,e.tools&&e.tools.length>0&&(s+=`tools: +`,e.tools.forEach(e=>{let t=JSON.parse(e.json);s+=` - ${JSON.stringify(t)} +`})),s+=`--- + +`,e.developerMessage&&""!==e.developerMessage.trim()&&(s+=`Developer: ${e.developerMessage.trim()} + +`),e.messages.forEach(e=>{let t=e.role.charAt(0).toUpperCase()+e.role.slice(1);s+=`${t}: ${e.content} + +`}),s.trim()},C=e=>{let t=Number(e);return Number.isFinite(t)?t:void 0},_=e=>{let t=e?.prompt_spec?.litellm_params?.dotprompt_content||"";if(!t)throw Error("No dotprompt_content found in API response");let s=t.split("---");if(s.length<3)throw Error("Invalid dotprompt format");let r=s[1],l=s.slice(2).join("---").trim(),a=(e=>{let t={config:{},tools:[]},s=e.split("\n");for(let e of(t.tools=(e=>{let t=[],s=!1;for(let r of e){let e=r.trim();if(!s){("tools:"===e||e.startsWith("tools:"))&&(s=!0);continue}if(r.length>0&&!/^\s/.test(r)&&"-"!==e&&!e.startsWith("-"))break;let l=e.match(/^-+\s*(.+)$/);if(!l)continue;let a=l[1].trim();if(a)try{let e=JSON.parse(a);t.push({name:e?.function?.name||"Unnamed Tool",description:e?.function?.description||"",json:JSON.stringify(e,null,2)})}catch{}}return t})(s),s)){let s=e.trim();if(!s||s.startsWith("input:")||s.startsWith("output:")||s.startsWith("schema:")||s.startsWith("format:")||s.startsWith("tools:")||s.startsWith("-"))continue;let r=s.indexOf(":");if(r<=0)continue;let l=s.substring(0,r).trim(),a=s.substring(r+1).trim();if("model"===l){t.model=a;continue}"temperature"===l&&(t.config.temperature=C(a)),"max_tokens"===l&&(t.config.max_tokens=C(a)),"top_p"===l&&(t.config.top_p=C(a))}return t})(r),n=(e=>{let t=/^(System|Developer|User|Assistant):(?:\s(.*)|\s*)$/,s=[],r="",l=null,a=[],n=()=>{if(!l)return;let e=a.join("\n").trim();"developer"===l?e&&(r=r?`${r} + +${e}`:e):e?s.push({role:l,content:e}):s.push({role:l,content:""})};for(let s of e.split("\n")){let e=s.match(t);if(e){n(),l=e[1].toLowerCase(),a=[e[2]??""];continue}l&&a.push(s)}return n(),{developerMessage:r,messages:s}})(l),o=e?.prompt_spec?.prompt_id||"Unnamed Prompt";return{name:k(o)||o,model:a.model||"gpt-4o",config:a.config,tools:a.tools,developerMessage:n.developerMessage,messages:n.messages.length>0?n.messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:e?.prompt_spec?.environment||e?.prompt_spec?.prompt_info?.environment||"development"}},k=e=>e?e.replace(/[._-]v\d+$/,""):"",T=e=>e?.prompt_id||"",S=e=>{try{let t=e.litellm_params;if(t?.dotprompt_content){let e=t.dotprompt_content.match(/model:\s*([^\n]+)/);if(e)return e[1].trim()}if(t?.prompt_data?.model)return t.prompt_data.model;if(t?.model)return t.model;return null}catch(e){return console.error("Error extracting model:",e),null}},$=({promptsList:e,isLoading:l,onPromptClick:a,onDeleteClick:N,accessToken:w,isAdmin:C})=>{let[_,k]=(0,s.useState)([{id:"created_at",desc:!0}]),[T,$]=(0,s.useState)(new Map);(0,s.useEffect)(()=>{(async()=>{if(w)try{let e=await (0,n.modelHubCall)(w);if(e?.data){let t=new Map;e.data.forEach(e=>{t.set(e.model_group,e)}),$(t)}}catch(e){console.error("Error fetching model hub data:",e)}})()},[w]);let P=e=>e?new Date(e).toLocaleString():"-",I=[{header:"Prompt ID",accessorKey:"prompt_id",cell:e=>{let s=String(e.getValue()||""),l=s.length>25?`${s.slice(0,25)}...`:s;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f.Tooltip,{title:s,children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[220px] justify-start",onClick:()=>e.getValue()&&a?.(e.getValue()),children:l})}),(0,t.jsx)(f.Tooltip,{title:"Copy prompt ID",children:(0,t.jsx)(v.CopyOutlined,{onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(s)},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Model",accessorKey:"model",cell:({row:e})=>{let s=S(e.original);if(!s)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let r=((e,t)=>{if(!e)return null;let s=t.get(e);return s&&s.providers&&s.providers.length>0?s.providers[0]:null})(s,T),{logo:l}=(0,y.getProviderLogoAndName)(r||"");return(0,t.jsx)(f.Tooltip,{title:s,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:r&&l?(0,t.jsx)("img",{src:l,alt:`${r} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,s=t.parentElement;if(s&&s.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r?.charAt(0)||"-",s.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}):(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:s})]})})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:P(s.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.updated_at,children:(0,t.jsx)("span",{className:"text-xs",children:P(s.updated_at)})})}},{header:"Environment",accessorKey:"environment",cell:({row:e})=>{let s=e.original.environment||"development";return(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${{production:"text-red-600 bg-red-50",staging:"text-yellow-600 bg-yellow-50",development:"text-green-600 bg-green-50"}[s]||"text-gray-600 bg-gray-50"}`,children:s})}},{header:"Created By",accessorKey:"created_by",cell:({row:e})=>{let s=e.original;return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:s.created_by||"-"})}},{header:"Type",accessorKey:"prompt_info.prompt_type",cell:({row:e})=>{let s=e.original;return(0,t.jsx)(f.Tooltip,{title:s.prompt_info.prompt_type,children:(0,t.jsx)("span",{className:"text-xs",children:s.prompt_info.prompt_type})})}},...C?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let s=e.original,l=s.prompt_id||"Unknown Prompt";return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(f.Tooltip,{title:"Delete prompt",children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),N?.(s.prompt_id,l)},icon:g.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],B=(0,j.useReactTable)({data:e,columns:I,state:{sorting:_},onSortingChange:k,getCoreRowModel:(0,b.getCoreRowModel)(),getSortedRowModel:(0,b.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(o.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:B.getHeaderGroups().map(e=>(0,t.jsx)(p.TableRow,{children:e.headers.map(e=>(0,t.jsx)(m.TableHeaderCell,{className:"py-1 h-8",onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(u.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(h.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(x.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(i.TableBody,{children:l?(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:I.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e.length>0?B.getRowModel().rows.map(e=>(0,t.jsx)(p.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:I.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No prompts found"})})})})})]})})})};var P=e.i(304967),I=e.i(629569),B=e.i(599724),E=e.i(350967),O=e.i(389083),A=e.i(197647),D=e.i(653824),M=e.i(881073),z=e.i(404206),R=e.i(723731),L=e.i(464571),F=e.i(530212),U=e.i(797672),V=e.i(500330),H=e.i(678784),J=e.i(118366),W=e.i(727749),K=e.i(653496),q=e.i(245094),G=e.i(650056),X=e.i(219470);let Y=({promptId:e,model:n,promptVariables:o={},accessToken:i,version:c="1",proxySettings:d})=>{let[m,p]=(0,s.useState)(!1),[x,u]=(0,s.useState)("curl"),[h,g]=(0,s.useState)("basic"),[f,v]=(0,s.useState)(""),j=window.location.origin,b=d?.LITELLM_UI_API_DOC_BASE_URL;b&&b.trim()?j=b:d?.PROXY_BASE_URL&&(j=d.PROXY_BASE_URL);let y=i||"sk-1234";return s.default.useEffect(()=>{m&&v((()=>{let t=Object.keys(o).length>0;if("curl"===x)if("basic"===h)return`curl -X POST '${j}/chat/completions' \\ + -H 'Content-Type: application/json' \\ + -H 'Authorization: Bearer ${y}' \\ + -d '{ + "model": "${n}", + "prompt_id": "${e}"${t?`, + "prompt_variables": ${JSON.stringify(o,null,6).replace(/\n/g,"\n ")}`:""} + }' | jq`;else if("messages"===h)return`curl -X POST '${j}/chat/completions' \\ + -H 'Content-Type: application/json' \\ + -H 'Authorization: Bearer ${y}' \\ + -d '{ + "model": "${n}", + "prompt_id": "${e}"${t?`, + "prompt_variables": ${JSON.stringify(o,null,6).replace(/\n/g,"\n ")}`:""}, + "messages": [ + { + "role": "user", + "content": "hi" + } + ] + }' | jq`;else return`curl -X POST '${j}/chat/completions' \\ + -H 'Content-Type: application/json' \\ + -H 'Authorization: Bearer ${y}' \\ + -d '{ + "model": "${n}", + "prompt_id": "${e}", + "prompt_version": ${c}, + "messages": [ + { + "role": "user", + "content": "Who are u" + } + ] + }' | jq`;if("python"===x){let s=`import openai + +client = openai.OpenAI( + api_key="${y}", + base_url="${j}" +) +`;return"basic"===h?`${s} +response = client.chat.completions.create( + model="${n}", + extra_body={ + "prompt_id": "${e}"${t?`, + "prompt_variables": ${JSON.stringify(o,null,8).replace(/\n/g,"\n ")}`:""} + } +) + +print(response)`:"messages"===h?`${s} +response = client.chat.completions.create( + model="${n}", + messages=[ + {"role": "user", "content": "hi"} + ], + extra_body={ + "prompt_id": "${e}"${t?`, + "prompt_variables": ${JSON.stringify(o,null,8).replace(/\n/g,"\n ")}`:""} + } +) + +print(response)`:`${s} +response = client.chat.completions.create( + model="${n}", + messages=[ + {"role": "user", "content": "Who are u"} + ], + extra_body={ + "prompt_id": "${e}", + "prompt_version": ${c} + } +) + +print(response)`}{let s=`import OpenAI from 'openai'; + +const client = new OpenAI({ + apiKey: "${y}", + baseURL: "${j}" +}); +`;return"basic"===h?`${s} +async function main() { + const response = await client.chat.completions.create({ + model: "${n}", + ${t?`prompt_id: "${e}", + prompt_variables: ${JSON.stringify(o,null,8).replace(/\n/g,"\n ")}`:`prompt_id: "${e}"`} + }); + + console.log(response); +} + +main();`:"messages"===h?`${s} +async function main() { + const response = await client.chat.completions.create({ + model: "${n}", + messages: [ + { role: "user", content: "hi" } + ], + ${t?`prompt_id: "${e}", + prompt_variables: ${JSON.stringify(o,null,8).replace(/\n/g,"\n ")}`:`prompt_id: "${e}"`} + }); + + console.log(response); +} + +main();`:`${s} +async function main() { + const response = await client.chat.completions.create({ + model: "${n}", + messages: [ + { role: "user", content: "Who are u" } + ], + prompt_id: "${e}", + prompt_version: ${c} + }); + + console.log(response); +} + +main();`}})())},[m,x,h,e,n,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"secondary",icon:q.CodeOutlined,onClick:()=>{p(!0)},children:"Get Code"}),(0,t.jsxs)(l.Modal,{title:"Generated Code",open:m,onCancel:()=>{p(!1)},footer:null,width:800,children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B.Text,{className:"font-medium block mb-1 text-gray-700",children:"Language"}),(0,t.jsx)(a.Select,{value:x,onChange:e=>u(e),style:{width:180},options:[{value:"curl",label:"cURL"},{value:"python",label:"Python (OpenAI SDK)"},{value:"javascript",label:"JavaScript (OpenAI SDK)"}]})]}),(0,t.jsx)(L.Button,{onClick:()=>{navigator.clipboard.writeText(f),W.default.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,t.jsx)(K.Tabs,{activeKey:h,onChange:g,items:[{label:"Basic",key:"basic"},{label:"With Messages",key:"messages"},{label:"With Version",key:"version"}]}),(0,t.jsx)(G.Prism,{language:"curl"===x?"bash":"python"===x?"python":"javascript",style:X.coy,wrapLines:!0,wrapLongLines:!0,className:"rounded-md mt-0",customStyle:{maxHeight:"60vh",overflowY:"auto",marginTop:0,borderTopLeftRadius:0,borderTopRightRadius:0},children:f})]})]})},Z=({promptId:e,onClose:a,accessToken:x,isAdmin:u,onDelete:h,onEdit:f})=>{let[v,j]=(0,s.useState)(null),[b,y]=(0,s.useState)(null),[N,w]=(0,s.useState)(null),[C,_]=(0,s.useState)(!0),[k,$]=(0,s.useState)({}),[K,q]=(0,s.useState)(!1),[G,X]=(0,s.useState)(!1),[Z,Q]=(0,s.useState)([]),[ee,et]=(0,s.useState)(null),[es,er]=(0,s.useState)([]),[el,ea]=(0,s.useState)(null),[en,eo]=(0,s.useState)(!1),ei=async t=>{try{if(_(!0),!x)return;let s=await (0,n.getPromptInfo)(x,e,t);j(s.prompt_spec),y(s.raw_prompt_template),w(s),s.environments&&s.environments.length>0&&(Q(s.environments),ee||et(s.prompt_spec.environment||s.environments[0])),ea(s.prompt_spec.version||null)}catch(e){W.default.fromBackend("Failed to load prompt information"),console.error("Error fetching prompt info:",e)}finally{_(!1)}},ec=async t=>{if(x){eo(!0);try{let s=await (0,n.getPromptVersions)(x,e,t);er(s.prompts||[])}catch{er([])}finally{eo(!1)}}},ed=(0,s.useRef)(!0);if((0,s.useEffect)(()=>{et(null),Q([]),er([]),ei()},[e,x]),(0,s.useEffect)(()=>{if(ed.current){ed.current=!1,ee&&x&&ec(ee);return}ee&&x&&(ei(ee),ec(ee))},[ee]),C&&!v)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!v)return(0,t.jsx)("div",{className:"p-4",children:"Prompt not found"});let em=e=>e?new Date(e).toLocaleString():"-",ep=async(e,t)=>{await (0,V.copyToClipboard)(e)&&($(e=>({...e,[t]:!0})),setTimeout(()=>{$(e=>({...e,[t]:!1}))},2e3))},ex=async()=>{if(x&&v){X(!0);try{await (0,n.deletePromptCall)(x,eg),W.default.success(`Prompt "${eg}" deleted successfully`),h?.(),a()}catch(e){console.error("Error deleting prompt:",e),W.default.fromBackend("Failed to delete prompt")}finally{X(!1),q(!1)}}},eu=async t=>{if(!x||!ee)return;let s=t.version||1;ea(s);try{let t=`${e}.v${s}`,r=await (0,n.getPromptInfo)(x,t,ee);j(r.prompt_spec),y(r.raw_prompt_template),w(r)}catch{W.default.fromBackend(`Failed to load version v${s}`)}},eh=v&&S(v)||"gpt-4o",eg=T(v),ef=(e=>{let t;if(e?.version)return String(e.version);var s=(t=T(e),e?.litellm_params?.prompt_id||t);if(!s)return"1";let r=s.match(/[._-]v(\d+)$/);return r?r[1]:"1"})(v),ev=es.length>0?Math.max(...es.map(e=>e.version||1)):null,ej=null!==ev&&null!==el&&elep(eg,"prompt-id"),className:`left-2 z-10 transition-all duration-200 ${k["prompt-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Y,{promptId:eg,model:eh,promptVariables:(e=>{let t;if(!e)return{};let s={},r=/\{\{(\w+)\}\}/g;for(;null!==(t=r.exec(e));){let e=t[1];s[e]||(s[e]=`example_${e}`)}return s})(b?.content),accessToken:x,version:ef}),(0,t.jsx)(r.Button,{icon:U.PencilIcon,variant:"primary",onClick:()=>f?.(N),className:"flex items-center",children:"Prompt Studio"}),u&&(0,t.jsx)(r.Button,{icon:g.TrashIcon,variant:"secondary",onClick:()=>{q(!0)},className:"flex items-center",children:"Delete Prompt"})]})]})]}),Z.length>0&&(0,t.jsx)("div",{className:"flex gap-2 mb-4",children:[...Z].sort((e,t)=>{let s={development:0,staging:1,production:2};return(s[e]??99)-(s[t]??99)}).map(e=>(0,t.jsxs)("button",{onClick:()=>{et(e),ea(null)},className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${ee===e?"production"===e?"bg-red-100 text-red-800 border-2 border-red-300":"staging"===e?"bg-yellow-100 text-yellow-800 border-2 border-yellow-300":"bg-green-100 text-green-800 border-2 border-green-300":"bg-gray-100 text-gray-600 border-2 border-transparent hover:bg-gray-200"}`,children:[e,es.length>0&&ee===e&&(0,t.jsxs)("span",{className:"ml-1 text-xs opacity-75",children:["(v",ev,")"]})]},e))}),ej&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-amber-50 border border-amber-200 rounded-lg flex items-center justify-between",children:[(0,t.jsxs)(B.Text,{className:"text-amber-800",children:["Viewing v",el," — not the latest version (v",ev,")"]}),(0,t.jsx)(r.Button,{variant:"light",size:"xs",onClick:()=>{let e=es.find(e=>e.version===ev);e&&eu(e)},children:"Go to latest"})]}),(0,t.jsxs)(D.TabGroup,{children:[(0,t.jsxs)(M.TabList,{className:"mb-4",children:[(0,t.jsx)(A.Tab,{children:"Overview"},"overview"),b?(0,t.jsx)(A.Tab,{children:"Prompt Template"},"prompt-template"):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(A.Tab,{children:"Raw JSON"},"raw-json")]}),(0,t.jsxs)(R.TabPanels,{children:[(0,t.jsxs)(z.TabPanel,{children:[(0,t.jsxs)(E.Grid,{numItems:1,numItemsSm:2,numItemsLg:4,className:"gap-4",children:[(0,t.jsxs)(P.Card,{children:[(0,t.jsx)(B.Text,{children:"Version"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(I.Title,{children:ef}),(0,t.jsxs)(O.Badge,{color:"blue",className:"mt-1",children:["v",ef]})]})]}),(0,t.jsxs)(P.Card,{children:[(0,t.jsx)(B.Text,{children:"Prompt Type"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(I.Title,{children:v.prompt_info?.prompt_type||"-"})})]}),(0,t.jsxs)(P.Card,{children:[(0,t.jsx)(B.Text,{children:"Created By"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(I.Title,{className:"text-sm",children:v.created_by||"-"})})]}),(0,t.jsxs)(P.Card,{children:[(0,t.jsx)(B.Text,{children:"Created At"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(I.Title,{className:"text-sm",children:em(v.created_at)}),(0,t.jsxs)(B.Text,{className:"text-xs",children:["Updated: ",em(v.updated_at)]})]})]})]}),(0,t.jsxs)(P.Card,{className:"mt-6",children:[(0,t.jsxs)(I.Title,{className:"mb-3",children:["Version History — ",ee]}),en?(0,t.jsx)(B.Text,{children:"Loading versions..."}):es.length>0?(0,t.jsxs)(o.Table,{children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(m.TableHeaderCell,{children:"Version"}),(0,t.jsx)(m.TableHeaderCell,{children:"Created By"}),(0,t.jsx)(m.TableHeaderCell,{children:"Date"}),(0,t.jsx)(m.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(i.TableBody,{children:es.map(e=>{let s=e.version||1,l=s===el,a=s===ev;return(0,t.jsxs)(p.TableRow,{className:`cursor-pointer hover:bg-blue-50 transition-colors ${l?"bg-blue-50":""}`,onClick:()=>eu(e),children:[(0,t.jsxs)(c.TableCell,{children:[(0,t.jsxs)("span",{className:l?"font-bold":"",children:["v",s]}),a&&(0,t.jsx)(O.Badge,{color:"blue",className:"ml-2",size:"xs",children:"latest"})]}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)("span",{className:"text-sm",children:e.created_by||"-"})}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)("span",{className:"text-sm",children:em(e.created_at)})}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)(r.Button,{icon:U.PencilIcon,variant:"light",size:"xs",onClick:t=>{t.stopPropagation();let s={prompt_spec:{...e,prompt_id:eg,environment:ee},raw_prompt_template:l?b:null};f?.(s)},children:"Edit"})})]},s)})})]}):(0,t.jsxs)(B.Text,{className:"text-gray-400",children:["No versions found in ",ee]})]})]}),b&&(0,t.jsx)(z.TabPanel,{children:(0,t.jsxs)(P.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(I.Title,{children:"Prompt Template"}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:k["prompt-content"]?(0,t.jsx)(H.CheckIcon,{size:16}):(0,t.jsx)(J.CopyIcon,{size:16}),onClick:()=>ep(b.content,"prompt-content"),className:`transition-all duration-200 ${k["prompt-content"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:k["prompt-content"]?"Copied!":"Copy Content"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(B.Text,{className:"font-medium",children:"Template ID"}),(0,t.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:b.litellm_prompt_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(B.Text,{className:"font-medium",children:"Content"}),(0,t.jsx)("div",{className:"mt-2 p-4 bg-gray-50 rounded-md border overflow-auto max-h-96",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:b.content})})]}),b.metadata&&Object.keys(b.metadata).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(B.Text,{className:"font-medium",children:"Template Metadata"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-64",children:JSON.stringify(b.metadata,null,2)})})]})]})]})}),(0,t.jsx)(z.TabPanel,{children:(0,t.jsxs)(P.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(I.Title,{children:"Raw API Response"}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:k["raw-json"]?(0,t.jsx)(H.CheckIcon,{size:16}):(0,t.jsx)(J.CopyIcon,{size:16}),onClick:()=>ep(JSON.stringify(N,null,2),"raw-json"),className:`transition-all duration-200 ${k["raw-json"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:k["raw-json"]?"Copied!":"Copy JSON"})]}),(0,t.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(N,null,2)})})]})})]})]}),(0,t.jsxs)(l.Modal,{title:"Delete Prompt",open:K,onOk:ex,onCancel:()=>{q(!1)},confirmLoading:G,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",(0,t.jsx)("strong",{children:eg}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var Q=e.i(808613),ee=e.i(515831),et=e.i(312361),es=e.i(779241),er=e.i(519756);let{Option:el}=a.Select,ea=({visible:e,onClose:r,accessToken:o,onSuccess:i})=>{let[c]=Q.Form.useForm(),[d,m]=(0,s.useState)(!1),[p,x]=(0,s.useState)([]),[u,h]=(0,s.useState)("dotprompt"),g=()=>{c.resetFields(),x([]),h("dotprompt"),r()},f=async()=>{try{let e=await c.validateFields();if(console.log("values: ",e),!o)return void W.default.fromBackend("Access token is required");if("dotprompt"===u&&0===p.length)return void W.default.fromBackend("Please upload a .prompt file");m(!0);let t={};if("dotprompt"===u&&p.length>0){let s=p[0].originFileObj;try{let r=await (0,n.convertPromptFileToJson)(o,s);console.log("Conversion result:",r),t={prompt_id:e.prompt_id,litellm_params:{prompt_integration:"dotprompt",prompt_id:r.prompt_id,prompt_data:r.json_data},prompt_info:{prompt_type:"db"}}}catch(e){console.error("Error converting prompt file:",e),W.default.fromBackend("Failed to convert prompt file to JSON"),m(!1);return}}try{await (0,n.createPromptCall)(o,t),W.default.success("Prompt created successfully!"),g(),i()}catch(e){console.error("Error creating prompt:",e),W.default.fromBackend("Failed to create prompt")}}catch(e){console.error("Form validation error:",e)}finally{m(!1)}};return(0,t.jsx)(l.Modal,{title:"Add New Prompt",open:e,onCancel:g,footer:[(0,t.jsx)(L.Button,{onClick:g,children:"Cancel"},"cancel"),(0,t.jsx)(L.Button,{loading:d,onClick:f,children:"Create Prompt"},"submit")],width:600,children:(0,t.jsxs)(Q.Form,{form:c,layout:"vertical",requiredMark:!1,children:[(0,t.jsx)(Q.Form.Item,{label:"Prompt ID",name:"prompt_id",rules:[{required:!0,message:"Please enter a prompt ID"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Prompt ID can only contain letters, numbers, underscores, and hyphens"}],children:(0,t.jsx)(es.TextInput,{placeholder:"Enter unique prompt ID (e.g., my_prompt_id)"})}),(0,t.jsx)(Q.Form.Item,{label:"Prompt Integration",name:"prompt_integration",initialValue:"dotprompt",children:(0,t.jsx)(a.Select,{value:u,onChange:h,children:(0,t.jsx)(el,{value:"dotprompt",children:"dotprompt"})})}),"dotprompt"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Divider,{}),(0,t.jsxs)(Q.Form.Item,{label:"Prompt File",extra:"Upload a .prompt file that follows the Dotprompt specification",children:[(0,t.jsx)(ee.Upload,{...{beforeUpload:e=>(e.name.endsWith(".prompt")||W.default.fromBackend("Please upload a .prompt file"),!1),fileList:p,onChange:({fileList:e})=>{x(e.slice(-1))},onRemove:()=>{x([])}},children:(0,t.jsx)(L.Button,{icon:(0,t.jsx)(er.UploadOutlined,{}),children:"Select .prompt File"})}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",p[0].name]})]})]})]})})},en=`{ + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA" + }, + "unit": { + "type": "string", + "enum": ["celsius", "fahrenheit"] + } + }, + "required": ["location"] + } + } +}`,eo=({visible:e,initialJson:r,onSave:a,onClose:n})=>{let[o,i]=(0,s.useState)(r||en),[c,d]=(0,s.useState)(null),m=()=>{d(null),n()};return(0,t.jsx)(l.Modal,{title:(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsx)("span",{className:"text-lg font-medium",children:"Add Tool"})}),open:e,onCancel:m,width:800,footer:[(0,t.jsx)(L.Button,{onClick:m,children:"Cancel"},"cancel"),(0,t.jsx)(L.Button,{type:"primary",onClick:()=>{try{JSON.parse(o),d(null),a(o)}catch(e){d("Invalid JSON format. Please check your syntax.")}},children:"Add"},"save")],children:(0,t.jsxs)("div",{className:"space-y-3",children:[c&&(0,t.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-red-600 text-sm",children:c}),(0,t.jsx)("textarea",{value:o,onChange:e=>i(e.target.value),className:"w-full min-h-[400px] px-4 py-3 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",placeholder:"Paste your tool JSON here..."})]})})};var ei=e.i(311451),ec=e.i(475254);let ed=(0,ec.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",()=>ed],180127),e.s(["ArrowLeftIcon",()=>ed],516430);let em=(0,ec.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),ep=(0,ec.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),ex=({promptName:e,onNameChange:s,onBack:l,onSave:n,isSaving:o,editMode:i=!1,onShowHistory:c,version:d,promptModel:m="gpt-4o",promptVariables:p={},accessToken:x,proxySettings:u,environment:h,onEnvironmentChange:g})=>(0,t.jsxs)("div",{className:"bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(r.Button,{icon:ed,variant:"light",onClick:l,size:"xs",children:"Back"}),(0,t.jsx)(ei.Input,{value:e,onChange:e=>s(e.target.value),className:"text-base font-medium border-none shadow-none",style:{width:"200px"}}),d&&(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium",children:d}),(0,t.jsx)(a.Select,{value:h,onChange:g,style:{width:140},size:"small",options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]}),(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Draft"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Unsaved changes"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(Y,{promptId:e,model:m,promptVariables:p,accessToken:x,version:d?.replace("v","")||"1",proxySettings:u}),i&&c&&(0,t.jsx)(r.Button,{icon:ep,variant:"secondary",onClick:c,children:"History"}),(0,t.jsx)(r.Button,{icon:em,onClick:n,loading:o,disabled:o,children:i?"Update":"Save"})]})]});var eu=e.i(440987),eh=e.i(992619);let eg=({model:e,temperature:r=1,maxTokens:l=1e3,accessToken:a,onModelChange:n,onTemperatureChange:o,onMaxTokensChange:i})=>{let[c,d]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-[300px]",children:(0,t.jsx)(eh.default,{accessToken:a||"",value:e,onChange:n,showLabel:!1})}),(0,t.jsxs)("button",{onClick:()=>d(!c),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(eu.SettingsIcon,{size:16}),(0,t.jsx)("span",{children:"Parameters"})]}),c&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-96",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:"Model Parameters"}),(0,t.jsx)("button",{onClick:()=>d(!1),className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(B.Text,{className:"text-sm text-gray-700",children:"Temperature"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:0,max:2,step:.1,value:r,onChange:e=>o(parseFloat(e.target.value)||0),className:"w-20"})]})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(B.Text,{className:"text-sm text-gray-700",children:"Max Tokens"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:1,max:32768,value:l,onChange:e=>i(parseInt(e.target.value)||1e3),className:"w-24"})]})})]})]})})]})};var ef=e.i(837007);let ev=(0,ec.default)("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),ej=({tools:e,onAddTool:s,onEditTool:r,onRemoveTool:l})=>(0,t.jsxs)(P.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(B.Text,{className:"text-sm font-medium",children:"Tools"}),(0,t.jsxs)("button",{onClick:s,className:"text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add"]})]}),0===e.length?(0,t.jsx)(B.Text,{className:"text-gray-500 text-xs",children:"No tools added"}):(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 border border-gray-200 rounded",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"font-medium text-xs truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1 ml-2",children:[(0,t.jsx)("button",{onClick:()=>r(s),className:"text-xs text-blue-600 hover:text-blue-700",children:"Edit"}),(0,t.jsx)("button",{onClick:()=>l(s),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})})]})]},s))})]});var eb=e.i(282786),ey=e.i(262218),eN=e.i(751904);let{TextArea:ew}=ei.Input,eC=({value:e,onChange:r,placeholder:l,rows:a=4,className:n})=>{let[o,i]=(0,s.useState)(null),[c,d]=(0,s.useState)(""),m=()=>{c.trim()&&o&&(r(e.substring(0,o.start)+`{{${c}}}`+e.substring(o.end)),i(null),d(""))},p=(()=>{let t,s=/\{\{(\w+)\}\}/g,r=[];for(;null!==(t=s.exec(e));)r.push({name:t[1],start:t.index,end:t.index+t[0].length});return r})();return(0,t.jsxs)("div",{className:`variable-textarea-container ${n}`,children:[(0,t.jsx)("style",{children:` + .variable-highlight-text { + color: #f97316; + background-color: #fff7ed; + border-radius: 4px; + padding: 0 2px; + border: 1px solid #fed7aa; + font-family: monospace; + } + `}),(0,t.jsx)(ew,{value:e,onChange:e=>r(e.target.value),placeholder:l,rows:a,className:"font-sans"}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),p.map((e,s)=>(0,t.jsx)(eb.Popover,{content:(0,t.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,t.jsx)(ei.Input,{size:"small",value:c,onChange:e=>d(e.target.value),onPressEnter:m,placeholder:"Variable name",autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,t.jsx)("button",{onClick:()=>{i(null),d("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:o?.start===e.start,onOpenChange:e=>{e||(i(null),d(""))},trigger:"click",children:(0,t.jsx)(ey.Tag,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,t.jsx)(eN.EditOutlined,{}),onClick:()=>{i({oldName:e.name,start:e.start,end:e.end}),d(e.name)},children:e.name})},`${e.start}-${s}`))]})]})},e_=({value:e,onChange:s})=>(0,t.jsxs)(P.Card,{className:"p-3",children:[(0,t.jsx)(B.Text,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,t.jsx)(B.Text,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,t.jsx)(eC,{value:e,onChange:s,rows:3,placeholder:"e.g., You are a helpful assistant..."})]}),ek=(0,ec.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),{Option:eT}=a.Select,eS=({messages:e,onAddMessage:r,onUpdateMessage:l,onRemoveMessage:n,onMoveMessage:o})=>{let[i,c]=(0,s.useState)(null),[d,m]=(0,s.useState)(null),p=()=>{c(null),m(null)};return(0,t.jsxs)(P.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)(B.Text,{className:"text-sm font-medium",children:"Prompt messages"}),(0,t.jsxs)(B.Text,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.map((s,r)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{c(r)},onDragOver:e=>{e.preventDefault(),m(r)},onDrop:e=>{e.preventDefault(),null!==i&&i!==r&&o(i,r),c(null),m(null)},onDragEnd:p,className:`border border-gray-300 rounded overflow-hidden bg-white transition-all ${i===r?"opacity-50":""} ${d===r&&i!==r?"border-blue-500 border-2":""}`,children:[(0,t.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,t.jsxs)(a.Select,{value:s.role,onChange:e=>l(r,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,t.jsx)(eT,{value:"user",children:"User"}),(0,t.jsx)(eT,{value:"assistant",children:"Assistant"}),(0,t.jsx)(eT,{value:"system",children:"System"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[e.length>1&&(0,t.jsx)("button",{onClick:()=>n(r),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})}),(0,t.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,t.jsx)(ek,{size:16})})]})]}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(eC,{value:s.content,onChange:e=>l(r,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},r))}),(0,t.jsxs)("button",{onClick:r,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add message"]})]})};var e$=e.i(447593);let eP=({extractedVariables:e,variables:s,onVariableChange:r})=>0===e.length?null:(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,t.jsx)(ei.Input,{value:s[e]||"",onChange:t=>r(e,t.target.value),placeholder:`Enter value for ${e}`,size:"small"})]},e))})]});var eI=e.i(56456),eB=e.i(482725),eE=e.i(983561);let eO=({hasVariables:e})=>(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(eE.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)("span",{className:"text-base",children:e?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]});var eA=e.i(771674),eD=e.i(918789),eM=e.i(989022);let ez=({message:e})=>(0,t.jsx)("div",{className:`mb-4 flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,t.jsx)(eA.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(eE.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===e.role?(0,t.jsx)(eD.default,{components:{code({node:e,inline:s,className:r,children:l,...a}){let n=/language-(\w+)/.exec(r||"");return!s&&n?(0,t.jsx)(G.Prism,{style:X.coy,language:n[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...a,children:String(l).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...a,children:l})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:e.content}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.content}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&(0,t.jsx)(eM.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage})]})]})}),eR=({messages:e,isLoading:s,hasVariables:r,messagesEndRef:l})=>{let a=(0,t.jsx)(eI.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===e.length&&(0,t.jsx)(eO,{hasVariables:r}),e.map((e,s)=>(0,t.jsx)(ez,{message:e},s)),s&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(eB.Spin,{indicator:a})}),(0,t.jsx)("div",{ref:l,style:{height:"1px"}})]})},eL=({extractedVariables:e,variables:s})=>{let r=e.filter(e=>!s[e]||""===s[e].trim());return 0===r.length?null:(0,t.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,t.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",r.map(e=>`{{${e}}}`).join(", ")]})]})]})})};var eF=e.i(132104);let{TextArea:eU}=ei.Input,eV=({inputMessage:e,isLoading:s,isDisabled:l,onInputChange:a,onSend:n,onKeyDown:o,onCancel:i})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,t.jsx)(eU,{value:e,onChange:e=>a(e.target.value),onKeyDown:o,placeholder:"Type your message... (Shift+Enter for new line)",disabled:s,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,t.jsx)(r.Button,{onClick:n,disabled:l,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,t.jsx)(eF.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),s&&(0,t.jsx)(r.Button,{onClick:i,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]}),eH=({prompt:e,accessToken:l})=>{let{isLoading:a,messages:o,inputMessage:i,variables:c,variablesFilled:d,extractedVariables:m,allVariablesFilled:p,messagesEndRef:x,setInputMessage:u,handleSendMessage:h,handleCancelRequest:g,handleClearConversation:f,handleKeyDown:v,handleVariableChange:j}=((e,t)=>{let[r,l]=(0,s.useState)(!1),[a,o]=(0,s.useState)([]),[i,c]=(0,s.useState)(""),[d,m]=(0,s.useState)({}),[p,x]=(0,s.useState)(!1),[u,h]=(0,s.useState)(null),g=(0,s.useRef)(null),f=N(e),v=f.every(e=>d[e]&&""!==d[e].trim());(0,s.useEffect)(()=>{g.current&&setTimeout(()=>{g.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[a]);let j=async()=>{let s;if(!t)return void W.default.fromBackend("Access token is required");if(f.length>0&&!v)return void W.default.fromBackend("Please fill in all template variables");if(!i.trim())return;!p&&f.length>0&&x(!0);let r={role:"user",content:i};o(e=>[...e,r]),c("");let m=new AbortController;h(m),l(!0);let u=Date.now();try{let r,l,c=w(e),p=(0,n.getProxyBaseUrl)(),x={dotprompt_content:c};0===a.length?x.prompt_variables=d:x.conversation_history=[...a.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch(`${p}/prompts/test`,{method:"POST",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(x),signal:m.signal});if(!h.ok){let e=await h.text();throw Error(`HTTP error! status: ${h.status}, ${e}`)}if(!h.body)throw Error("No response body");let g=h.body.getReader(),f=new TextDecoder,v="";for(o(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await g.read();if(e)break;for(let e of f.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{let e=JSON.parse(t);!r&&e.model&&(r=e.model),e.usage&&(l=e.usage);let a=e.choices?.[0]?.delta?.content;a&&(s||(s=Date.now()-u),v+=a,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:v,model:r,timeToFirstToken:s},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let j=Date.now()-u;o(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:j,usage:l},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),o(t=>{let s=t[t.length-1];return s&&"assistant"===s.role&&""===s.content?[...t.slice(0,-1),{role:"assistant",content:`Error: ${e.message}`}]:[...t,{role:"assistant",content:`Error: ${e.message}`}]}))}finally{l(!1),h(null)}};return{isLoading:r,messages:a,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:f,allVariablesFilled:v,messagesEndRef:g,setInputMessage:c,handleSendMessage:j,handleCancelRequest:()=>{u&&(u.abort(),h(null),l(!1),W.default.info("Request cancelled"))},handleClearConversation:()=>{o([]),x(!1),W.default.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),j())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}})(e,l);return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!d&&(0,t.jsx)(eP,{extractedVariables:m,variables:c,onVariableChange:j}),o.length>0&&(0,t.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,t.jsx)(r.Button,{onClick:f,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:e$.ClearOutlined,children:"Clear Chat"})}),(0,t.jsx)(eR,{messages:o,isLoading:a,hasVariables:m.length>0,messagesEndRef:x}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,t.jsx)(eL,{extractedVariables:m,variables:c}),(0,t.jsx)(eV,{inputMessage:i,isLoading:a,isDisabled:a||!i.trim()||m.length>0&&!p,onInputChange:u,onSend:h,onKeyDown:v,onCancel:g})]})]})},eJ=({visible:e,promptName:s,isSaving:a,onNameChange:n,onPublish:o,onCancel:i})=>(0,t.jsx)(l.Modal,{title:"Publish Prompt",open:e,onCancel:i,footer:[(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:o,loading:a,children:"Publish"})]},"footer")],children:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)(B.Text,{className:"mb-2",children:"Name"}),(0,t.jsx)(ei.Input,{value:s,onChange:e=>n(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,t.jsx)(B.Text,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})}),eW=({prompt:e})=>{let s=w(e);return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,t.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:s})})]})};var eK=e.i(608856),eq=e.i(573421),eG=e.i(981339);let{Text:eX}=e.i(898586).Typography,eY=({isOpen:e,onClose:r,accessToken:l,promptId:a,activeVersionId:o,onSelectVersion:i})=>{let[c,d]=(0,s.useState)([]),[m,p]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&l&&a&&x()},[e,l,a]);let x=async()=>{p(!0);try{let e=a.includes(".v")?a.split(".v")[0]:a,t=await (0,n.getPromptVersions)(l,e);d(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{p(!1)}},u=e=>{if(e.version)return`v${e.version}`;let t=e.litellm_params?.prompt_id||e.prompt_id;return t.includes(".v")?`v${t.split(".v")[1]}`:t.includes("_v")?`v${t.split("_v")[1]}`:"v1"};return(0,t.jsx)(eK.Drawer,{title:"Version History",placement:"right",onClose:r,open:e,width:400,mask:!1,maskClosable:!1,children:m?(0,t.jsx)(eG.Skeleton,{active:!0,paragraph:{rows:4}}):0===c.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,t.jsx)(eq.List,{dataSource:c,renderItem:(e,s)=>{var r;let l=e.version||parseInt(u(e).replace("v","")),a=null;o&&(o.includes(".v")?a=parseInt(o.split(".v")[1]):o.includes("_v")&&(a=parseInt(o.split("_v")[1])));let n=a?l===a:0===s;return(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ${n?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,onClick:()=>i?.(e),children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ey.Tag,{className:"m-0",children:u(e)}),0===s&&(0,t.jsx)(ey.Tag,{color:"blue",className:"m-0",children:"Latest"})]}),n&&(0,t.jsx)(ey.Tag,{color:"green",className:"m-0",children:"Active"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eX,{className:"text-sm text-gray-600 font-medium",children:(r=e.created_at)?new Date(r).toLocaleString():"-"}),(0,t.jsx)(eX,{type:"secondary",className:"text-xs",children:e.prompt_info?.prompt_type==="db"?"Saved to Database":"Config Prompt"})]})]},`${e.prompt_id}-v${e.version||l}`)}})})},eZ=({onClose:e,onSuccess:r,accessToken:l,initialPromptData:a})=>{let[o,i]=(0,s.useState)((()=>{if(a)try{return _(a)}catch(e){console.error("Error parsing existing prompt:",e),W.default.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:"development"}})()),[c,d]=(0,s.useState)(!!a),[m,p]=(0,s.useState)(!1),[x,u]=(0,s.useState)((()=>{if(!a?.prompt_spec)return;let e=a.prompt_spec.prompt_id,t=a.prompt_spec.version||a.prompt_spec.litellm_params?.prompt_id;return"number"==typeof t?`${e}.v${t}`:"string"==typeof t&&(t.includes(".v")||t.includes("_v"))?t:e})()),[h,g]=(0,s.useState)(!1),[f,v]=(0,s.useState)(!1),[j,b]=(0,s.useState)(null),[y,N]=(0,s.useState)(!1),[C,k]=(0,s.useState)("pretty"),T=e=>{void 0!==e?b(e):b(null),g(!0)},S=async()=>{if(!l)return void W.default.fromBackend("Access token is required");if(!o.name||""===o.name.trim())return void W.default.fromBackend("Please enter a valid prompt name");N(!0);try{let t=o.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),s=w(o),i={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:s},prompt_info:{prompt_type:"db",environment:o.environment}};c&&a?.prompt_spec?.prompt_id?(await (0,n.updatePromptCall)(l,a.prompt_spec.prompt_id,i),W.default.success("Prompt updated successfully!")):(await (0,n.createPromptCall)(l,i),W.default.success("Prompt created successfully!")),r(),e()}catch(e){console.error("Error saving prompt:",e),W.default.fromBackend(c?"Failed to update prompt":"Failed to save prompt")}finally{N(!1),v(!1)}},$=x&&x.includes(".v")?`v${x.split(".v")[1]}`:null;return(0,t.jsxs)("div",{className:"flex h-full bg-white",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,t.jsx)(ex,{promptName:o.name,onNameChange:e=>i({...o,name:e}),onBack:e,onSave:()=>{o.name&&""!==o.name.trim()&&"New prompt"!==o.name?S():v(!0)},isSaving:y,editMode:c,onShowHistory:()=>p(!0),version:$,promptModel:o.model,promptVariables:(()=>{let e,t={},s=[o.developerMessage,...o.messages.map(e=>e.content)].join(" "),r=/\{\{(\w+)\}\}/g;for(;null!==(e=r.exec(s));){let s=e[1];t[s]||(t[s]=`example_${s}`)}return t})(),accessToken:l,environment:o.environment,onEnvironmentChange:async e=>{if(i({...o,environment:e}),c&&l&&a?.prompt_spec?.prompt_id)try{let t=await (0,n.getPromptInfo)(l,a.prompt_spec.prompt_id,e);if(t?.prompt_spec){let s=_(t);i({...s,environment:e});let r=t.prompt_spec.version||1;u(`${t.prompt_spec.prompt_id}.v${r}`)}}catch{}}}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,t.jsx)(eg,{model:o.model,temperature:o.config.temperature,maxTokens:o.config.max_tokens,accessToken:l,onModelChange:e=>i({...o,model:e}),onTemperatureChange:e=>i({...o,config:{...o.config,temperature:e}}),onMaxTokensChange:e=>i({...o,config:{...o.config,max_tokens:e}})}),(0,t.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"pretty"===C?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("pretty"),children:"PRETTY"}),(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"dotprompt"===C?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===C?(0,t.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,t.jsx)(ej,{tools:o.tools,onAddTool:()=>T(),onEditTool:T,onRemoveTool:e=>{i({...o,tools:o.tools.filter((t,s)=>s!==e)})}}),(0,t.jsx)(e_,{value:o.developerMessage,onChange:e=>i({...o,developerMessage:e})}),(0,t.jsx)(eS,{messages:o.messages,onAddMessage:()=>{i({...o,messages:[...o.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,s)=>{let r=[...o.messages];r[e][t]=s,i({...o,messages:r})},onRemoveMessage:e=>{o.messages.length>1&&i({...o,messages:o.messages.filter((t,s)=>s!==e)})},onMoveMessage:(e,t)=>{let s=[...o.messages],[r]=s.splice(e,1);s.splice(t,0,r),i({...o,messages:s})}})]}):(0,t.jsx)(eW,{prompt:o})]}),(0,t.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,t.jsx)(eH,{prompt:o,accessToken:l})})]})]}),(0,t.jsx)(eJ,{visible:f,promptName:o.name,isSaving:y,onNameChange:e=>i({...o,name:e}),onPublish:S,onCancel:()=>v(!1)}),h&&(0,t.jsx)(eo,{visible:h,initialJson:null!==j?o.tools[j].json:"",onSave:e=>{try{let t=JSON.parse(e),s={name:t.function?.name||"Unnamed Tool",description:t.function?.description||"",json:e};if(null!==j){let e=[...o.tools];e[j]=s,i({...o,tools:e})}else i({...o,tools:[...o.tools,s]});g(!1),b(null)}catch(e){W.default.fromBackend("Invalid JSON format")}},onClose:()=>{g(!1),b(null)}}),(0,t.jsx)(eY,{isOpen:m,onClose:()=>p(!1),accessToken:l,promptId:a?.prompt_spec?.prompt_id||o.name,activeVersionId:x,onSelectVersion:e=>{try{let t=_({prompt_spec:e});i(t);let s=e.version||1;u(`${e.prompt_id}.v${s}`)}catch(e){console.error("Error loading version:",e),W.default.fromBackend("Failed to load prompt version")}}})]})};var eQ=e.i(708347);e.s(["default",0,({accessToken:e,userRole:o})=>{let[i,c]=(0,s.useState)([]),[d,m]=(0,s.useState)(!1),[p,x]=(0,s.useState)(void 0),[u,h]=(0,s.useState)(null),[g,f]=(0,s.useState)(!1),[v,j]=(0,s.useState)(!1),[b,y]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[C,_]=(0,s.useState)(null),k=!!o&&(0,eQ.isAdminRole)(o),T=async()=>{if(e){m(!0);try{let t=await (0,n.getPromptsList)(e,p);console.log(`prompts: ${JSON.stringify(t)}`),c(t.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{m(!1)}}};(0,s.useEffect)(()=>{T()},[e,p]);let S=()=>{T(),j(!1),y(null),h(null)},P=async()=>{if(C&&e){w(!0);try{await (0,n.deletePromptCall)(e,C.id),W.default.success(`Prompt "${C.name}" deleted successfully`),T()}catch(e){console.error("Error deleting prompt:",e),W.default.fromBackend("Failed to delete prompt")}finally{w(!1),_(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[v?(0,t.jsx)(eZ,{onClose:()=>{j(!1),y(null)},onSuccess:S,accessToken:e,initialPromptData:b}):u?(0,t.jsx)(Z,{promptId:u,onClose:()=>h(null),accessToken:e,isAdmin:k,onDelete:T,onEdit:e=>{y(e),j(!0)}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{onClick:()=>{u&&h(null),y(null),j(!0)},disabled:!e,children:"+ Add New Prompt"}),(0,t.jsx)(r.Button,{onClick:()=>{u&&h(null),f(!0)},disabled:!e,variant:"secondary",children:"Upload .prompt File"})]}),(0,t.jsx)(a.Select,{placeholder:"All Environments",allowClear:!0,value:p,onChange:e=>x(e),style:{width:180},options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]})]}),(0,t.jsx)($,{promptsList:i,isLoading:d,onPromptClick:e=>{h(e)},onDeleteClick:(e,t)=>{_({id:e,name:t})},accessToken:e,isAdmin:k})]}),(0,t.jsx)(ea,{visible:g,onClose:()=>{f(!1)},accessToken:e,onSuccess:S}),C&&(0,t.jsxs)(l.Modal,{title:"Delete Prompt",open:null!==C,onOk:P,onCancel:()=>{_(null)},confirmLoading:N,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",C.name," ?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],191403)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5ab3a0c9cca409f3.js b/litellm/proxy/_experimental/out/_next/static/chunks/5ab3a0c9cca409f3.js deleted file mode 100644 index 31634f9781b..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5ab3a0c9cca409f3.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),g=e.i(72713),p=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:N}=s.Typography;function k({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:k,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(N,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:k,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(g.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(p.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>k],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(389083),l=e.i(810757),r=e.i(477386),i=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:n=[],variant:o="card",className:d=""}){let c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var n;let o=(n=e.callback_name,Object.entries(i.callback_map).find(([e,t])=>t===n)?.[0]||n),d=i.callbackInfo[o]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:o,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-blue-800",children:o}),(0,t.jsxs)(a.Text,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(s.Badge,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}})(e.callback_type),size:"sm",children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(s.Badge,{color:"red",size:"xs",children:n.length})]}),n.length>0?(0,t.jsx)("div",{className:"space-y-3",children:n.map((e,l)=>{let n=i.reverse_callback_map[e]||e,o=i.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-red-800",children:n}),(0,t.jsx)(a.Text,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(s.Badge,{color:"red",size:"sm",children:"Disabled"})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===o?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${d}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${d}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),c]})}])},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),g=e.i(808613),p=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),N=e.i(237016),k=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=g.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),k.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),k.default.fromBackend(e),C(!1)}}},B=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:B,footer:_?[(0,n.jsx)(o.Button,{onClick:B,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:B,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(N.CopyToClipboard,{text:_,onCopy:()=>k.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(g.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(p.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),g=e.i(653824),p=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),N=e.i(784647),k=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),B=e.i(190702),E=e.i(891547),O=e.i(109799),P=e.i(921511),z=e.i(827252),K=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[g,p]=(0,k.useState)([]),[h,j]=(0,k.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,k.useState)([]),[v,N]=(0,k.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,k.useState)(e.organization_id||null),[A,M]=(0,k.useState)(e.auto_rotate||!1),[R,D]=(0,k.useState)(e.rotation_interval||""),[B,el]=(0,k.useState)(!e.expires),[er,ei]=(0,k.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,k.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);p(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,k.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let eg=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,ep={...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,k.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,k.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,k.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,k.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}B&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:ep,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(E.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:g.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{N((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:B,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:E,teams:O,onKeyDataUpdate:P,onDelete:z,backButtonText:K="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,k.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,k.useState)(!1),[es,er]=(0,k.useState)(!1),[ei,en]=(0,k.useState)(""),[eo,ed]=(0,k.useState)(!1),[ec,em]=(0,k.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[eg,ep]=(0,k.useState)(E),[eh,ej]=(0,k.useState)(null),[e_,ey]=(0,k.useState)(!1),[eb,ef]=(0,k.useState)({}),[ev,eN]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{E&&ep(E)},[E]),(0,k.useEffect)(()=>{(async()=>{let e=eg?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;eN(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eN(!1)}})()},[U,eg?.metadata?.policies]),(0,k.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!eg)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:K}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let ek=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...eg.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...eg.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);ep(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,eg.token||eg.token_id),F.default.success("Key deleted successfully"),z&&z(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"")||$===eg.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(N.KeyInfoHeader,{data:{keyName:eg.key_alias||"Virtual Key",keyId:eg.token_id||eg.token,userId:eg.user_id||"",userEmail:eg.user_email||"",createdBy:eg.user_email||eg.user_id||"",createdAt:eg.created_at?ew(eg.created_at):"",lastUpdated:eg.updated_at?ew(eg.updated_at):"",lastActive:eg.last_active?ew(eg.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:K,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:eg,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{ep(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:eg?.key_alias||"-"},{label:"Key ID",value:eg?.token_id||eg?.token||"-",code:!0},{label:"Team ID",value:eg?.team_id||"-",code:!0},{label:"Spend",value:eg?.spend?`$${(0,i.formatNumberWithCommas)(eg.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:eg?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(eg.token||eg.token_id,{onSuccess:()=>{ep(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:eg?.key_alias||eg?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(g.TabGroup,{children:[(0,t.jsxs)(p.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(eg.metadata?.guardrails)&&eg.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eg.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof eg.metadata?.disable_global_guardrails&&!0===eg.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(eg.metadata?.policies)&&eg.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:eg.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:eg,onCancel:()=>Z(!1),onSubmit:ek,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.token_id||eg.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:eg.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:eg.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:eg.project_id?(V=J?.find(e=>e.project_id===eg.project_id),V?.project_alias?`${V.project_alias} (${eg.project_id})`:eg.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(eg.organization_id??eg.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(eg.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:eg.expires?ew(eg.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.metadata?.tags)&&eg.metadata.tags.length>0?eg.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.prompts)&&eg.metadata.prompts.length>0?eg.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.allowed_routes)&&eg.allowed_routes.length>0?eg.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.allowed_passthrough_routes)&&eg.metadata.allowed_passthrough_routes.length>0?eg.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:eg.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==eg.max_parallel_requests?eg.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",eg.metadata?.model_tpm_limit?JSON.stringify(eg.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",eg.metadata?.model_rpm_limit?JSON.stringify(eg.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(eg.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5b44cdfc729a6dc9.js b/litellm/proxy/_experimental/out/_next/static/chunks/5b44cdfc729a6dc9.js deleted file mode 100644 index 596897ca5d2..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5b44cdfc729a6dc9.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,596115,e=>{"use strict";var s=e.i(843476),l=e.i(271645),a=e.i(764205),t=e.i(584578),r=e.i(808613),i=e.i(56567),o=e.i(468133),n=e.i(708347),d=e.i(304967),c=e.i(994388),m=e.i(309426),h=e.i(599724),u=e.i(350967),x=e.i(404206),p=e.i(747871),g=e.i(500330),_=e.i(752978),j=e.i(197647),f=e.i(653824),b=e.i(881073),y=e.i(723731),v=e.i(278587);let w=({lastRefreshed:e,onRefresh:l,userRole:a,children:t})=>(0,s.jsxs)(f.TabGroup,{className:"gap-2 h-[75vh] w-full",children:[(0,s.jsxs)(b.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)(j.Tab,{children:"Your Teams"}),(0,s.jsx)(j.Tab,{children:"Available Teams"}),(0,n.isAdminRole)(a||"")&&(0,s.jsx)(j.Tab,{children:"Default Team Settings"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[e&&(0,s.jsxs)(h.Text,{children:["Last Refreshed: ",e]}),(0,s.jsx)(_.Icon,{icon:v.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:l})]})]}),(0,s.jsx)(y.TabPanels,{children:t})]});var T=e.i(206929),C=e.i(35983);let N=({filters:e,organizations:l,showFilters:a,onToggleFilters:t,onChange:r,onReset:i})=>(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Search by Team Name...",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e.team_alias,onChange:e=>r("team_alias",e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,s.jsxs)("button",{className:`px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ${a?"bg-gray-100":""}`,onClick:()=>t(!a),children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters",(e.team_id||e.team_alias||e.organization_id)&&(0,s.jsx)("span",{"data-testid":"active-filter-indicator",className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:i,children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Reset Filters"]})]}),a&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Enter Team ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e.team_id,onChange:e=>r("team_id",e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(T.Select,{value:e.organization_id||"",onValueChange:e=>r("organization_id",e),placeholder:"Select Organization",children:l?.map(e=>(0,s.jsx)(C.SelectItem,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]});var S=e.i(135214),k=e.i(269200),I=e.i(942232),F=e.i(977572),A=e.i(427612),z=e.i(64848),M=e.i(496020),O=e.i(592968),P=e.i(591935),L=e.i(68155),D=e.i(389083),B=e.i(871943),E=e.i(502547),R=e.i(355619);let V=({team:e})=>{let[a,t]=(0,l.useState)(!1);return(0,s.jsx)(F.TableCell,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:e.models.length>3?"px-0":"",children:(0,s.jsx)("div",{className:"flex flex-col",children:Array.isArray(e.models)?(0,s.jsx)("div",{className:"flex flex-col",children:0===e.models.length?(0,s.jsx)(D.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,s.jsx)(h.Text,{children:"All Proxy Models"})}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"flex items-start",children:[e.models.length>3&&(0,s.jsx)("div",{children:(0,s.jsx)(_.Icon,{icon:a?B.ChevronDownIcon:E.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{t(e=>!e)}})}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.models.slice(0,3).map((e,l)=>"all-proxy-models"===e?(0,s.jsx)(D.Badge,{size:"xs",color:"red",children:(0,s.jsx)(h.Text,{children:"All Proxy Models"})},l):(0,s.jsx)(D.Badge,{size:"xs",color:"blue",children:(0,s.jsx)(h.Text,{children:e.length>30?`${(0,R.getModelDisplayName)(e).slice(0,30)}...`:(0,R.getModelDisplayName)(e)})},l)),e.models.length>3&&!a&&(0,s.jsx)(D.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,s.jsxs)(h.Text,{children:["+",e.models.length-3," ",e.models.length-3==1?"more model":"more models"]})}),a&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:e.models.slice(3).map((e,l)=>"all-proxy-models"===e?(0,s.jsx)(D.Badge,{size:"xs",color:"red",children:(0,s.jsx)(h.Text,{children:"All Proxy Models"})},l+3):(0,s.jsx)(D.Badge,{size:"xs",color:"blue",children:(0,s.jsx)(h.Text,{children:e.length>30?`${(0,R.getModelDisplayName)(e).slice(0,30)}...`:(0,R.getModelDisplayName)(e)})},l+3))})]})]})})}):null})})};var H=e.i(918549),H=H,W=e.i(846753),W=W;let U=({team:e,userId:l})=>{var a;let t,r=(a=((e,s)=>{if(!s)return null;let l=e.members_with_roles?.find(e=>e.user_id===s);return l?.role??null})(e,l),t="inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border","admin"===a?(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#EEF2FF",color:"#3730A3",borderColor:"#C7D2FE"},children:[(0,s.jsx)(H.default,{className:"h-3 w-3 mr-1"}),"Admin"]}):(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#F3F4F6",color:"#4B5563",borderColor:"#E5E7EB"},children:[(0,s.jsx)(W.default,{className:"h-3 w-3 mr-1"}),"Member"]}));return(0,s.jsx)(F.TableCell,{children:r})},$=({teams:e,currentOrg:l,setSelectedTeamId:a,perTeamInfo:t,userRole:r,userId:i,setEditTeam:o,onDeleteTeam:n})=>(0,s.jsxs)(k.Table,{children:[(0,s.jsx)(A.TableHead,{children:(0,s.jsxs)(M.TableRow,{children:[(0,s.jsx)(z.TableHeaderCell,{children:"Team Name"}),(0,s.jsx)(z.TableHeaderCell,{children:"Team ID"}),(0,s.jsx)(z.TableHeaderCell,{children:"Created"}),(0,s.jsx)(z.TableHeaderCell,{children:"Spend (USD)"}),(0,s.jsx)(z.TableHeaderCell,{children:"Budget (USD)"}),(0,s.jsx)(z.TableHeaderCell,{children:"Models"}),(0,s.jsx)(z.TableHeaderCell,{children:"Organization"}),(0,s.jsx)(z.TableHeaderCell,{children:"Your Role"}),(0,s.jsx)(z.TableHeaderCell,{children:"Info"})]})}),(0,s.jsx)(I.TableBody,{children:e&&e.length>0?e.filter(e=>!l||e.organization_id===l.organization_id).sort((e,s)=>new Date(s.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,s.jsxs)(M.TableRow,{children:[(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,s.jsx)(F.TableCell,{children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(O.Tooltip,{title:e.team_id,children:(0,s.jsxs)(c.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>{a(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,g.formatNumberWithCommas)(e.spend,4)}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:null!==e.max_budget&&void 0!==e.max_budget?e.max_budget:"No limit"}),(0,s.jsx)(V,{team:e}),(0,s.jsx)(F.TableCell,{children:e.organization_id}),(0,s.jsx)(U,{team:e,userId:i}),(0,s.jsxs)(F.TableCell,{children:[(0,s.jsxs)(h.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].keys&&t[e.team_id].keys.length," ","Keys"]}),(0,s.jsxs)(h.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].team_info&&t[e.team_id].team_info.members_with_roles&&t[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,s.jsx)(F.TableCell,{children:"Admin"==r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.Icon,{icon:P.PencilAltIcon,size:"sm",onClick:()=>{a(e.team_id),o(!0)}}),(0,s.jsx)(_.Icon,{onClick:()=>n(e.team_id),icon:L.TrashIcon,size:"sm"})]}):null})]},e.team_id)):null})]});var G=e.i(582458),G=G,J=e.i(995926);let K=({teams:e,teamToDelete:a,onCancel:t,onConfirm:r})=>{let[i,o]=(0,l.useState)(""),n=e?.find(e=>e.team_id===a),d=n?.team_alias||"",c=n?.keys?.length||0,m=i===d;return(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl min-h-[380px] py-6 overflow-hidden transform transition-all flex flex-col justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,s.jsx)("button",{"aria-label":"Close",onClick:()=>{t(),o("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,s.jsx)(J.XIcon,{size:20})})]}),(0,s.jsxs)("div",{className:"px-6 py-4",children:[c>0&&(0,s.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,s.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,s.jsx)(G.default,{size:20})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",c," associated key",c>1?"s":"","."]}),(0,s.jsx)("p",{className:"text-base text-red-600 mt-2",children:"Deleting the team will also delete all associated keys. This action is irreversible."})]})]}),(0,s.jsx)("p",{className:"text-base text-gray-600 mb-5",children:"Are you sure you want to force delete this team and all its keys?"}),(0,s.jsxs)("div",{className:"mb-5",children:[(0,s.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,s.jsx)("span",{className:"underline",children:d})," to confirm deletion:"]}),(0,s.jsx)("input",{type:"text",value:i,onChange:e=>o(e.target.value),placeholder:"Enter team name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]})]})]}),(0,s.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,s.jsx)("button",{onClick:()=>{t(),o("")},className:"px-5 py-3 bg-white border border-gray-300 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),(0,s.jsx)("button",{onClick:r,disabled:!m,className:`px-5 py-3 rounded-md text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ${m?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"}`,children:"Force Delete"})]})]})})};var q=e.i(464571),Y=e.i(311451),X=e.i(212931),Q=e.i(199133),Z=e.i(790848),ee=e.i(677667),es=e.i(130643),el=e.i(898667),ea=e.i(779241),et=e.i(827252),er=e.i(435451),ei=e.i(916940),eo=e.i(75921),en=e.i(552130),ed=e.i(651904),ec=e.i(533882),em=e.i(727749),eh=e.i(390605);let eu=({isTeamModalVisible:e,handleOk:t,handleCancel:i,currentOrg:o,organizations:n,teams:d,setTeams:c,modelAliases:m,setModelAliases:u,loggingSettings:x,setLoggingSettings:p,setIsTeamModalVisible:g})=>{let{userId:_,userRole:j,accessToken:f,premiumUser:b}=(0,S.default)(),[y]=r.Form.useForm(),[v,w]=(0,l.useState)([]),[T,C]=(0,l.useState)(null),[N,k]=(0,l.useState)([]),[I,F]=(0,l.useState)([]),[A,z]=(0,l.useState)([]),[M,P]=(0,l.useState)([]),[L,D]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{try{if(null===_||null===j||null===f)return;let e=await (0,R.fetchAvailableModelsForTeamOrKey)(_,j,f);e&&w(e)}catch(e){console.error("Error fetching user models:",e)}})()},[f,_,j,d]),(0,l.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${T}`);let s=(e=[],T&&T.models.length>0?(console.log(`organization.models: ${T.models}`),e=T.models):e=v,(0,R.unfurlWildcardModelsInList)(e,v));console.log(`models: ${s}`),k(s),y.setFieldValue("models",[])},[T,v,y]);let B=async()=>{try{if(null==f)return;let e=await (0,a.fetchMCPAccessGroups)(f);P(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,l.useEffect)(()=>{B()},[f,B]),(0,l.useEffect)(()=>{let e=async()=>{try{if(null==f)return;let e=(await (0,a.getPoliciesList)(f)).policies.map(e=>e.policy_name);z(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==f)return;let e=(await (0,a.getGuardrailsList)(f)).guardrails.map(e=>e.guardrail_name);F(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[f]);let E=async e=>{try{if(console.log(`formValues: ${JSON.stringify(e)}`),null!=f){let s=e?.team_alias,l=d?.map(e=>e.team_alias)??[],t=e?.organization_id||o?.organization_id;if(""===t||"string"!=typeof t?e.organization_id=null:e.organization_id=t.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(em.default.info("Creating Team"),x.length>0){let s={};if(e.metadata)try{s=JSON.parse(e.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}s={...s,logging:x.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.secret_manager_settings&&"string"==typeof e.secret_manager_settings)if(""===e.secret_manager_settings.trim())delete e.secret_manager_settings;else try{e.secret_manager_settings=JSON.parse(e.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolPermissions)){if(e.object_permission={},e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission.vector_stores=e.allowed_vector_store_ids,delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups){let{servers:s,accessGroups:l}=e.allowed_mcp_servers_and_groups;s&&s.length>0&&(e.object_permission.mcp_servers=s),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),delete e.allowed_mcp_servers_and_groups}if(e.mcp_tool_permissions&&Object.keys(e.mcp_tool_permissions).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=e.mcp_tool_permissions,delete e.mcp_tool_permissions),e.allowed_agents_and_groups){let{agents:s,accessGroups:l}=e.allowed_agents_and_groups;e.object_permission||(e.object_permission={}),s&&s.length>0&&(e.object_permission.agents=s),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}}e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),Object.keys(m).length>0&&(e.model_aliases=m);let r=await (0,a.teamCreateCall)(f,e);null!==d?c([...d,r]):c([r]),console.log(`response for team create call: ${r}`),em.default.success("Team created"),y.resetFields(),p([]),u({}),g(!1)}}catch(e){console.error("Error creating the team:",e),em.default.fromBackend("Error creating the team: "+e)}};return(0,s.jsx)(X.Modal,{title:"Create Team",open:e,width:1e3,footer:null,onOk:t,onCancel:i,children:(0,s.jsxs)(r.Form,{form:y,onFinish:E,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,s.jsx)(ea.TextInput,{placeholder:""})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Organization"," ",(0,s.jsx)(O.Tooltip,{title:(0,s.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:o?o.organization_id:null,className:"mt-8",children:(0,s.jsx)(Q.Select,{showSearch:!0,allowClear:!0,placeholder:"Search or select an Organization",onChange:e=>{y.setFieldValue("organization_id",e),C(n?.find(s=>s.organization_id===e)||null)},filterOption:(e,s)=>!!s&&(s.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:n?.map(e=>(0,s.jsxs)(Q.Select.Option,{value:e.organization_id,children:[(0,s.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,s.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(O.Tooltip,{title:"These are the models that your selected team has access to",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(Q.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,s.jsx)(Q.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),N.map(e=>(0,s.jsx)(Q.Select.Option,{value:e,children:(0,R.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(r.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,s.jsx)(er.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(r.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,s.jsxs)(Q.Select,{defaultValue:null,placeholder:"n/a",children:[(0,s.jsx)(Q.Select.Option,{value:"24h",children:"daily"}),(0,s.jsx)(Q.Select.Option,{value:"7d",children:"weekly"}),(0,s.jsx)(Q.Select.Option,{value:"30d",children:"monthly"})]})}),(0,s.jsx)(r.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsxs)(ee.Accordion,{className:"mt-20 mb-8",onClick:()=>{L||(B(),D(!0))},children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Additional Settings"})}),(0,s.jsxs)(es.AccordionBody,{children:[(0,s.jsx)(r.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,s.jsx)(ea.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,s.jsx)(r.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,s.jsx)(er.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(r.Form.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,s.jsx)(ea.TextInput,{placeholder:"e.g., 30d"})}),(0,s.jsx)(r.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,s.jsx)(Y.Input.TextArea,{rows:4})}),(0,s.jsx)(r.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:b?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,s)=>{if(!s)return Promise.resolve();try{return JSON.parse(s),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,s.jsx)(Y.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!b})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(O.Tooltip,{title:"Setup your first guardrail",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,s.jsx)(Q.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:I.map(e=>({value:e,label:e}))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,s.jsx)(O.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,s.jsx)(Z.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Policies"," ",(0,s.jsx)(O.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,s.jsx)(Q.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:A.map(e=>({value:e,label:e}))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,s.jsx)(O.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,s.jsx)(ei.default,{onChange:e=>y.setFieldValue("allowed_vector_store_ids",e),value:y.getFieldValue("allowed_vector_store_ids"),accessToken:f||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"MCP Settings"})}),(0,s.jsxs)(es.AccordionBody,{children:[(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,s.jsx)(O.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,s.jsx)(eo.default,{onChange:e=>y.setFieldValue("allowed_mcp_servers_and_groups",e),value:y.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:f||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,s.jsx)(r.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,s.jsx)(Y.Input,{type:"hidden"})}),(0,s.jsx)(r.Form.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_mcp_servers_and_groups!==s.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(eh.default,{accessToken:f||"",selectedServers:y.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:y.getFieldValue("mcp_tool_permissions")||{},onChange:e=>y.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Agent Settings"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Agents"," ",(0,s.jsx)(O.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,s.jsx)(en.default,{onChange:e=>y.setFieldValue("allowed_agents_and_groups",e),value:y.getFieldValue("allowed_agents_and_groups"),accessToken:f||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Logging Settings"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(ed.default,{value:x,onChange:p,premiumUser:b})})})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Model Aliases"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)(h.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,s.jsx)(ec.default,{accessToken:f||"",initialModelAliases:m,onAliasUpdate:u,showExampleConfig:!1})]})})]})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(q.Button,{htmlType:"submit",children:"Create Team"})})]})})},ex=({teams:e,accessToken:_,setTeams:j,userID:f,userRole:b,organizations:y,premiumUser:v=!1})=>{let[T,C]=(0,l.useState)(null),[k,I]=(0,l.useState)(!1),[F,A]=(0,l.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),[z]=r.Form.useForm(),[M]=r.Form.useForm(),[O,P]=(0,l.useState)(null),[L,D]=(0,l.useState)(!1),[B,E]=(0,l.useState)(!1),[R,V]=(0,l.useState)(!1),[H,W]=(0,l.useState)(!1),[U,G]=(0,l.useState)([]),[J,q]=(0,l.useState)(!1),[Y,X]=(0,l.useState)(null),[Q,Z]=(0,l.useState)({}),[ee,es]=(0,l.useState)([]),[el,ea]=(0,l.useState)({}),{lastRefreshed:et,onRefreshClick:er}=(({currentOrg:e,setTeams:s})=>{let[a,r]=(0,l.useState)(""),{accessToken:i,userId:o,userRole:n}=(0,S.default)(),d=(0,l.useCallback)(()=>{r(new Date().toLocaleString())},[]);return(0,l.useEffect)(()=>{i&&(0,t.fetchTeams)(i,o,n,e,s).then(),d()},[i,e,a,d,s,o,n]),{lastRefreshed:a,setLastRefreshed:r,onRefreshClick:d}})({currentOrg:T,setTeams:j});(0,l.useEffect)(()=>{e&&Z(e.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[e]);let ei=async e=>{X(e),q(!0)},eo=async()=>{if(null!=Y&&null!=e&&null!=_){try{await (0,a.teamDeleteCall)(_,Y),(0,t.fetchTeams)(_,f,b,T,j)}catch(e){console.error("Error deleting the team:",e)}q(!1),X(null)}};return(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(u.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(m.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"==b||"Org Admin"==b)&&(0,s.jsx)(c.Button,{className:"w-fit",onClick:()=>E(!0),children:"+ Create New Team"}),O?(0,s.jsx)(i.default,{teamId:O,onUpdate:e=>{j(s=>{if(null==s)return s;let l=s.map(s=>e.team_id===s.team_id?(0,g.updateExistingKeys)(s,e):s);return _&&(0,t.fetchTeams)(_,f,b,T,j),l})},onClose:()=>{P(null),D(!1)},accessToken:_,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===O)),is_proxy_admin:"Admin"==b,is_org_admin:(()=>{let s=e?.find(e=>e.team_id===O);if(!s?.organization_id||!y||!f)return!1;let l=y.find(e=>e.organization_id===s.organization_id);return l?.members?.some(e=>e.user_id===f&&"org_admin"===e.user_role)??!1})(),userModels:U,editTeam:L,premiumUser:v}):(0,s.jsxs)(w,{lastRefreshed:et,onRefresh:er,userRole:b,children:[(0,s.jsxs)(x.TabPanel,{children:[(0,s.jsxs)(h.Text,{children:["Click on “Team ID” to view team details ",(0,s.jsx)("b",{children:"and"})," manage team members."]}),(0,s.jsx)(u.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,s.jsx)(m.Col,{numColSpan:1,children:(0,s.jsxs)(d.Card,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsx)(N,{filters:F,organizations:y,showFilters:k,onToggleFilters:I,onChange:(e,s)=>{let l={...F,[e]:s};A(l),_&&(0,a.v2TeamListCall)(_,l.organization_id||null,null,l.team_id||null,l.team_alias||null).then(e=>{e&&e.teams&&j(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})},onReset:()=>{A({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),_&&(0,a.v2TeamListCall)(_,null,f||null,null,null).then(e=>{e&&e.teams&&j(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})}})})}),(0,s.jsx)($,{teams:e,currentOrg:T,perTeamInfo:Q,userRole:b,userId:f,setSelectedTeamId:P,setEditTeam:D,onDeleteTeam:ei}),J&&(0,s.jsx)(K,{teams:e,teamToDelete:Y,onCancel:()=>{q(!1),X(null)},onConfirm:eo})]})})})]}),(0,s.jsx)(x.TabPanel,{children:(0,s.jsx)(p.default,{accessToken:_,userID:f})}),(0,n.isAdminRole)(b||"")&&(0,s.jsx)(x.TabPanel,{children:(0,s.jsx)(o.default,{accessToken:_,userID:f||"",userRole:b||""})})]}),("Admin"==b||"Org Admin"==b)&&(0,s.jsx)(eu,{isTeamModalVisible:B,handleOk:()=>{E(!1),z.resetFields(),es([]),ea({})},handleCancel:()=>{E(!1),z.resetFields(),es([]),ea({})},currentOrg:T,organizations:y,teams:e,setTeams:j,modelAliases:el,setModelAliases:ea,loggingSettings:ee,setLoggingSettings:es,setIsTeamModalVisible:E})]})})})};var ep=e.i(214541),eg=e.i(846835);e.s(["default",0,()=>{let{accessToken:e,userId:a,userRole:t}=(0,S.default)(),{teams:r,setTeams:i}=(0,ep.default)(),[o,n]=(0,l.useState)([]);return(0,l.useEffect)(()=>{(0,eg.fetchOrganizations)(e,n).then(()=>{})},[e]),(0,s.jsx)(ex,{teams:r,accessToken:e,setTeams:i,userID:a,userRole:t,organizations:o})}],596115)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/cc1429f96b037302.js b/litellm/proxy/_experimental/out/_next/static/chunks/5cce5cd9386751d1.js similarity index 86% rename from litellm/proxy/_experimental/out/_next/static/chunks/cc1429f96b037302.js rename to litellm/proxy/_experimental/out/_next/static/chunks/5cce5cd9386751d1.js index a4ebdaee371..5f1651e109f 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/cc1429f96b037302.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/5cce5cd9386751d1.js @@ -95,4 +95,4 @@ ${u}${d}topRight `]:{animationName:i.slideDownOut},"&-hidden":{display:"none"},[n]: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(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-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),{[`${o}-rtl`]:{direction:"rtl"}},(0,r.genCompactItemStyle)(e,{borderElCls:`${o}-selector`,focusElCls:`${o}-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:o,controlHeight:n,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*o,x=Math.min(n-$,n-C),E=Math.min(a-$,a-C),S=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:`${(n-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:n,selectorBg:m,clearBg:m,singleItemHeightLG:i,multipleItemBg:h,multipleItemBorderColor:"transparent",multipleItemHeight:x,multipleItemHeightSM:E,multipleItemHeightLG:S,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),o=e.i(726289),n=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(o.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:o})=>r&&o?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(n.default,null)}}e.s(["default",()=>s])},327494,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(123829),n=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),x=e.i(617206),E=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let S="SECRET_COMBOBOX_MODE_DO_NOT_USE",k=t.forwardRef((e,n)=>{var a,c,k,j,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:eo,prefix:en,dropdownRender:ea,popupRender:ei,onDropdownVisibleChange:el,onOpenChange:es,styles:ec,classNames:eu}=e,ed=E(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:ex}=(0,d.useComponentConfig)("select"),[,eE]=(0,b.useToken)(),eS=null!=D?D:null==eE?void 0:eE.controlHeight,ek=ep("select",P),ej=ep(),eO=null!=X?X:eh,{compactSize:eT,compactItemClassnames:eF}=(0,y.useCompactItemContext)(ek,eO),[e_,eI]=(0,v.default)("select",Q,N),eP=(0,m.default)(ek),[eN,eR,eM]=(0,$.default)(ek,eP),eB=t.useMemo(()=>{let{mode:t}=e;if("combobox"!==t)return t===S?"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==(k=e$.popup)?void 0:k.root)||ee,eD=(_=ei||ea,t.default.useMemo(()=>{if(_)return(...e)=>t.default.createElement(x.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:ek,componentName:"Select"})),eZ=(0,i.default)(ed,["suffixIcon","itemIcon"]),eQ=(0,r.default)((null==(j=null==eu?void 0:eu.popup)?void 0:j.root)||(null==(O=null==ex?void 0:ex.popup)?void 0:O.root)||A||z,{[`${ek}-dropdown-${eO}`]:"rtl"===eO},M,ex.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)({[`${ek}-lg`]:"large"===e0,[`${ek}-sm`]:"small"===e0,[`${ek}-rtl`]:"rtl"===eO,[`${ek}-${e_}`]:eI,[`${ek}-in-form-item`]:eG},(0,u.getStatusClassNames)(ek,eq,eW),eF,eC,R,ex.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(o.default,Object.assign({ref:n,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)(ej,"slide-up",et),builtinPlacements:(0,w.default)(q,ey),listHeight:L,listItemHeight:eS,mode:eB,prefixCls:ek,placement:e4,direction:eO,prefix:en,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?eo:void 0,tagRender:eA?er:void 0,dropdownRender:eD,onDropdownVisibleChange:es||el})))}),j=(0,c.default)(k,"dropdownAlign");k.SECRET_COMBOBOX_MODE_DO_NOT_USE=S,k.Option=a.Option,k.OptGroup=n.OptGroup,k._InternalPanelDoNotUseOrYouWillBeFired=j,e.s(["default",0,k],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 o=e=>{var o=(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"},o),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",()=>o],689074);let n=e=>{var o=(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"},o),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",()=>n],21243);let a=e=>{var o=(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"},o),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 o=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(o).join(""):"object"==typeof e&&e?o(e.props.children):void 0;function n(e){let t=new Map;return r.default.Children.map(e,e=>{var r;t.set(e.props.value,null!=(r=o(e))?r:e.props.value)}),t}function a(e,t){return r.default.Children.map(t,t=>{var r;if((null!=(r=o(t))?r:t.props.value).toLowerCase().includes(e.toLowerCase()))return t})}let i=(e,r,o=!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",o&&"text-red-500 placeholder:text-red-500 dark:text-red-500 dark:placeholder:text-red-500",o?"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",()=>n,"getFilteredOptions",()=>a,"getNodeText",()=>o,"getSelectButtonColors",()=>i,"hasValue",()=>l])},779241,677955,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(673706),n=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:x,pattern:E}=e,S=(0,t.__rest)(e,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange","autoFocus","pattern"]),[k,j]=(0,r.useState)(x||!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=()=>j(!0),t=()=>j(!1),r=_.current;return r&&(r.addEventListener("focus",e),r.addEventListener("blur",t),x&&r.focus()),()=>{r&&(r.removeEventListener("focus",e),r.removeEventListener("blur",t))}},[x]),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),k&&(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,o.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:E},S)),"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(n.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,o.makeClassName)("TextInput"),d=r.default.forwardRef((e,o)=>{let{type:n="text"}=e,a=(0,t.__rest)(e,["type"]);return r.default.createElement(c,Object.assign({ref:o,type:n,makeInputClassName:u},a))});d.displayName="TextInput",e.s(["TextInput",()=>d],779241)},764205,122550,82946,e=>{"use strict";e.s(["addAllowedIP",()=>eA,"adminGlobalActivity",()=>eZ,"adminGlobalActivityPerModel",()=>e0,"adminGlobalCacheActivity",()=>eQ,"adminSpendLogsCall",()=>eJ,"adminTopEndUsersCall",()=>eX,"adminTopKeysCall",()=>eK,"adminTopModelsCall",()=>e1,"adminspendByProvider",()=>eY,"agentDailyActivityCall",()=>eS,"agentHubPublicModelsCall",()=>eN,"alertingSettingsCall",()=>Z,"allEndUsersCall",()=>eG,"allTagNamesCall",()=>eW,"applyGuardrail",()=>ol,"approveGuardrailSubmission",()=>tD,"approveMCPServer",()=>rT,"availableTeamListCall",()=>ef,"budgetCreateCall",()=>K,"budgetDeleteCall",()=>J,"budgetUpdateCall",()=>X,"buildMcpOAuthAuthorizeUrl",()=>ow,"cacheTemporaryMcpServer",()=>oy,"cachingHealthCheckCall",()=>tP,"callMCPTool",()=>rA,"cancelModelCostMapReload",()=>V,"checkEuAiActCompliance",()=>oD,"checkGdprCompliance",()=>oV,"claimOnboardingToken",()=>ej,"convertPromptFileToJson",()=>rf,"createAgentCall",()=>rp,"createGuardrailCall",()=>rm,"createMCPServer",()=>rE,"createPassThroughEndpoint",()=>tj,"createPolicyAttachmentCall",()=>re,"createPolicyCall",()=>t2,"createPolicyVersion",()=>t3,"createPromptCall",()=>rc,"createSearchTool",()=>rI,"credentialCreateCall",()=>te,"credentialDeleteCall",()=>to,"credentialGetCall",()=>tr,"credentialListCall",()=>tt,"credentialUpdateCall",()=>tn,"customerDailyActivityCall",()=>eE,"deleteAgentCall",()=>r6,"deleteAllowedIP",()=>ez,"deleteCallback",()=>og,"deleteClaudeCodePlugin",()=>oH,"deleteConfigFieldSetting",()=>tT,"deleteGuardrailCall",()=>r5,"deleteMCPOAuthUserCredential",()=>oY,"deleteMCPServer",()=>rk,"deletePassThroughEndpointsCall",()=>tF,"deletePolicyAttachmentCall",()=>rt,"deletePolicyCall",()=>t5,"deletePromptCall",()=>rd,"deleteSearchTool",()=>rN,"deleteToolPolicyOverride",()=>oK,"deriveErrorMessage",()=>oF,"disableClaudeCodePlugin",()=>oL,"enableClaudeCodePlugin",()=>oz,"enrichPolicyTemplate",()=>tY,"enrichPolicyTemplateStream",()=>t0,"estimateAttachmentImpactCall",()=>ra,"exchangeLoginCode",()=>oI,"exchangeMcpOAuthToken",()=>o$,"fetchAvailableSearchProviders",()=>rR,"fetchDiscoverableMCPServers",()=>rb,"fetchMCPAccessGroups",()=>rC,"fetchMCPClientIp",()=>rx,"fetchMCPServerHealth",()=>r$,"fetchMCPServers",()=>rw,"fetchMCPSubmissions",()=>rO,"fetchOpenAPIRegistry",()=>ry,"fetchSearchTools",()=>r_,"fetchToolDetail",()=>oq,"fetchToolPolicyOptions",()=>oW,"fetchToolsList",()=>oG,"formatDate",()=>y,"getAgentCreateMetadata",()=>I,"getAgentInfo",()=>oo,"getAgentsList",()=>or,"getAllowedIPs",()=>eB,"getBudgetList",()=>ty,"getCacheSettingsCall",()=>tC,"getCallbackConfigsCall",()=>b,"getCallbacksCall",()=>tb,"getCategoryYaml",()=>oe,"getClaudeCodeMarketplace",()=>oR,"getClaudeCodePluginDetails",()=>oB,"getClaudeCodePluginsList",()=>oM,"getConfigFieldSetting",()=>tk,"getDefaultTeamSettings",()=>rW,"getEmailEventSettings",()=>r1,"getGeneralSettingsCall",()=>tw,"getGlobalLitellmHeaderName",()=>R,"getGuardrailInfo",()=>on,"getGuardrailProviderSpecificParams",()=>r8,"getGuardrailUISettings",()=>r9,"getGuardrailsList",()=>tL,"getGuardrailsUsageDetail",()=>tG,"getGuardrailsUsageLogs",()=>tU,"getGuardrailsUsageOverview",()=>tW,"getInProductNudgesCall",()=>w,"getInternalUserSettings",()=>rg,"getLicenseInfo",()=>om,"getMCPOAuthUserCredentialStatus",()=>oZ,"getMCPSemanticFilterSettings",()=>tB,"getMajorAirlines",()=>ot,"getModelCostMapReloadStatus",()=>G,"getModelCostMapSource",()=>W,"getOnboardingCredentials",()=>ek,"getOpenAPISchema",()=>z,"getPassThroughEndpointsCall",()=>tS,"getPoliciesList",()=>tq,"getPolicyAttachmentsList",()=>t8,"getPolicyInfo",()=>t9,"getPolicyInfoWithGuardrails",()=>tK,"getPolicyTemplates",()=>tX,"getPossibleUserRoles",()=>e9,"getPromptInfo",()=>rl,"getPromptVersions",()=>rs,"getPromptsList",()=>ri,"getProviderCreateMetadata",()=>_,"getProxyBaseUrl",()=>S,"getProxyUISettings",()=>tR,"getPublicModelHubInfo",()=>A,"getRemainingUsers",()=>op,"getResolvedGuardrails",()=>ro,"getRouterSettingsCall",()=>t$,"getSSOSettings",()=>ou,"getTeamPermissionsCall",()=>rU,"getToolUsageLogs",()=>oU,"getUISettings",()=>tM,"getUiConfig",()=>B,"getUiSettings",()=>oP,"handleError",()=>F,"individualModelHealthCheckCall",()=>tI,"invitationCreateCall",()=>Y,"keyAliasesCall",()=>e7,"keyCreateCall",()=>ee,"keyCreateForAgentCall",()=>et,"keyCreateServiceAccountCall",()=>Q,"keyDeleteCall",()=>eo,"keyInfoCall",()=>e2,"keyInfoV1Call",()=>e6,"keyListCall",()=>e3,"keyUpdateCall",()=>ta,"latestHealthChecksCall",()=>tN,"listGuardrailSubmissions",()=>tH,"listMCPTools",()=>rB,"listMCPUserCredentials",()=>oQ,"listPolicyVersions",()=>t6,"loginCall",()=>o_,"makeAgentsPublicCall",()=>r3,"makeMCPPublicCall",()=>r7,"makeModelGroupPublic",()=>M,"mcpHubPublicServersCall",()=>eR,"modelAvailableCall",()=>eH,"modelCostMap",()=>L,"modelCreateCall",()=>U,"modelDeleteCall",()=>q,"modelHubCall",()=>eM,"modelHubPublicModelsCall",()=>eP,"modelInfoCall",()=>e_,"modelInfoV1Call",()=>eI,"modelPatchUpdateCall",()=>tl,"organizationCreateCall",()=>eh,"organizationDailyActivityCall",()=>ex,"organizationDeleteCall",()=>ev,"organizationInfoCall",()=>em,"organizationListCall",()=>ep,"organizationMemberAddCall",()=>tf,"organizationMemberDeleteCall",()=>tp,"organizationMemberUpdateCall",()=>tm,"organizationUpdateCall",()=>eg,"patchAgentCall",()=>oa,"perUserAnalyticsCall",()=>oT,"proxyBaseUrl",()=>E,"ragIngestCall",()=>r0,"regenerateKeyCall",()=>eO,"registerClaudeCodePlugin",()=>oA,"registerMCPServer",()=>rj,"registerMcpOAuthClient",()=>ob,"rejectGuardrailSubmission",()=>tV,"rejectMCPServer",()=>rF,"reloadModelCostMap",()=>H,"resetEmailEventSettings",()=>r4,"resolvePoliciesCall",()=>rn,"scheduleModelCostMapReload",()=>D,"searchToolQueryCall",()=>ox,"serverRootPath",()=>$,"serviceHealthCheck",()=>tv,"sessionSpendLogsCall",()=>rJ,"setCallbacksCall",()=>t_,"setGlobalLitellmHeaderName",()=>N,"storeMCPOAuthUserCredential",()=>oX,"suggestPolicyTemplates",()=>tZ,"switchToWorkerUrl",()=>k,"tagCreateCall",()=>rz,"tagDailyActivityCall",()=>e$,"tagDauCall",()=>oE,"tagDeleteCall",()=>rV,"tagDistinctCall",()=>oj,"tagInfoCall",()=>rH,"tagListCall",()=>rD,"tagMauCall",()=>ok,"tagUpdateCall",()=>rL,"tagWauCall",()=>oS,"tagsSpendLogsCall",()=>eV,"teamBulkMemberAddCall",()=>tc,"teamCreateCall",()=>e8,"teamDailyActivityCall",()=>eC,"teamDeleteCall",()=>ea,"teamInfoCall",()=>ec,"teamListCall",()=>ed,"teamMemberAddCall",()=>ts,"teamMemberDeleteCall",()=>td,"teamMemberUpdateCall",()=>tu,"teamPermissionsUpdateCall",()=>rq,"teamSpendLogsCall",()=>eD,"teamUpdateCall",()=>ti,"testCacheConnectionCall",()=>tx,"testConnectionRequest",()=>e4,"testCustomCodeGuardrail",()=>os,"testMCPSemanticFilter",()=>tz,"testMCPToolsListRequest",()=>ov,"testPipelineCall",()=>rr,"testPoliciesAndGuardrails",()=>tJ,"testPolicyTemplate",()=>tQ,"testSearchToolConnection",()=>rM,"transformRequestCall",()=>ey,"uiAuditLogsCall",()=>of,"uiSpendLogDetailsCall",()=>rh,"uiSpendLogsCall",()=>eq,"updateCacheSettingsCall",()=>tE,"updateConfigFieldSetting",()=>tO,"updateDefaultTeamSettings",()=>rG,"updateEmailEventSettings",()=>r2,"updateGuardrailCall",()=>oi,"updateInternalUserSettings",()=>rv,"updateMCPSemanticFilterSettings",()=>tA,"updateMCPServer",()=>rS,"updatePassThroughEndpoint",()=>oh,"updatePolicyCall",()=>t4,"updatePolicyVersionStatus",()=>t7,"updatePromptCall",()=>ru,"updateSSOSettings",()=>od,"updateSearchTool",()=>rP,"updateToolPolicy",()=>oJ,"updateUiSettings",()=>oN,"updateUsefulLinksCall",()=>eL,"usageAiChatStream",()=>t1,"userAgentSummaryCall",()=>oO,"userBulkUpdateUserCall",()=>tg,"userCreateCall",()=>er,"userDailyActivityAggregatedCall",()=>e5,"userDailyActivityCall",()=>ew,"userDeleteCall",()=>en,"userFilterUICall",()=>eU,"userGetInfoV2",()=>el,"userInfoCall",()=>es,"userListCall",()=>ei,"userUpdateUserCall",()=>th,"v2TeamListCall",()=>eu,"validateBlockedWordsFile",()=>oc,"vectorStoreCreateCall",()=>rK,"vectorStoreDeleteCall",()=>rY,"vectorStoreInfoCall",()=>rZ,"vectorStoreListCall",()=>rX,"vectorStoreSearchCall",()=>oC,"vectorStoreUpdateCall",()=>rQ],764205),e.i(247167);var t=e.i(888259),r=e.i(268004);e.s(["default",()=>g,"jsonFields",()=>m],82946);var o=e.i(843476),n=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);let f=e=>e?e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):e;function p(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,f,"truncateString",()=>p],122550);let m=["metadata","config","enforced_params","aliases"],h=(e,t)=>m.includes(e)||"json"===t.format,g=({schemaComponent:e,excludedFields:t=[],form:r,overrideLabels:p={},overrideTooltips:m={},customValidation:g={},defaultValues:v={}})=>{let[y,b]=(0,n.useState)(null),[w,$]=(0,n.useState)(null);return((0,n.useEffect)(()=>{(async()=>{try{let o=(await z()).components.schemas[e];if(!o)throw Error(`Schema component "${e}" not found`);b(o);let n={};Object.keys(o.properties).filter(e=>!t.includes(e)&&void 0!==v[e]).forEach(e=>{n[e]=v[e]}),r.setFieldsValue(n)}catch(e){console.error("Schema fetch error:",e),$(e instanceof Error?e.message:"Failed to fetch schema")}})()},[e,r,t]),w)?(0,o.jsxs)("div",{className:"text-red-500",children:["Error: ",w]}):y?.properties?(0,o.jsx)("div",{children:Object.entries(y.properties).filter(([e])=>!t.includes(e)).map(([e,t])=>{let r,n,b,w,$,C,x,E;return n=(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||f(e),$=m[e]||t.description,C=[],b&&C.push({required:!0,message:`${w} is required`}),g[e]&&C.push({validator:g[e]}),h(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")}}),x=$?(0,o.jsxs)("span",{children:[w," ",(0,o.jsx)(d.Tooltip,{title:$,children:(0,o.jsx)(u.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}):w,r=h(e,t)?(0,o.jsx)(i.Input.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,o.jsx)(s.Select,{children:t.enum.map(e=>(0,o.jsx)(s.Select.Option,{value:e,children:e},e))}):"number"===n||"integer"===n?(0,o.jsx)(l.InputNumber,{style:{width:"100%"},precision:"integer"===n?0:void 0}):"duration"===e?(0,o.jsx)(c.TextInput,{placeholder:"eg: 30s, 30h, 30d"}):(0,o.jsx)(c.TextInput,{placeholder:$||""}),(0,o.jsx)(a.Form.Item,{label:x,name:e,className:"mt-8",rules:C,initialValue:v[e],help:(0,o.jsx)("div",{className:"text-xs text-gray-500",children:(E=({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"})[n]||"Text input",h(e,t)?`${E} Must be valid JSON format`:t.enum?`Select from available options -Allowed values: ${t.enum.join(", ")}`:E)}),children:r},e)})}):null};var v=e.i(727749);let y=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`},b=async e=>{try{let t=E?`${E}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},w=async e=>{try{let t=E?`${E}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},$="/",C="litellm_worker_url",x=window.localStorage.getItem(C),E=(()=>{if(!x)return null;try{let e=new URL(x);if("http:"===e.protocol||"https:"===e.protocol)return x}catch{}return window.localStorage.removeItem(C),null})()??null;console.log=function(){};let S=()=>{if(E)return E;let e=window.location;return e?.origin??""};function k(e){(!e||function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))&&(e?window.localStorage.setItem(C,e):window.localStorage.removeItem(C),E=e??null)}let j="POST",O="DELETE",T=0,F=async e=>{let t=Date.now();if(t-T>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){v.default.info("UI Session Expired. Logging out."),T=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}T=t}else console.log("Error suppressed to prevent spam:",e)},_=async()=>{let e=E?`${E}/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()},I=async()=>{let e=E?`${E}/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()},P="Authorization";function N(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),P=e}function R(){return P}let M=async(e,t)=>{let r=E?`${E}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},B=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)=>{if(window.localStorage.getItem(C))return;let r=window.location,o=r?.origin??null,n=t||o;if(console.log("proxyBaseUrl:",E),console.log("serverRootPath:",e),!n)return console.log("Updated proxyBaseUrl:",E=E??null);e.length>0&&!n.endsWith(e)&&"/"!=e&&(n+=e),console.log("Updated proxyBaseUrl:",E=n)})(t.server_root_path,t.proxy_base_url),t},A=async()=>{let e=E?`${E}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},z=async()=>{let e=E?`${E}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},L=async()=>{try{let e=E?`${E}/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}},H=async e=>{try{let t=E?`${E}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to reload model cost map:",e),e}},D=async(e,t)=>{try{let r=E?`${E}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await o.json();return console.log(`Schedule model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},V=async e=>{try{let t=E?`${E}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Cancel model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},W=async e=>{try{let t=E?`${E}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let o=await r.json();return console.log("Model cost map source info:",o),o}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},G=async e=>{try{let t=E?`${E}/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:{[P]:`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 o=await r.json();return console.log("Model cost map reload status:",o),o}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},U=async(e,r)=>{try{let o=E?`${E}/model/new`:"/model/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),t.default.destroy(),v.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=E?`${E}/model/delete`:"/model/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=E?`${E}/budget/delete`:"/budget/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/new`:"/budget/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/update`:"/budget/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Y=async(e,t)=>{try{let r=E?`${E}/invitation/new`:"/invitation/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Z=async e=>{try{let t=E?`${E}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Q=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)),m))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=E?`${E}/key/service-account/generate`:"/key/service-account/generate",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ee=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)),m))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 o=E?`${E}/key/generate`:"/key/generate",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t,r,o,n,a)=>{let i=E?`${E}/key/generate`:"/key/generate",l={agent_id:t,key_alias:r,models:o.length>0?o:[]};a&&(l.team_id=a),n&&Object.keys(n).length>0&&(l.metadata=n);let s=await fetch(i,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw F(await s.text()),Error("Failed to create key for agent");return s.json()},er=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 o=E?`${E}/user/new`:"/user/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eo=async(e,t)=>{try{let r=E?`${E}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},en=async(e,t)=>{try{let r=E?`${E}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete user(s):",e),e}},ea=async(e,t)=>{try{let r=E?`${E}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},ei=async(e,t=null,r=null,o=null,n=null,a=null,i=null,l=null,s=null,c=null,u=null)=>{try{let d=E?`${E}/user/list`:"/user/list";console.log("in userListCall");let f=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");f.append("user_ids",e)}r&&f.append("page",r.toString()),o&&f.append("page_size",o.toString()),n&&f.append("user_email",n),a&&f.append("role",a),i&&f.append("team",i),l&&f.append("sso_user_ids",l),s&&f.append("sort_by",s),c&&f.append("sort_order",c),u&&u.length>0&&f.append("organization_ids",u.join(","));let p=f.toString();p&&(d+=`?${p}`);let m=await fetch(d,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!m.ok){let e=await m.json(),t=oF(e);throw F(t),Error(t)}let h=await m.json();return console.log("/user/list API Response:",h),h}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t)=>{try{let r=E?`${E}/v2/user/info`:"/v2/user/info";t&&(r+=`?user_id=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch user info v2:",e),e}},es=async(e,t,r,o=!1,n,a,i=!1)=>{console.log(`userInfoCall: ${t}, ${r}, ${o}, ${n}, ${a}, ${i}`);try{let l;if(o){l=E?`${E}/user/list`:"/user/list";let e=new URLSearchParams;null!=n&&e.append("page",n.toString()),null!=a&&e.append("page_size",a.toString()),l+=`?${e.toString()}`}else l=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ec=async(e,t)=>{try{let r=E?`${E}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t,r=null,o=null,n=null,a=1,i=10,l=null,s=null)=>{try{let a=E?`${E}/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()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ed=async(e,t,r=null,o=null,n=null)=>{try{let a=E?`${E}/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()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ef=async e=>{try{let t=E?`${E}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("/team/available_teams API Response:",o),o}catch(e){throw e}},ep=async(e,t=null,r=null)=>{try{let o=E?`${E}/organization/list`:"/organization/list",n=new URLSearchParams;t&&n.append("org_id",t.toString()),r&&n.append("org_alias",r.toString());let a=n.toString();a&&(o+=`?${a}`);let i=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{let r=E?`${E}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eh=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=E?`${E}/organization/new`:"/organization/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eg=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=E?`${E}/organization/update`:"/organization/update",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ev=async(e,t)=>{try{let r=E?`${E}/organization/delete`:"/organization/delete",o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!o.ok){let e=await o.text();throw F(e),Error(`Error deleting organization: ${e}`)}return await o.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},ey=async(e,t)=>{try{let r=E?`${E}/utils/transform_request`:"/utils/transform_request",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eb=async({accessToken:e,endpoint:t,startTime:r,endTime:o,page:n=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=E?`${E}${i}`:i,(s=new URLSearchParams).append("start_date",y(r)),s.append("end_date",y(o)),s.append("page_size","1000"),s.append("page",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=oF(e);throw F(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},ew=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{user_id:n}}),e$=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{tags:n}}),eC=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{team_ids:n,exclude_team_ids:"litellm-dashboard"}}),ex=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{organization_ids:n}}),eE=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{end_user_ids:n}}),eS=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{agent_ids:n}}),ek=async e=>{try{let t=E?`${E}/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=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ej=async(e,t,r,o)=>{let n=E?`${E}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:o})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},eO=async(e,t,r)=>{try{let o=E?`${E}/key/${t}/regenerate`:`/key/${t}/regenerate`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},eT=!1,eF=null,e_=async(e,t,r,o=1,n=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,o,n,a,i,l,s,c);let u=E?`${E}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",o.toString()),d.append("size",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${eT}`,eT||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),v.default.info(e),eT=!0,eF&&clearTimeout(eF),eF=setTimeout(()=>{eT=!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}},eI=async(e,t)=>{try{let r=E?`${E}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("modelInfoV1Call:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eP=async()=>{let e=E?`${E}/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}`),[])},eN=async()=>{let e=E?`${E}/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}`),[])},eR=async()=>{let e=E?`${E}/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}`),[])},eM=async e=>{try{let t=E?`${E}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("modelHubCall:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},eB=async e=>{try{let t=E?`${E}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("getAllowedIPs:",o),o.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eA=async(e,t)=>{try{let r=E?`${E}/add/allowed_ip`:"/add/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("addAllowedIP:",n),n}catch(e){throw console.error("Failed to add allowed IP:",e),e}},ez=async(e,t)=>{try{let r=E?`${E}/delete/allowed_ip`:"/delete/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("deleteAllowedIP:",n),n}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eL=async(e,t)=>{try{let r=E?`${E}/model_hub/update_useful_links`:"/model_hub/update_useful_links",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eH=async(e,t,r,o=!1,n=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",P);try{let t=E?`${E}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===o&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),n&&r.append("team_id",n.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eD=async e=>{try{let t=E?`${E}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eV=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/tags`:"/global/spend/tags";t&&r&&(n=`${n}?start_date=${t}&end_date=${r}`),o&&(n+=`&tags=${o.join(",")}`),console.log("in tagsSpendLogsCall:",n);let a=await fetch(`${n}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eG=async e=>{try{let t=E?`${E}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to fetch end users:",e),e}},eU=async(e,t)=>{try{let r=E?`${E}/user/filter/ui`:"/user/filter/ui",o=new URLSearchParams;t.get("user_email")&&o.append("user_email",t.get("user_email")),t.get("user_id")&&o.append("user_id",t.get("user_id")),t.get("team_id")&&o.append("team_id",t.get("team_id"));let n=o.toString(),a=n?`${r}?${n}`:r,i=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:o=1,page_size:n=50,params:a={}})=>{try{let i=E?`${E}/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",o.toString()),l.append("page_size",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=oF(e);throw F(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=E?`${E}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=E?`${E}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:o}):JSON.stringify({startTime:r,endTime:o});let i={method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(n,i);if(!l.ok){let e=await l.json(),t=oF(e);throw F(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,o)=>{try{let n=E?`${E}/global/spend/provider`:"/global/spend/provider";r&&o&&(n+=`?start_date=${r}&end_date=${o}`),t&&(n+=`&api_key=${t}`);let a={method:"GET",headers:{[P]:`Bearer ${e}`}},i=await fetch(n,a);if(!i.ok){let e=await i.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity`:"/global/activity";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity/model`:"/global/activity/model";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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=>{try{let t=E?`${E}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e2=async(e,t)=>{try{let r=E?`${E}/v2/key/info`:"/v2/key/info",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!o.ok){let e=await o.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw F(e),Error("Network response was not ok")}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e4=async(e,t,r,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let n=E?`${E}/health/test_connection`:"/health/test_connection",a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:o})}),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}},e6=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=E?`${E}/key/info`:"/key/info";r=`${r}?key=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",o),!o.ok){let e=await o.text();F(e),v.default.fromBackend("Failed to fetch key info - "+e)}let n=await o.json();return console.log("data",n),n}catch(e){throw console.error("Failed to fetch key info:",e),e}},e3=async(e,t,r,o,n,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=E?`${E}/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()),o&&p.append("key_alias",o),a&&p.append("key_hash",a),n&&p.append("user_id",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=oF(e);throw F(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}},e7=async(e,t=1,r=50,o)=>{try{let n=new URLSearchParams(Object.entries({page:String(t),size:String(r),...o?{search:o}:{}})),a=E?`${E}/key/aliases`:"/key/aliases";a=`${a}?${n}`;let i=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(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}},e5=async(e,t,r,o=null)=>{try{let n=E?`${E}/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"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),o&&a.append("user_id",o);let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},e9=async e=>{try{let t=E?`${E}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("response from user/available_role",o),o}catch(e){throw e}},e8=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=E?`${E}/team/new`:"/team/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},te=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=E?`${E}/credentials`:"/credentials",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=E?`${E}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("/credentials API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tr=async(e,t,r)=>{try{let o=E?`${E}/credentials`:"/credentials";t?o+=`/by_name/${t}`:r&&(o+=`/by_model/${r}`),console.log("in credentialListCall");let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},to=async(e,t)=>{try{let r=E?`${E}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},tn=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 o=E?`${E}/credentials/${t}`:`/credentials/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},ta=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=E?`${E}/key/update`:"/key/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("Update key Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=E?`${E}/team/update`:"/team/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),v.default.fromBackend("Failed to update team settings: "+e),Error(e)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to update team:",e),e}},tl=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let o=E?`${E}/model/${r}/update`:`/model/${r}/update`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await n.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},ts=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_add`:"/team/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!n.ok){let e=await n.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",o=Error(r);throw o.raw=t,o}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t,r,o,n)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:o});let a=E?`${E}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};n?i.all_users=!0:i.members=r,null!=o&&(i.max_budget_in_team=o);let l=await fetch(a,{method:"POST",headers:{[P]:`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",o=Error(r);throw o.raw=t,o}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}},tu=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 o=E?`${E}/team/member_update`:"/team/member_update",n={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(n.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(n.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(n.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(n.rpm_limit=r.rpm_limit),console.log("Final request body:",n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(n)});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",o=Error(r);throw o.raw=t,o}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},td=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_delete`:"/team/member_delete",n=await fetch(o,{method:"POST",headers:{[P]:`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(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/organization/member_add`:"/organization/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let o=E?`${E}/organization/member_delete`:"/organization/member_delete",n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},tm=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let o=E?`${E}/organization/member_update`:"/organization/member_update",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let o=E?`${E}/user/update`:"/user/update",n={...t};null!==r&&(n.user_role=r),n=JSON.stringify(n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!a.ok){let e=await a.json(),t=oF(e);throw F(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}},tg=async(e,t,r,o=!1)=>{try{let n;console.log("Form Values in userUpdateUserCall:",t);let a=E?`${E}/user/bulk_update`:"/user/bulk_update";if(o)n=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let o of r)e.push({user_id:o,...t});n=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!i.ok){let e=await i.json(),t=oF(e);throw F(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}},tv=async(e,t)=>{try{let r=E?`${E}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},ty=async e=>{try{let t=E?`${E}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tb=async(e,t,r)=>{try{let t=E?`${E}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tw=async e=>{try{let t=E?`${E}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t$=async e=>{try{let t=E?`${E}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tC=async e=>{try{let t=E?`${E}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tx=async(e,t)=>{try{let r=E?`${E}/cache/settings/test`:"/cache/settings/test",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tE=async(e,t)=>{try{let r=E?`${E}/cache/settings`:"/cache/settings",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tS=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tk=async(e,t)=>{try{let r=E?`${E}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tj=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tO=async(e,t,r)=>{try{let o=E?`${E}/config/field/update`:"/config/field/update",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return v.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tT=async(e,t)=>{try{let r=E?`${E}/config/field/delete`:"/config/field/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return v.default.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async(e,t)=>{try{let r=E?`${E}/config/update`:"/config/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tI=async(e,t)=>{try{let r=E?`${E}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tP=async e=>{try{let t=E?`${E}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tN=async e=>{try{let t=E?`${E}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tR=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",E);let t=E?`${E}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async e=>{try{let t=E?`${E}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(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}},tB=async e=>{try{let t=E?`${E}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tA=async(e,t)=>{try{let r=E?`${E}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tz=async(e,t,r)=>{try{let o=E?`${E}/v1/responses`:"/v1/responses",n=await fetch(o,{method:"POST",headers:{[P]:`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=n.headers.get("x-litellm-semantic-filter"),i=n.headers.get("x-litellm-semantic-filter-tools");if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return{data:await n.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},tL=async e=>{try{let t=E?`${E}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`v2 guardrails/list returned ${r.status}`);return await r.json()}catch(t){console.log("v2/guardrails/list failed, falling back to v1:",t);try{let t=E?`${E}/guardrails/list`:"/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}}},tH=async(e,t)=>{let r=E?`${E}/guardrails/submissions`:"/guardrails/submissions",o=new URLSearchParams;t?.status&&o.set("status",t.status),t?.team_id&&o.set("team_id",t.team_id),t?.team_guardrail!==void 0&&o.set("team_guardrail",String(t.team_guardrail)),t?.search&&o.set("search",t.search);let n=o.toString()?`${r}?${o.toString()}`:r,a=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=oF(await a.json().catch(()=>({})));throw F(e),Error(e)}return a.json()},tD=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/approve`:`/guardrails/submissions/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oF(await o.json().catch(()=>({})));throw F(e),Error(e)}return o.json()},tV=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/reject`:`/guardrails/submissions/${encodeURIComponent(t)}/reject`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oF(await o.json().catch(()=>({})));throw F(e),Error(e)}return o.json()},tW=async(e,t,r)=>{try{let o=E?`${E}/guardrails/usage/overview`:"/guardrails/usage/overview",n=new URLSearchParams;t&&n.append("start_date",t),r&&n.append("end_date",r),n.toString()&&(o+=`?${n.toString()}`);let a=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(oF(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},tG=async(e,t,r,o)=>{try{let n=E?`${E}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),o&&a.append("end_date",o),a.toString()&&(n+=`?${a.toString()}`);let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(oF(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},tU=async(e,t)=>{try{let r=E?`${E}/guardrails/usage/logs`:"/guardrails/usage/logs",o=new URLSearchParams;t.guardrailId&&o.append("guardrail_id",t.guardrailId),t.policyId&&o.append("policy_id",t.policyId),null!=t.page&&o.append("page",String(t.page)),null!=t.pageSize&&o.append("page_size",String(t.pageSize)),t.action&&o.append("action",t.action),t.startDate&&o.append("start_date",t.startDate),t.endDate&&o.append("end_date",t.endDate),o.toString()&&(r+=`?${o.toString()}`);let n=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json();throw Error(oF(e))}return n.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},tq=async e=>{try{let t=E?`${E}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},tJ=async(e,t,r)=>{try{let o=E?`${E}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",n=await fetch(o,{method:"POST",signal:r,headers:{[P]:`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(!n.ok){let e=await n.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 F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},tK=async(e,t)=>{try{let r=E?`${E}/policy/info/${t}`:`/policy/info/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},tX=async e=>{try{let t=E?`${E}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},tY=async(e,t,r,o,n)=>{try{let a=E?`${E}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};o&&(i.model=o),n&&(i.competitors=n);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},tZ=async(e,t,r,o)=>{try{let n=E?`${E}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:o})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},tQ=async(e,t,r)=>{try{let o=E?`${E}/policy/templates/test`:"/policy/templates/test",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},t0=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:o};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=oF(await d.json());throw F(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?n(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},t1=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=oF(await u.json());throw F(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?o(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?n():"error"===t.type&&a?.(t.message)}catch{}}},t2=async(e,t)=>{try{let r=E?`${E}/policies`:"/policies",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy:",e),e}},t4=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}`:`/policies/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy:",e),e}},t6=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},t3=async(e,t,r)=>{try{let o=encodeURIComponent(t),n=E?`${E}/policies/name/${o}/versions`:`/policies/name/${o}/versions`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},t7=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}/status`:`/policies/${t}/status`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},t5=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},t9=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},t8=async e=>{try{let t=E?`${E}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},re=async(e,t)=>{try{let r=E?`${E}/policies/attachments`:"/policies/attachments",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rt=async(e,t)=>{try{let r=E?`${E}/policies/attachments/${t}`:`/policies/attachments/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rr=async(e,t,r)=>{try{let o=E?`${E}/policies/test-pipeline`:"/policies/test-pipeline",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},ro=async(e,t)=>{try{let r=E?`${E}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rn=async(e,t)=>{try{let r=E?`${E}/policies/resolve`:"/policies/resolve",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},ra=async(e,t)=>{try{let r=E?`${E}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ri=async e=>{try{let t=E?`${E}/prompts/list`:"/prompts/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rl=async(e,t)=>{try{let r=E?`${E}/prompts/${t}/info`:`/prompts/${t}/info`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rs=async(e,t)=>{try{let r=E?`${E}/prompts/${t}/versions`:`/prompts/${t}/versions`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw 404!==o.status&&F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},rc=async(e,t)=>{try{let r=E?`${E}/prompts`:"/prompts",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},ru=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}`:`/prompts/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rd=async(e,t)=>{try{let r=E?`${E}/prompts/${t}`:`/prompts/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rf=async(e,t)=>{try{let r=new FormData;r.append("file",t);let o=E?`${E}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`},body:r});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rp=async(e,t)=>{try{let r=E?`${E}/v1/agents`:"/v1/agents",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Create agent response:",n),n}catch(e){throw console.error("Failed to create agent:",e),e}},rm=async(e,t)=>{try{let r=E?`${E}/guardrails`:"/guardrails",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Create guardrail response:",n),n}catch(e){throw console.error("Failed to create guardrail:",e),e}},rh=async(e,t,r)=>{try{let o=E?`${E}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",o);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rg=async e=>{try{let t=E?`${E}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched SSO settings:",o),o}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rv=async(e,t)=>{try{let r=E?`${E}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Updated internal user settings:",n),v.default.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},ry=async e=>{try{let t=E?`${E}/v1/mcp/openapi-registry`:"/v1/mcp/openapi-registry",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json();throw Error(oF(e))}return await r.json()}catch(e){throw console.error("Failed to fetch OpenAPI registry:",e),e}},rb=async e=>{try{let t=E?`${E}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rw=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server";if(t){let e=new URLSearchParams;e.append("team_id",t),r=`${r}?${e.toString()}`}console.log("Fetching MCP servers from:",r);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},r$=async(e,t)=>{try{let r=E?`${E}/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 o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Fetched MCP server health:",n),n}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rC=async e=>{try{let t=E?`${E}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched MCP access groups:",o),o.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rx=async e=>{try{let t=E?`${E}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rE=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},rS=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rk=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rj=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/server/register",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to register MCP server:",e),e}},rO=async e=>{try{let t=(E?`${E}`:"")+"/v1/mcp/server/submissions",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return r.json()}catch(e){throw console.error("Failed to fetch MCP submissions:",e),e}},rT=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to approve MCP server:",e),e}},rF=async(e,t,r)=>{try{let o=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/reject`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({review_notes:r??null})});if(!n.ok){let e=await n.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to reject MCP server:",e),e}},r_=async e=>{try{let t=E?`${E}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched search tools:",o),o}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rI=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=E?`${E}/search_tools`:"/search_tools",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Created search tool:",n),n}catch(e){throw console.error("Failed to create search tool:",e),e}},rP=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let o=E?`${E}/search_tools/${t}`:`/search_tools/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rN=async(e,t)=>{try{let r=(E?`${E}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Deleted search tool:",n),n}catch(e){throw console.error("Failed to delete search tool:",e),e}},rR=async e=>{try{let t=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched available search providers:",o),o}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rM=async(e,t)=>{try{let r=E?`${E}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Test connection response:",n),n}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rB=async(e,t,r)=>{try{let o=E?`${E}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",o);let n={[P]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(o,{method:"GET",headers:n}),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}}},rA=async(e,t,r,o,n)=>{try{let a=E?`${E}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",o,"for server:",t);let i={[P]:`Bearer ${e}`,"Content-Type":"application/json",...n?.customHeaders||{}},l={server_id:t,name:r,arguments:o};n?.guardrails&&n.guardrails.length>0&&(l.litellm_metadata={guardrails:n.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 o=JSON.parse(r);o.detail?"string"==typeof o.detail?e=o.detail:"object"==typeof o.detail&&(e=o.detail.message||o.detail.error||"An error occurred",t=o.detail):e=o.message||o.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let o=Error(e);throw o.status=s.status,o.statusText=s.statusText,o.details=t,F(e),o}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}},rz=async(e,t)=>{try{let r=E?`${E}/tag/new`:"/tag/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error creating tag:",e),e}},rL=async(e,t)=>{try{let r=E?`${E}/tag/update`:"/tag/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error updating tag:",e),e}},rH=async(e,t)=>{try{let r=E?`${E}/tag/info`:"/tag/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!o.ok){let e=await o.text();return await F(e),{}}return await o.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rD=async e=>{try{let t=E?`${E}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await F(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rV=async(e,t)=>{try{let r=E?`${E}/tag/delete`:"/tag/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rW=async e=>{try{let t=E?`${E}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched default team settings:",o),o}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},rG=async(e,t)=>{try{let r=E?`${E}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Updated default team settings:",n),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},rU=async(e,t)=>{try{let r=E?`${E}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,o=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Team permissions response:",n),n}catch(e){throw console.error("Failed to get team permissions:",e),e}},rq=async(e,t,r)=>{try{let o=E?`${E}/team/permissions_update`:"/team/permissions_update",n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},rJ=async(e,t)=>{try{let r=E?`${E}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},rK=async(e,t)=>{try{let r=E?`${E}/vector_store/new`:"/vector_store/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to create vector store")}return await o.json()}catch(e){throw console.error("Error creating vector store:",e),e}},rX=async(e,t=1,r=100)=>{try{let t=E?`${E}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[P]:`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}},rY=async(e,t)=>{try{let r=E?`${E}/vector_store/delete`:"/vector_store/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to delete vector store")}return await o.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},rZ=async(e,t)=>{try{let r=E?`${E}/vector_store/info`:"/vector_store/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to get vector store info")}return await o.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},rQ=async(e,t)=>{try{let r=E?`${E}/vector_store/update`:"/vector_store/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to update vector store")}return await o.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r0=async(e,t,r,o,n,a,i)=>{try{let l=E?`${E}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...o&&{vector_store_id:o},...i&&i}}};(n||a)&&(c.ingest_options.litellm_vector_store_params={},n&&(c.ingest_options.litellm_vector_store_params.vector_store_name=n),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:{[P]:`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}},r1=async e=>{try{let t=E?`${E}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get email event settings")}let o=await r.json();return console.log("Email event settings response:",o),o}catch(e){throw console.error("Failed to get email event settings:",e),e}},r2=async(e,t)=>{try{let r=E?`${E}/email/event_settings`:"/email/event_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to update email event settings")}let n=await o.json();return console.log("Update email event settings response:",n),n}catch(e){throw console.error("Failed to update email event settings:",e),e}},r4=async e=>{try{let t=E?`${E}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to reset email event settings")}let o=await r.json();return console.log("Reset email event settings response:",o),o}catch(e){throw console.error("Failed to reset email event settings:",e),e}},r6=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Delete agent response:",n),n}catch(e){throw console.error("Failed to delete agent:",e),e}},r3=async(e,t)=>{try{let r=E?`${E}/v1/agents/make_public`:"/v1/agents/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r7=async(e,t)=>{try{let r=E?`${E}/v1/mcp/make_public`:"/v1/mcp/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r5=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Delete guardrail response:",n),n}catch(e){throw console.error("Failed to delete guardrail:",e),e}},r9=async e=>{try{let t=E?`${E}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get guardrail UI settings")}let o=await r.json();return console.log("Guardrail UI settings response:",o),o}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},r8=async e=>{try{let t=E?`${E}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get guardrail provider specific parameters")}let o=await r.json();return console.log("Guardrail provider specific params response:",o),o}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},oe=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${o}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw console.error(`Failed to get category YAML. Status: ${n.status}, Error:`,e),F(e),Error(`Failed to get category YAML: ${n.status} ${e}`)}let a=await n.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},ot=async e=>{try{let t=E?`${E}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[P]:`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),F(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}},or=async(e,t=!1)=>{try{let r=t?"?health_check=true":"",o=E?`${E}/v1/agents${r}`:`/v1/agents${r}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to get agents list")}let a=await n.json();return console.log("Agents list response:",a),{agents:a}}catch(e){throw console.error("Failed to get agents list:",e),e}},oo=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to get agent info")}let n=await o.json();return console.log("Agent info response:",n),n}catch(e){throw console.error("Failed to get agent info:",e),e}},on=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}/info`:`/guardrails/${t}/info`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to get guardrail info")}let n=await o.json();return console.log("Guardrail info response:",n),n}catch(e){throw console.error("Failed to get guardrail info:",e),e}},oa=async(e,t,r)=>{try{let o=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to patch agent")}let a=await n.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},oi=async(e,t,r)=>{try{let o=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to update guardrail")}let a=await n.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ol=async(e,t,r,o,n)=>{try{let a=E?`${E}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};o&&(i.language=o),n&&n.length>0&&(i.entities=n);let l=await fetch(a,{method:"POST",headers:{[P]:`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 F(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}},os=async(e,t)=>{try{let r=E?`${E}/guardrails/test_custom_code`:"/guardrails/test_custom_code",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.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 F(e),Error(t)}let n=await o.json();return console.log("Test custom code guardrail response:",n),n}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},oc=async(e,t)=>{try{let r=E?`${E}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to validate blocked words file")}let n=await o.json();return console.log("Validate blocked words file response:",n),n}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},ou=async e=>{try{let t=E?`${E}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched SSO configuration:",o),o}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},od=async(e,t)=>{try{let r=E?`${E}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:oF(e);F(r);let n=Error(r);throw e?.detail!==void 0&&(n.detail=e.detail),n.rawError=e,n}let n=await o.json();return console.log("Updated SSO configuration:",n),n}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},of=async({accessToken:e,page:t=1,page_size:r=50,params:o={}})=>{try{let n=E?`${E}/audit`:"/audit",a=new URLSearchParams;for(let[e,n]of(a.append("page",t.toString()),a.append("page_size",r.toString()),Object.entries(o)))null!=n&&""!==n&&a.append(e,String(n));n+=`?${a.toString()}`;let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},op=async e=>{try{let t=E?`${E}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw F(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},om=async e=>{try{let t=E?`${E}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw F(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},oh=async(e,t,r)=>{try{let o=E?`${E}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return v.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},og=async(e,t)=>{try{let r=E?`${E}/config/callback/delete`:"/config/callback/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},ov=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=E?`${E}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",n={"Content-Type":"application/json"};e&&(n["x-litellm-api-key"]=e),r?n.Authorization=`Bearer ${r}`:e&&(n[P]=`Bearer ${e}`);let a=await fetch(o,{method:"POST",headers:n,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}},oy=async(e,t)=>{let r=E?`${E}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await o.json();if(!o.ok)throw Error(oF(n)||n?.error||"Failed to cache MCP server");return n},ob=async(e,t,r)=>{let o=S(),n=encodeURIComponent(t.trim()),a=`${o}/v1/mcp/server/oauth/${n}/register`,i=await fetch(a,{method:"POST",headers:{[P]:`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(oF(l)||l?.detail||"Failed to register OAuth client");return l},ow=({serverId:e,clientId:t,redirectUri:r,state:o,codeChallenge:n,scope:a})=>{let i=S(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:o,response_type:"code",code_challenge:n,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()}`},o$=async({serverId:e,code:t,clientId:r,clientSecret:o,codeVerifier:n,redirectUri:a})=>{let i=S(),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),o&&o.trim().length>0&&c.set("client_secret",o),c.set("code_verifier",n),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(oF(d)||d?.detail||"OAuth token exchange failed");return d},oC=async(e,t,r)=>{try{let o=`${S()}/v1/vector_stores/${t}/search`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!n.ok){let e=await n.text();return await F(e),null}return await n.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},ox=async(e,t,r,o)=>{try{let n=`${S()}/v1/search/${t}`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:o||5})});if(!a.ok){let e=await a.text();return await F(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},oE=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},oS=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},ok=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},oj=async e=>{try{let t=E?`${E}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},oO=async(e,t,r,o)=>{try{let n=E?`${E}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},oT=async(e,t=1,r=50,o)=>{try{let n=E?`${E}/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()),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(n+=`?${i}`);let l=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},oF=e=>{let t=e?.detail,r=Array.isArray(t)?t.map(e=>e?.msg||JSON.stringify(e)).join("; "):"string"==typeof t?t:void 0;return e?.error&&(e.error.message||("string"==typeof e.error?e.error:void 0))||e?.message||r||JSON.stringify(e)},o_=async(e,t,r)=>{let o=S(),n=r?"/v3/login":"/v2/login",a=o?`${o}${n}`:n,i=JSON.stringify({username:e,password:t}),l=await fetch(a,{method:"POST",body:i,credentials:"include",headers:{"Content-Type":"application/json"}});if(!l.ok)throw Error(oF(await l.json()));let s=await l.json();if(r&&s.code){let e=o?`${o}/v3/login/exchange`:"/v3/login/exchange",t=await fetch(e,{method:"POST",body:JSON.stringify({code:s.code}),credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error(oF(await t.json()));let r=await t.json();return r.token&&(document.cookie=`token=${r.token}; path=/; SameSite=Lax`),r}return s.token&&(document.cookie=`token=${s.token}; path=/; SameSite=Lax`),s},oI=async(e,t)=>{let r=t||S(),o=await fetch(`${r}/v3/login/exchange`,{method:"POST",body:JSON.stringify({code:e}),headers:{"Content-Type":"application/json"}});if(!o.ok)throw Error(oF(await o.json()));let n=await o.json();return n.token&&(document.cookie=`token=${n.token}; path=/; SameSite=Lax`),n.token},oP=async()=>{let e=S(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(oF(await r.json()));return await r.json()},oN=async(e,t)=>{let r=S(),o=r?`${r}/update/ui_settings`:"/update/ui_settings",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(oF(await n.json()));return await n.json()},oR=async()=>{try{let e=S(),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=oF(JSON.parse(e));throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},oM=async(e,t=!1)=>{try{let r=S(),o=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},oB=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},oA=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins`:"/claude-code/plugins",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},oz=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},oL=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},oH=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},oD=async(e,t)=>{let r=E?`${E}/compliance/eu-ai-act`:"/compliance/eu-ai-act",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oV=async(e,t)=>{let r=E?`${E}/compliance/gdpr`:"/compliance/gdpr",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oW=async e=>{let t=E?`${E}/v1/tool/policy/options`:"/v1/tool/policy/options",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return r.json()},oG=async e=>{let t=E?`${E}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},oU=async(e,t,r)=>{let o=encodeURIComponent(t),n=E?`${E}/v1/tool/${o}/logs`:`/v1/tool/${o}/logs`,a=new URLSearchParams;null!=r.page&&a.append("page",String(r.page)),null!=r.pageSize&&a.append("page_size",String(r.pageSize)),r.startDate&&a.append("start_date",r.startDate),r.endDate&&a.append("end_date",r.endDate);let i=a.toString()?`${n}?${a.toString()}`:n,l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok)throw Error(oF(await l.json().catch(()=>({}))));return l.json()},oq=async(e,t)=>{let r=encodeURIComponent(t),o=E?`${E}/v1/tool/${r}/detail`:`/v1/tool/${r}/detail`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok)throw Error(await n.text());return n.json()},oJ=async(e,t,r,o)=>{let n=E?`${E}/v1/tool/policy`:"/v1/tool/policy",a={tool_name:t};null!=r.input_policy&&(a.input_policy=r.input_policy),null!=r.output_policy&&(a.output_policy=r.output_policy),o?.team_id!=null&&(a.team_id=o.team_id||void 0),o?.key_hash!=null&&(a.key_hash=o.key_hash||void 0),o?.key_alias!=null&&(a.key_alias=o.key_alias||void 0);let i=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw Error(await i.text());return i.json()},oK=async(e,t,r)=>{let o=encodeURIComponent(t),n=new URLSearchParams;null!=r.team_id&&""!==r.team_id&&n.set("team_id",r.team_id),null!=r.key_hash&&""!==r.key_hash&&n.set("key_hash",r.key_hash);let a=n.toString(),i=E?`${E}/v1/tool/${o}/overrides${a?`?${a}`:""}`:`/v1/tool/${o}/overrides${a?`?${a}`:""}`,l=await fetch(i,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!l.ok)throw Error(await l.text());return l.json()},oX=async(e,t,r)=>{let o=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to store OAuth credential")}return n.json()},oY=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to revoke OAuth credential")}return o.json()},oZ=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential/status`:`/v1/mcp/server/${t}/oauth-user-credential/status`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`}});return o.ok?o.json():{server_id:t,has_credential:!1,is_expired:!1}},oQ=async e=>{let t=E?`${E}/v1/mcp/user-credentials`:"/v1/mcp/user-credentials",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});return r.ok?r.json():[]}}]); \ No newline at end of file +Allowed values: ${t.enum.join(", ")}`:E)}),children:r},e)})}):null};var v=e.i(727749);let y=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`},b=async e=>{try{let t=E?`${E}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},w=async e=>{try{let t=E?`${E}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},$="/",C="litellm_worker_url",x=window.localStorage.getItem(C),E=(()=>{if(!x)return null;try{let e=new URL(x);if("http:"===e.protocol||"https:"===e.protocol)return x}catch{}return window.localStorage.removeItem(C),null})()??null;console.log=function(){};let S=()=>{if(E)return E;let e=window.location;return e?.origin??""};function k(e){(!e||function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))&&(e?window.localStorage.setItem(C,e):window.localStorage.removeItem(C),E=e??null)}let j="POST",O="DELETE",T=0,F=async e=>{let t=Date.now();if(t-T>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){v.default.info("UI Session Expired. Logging out."),T=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}T=t}else console.log("Error suppressed to prevent spam:",e)},_=async()=>{let e=E?`${E}/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()},I=async()=>{let e=E?`${E}/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()},P="Authorization";function N(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),P=e}function R(){return P}let M=async(e,t)=>{let r=E?`${E}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},B=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)=>{if(window.localStorage.getItem(C))return;let r=window.location,o=r?.origin??null,n=t||o;if(console.log("proxyBaseUrl:",E),console.log("serverRootPath:",e),!n)return console.log("Updated proxyBaseUrl:",E=E??null);e.length>0&&!n.endsWith(e)&&"/"!=e&&(n+=e),console.log("Updated proxyBaseUrl:",E=n)})(t.server_root_path,t.proxy_base_url),t},A=async()=>{let e=E?`${E}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},z=async()=>{let e=E?`${E}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},L=async()=>{try{let e=E?`${E}/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}},H=async e=>{try{let t=E?`${E}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to reload model cost map:",e),e}},D=async(e,t)=>{try{let r=E?`${E}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await o.json();return console.log(`Schedule model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},V=async e=>{try{let t=E?`${E}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Cancel model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},W=async e=>{try{let t=E?`${E}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let o=await r.json();return console.log("Model cost map source info:",o),o}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},G=async e=>{try{let t=E?`${E}/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:{[P]:`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 o=await r.json();return console.log("Model cost map reload status:",o),o}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},U=async(e,r)=>{try{let o=E?`${E}/model/new`:"/model/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),t.default.destroy(),v.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=E?`${E}/model/delete`:"/model/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=E?`${E}/budget/delete`:"/budget/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/new`:"/budget/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/update`:"/budget/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Y=async(e,t)=>{try{let r=E?`${E}/invitation/new`:"/invitation/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Z=async e=>{try{let t=E?`${E}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Q=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)),m))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=E?`${E}/key/service-account/generate`:"/key/service-account/generate",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ee=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)),m))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 o=E?`${E}/key/generate`:"/key/generate",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t,r,o,n,a)=>{let i=E?`${E}/key/generate`:"/key/generate",l={agent_id:t,key_alias:r,models:o.length>0?o:[]};a&&(l.team_id=a),n&&Object.keys(n).length>0&&(l.metadata=n);let s=await fetch(i,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw F(await s.text()),Error("Failed to create key for agent");return s.json()},er=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 o=E?`${E}/user/new`:"/user/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eo=async(e,t)=>{try{let r=E?`${E}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},en=async(e,t)=>{try{let r=E?`${E}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete user(s):",e),e}},ea=async(e,t)=>{try{let r=E?`${E}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},ei=async(e,t=null,r=null,o=null,n=null,a=null,i=null,l=null,s=null,c=null,u=null)=>{try{let d=E?`${E}/user/list`:"/user/list";console.log("in userListCall");let f=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");f.append("user_ids",e)}r&&f.append("page",r.toString()),o&&f.append("page_size",o.toString()),n&&f.append("user_email",n),a&&f.append("role",a),i&&f.append("team",i),l&&f.append("sso_user_ids",l),s&&f.append("sort_by",s),c&&f.append("sort_order",c),u&&u.length>0&&f.append("organization_ids",u.join(","));let p=f.toString();p&&(d+=`?${p}`);let m=await fetch(d,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!m.ok){let e=await m.json(),t=oF(e);throw F(t),Error(t)}let h=await m.json();return console.log("/user/list API Response:",h),h}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t)=>{try{let r=E?`${E}/v2/user/info`:"/v2/user/info";t&&(r+=`?user_id=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch user info v2:",e),e}},es=async(e,t,r,o=!1,n,a,i=!1)=>{console.log(`userInfoCall: ${t}, ${r}, ${o}, ${n}, ${a}, ${i}`);try{let l;if(o){l=E?`${E}/user/list`:"/user/list";let e=new URLSearchParams;null!=n&&e.append("page",n.toString()),null!=a&&e.append("page_size",a.toString()),l+=`?${e.toString()}`}else l=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ec=async(e,t)=>{try{let r=E?`${E}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t,r=null,o=null,n=null,a=1,i=10,l=null,s=null)=>{try{let a=E?`${E}/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()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ed=async(e,t,r=null,o=null,n=null)=>{try{let a=E?`${E}/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()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ef=async e=>{try{let t=E?`${E}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("/team/available_teams API Response:",o),o}catch(e){throw e}},ep=async(e,t=null,r=null)=>{try{let o=E?`${E}/organization/list`:"/organization/list",n=new URLSearchParams;t&&n.append("org_id",t.toString()),r&&n.append("org_alias",r.toString());let a=n.toString();a&&(o+=`?${a}`);let i=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{let r=E?`${E}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eh=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=E?`${E}/organization/new`:"/organization/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eg=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=E?`${E}/organization/update`:"/organization/update",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ev=async(e,t)=>{try{let r=E?`${E}/organization/delete`:"/organization/delete",o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!o.ok){let e=await o.text();throw F(e),Error(`Error deleting organization: ${e}`)}return await o.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},ey=async(e,t)=>{try{let r=E?`${E}/utils/transform_request`:"/utils/transform_request",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eb=async({accessToken:e,endpoint:t,startTime:r,endTime:o,page:n=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=E?`${E}${i}`:i,(s=new URLSearchParams).append("start_date",y(r)),s.append("end_date",y(o)),s.append("page_size","1000"),s.append("page",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=oF(e);throw F(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},ew=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{user_id:n}}),e$=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{tags:n}}),eC=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{team_ids:n,exclude_team_ids:"litellm-dashboard"}}),ex=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{organization_ids:n}}),eE=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{end_user_ids:n}}),eS=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{agent_ids:n}}),ek=async e=>{try{let t=E?`${E}/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=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ej=async(e,t,r,o)=>{let n=E?`${E}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:o})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},eO=async(e,t,r)=>{try{let o=E?`${E}/key/${t}/regenerate`:`/key/${t}/regenerate`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},eT=!1,eF=null,e_=async(e,t,r,o=1,n=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,o,n,a,i,l,s,c);let u=E?`${E}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",o.toString()),d.append("size",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${eT}`,eT||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),v.default.info(e),eT=!0,eF&&clearTimeout(eF),eF=setTimeout(()=>{eT=!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}},eI=async(e,t)=>{try{let r=E?`${E}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("modelInfoV1Call:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eP=async()=>{let e=E?`${E}/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}`),[])},eN=async()=>{let e=E?`${E}/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}`),[])},eR=async()=>{let e=E?`${E}/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}`),[])},eM=async e=>{try{let t=E?`${E}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("modelHubCall:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},eB=async e=>{try{let t=E?`${E}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("getAllowedIPs:",o),o.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eA=async(e,t)=>{try{let r=E?`${E}/add/allowed_ip`:"/add/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("addAllowedIP:",n),n}catch(e){throw console.error("Failed to add allowed IP:",e),e}},ez=async(e,t)=>{try{let r=E?`${E}/delete/allowed_ip`:"/delete/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("deleteAllowedIP:",n),n}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eL=async(e,t)=>{try{let r=E?`${E}/model_hub/update_useful_links`:"/model_hub/update_useful_links",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eH=async(e,t,r,o=!1,n=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",P);try{let t=E?`${E}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===o&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),n&&r.append("team_id",n.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eD=async e=>{try{let t=E?`${E}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eV=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/tags`:"/global/spend/tags";t&&r&&(n=`${n}?start_date=${t}&end_date=${r}`),o&&(n+=`&tags=${o.join(",")}`),console.log("in tagsSpendLogsCall:",n);let a=await fetch(`${n}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eG=async e=>{try{let t=E?`${E}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to fetch end users:",e),e}},eU=async(e,t)=>{try{let r=E?`${E}/user/filter/ui`:"/user/filter/ui",o=new URLSearchParams;t.get("user_email")&&o.append("user_email",t.get("user_email")),t.get("user_id")&&o.append("user_id",t.get("user_id")),t.get("team_id")&&o.append("team_id",t.get("team_id"));let n=o.toString(),a=n?`${r}?${n}`:r,i=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:o=1,page_size:n=50,params:a={}})=>{try{let i=E?`${E}/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",o.toString()),l.append("page_size",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=oF(e);throw F(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=E?`${E}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=E?`${E}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:o}):JSON.stringify({startTime:r,endTime:o});let i={method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(n,i);if(!l.ok){let e=await l.json(),t=oF(e);throw F(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,o)=>{try{let n=E?`${E}/global/spend/provider`:"/global/spend/provider";r&&o&&(n+=`?start_date=${r}&end_date=${o}`),t&&(n+=`&api_key=${t}`);let a={method:"GET",headers:{[P]:`Bearer ${e}`}},i=await fetch(n,a);if(!i.ok){let e=await i.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity`:"/global/activity";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity/model`:"/global/activity/model";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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=>{try{let t=E?`${E}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e2=async(e,t)=>{try{let r=E?`${E}/v2/key/info`:"/v2/key/info",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!o.ok){let e=await o.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw F(e),Error("Network response was not ok")}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e4=async(e,t,r,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let n=E?`${E}/health/test_connection`:"/health/test_connection",a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:o})}),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}},e6=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=E?`${E}/key/info`:"/key/info";r=`${r}?key=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",o),!o.ok){let e=await o.text();F(e),v.default.fromBackend("Failed to fetch key info - "+e)}let n=await o.json();return console.log("data",n),n}catch(e){throw console.error("Failed to fetch key info:",e),e}},e3=async(e,t,r,o,n,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=E?`${E}/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()),o&&p.append("key_alias",o),a&&p.append("key_hash",a),n&&p.append("user_id",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=oF(e);throw F(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}},e7=async(e,t=1,r=50,o,n)=>{try{let a=new URLSearchParams(Object.entries({page:String(t),size:String(r),...o?{search:o}:{},...n?{team_id:n}:{}})),i=E?`${E}/key/aliases`:"/key/aliases";i=`${i}?${a}`;let l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}let s=await l.json();return console.log("/key/aliases API Response:",s),s}catch(e){throw console.error("Failed to fetch key aliases:",e),e}},e5=async(e,t,r,o=null)=>{try{let n=E?`${E}/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"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),o&&a.append("user_id",o);let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},e9=async e=>{try{let t=E?`${E}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("response from user/available_role",o),o}catch(e){throw e}},e8=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=E?`${E}/team/new`:"/team/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},te=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=E?`${E}/credentials`:"/credentials",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=E?`${E}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("/credentials API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tr=async(e,t,r)=>{try{let o=E?`${E}/credentials`:"/credentials";t?o+=`/by_name/${t}`:r&&(o+=`/by_model/${r}`),console.log("in credentialListCall");let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},to=async(e,t)=>{try{let r=E?`${E}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},tn=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 o=E?`${E}/credentials/${t}`:`/credentials/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},ta=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=E?`${E}/key/update`:"/key/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("Update key Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=E?`${E}/team/update`:"/team/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),v.default.fromBackend("Failed to update team settings: "+e),Error(e)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to update team:",e),e}},tl=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let o=E?`${E}/model/${r}/update`:`/model/${r}/update`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await n.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},ts=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_add`:"/team/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!n.ok){let e=await n.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",o=Error(r);throw o.raw=t,o}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t,r,o,n)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:o});let a=E?`${E}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};n?i.all_users=!0:i.members=r,null!=o&&(i.max_budget_in_team=o);let l=await fetch(a,{method:"POST",headers:{[P]:`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",o=Error(r);throw o.raw=t,o}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}},tu=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 o=E?`${E}/team/member_update`:"/team/member_update",n={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(n.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(n.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(n.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(n.rpm_limit=r.rpm_limit),console.log("Final request body:",n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(n)});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",o=Error(r);throw o.raw=t,o}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},td=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_delete`:"/team/member_delete",n=await fetch(o,{method:"POST",headers:{[P]:`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(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/organization/member_add`:"/organization/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let o=E?`${E}/organization/member_delete`:"/organization/member_delete",n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},tm=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let o=E?`${E}/organization/member_update`:"/organization/member_update",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let o=E?`${E}/user/update`:"/user/update",n={...t};null!==r&&(n.user_role=r),n=JSON.stringify(n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!a.ok){let e=await a.json(),t=oF(e);throw F(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}},tg=async(e,t,r,o=!1)=>{try{let n;console.log("Form Values in userUpdateUserCall:",t);let a=E?`${E}/user/bulk_update`:"/user/bulk_update";if(o)n=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let o of r)e.push({user_id:o,...t});n=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!i.ok){let e=await i.json(),t=oF(e);throw F(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}},tv=async(e,t)=>{try{let r=E?`${E}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},ty=async e=>{try{let t=E?`${E}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tb=async(e,t,r)=>{try{let t=E?`${E}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tw=async e=>{try{let t=E?`${E}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t$=async e=>{try{let t=E?`${E}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tC=async e=>{try{let t=E?`${E}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tx=async(e,t)=>{try{let r=E?`${E}/cache/settings/test`:"/cache/settings/test",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tE=async(e,t)=>{try{let r=E?`${E}/cache/settings`:"/cache/settings",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tS=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tk=async(e,t)=>{try{let r=E?`${E}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tj=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tO=async(e,t,r)=>{try{let o=E?`${E}/config/field/update`:"/config/field/update",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return v.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tT=async(e,t)=>{try{let r=E?`${E}/config/field/delete`:"/config/field/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return v.default.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async(e,t)=>{try{let r=E?`${E}/config/update`:"/config/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tI=async(e,t)=>{try{let r=E?`${E}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tP=async e=>{try{let t=E?`${E}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tN=async e=>{try{let t=E?`${E}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tR=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",E);let t=E?`${E}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async e=>{try{let t=E?`${E}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(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}},tB=async e=>{try{let t=E?`${E}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tA=async(e,t)=>{try{let r=E?`${E}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tz=async(e,t,r)=>{try{let o=E?`${E}/v1/responses`:"/v1/responses",n=await fetch(o,{method:"POST",headers:{[P]:`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=n.headers.get("x-litellm-semantic-filter"),i=n.headers.get("x-litellm-semantic-filter-tools");if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return{data:await n.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},tL=async e=>{try{let t=E?`${E}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`v2 guardrails/list returned ${r.status}`);return await r.json()}catch(t){console.log("v2/guardrails/list failed, falling back to v1:",t);try{let t=E?`${E}/guardrails/list`:"/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}}},tH=async(e,t)=>{let r=E?`${E}/guardrails/submissions`:"/guardrails/submissions",o=new URLSearchParams;t?.status&&o.set("status",t.status),t?.team_id&&o.set("team_id",t.team_id),t?.team_guardrail!==void 0&&o.set("team_guardrail",String(t.team_guardrail)),t?.search&&o.set("search",t.search);let n=o.toString()?`${r}?${o.toString()}`:r,a=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=oF(await a.json().catch(()=>({})));throw F(e),Error(e)}return a.json()},tD=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/approve`:`/guardrails/submissions/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oF(await o.json().catch(()=>({})));throw F(e),Error(e)}return o.json()},tV=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/reject`:`/guardrails/submissions/${encodeURIComponent(t)}/reject`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oF(await o.json().catch(()=>({})));throw F(e),Error(e)}return o.json()},tW=async(e,t,r)=>{try{let o=E?`${E}/guardrails/usage/overview`:"/guardrails/usage/overview",n=new URLSearchParams;t&&n.append("start_date",t),r&&n.append("end_date",r),n.toString()&&(o+=`?${n.toString()}`);let a=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(oF(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},tG=async(e,t,r,o)=>{try{let n=E?`${E}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),o&&a.append("end_date",o),a.toString()&&(n+=`?${a.toString()}`);let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(oF(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},tU=async(e,t)=>{try{let r=E?`${E}/guardrails/usage/logs`:"/guardrails/usage/logs",o=new URLSearchParams;t.guardrailId&&o.append("guardrail_id",t.guardrailId),t.policyId&&o.append("policy_id",t.policyId),null!=t.page&&o.append("page",String(t.page)),null!=t.pageSize&&o.append("page_size",String(t.pageSize)),t.action&&o.append("action",t.action),t.startDate&&o.append("start_date",t.startDate),t.endDate&&o.append("end_date",t.endDate),o.toString()&&(r+=`?${o.toString()}`);let n=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json();throw Error(oF(e))}return n.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},tq=async e=>{try{let t=E?`${E}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},tJ=async(e,t,r)=>{try{let o=E?`${E}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",n=await fetch(o,{method:"POST",signal:r,headers:{[P]:`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(!n.ok){let e=await n.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 F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},tK=async(e,t)=>{try{let r=E?`${E}/policy/info/${t}`:`/policy/info/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},tX=async e=>{try{let t=E?`${E}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},tY=async(e,t,r,o,n)=>{try{let a=E?`${E}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};o&&(i.model=o),n&&(i.competitors=n);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},tZ=async(e,t,r,o)=>{try{let n=E?`${E}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:o})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},tQ=async(e,t,r)=>{try{let o=E?`${E}/policy/templates/test`:"/policy/templates/test",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},t0=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:o};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=oF(await d.json());throw F(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?n(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},t1=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=oF(await u.json());throw F(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?o(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?n():"error"===t.type&&a?.(t.message)}catch{}}},t2=async(e,t)=>{try{let r=E?`${E}/policies`:"/policies",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy:",e),e}},t4=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}`:`/policies/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy:",e),e}},t6=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},t3=async(e,t,r)=>{try{let o=encodeURIComponent(t),n=E?`${E}/policies/name/${o}/versions`:`/policies/name/${o}/versions`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},t7=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}/status`:`/policies/${t}/status`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},t5=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},t9=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},t8=async e=>{try{let t=E?`${E}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},re=async(e,t)=>{try{let r=E?`${E}/policies/attachments`:"/policies/attachments",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rt=async(e,t)=>{try{let r=E?`${E}/policies/attachments/${t}`:`/policies/attachments/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rr=async(e,t,r)=>{try{let o=E?`${E}/policies/test-pipeline`:"/policies/test-pipeline",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},ro=async(e,t)=>{try{let r=E?`${E}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rn=async(e,t)=>{try{let r=E?`${E}/policies/resolve`:"/policies/resolve",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},ra=async(e,t)=>{try{let r=E?`${E}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ri=async(e,t)=>{try{let r=E?`${E}/prompts/list`:"/prompts/list";t&&(r+=`?environment=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rl=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}/info`:`/prompts/${t}/info`;r&&(o+=`?environment=${encodeURIComponent(r)}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rs=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}/versions`:`/prompts/${t}/versions`;r&&(o+=`?environment=${encodeURIComponent(r)}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw 404!==n.status&&F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},rc=async(e,t)=>{try{let r=E?`${E}/prompts`:"/prompts",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},ru=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}`:`/prompts/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rd=async(e,t)=>{try{let r=E?`${E}/prompts/${t}`:`/prompts/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rf=async(e,t)=>{try{let r=new FormData;r.append("file",t);let o=E?`${E}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`},body:r});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rp=async(e,t)=>{try{let r=E?`${E}/v1/agents`:"/v1/agents",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Create agent response:",n),n}catch(e){throw console.error("Failed to create agent:",e),e}},rm=async(e,t)=>{try{let r=E?`${E}/guardrails`:"/guardrails",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Create guardrail response:",n),n}catch(e){throw console.error("Failed to create guardrail:",e),e}},rh=async(e,t,r)=>{try{let o=E?`${E}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",o);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rg=async e=>{try{let t=E?`${E}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched SSO settings:",o),o}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rv=async(e,t)=>{try{let r=E?`${E}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Updated internal user settings:",n),v.default.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},ry=async e=>{try{let t=E?`${E}/v1/mcp/openapi-registry`:"/v1/mcp/openapi-registry",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json();throw Error(oF(e))}return await r.json()}catch(e){throw console.error("Failed to fetch OpenAPI registry:",e),e}},rb=async e=>{try{let t=E?`${E}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rw=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server";if(t){let e=new URLSearchParams;e.append("team_id",t),r=`${r}?${e.toString()}`}console.log("Fetching MCP servers from:",r);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},r$=async(e,t)=>{try{let r=E?`${E}/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 o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Fetched MCP server health:",n),n}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rC=async e=>{try{let t=E?`${E}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched MCP access groups:",o),o.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rx=async e=>{try{let t=E?`${E}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rE=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},rS=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rk=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rj=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/server/register",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to register MCP server:",e),e}},rO=async e=>{try{let t=(E?`${E}`:"")+"/v1/mcp/server/submissions",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return r.json()}catch(e){throw console.error("Failed to fetch MCP submissions:",e),e}},rT=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to approve MCP server:",e),e}},rF=async(e,t,r)=>{try{let o=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/reject`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({review_notes:r??null})});if(!n.ok){let e=await n.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to reject MCP server:",e),e}},r_=async e=>{try{let t=E?`${E}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched search tools:",o),o}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rI=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=E?`${E}/search_tools`:"/search_tools",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Created search tool:",n),n}catch(e){throw console.error("Failed to create search tool:",e),e}},rP=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let o=E?`${E}/search_tools/${t}`:`/search_tools/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rN=async(e,t)=>{try{let r=(E?`${E}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Deleted search tool:",n),n}catch(e){throw console.error("Failed to delete search tool:",e),e}},rR=async e=>{try{let t=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched available search providers:",o),o}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rM=async(e,t)=>{try{let r=E?`${E}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Test connection response:",n),n}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rB=async(e,t,r)=>{try{let o=E?`${E}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",o);let n={[P]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(o,{method:"GET",headers:n}),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}}},rA=async(e,t,r,o,n)=>{try{let a=E?`${E}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",o,"for server:",t);let i={[P]:`Bearer ${e}`,"Content-Type":"application/json",...n?.customHeaders||{}},l={server_id:t,name:r,arguments:o};n?.guardrails&&n.guardrails.length>0&&(l.litellm_metadata={guardrails:n.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 o=JSON.parse(r);o.detail?"string"==typeof o.detail?e=o.detail:"object"==typeof o.detail&&(e=o.detail.message||o.detail.error||"An error occurred",t=o.detail):e=o.message||o.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let o=Error(e);throw o.status=s.status,o.statusText=s.statusText,o.details=t,F(e),o}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}},rz=async(e,t)=>{try{let r=E?`${E}/tag/new`:"/tag/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error creating tag:",e),e}},rL=async(e,t)=>{try{let r=E?`${E}/tag/update`:"/tag/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error updating tag:",e),e}},rH=async(e,t)=>{try{let r=E?`${E}/tag/info`:"/tag/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!o.ok){let e=await o.text();return await F(e),{}}return await o.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rD=async e=>{try{let t=E?`${E}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await F(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rV=async(e,t)=>{try{let r=E?`${E}/tag/delete`:"/tag/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rW=async e=>{try{let t=E?`${E}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched default team settings:",o),o}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},rG=async(e,t)=>{try{let r=E?`${E}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Updated default team settings:",n),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},rU=async(e,t)=>{try{let r=E?`${E}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,o=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json(),t=oF(e);return console.error("Available permissions fetch failed:",t),{all_available_permissions:[],team_member_permissions:[]}}return await o.json()}catch(e){throw console.error("Failed to get team permissions:",e),e}},rq=async(e,t,r)=>{try{let o=E?`${E}/team/permissions_update`:"/team/permissions_update",n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},rJ=async(e,t)=>{try{let r=E?`${E}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},rK=async(e,t)=>{try{let r=E?`${E}/vector_store/new`:"/vector_store/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to create vector store")}return await o.json()}catch(e){throw console.error("Error creating vector store:",e),e}},rX=async(e,t=1,r=100)=>{try{let t=E?`${E}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[P]:`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}},rY=async(e,t)=>{try{let r=E?`${E}/vector_store/delete`:"/vector_store/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to delete vector store")}return await o.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},rZ=async(e,t)=>{try{let r=E?`${E}/vector_store/info`:"/vector_store/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to get vector store info")}return await o.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},rQ=async(e,t)=>{try{let r=E?`${E}/vector_store/update`:"/vector_store/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to update vector store")}return await o.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r0=async(e,t,r,o,n,a,i)=>{try{let l=E?`${E}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...o&&{vector_store_id:o},...i&&i}}};(n||a)&&(c.ingest_options.litellm_vector_store_params={},n&&(c.ingest_options.litellm_vector_store_params.vector_store_name=n),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:{[P]:`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}},r1=async e=>{try{let t=E?`${E}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get email event settings")}let o=await r.json();return console.log("Email event settings response:",o),o}catch(e){throw console.error("Failed to get email event settings:",e),e}},r2=async(e,t)=>{try{let r=E?`${E}/email/event_settings`:"/email/event_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to update email event settings")}let n=await o.json();return console.log("Update email event settings response:",n),n}catch(e){throw console.error("Failed to update email event settings:",e),e}},r4=async e=>{try{let t=E?`${E}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to reset email event settings")}let o=await r.json();return console.log("Reset email event settings response:",o),o}catch(e){throw console.error("Failed to reset email event settings:",e),e}},r6=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Delete agent response:",n),n}catch(e){throw console.error("Failed to delete agent:",e),e}},r3=async(e,t)=>{try{let r=E?`${E}/v1/agents/make_public`:"/v1/agents/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r7=async(e,t)=>{try{let r=E?`${E}/v1/mcp/make_public`:"/v1/mcp/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r5=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Delete guardrail response:",n),n}catch(e){throw console.error("Failed to delete guardrail:",e),e}},r9=async e=>{try{let t=E?`${E}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get guardrail UI settings")}let o=await r.json();return console.log("Guardrail UI settings response:",o),o}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},r8=async e=>{try{let t=E?`${E}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get guardrail provider specific parameters")}let o=await r.json();return console.log("Guardrail provider specific params response:",o),o}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},oe=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${o}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw console.error(`Failed to get category YAML. Status: ${n.status}, Error:`,e),F(e),Error(`Failed to get category YAML: ${n.status} ${e}`)}let a=await n.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},ot=async e=>{try{let t=E?`${E}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[P]:`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),F(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}},or=async(e,t=!1)=>{try{let r=t?"?health_check=true":"",o=E?`${E}/v1/agents${r}`:`/v1/agents${r}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to get agents list")}let a=await n.json();return console.log("Agents list response:",a),{agents:a}}catch(e){throw console.error("Failed to get agents list:",e),e}},oo=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to get agent info")}let n=await o.json();return console.log("Agent info response:",n),n}catch(e){throw console.error("Failed to get agent info:",e),e}},on=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}/info`:`/guardrails/${t}/info`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to get guardrail info")}let n=await o.json();return console.log("Guardrail info response:",n),n}catch(e){throw console.error("Failed to get guardrail info:",e),e}},oa=async(e,t,r)=>{try{let o=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to patch agent")}let a=await n.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},oi=async(e,t,r)=>{try{let o=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to update guardrail")}let a=await n.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ol=async(e,t,r,o,n)=>{try{let a=E?`${E}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};o&&(i.language=o),n&&n.length>0&&(i.entities=n);let l=await fetch(a,{method:"POST",headers:{[P]:`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 F(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}},os=async(e,t)=>{try{let r=E?`${E}/guardrails/test_custom_code`:"/guardrails/test_custom_code",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.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 F(e),Error(t)}let n=await o.json();return console.log("Test custom code guardrail response:",n),n}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},oc=async(e,t)=>{try{let r=E?`${E}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to validate blocked words file")}let n=await o.json();return console.log("Validate blocked words file response:",n),n}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},ou=async e=>{try{let t=E?`${E}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched SSO configuration:",o),o}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},od=async(e,t)=>{try{let r=E?`${E}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:oF(e);F(r);let n=Error(r);throw e?.detail!==void 0&&(n.detail=e.detail),n.rawError=e,n}let n=await o.json();return console.log("Updated SSO configuration:",n),n}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},of=async({accessToken:e,page:t=1,page_size:r=50,params:o={}})=>{try{let n=E?`${E}/audit`:"/audit",a=new URLSearchParams;for(let[e,n]of(a.append("page",t.toString()),a.append("page_size",r.toString()),Object.entries(o)))null!=n&&""!==n&&a.append(e,String(n));n+=`?${a.toString()}`;let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},op=async e=>{try{let t=E?`${E}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw F(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},om=async e=>{try{let t=E?`${E}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw F(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},oh=async(e,t,r)=>{try{let o=E?`${E}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return v.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},og=async(e,t)=>{try{let r=E?`${E}/config/callback/delete`:"/config/callback/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},ov=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=E?`${E}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",n={"Content-Type":"application/json"};e&&(n["x-litellm-api-key"]=e),r?n.Authorization=`Bearer ${r}`:e&&(n[P]=`Bearer ${e}`);let a=await fetch(o,{method:"POST",headers:n,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}},oy=async(e,t)=>{let r=E?`${E}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await o.json();if(!o.ok)throw Error(oF(n)||n?.error||"Failed to cache MCP server");return n},ob=async(e,t,r)=>{let o=S(),n=encodeURIComponent(t.trim()),a=`${o}/v1/mcp/server/oauth/${n}/register`,i=await fetch(a,{method:"POST",headers:{[P]:`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(oF(l)||l?.detail||"Failed to register OAuth client");return l},ow=({serverId:e,clientId:t,redirectUri:r,state:o,codeChallenge:n,scope:a})=>{let i=S(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:o,response_type:"code",code_challenge:n,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()}`},o$=async({serverId:e,code:t,clientId:r,clientSecret:o,codeVerifier:n,redirectUri:a})=>{let i=S(),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),o&&o.trim().length>0&&c.set("client_secret",o),c.set("code_verifier",n),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(oF(d)||d?.detail||"OAuth token exchange failed");return d},oC=async(e,t,r)=>{try{let o=`${S()}/v1/vector_stores/${t}/search`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!n.ok){let e=await n.text();return await F(e),null}return await n.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},ox=async(e,t,r,o)=>{try{let n=`${S()}/v1/search/${t}`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:o||5})});if(!a.ok){let e=await a.text();return await F(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},oE=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},oS=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},ok=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},oj=async e=>{try{let t=E?`${E}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},oO=async(e,t,r,o)=>{try{let n=E?`${E}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},oT=async(e,t=1,r=50,o)=>{try{let n=E?`${E}/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()),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(n+=`?${i}`);let l=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},oF=e=>{let t=e?.detail,r=Array.isArray(t)?t.map(e=>e?.msg||JSON.stringify(e)).join("; "):"string"==typeof t?t:void 0;return e?.error&&(e.error.message||("string"==typeof e.error?e.error:void 0))||e?.message||r||JSON.stringify(e)},o_=async(e,t,r)=>{let o=S(),n=r?"/v3/login":"/v2/login",a=o?`${o}${n}`:n,i=JSON.stringify({username:e,password:t}),l=await fetch(a,{method:"POST",body:i,credentials:"include",headers:{"Content-Type":"application/json"}});if(!l.ok)throw Error(oF(await l.json()));let s=await l.json();if(r&&s.code){let e=o?`${o}/v3/login/exchange`:"/v3/login/exchange",t=await fetch(e,{method:"POST",body:JSON.stringify({code:s.code}),credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error(oF(await t.json()));let r=await t.json();return r.token&&(document.cookie=`token=${r.token}; path=/; SameSite=Lax`),r}return s.token&&(document.cookie=`token=${s.token}; path=/; SameSite=Lax`),s},oI=async(e,t)=>{let r=t||S(),o=await fetch(`${r}/v3/login/exchange`,{method:"POST",body:JSON.stringify({code:e}),headers:{"Content-Type":"application/json"}});if(!o.ok)throw Error(oF(await o.json()));let n=await o.json();return n.token&&(document.cookie=`token=${n.token}; path=/; SameSite=Lax`),n.token},oP=async()=>{let e=S(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(oF(await r.json()));return await r.json()},oN=async(e,t)=>{let r=S(),o=r?`${r}/update/ui_settings`:"/update/ui_settings",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(oF(await n.json()));return await n.json()},oR=async()=>{try{let e=S(),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=oF(JSON.parse(e));throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},oM=async(e,t=!1)=>{try{let r=S(),o=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},oB=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},oA=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins`:"/claude-code/plugins",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},oz=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},oL=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},oH=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},oD=async(e,t)=>{let r=E?`${E}/compliance/eu-ai-act`:"/compliance/eu-ai-act",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oV=async(e,t)=>{let r=E?`${E}/compliance/gdpr`:"/compliance/gdpr",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oW=async e=>{let t=E?`${E}/v1/tool/policy/options`:"/v1/tool/policy/options",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return r.json()},oG=async e=>{let t=E?`${E}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},oU=async(e,t,r)=>{let o=encodeURIComponent(t),n=E?`${E}/v1/tool/${o}/logs`:`/v1/tool/${o}/logs`,a=new URLSearchParams;null!=r.page&&a.append("page",String(r.page)),null!=r.pageSize&&a.append("page_size",String(r.pageSize)),r.startDate&&a.append("start_date",r.startDate),r.endDate&&a.append("end_date",r.endDate);let i=a.toString()?`${n}?${a.toString()}`:n,l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok)throw Error(oF(await l.json().catch(()=>({}))));return l.json()},oq=async(e,t)=>{let r=encodeURIComponent(t),o=E?`${E}/v1/tool/${r}/detail`:`/v1/tool/${r}/detail`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok)throw Error(await n.text());return n.json()},oJ=async(e,t,r,o)=>{let n=E?`${E}/v1/tool/policy`:"/v1/tool/policy",a={tool_name:t};null!=r.input_policy&&(a.input_policy=r.input_policy),null!=r.output_policy&&(a.output_policy=r.output_policy),o?.team_id!=null&&(a.team_id=o.team_id||void 0),o?.key_hash!=null&&(a.key_hash=o.key_hash||void 0),o?.key_alias!=null&&(a.key_alias=o.key_alias||void 0);let i=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw Error(await i.text());return i.json()},oK=async(e,t,r)=>{let o=encodeURIComponent(t),n=new URLSearchParams;null!=r.team_id&&""!==r.team_id&&n.set("team_id",r.team_id),null!=r.key_hash&&""!==r.key_hash&&n.set("key_hash",r.key_hash);let a=n.toString(),i=E?`${E}/v1/tool/${o}/overrides${a?`?${a}`:""}`:`/v1/tool/${o}/overrides${a?`?${a}`:""}`,l=await fetch(i,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!l.ok)throw Error(await l.text());return l.json()},oX=async(e,t,r)=>{let o=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to store OAuth credential")}return n.json()},oY=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to revoke OAuth credential")}return o.json()},oZ=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential/status`:`/v1/mcp/server/${t}/oauth-user-credential/status`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`}});return o.ok?o.json():{server_id:t,has_credential:!1,is_expired:!1}},oQ=async e=>{let t=E?`${E}/v1/mcp/user-credentials`:"/v1/mcp/user-credentials",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});return r.ok?r.json():[]}}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/60d899dd52430ef8.js b/litellm/proxy/_experimental/out/_next/static/chunks/60d899dd52430ef8.js new file mode 100644 index 00000000000..5b58c85ba6a --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/60d899dd52430ef8.js @@ -0,0 +1,167 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,608856,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),l=e.i(209428),r=e.i(392221),n=e.i(951160),s=e.i(174428),o=t.createContext(null),i=t.createContext({}),c=e.i(211577),d=e.i(931067),m=e.i(361275),p=e.i(404948),u=e.i(244009),x=e.i(703923),h=e.i(611935),g=["prefixCls","className","containerRef"];let f=function(e){var l=e.prefixCls,r=e.className,n=e.containerRef,s=(0,x.default)(e,g),o=t.useContext(i).panel,c=(0,h.useComposeRef)(o,n);return t.createElement("div",(0,d.default)({className:(0,a.default)("".concat(l,"-content"),r),role:"dialog",ref:c},(0,u.default)(e,{aria:!0}),{"aria-modal":"true"},s))};var v=e.i(883110);function b(e){return"string"==typeof e&&String(Number(e))===e?((0,v.default)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}e.i(654310);var y={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"},j=t.forwardRef(function(e,n){var s,i,x,h=e.prefixCls,g=e.open,v=e.placement,j=e.inline,N=e.push,w=e.forceRender,$=e.autoFocus,C=e.keyboard,k=e.classNames,S=e.rootClassName,T=e.rootStyle,_=e.zIndex,O=e.className,E=e.id,P=e.style,I=e.motion,B=e.width,z=e.height,M=e.children,D=e.mask,R=e.maskClosable,L=e.maskMotion,H=e.maskClassName,A=e.maskStyle,V=e.afterOpenChange,F=e.onClose,W=e.onMouseEnter,U=e.onMouseOver,J=e.onMouseLeave,K=e.onClick,q=e.onKeyDown,X=e.onKeyUp,G=e.styles,Y=e.drawerRender,Z=t.useRef(),Q=t.useRef(),ee=t.useRef();t.useImperativeHandle(n,function(){return Z.current}),t.useEffect(function(){if(g&&$){var e;null==(e=Z.current)||e.focus({preventScroll:!0})}},[g]);var et=t.useState(!1),ea=(0,r.default)(et,2),el=ea[0],er=ea[1],en=t.useContext(o),es=null!=(s=null!=(i=null==(x="boolean"==typeof N?N?{}:{distance:0}:N||{})?void 0:x.distance)?i:null==en?void 0:en.pushDistance)?s:180,eo=t.useMemo(function(){return{pushDistance:es,push:function(){er(!0)},pull:function(){er(!1)}}},[es]);t.useEffect(function(){var e,t;g?null==en||null==(e=en.push)||e.call(en):null==en||null==(t=en.pull)||t.call(en)},[g]),t.useEffect(function(){return function(){var e;null==en||null==(e=en.pull)||e.call(en)}},[]);var ei=t.createElement(m.default,(0,d.default)({key:"mask"},L,{visible:D&&g}),function(e,r){var n=e.className,s=e.style;return t.createElement("div",{className:(0,a.default)("".concat(h,"-mask"),n,null==k?void 0:k.mask,H),style:(0,l.default)((0,l.default)((0,l.default)({},s),A),null==G?void 0:G.mask),onClick:R&&g?F:void 0,ref:r})}),ec="function"==typeof I?I(v):I,ed={};if(el&&es)switch(v){case"top":ed.transform="translateY(".concat(es,"px)");break;case"bottom":ed.transform="translateY(".concat(-es,"px)");break;case"left":ed.transform="translateX(".concat(es,"px)");break;default:ed.transform="translateX(".concat(-es,"px)")}"left"===v||"right"===v?ed.width=b(B):ed.height=b(z);var em={onMouseEnter:W,onMouseOver:U,onMouseLeave:J,onClick:K,onKeyDown:q,onKeyUp:X},ep=t.createElement(m.default,(0,d.default)({key:"panel"},ec,{visible:g,forceRender:w,onVisibleChanged:function(e){null==V||V(e)},removeOnLeave:!1,leavedClassName:"".concat(h,"-content-wrapper-hidden")}),function(r,n){var s=r.className,o=r.style,i=t.createElement(f,(0,d.default)({id:E,containerRef:n,prefixCls:h,className:(0,a.default)(O,null==k?void 0:k.content),style:(0,l.default)((0,l.default)({},P),null==G?void 0:G.content)},(0,u.default)(e,{aria:!0}),em),M);return t.createElement("div",(0,d.default)({className:(0,a.default)("".concat(h,"-content-wrapper"),null==k?void 0:k.wrapper,s),style:(0,l.default)((0,l.default)((0,l.default)({},ed),o),null==G?void 0:G.wrapper)},(0,u.default)(e,{data:!0})),Y?Y(i):i)}),eu=(0,l.default)({},T);return _&&(eu.zIndex=_),t.createElement(o.Provider,{value:eo},t.createElement("div",{className:(0,a.default)(h,"".concat(h,"-").concat(v),S,(0,c.default)((0,c.default)({},"".concat(h,"-open"),g),"".concat(h,"-inline"),j)),style:eu,tabIndex:-1,ref:Z,onKeyDown:function(e){var t,a,l=e.keyCode,r=e.shiftKey;switch(l){case p.default.TAB:l===p.default.TAB&&(r||document.activeElement!==ee.current?r&&document.activeElement===Q.current&&(null==(a=ee.current)||a.focus({preventScroll:!0})):null==(t=Q.current)||t.focus({preventScroll:!0}));break;case p.default.ESC:F&&C&&(e.stopPropagation(),F(e))}}},ei,t.createElement("div",{tabIndex:0,ref:Q,style:y,"aria-hidden":"true","data-sentinel":"start"}),ep,t.createElement("div",{tabIndex:0,ref:ee,style:y,"aria-hidden":"true","data-sentinel":"end"})))});let N=function(e){var a=e.open,o=e.prefixCls,c=e.placement,d=e.autoFocus,m=e.keyboard,p=e.width,u=e.mask,x=void 0===u||u,h=e.maskClosable,g=e.getContainer,f=e.forceRender,v=e.afterOpenChange,b=e.destroyOnClose,y=e.onMouseEnter,N=e.onMouseOver,w=e.onMouseLeave,$=e.onClick,C=e.onKeyDown,k=e.onKeyUp,S=e.panelRef,T=t.useState(!1),_=(0,r.default)(T,2),O=_[0],E=_[1],P=t.useState(!1),I=(0,r.default)(P,2),B=I[0],z=I[1];(0,s.default)(function(){z(!0)},[]);var M=!!B&&void 0!==a&&a,D=t.useRef(),R=t.useRef();(0,s.default)(function(){M&&(R.current=document.activeElement)},[M]);var L=t.useMemo(function(){return{panel:S}},[S]);if(!f&&!O&&!M&&b)return null;var H=(0,l.default)((0,l.default)({},e),{},{open:M,prefixCls:void 0===o?"rc-drawer":o,placement:void 0===c?"right":c,autoFocus:void 0===d||d,keyboard:void 0===m||m,width:void 0===p?378:p,mask:x,maskClosable:void 0===h||h,inline:!1===g,afterOpenChange:function(e){var t,a;E(e),null==v||v(e),e||!R.current||null!=(t=D.current)&&t.contains(R.current)||null==(a=R.current)||a.focus({preventScroll:!0})},ref:D},{onMouseEnter:y,onMouseOver:N,onMouseLeave:w,onClick:$,onKeyDown:C,onKeyUp:k});return t.createElement(i.Provider,{value:L},t.createElement(n.default,{open:M||f||O,autoDestroy:!1,getContainer:g,autoLock:x&&(M||O)},t.createElement(j,H)))};var w=e.i(981444),$=e.i(617206),C=e.i(122767),k=e.i(613541),S=e.i(340010),T=e.i(242064),_=e.i(922611),O=e.i(563113),E=e.i(185793);let P=e=>{var l,r,n,s;let o,{prefixCls:i,ariaId:c,title:d,footer:m,extra:p,closable:u,loading:x,onClose:h,headerStyle:g,bodyStyle:f,footerStyle:v,children:b,classNames:y,styles:j}=e,N=(0,T.useComponentConfig)("drawer");o=!1===u?void 0:void 0===u||!0===u?"start":(null==u?void 0:u.placement)==="end"?"end":"start";let w=t.useCallback(e=>t.createElement("button",{type:"button",onClick:h,className:(0,a.default)(`${i}-close`,{[`${i}-close-${o}`]:"end"===o})},e),[h,i,o]),[$,C]=(0,O.useClosable)((0,O.pickClosable)(e),(0,O.pickClosable)(N),{closable:!0,closeIconRender:w});return t.createElement(t.Fragment,null,d||$?t.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null==(n=N.styles)?void 0:n.header),g),null==j?void 0:j.header),className:(0,a.default)(`${i}-header`,{[`${i}-header-close-only`]:$&&!d&&!p},null==(s=N.classNames)?void 0:s.header,null==y?void 0:y.header)},t.createElement("div",{className:`${i}-header-title`},"start"===o&&C,d&&t.createElement("div",{className:`${i}-title`,id:c},d)),p&&t.createElement("div",{className:`${i}-extra`},p),"end"===o&&C):null,t.createElement("div",{className:(0,a.default)(`${i}-body`,null==y?void 0:y.body,null==(l=N.classNames)?void 0:l.body),style:Object.assign(Object.assign(Object.assign({},null==(r=N.styles)?void 0:r.body),f),null==j?void 0:j.body)},x?t.createElement(E.default,{active:!0,title:!1,paragraph:{rows:5},className:`${i}-body-skeleton`}):b),(()=>{var e,l;if(!m)return null;let r=`${i}-footer`;return t.createElement("div",{className:(0,a.default)(r,null==(e=N.classNames)?void 0:e.footer,null==y?void 0:y.footer),style:Object.assign(Object.assign(Object.assign({},null==(l=N.styles)?void 0:l.footer),v),null==j?void 0:j.footer)},m)})())};e.i(296059);var I=e.i(915654),B=e.i(183293),z=e.i(246422),M=e.i(838378);let D=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),R=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},D({opacity:e},{opacity:1})),L=(0,z.genStyleHooks)("Drawer",e=>{let t=(0,M.mergeToken)(e,{});return[(e=>{let{borderRadiusSM:t,componentCls:a,zIndexPopup:l,colorBgMask:r,colorBgElevated:n,motionDurationSlow:s,motionDurationMid:o,paddingXS:i,padding:c,paddingLG:d,fontSizeLG:m,lineHeightLG:p,lineWidth:u,lineType:x,colorSplit:h,marginXS:g,colorIcon:f,colorIconHover:v,colorBgTextHover:b,colorBgTextActive:y,colorText:j,fontWeightStrong:N,footerPaddingBlock:w,footerPaddingInline:$,calc:C}=e,k=`${a}-content-wrapper`;return{[a]:{position:"fixed",inset:0,zIndex:l,pointerEvents:"none",color:j,"&-pure":{position:"relative",background:n,display:"flex",flexDirection:"column",[`&${a}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${a}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${a}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${a}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${a}-mask`]:{position:"absolute",inset:0,zIndex:l,background:r,pointerEvents:"auto"},[k]:{position:"absolute",zIndex:l,maxWidth:"100vw",transition:`all ${s}`,"&-hidden":{display:"none"}},[`&-left > ${k}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${k}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${k}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${k}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${a}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:n,pointerEvents:"auto"},[`${a}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,I.unit)(c)} ${(0,I.unit)(d)}`,fontSize:m,lineHeight:p,borderBottom:`${(0,I.unit)(u)} ${x} ${h}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${a}-extra`]:{flex:"none"},[`${a}-close`]:Object.assign({display:"inline-flex",width:C(m).add(i).equal(),height:C(m).add(i).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:f,fontWeight:N,fontSize:m,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${o}`,textRendering:"auto",[`&${a}-close-end`]:{marginInlineStart:g},[`&:not(${a}-close-end)`]:{marginInlineEnd:g},"&:hover":{color:v,backgroundColor:b,textDecoration:"none"},"&:active":{backgroundColor:y}},(0,B.genFocusStyle)(e)),[`${a}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:m,lineHeight:p},[`${a}-body`]:{flex:1,minWidth:0,minHeight:0,padding:d,overflow:"auto",[`${a}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${a}-footer`]:{flexShrink:0,padding:`${(0,I.unit)(w)} ${(0,I.unit)($)}`,borderTop:`${(0,I.unit)(u)} ${x} ${h}`},"&-rtl":{direction:"rtl"}}}})(t),(e=>{let{componentCls:t,motionDurationSlow:a}=e;return{[t]:{[`${t}-mask-motion`]:R(0,a),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((e,t)=>{let l;return Object.assign(Object.assign({},e),{[`&-${t}`]:[R(.7,a),D({transform:(l="100%",({left:`translateX(-${l})`,right:`translateX(${l})`,top:`translateY(-${l})`,bottom:`translateY(${l})`})[t])},{transform:"none"})]})},{})}}})(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}));var H=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(a[l[r]]=e[l[r]]);return a};let A={distance:180},V=e=>{let{rootClassName:l,width:r,height:n,size:s="default",mask:o=!0,push:i=A,open:c,afterOpenChange:d,onClose:m,prefixCls:p,getContainer:u,panelRef:x=null,style:g,className:f,"aria-labelledby":v,visible:b,afterVisibleChange:y,maskStyle:j,drawerStyle:O,contentWrapperStyle:E,destroyOnClose:I,destroyOnHidden:B}=e,z=H(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),M=(0,w.default)(),D=z.title?M:void 0,{getPopupContainer:R,getPrefixCls:V,direction:F,className:W,style:U,classNames:J,styles:K}=(0,T.useComponentConfig)("drawer"),q=V("drawer",p),[X,G,Y]=L(q),Z=void 0===u&&R?()=>R(document.body):u,Q=(0,a.default)({"no-mask":!o,[`${q}-rtl`]:"rtl"===F},l,G,Y),ee=t.useMemo(()=>null!=r?r:"large"===s?736:378,[r,s]),et=t.useMemo(()=>null!=n?n:"large"===s?736:378,[n,s]),ea={motionName:(0,k.getTransitionName)(q,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},el=(0,_.usePanelRef)(),er=(0,h.composeRef)(x,el),[en,es]=(0,C.useZIndex)("Drawer",z.zIndex),{classNames:eo={},styles:ei={}}=z;return X(t.createElement($.default,{form:!0,space:!0},t.createElement(S.default.Provider,{value:es},t.createElement(N,Object.assign({prefixCls:q,onClose:m,maskMotion:ea,motion:e=>({motionName:(0,k.getTransitionName)(q,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},z,{classNames:{mask:(0,a.default)(eo.mask,J.mask),content:(0,a.default)(eo.content,J.content),wrapper:(0,a.default)(eo.wrapper,J.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},ei.mask),j),K.mask),content:Object.assign(Object.assign(Object.assign({},ei.content),O),K.content),wrapper:Object.assign(Object.assign(Object.assign({},ei.wrapper),E),K.wrapper)},open:null!=c?c:b,mask:o,push:i,width:ee,height:et,style:Object.assign(Object.assign({},U),g),className:(0,a.default)(W,f),rootClassName:Q,getContainer:Z,afterOpenChange:null!=d?d:y,panelRef:er,zIndex:en,"aria-labelledby":null!=v?v:D,destroyOnClose:null!=B?B:I}),t.createElement(P,Object.assign({prefixCls:q},z,{ariaId:D,onClose:m}))))))};V._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:l,style:r,className:n,placement:s="right"}=e,o=H(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=t.useContext(T.ConfigContext),c=i("drawer",l),[d,m,p]=L(c),u=(0,a.default)(c,`${c}-pure`,`${c}-${s}`,m,p,n);return d(t.createElement("div",{className:u,style:r},t.createElement(P,Object.assign({prefixCls:c},o))))},e.s(["Drawer",0,V],608856)},573421,e=>{"use strict";e.i(247167);var t=e.i(8211),a=e.i(271645),l=e.i(343794),r=e.i(887719),n=e.i(908206),s=e.i(242064),o=e.i(721132),i=e.i(517455),c=e.i(264042),d=e.i(150073),m=e.i(165370),p=e.i(244451);let u=a.default.createContext({});u.Consumer;var x=e.i(763731),h=e.i(211576),g=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(a[l[r]]=e[l[r]]);return a};let f=a.default.forwardRef((e,t)=>{let r,{prefixCls:n,children:o,actions:i,extra:c,styles:d,className:m,classNames:p,colStyle:f}=e,v=g(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:b,itemLayout:y}=(0,a.useContext)(u),{getPrefixCls:j,list:N}=(0,a.useContext)(s.ConfigContext),w=e=>{var t,a;return(0,l.default)(null==(a=null==(t=null==N?void 0:N.item)?void 0:t.classNames)?void 0:a[e],null==p?void 0:p[e])},$=e=>{var t,a;return Object.assign(Object.assign({},null==(a=null==(t=null==N?void 0:N.item)?void 0:t.styles)?void 0:a[e]),null==d?void 0:d[e])},C=j("list",n),k=i&&i.length>0&&a.default.createElement("ul",{className:(0,l.default)(`${C}-item-action`,w("actions")),key:"actions",style:$("actions")},i.map((e,t)=>a.default.createElement("li",{key:`${C}-item-action-${t}`},e,t!==i.length-1&&a.default.createElement("em",{className:`${C}-item-action-split`})))),S=a.default.createElement(b?"div":"li",Object.assign({},v,b?{}:{ref:t},{className:(0,l.default)(`${C}-item`,{[`${C}-item-no-flex`]:!("vertical"===y?!!c:(r=!1,a.Children.forEach(o,e=>{"string"==typeof e&&(r=!0)}),!(r&&a.Children.count(o)>1)))},m)}),"vertical"===y&&c?[a.default.createElement("div",{className:`${C}-item-main`,key:"content"},o,k),a.default.createElement("div",{className:(0,l.default)(`${C}-item-extra`,w("extra")),key:"extra",style:$("extra")},c)]:[o,k,(0,x.cloneElement)(c,{key:"extra"})]);return b?a.default.createElement(h.Col,{ref:t,flex:1,style:f},S):S});f.Meta=e=>{var{prefixCls:t,className:r,avatar:n,title:o,description:i}=e,c=g(e,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:d}=(0,a.useContext)(s.ConfigContext),m=d("list",t),p=(0,l.default)(`${m}-item-meta`,r),u=a.default.createElement("div",{className:`${m}-item-meta-content`},o&&a.default.createElement("h4",{className:`${m}-item-meta-title`},o),i&&a.default.createElement("div",{className:`${m}-item-meta-description`},i));return a.default.createElement("div",Object.assign({},c,{className:p}),n&&a.default.createElement("div",{className:`${m}-item-meta-avatar`},n),(o||i)&&u)},e.i(296059);var v=e.i(915654),b=e.i(183293),y=e.i(246422),j=e.i(838378);let N=(0,y.genStyleHooks)("List",e=>{let t=(0,j.mergeToken)(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[(e=>{let{componentCls:t,antCls:a,controlHeight:l,minHeight:r,paddingSM:n,marginLG:s,padding:o,itemPadding:i,colorPrimary:c,itemPaddingSM:d,itemPaddingLG:m,paddingXS:p,margin:u,colorText:x,colorTextDescription:h,motionDurationSlow:g,lineWidth:f,headerBg:y,footerBg:j,emptyTextPadding:N,metaMarginBottom:w,avatarMarginRight:$,titleMarginBottom:C,descriptionFontSize:k}=e;return{[t]:Object.assign(Object.assign({},(0,b.resetComponent)(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:y},[`${t}-footer`]:{background:j},[`${t}-header, ${t}-footer`]:{paddingBlock:n},[`${t}-pagination`]:{marginBlockStart:s,[`${a}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:r,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:i,color:x,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:$},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:x},[`${t}-item-meta-title`]:{margin:`0 0 ${(0,v.unit)(e.marginXXS)} 0`,color:x,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:x,transition:`all ${g}`,"&:hover":{color:c}}},[`${t}-item-meta-description`]:{color:h,fontSize:k,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,v.unit)(p)}`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:f,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${(0,v.unit)(o)} 0`,color:h,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:N,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${a}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:u,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:s},[`${t}-item-meta`]:{marginBlockEnd:w,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:x,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:o,marginInlineStart:"auto","> li":{padding:`0 ${(0,v.unit)(o)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:l},[`${t}-split${t}-something-after-last-item ${a}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:m},[`${t}-sm ${t}-item`]:{padding:d},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}})(t),(e=>{let{listBorderedCls:t,componentCls:a,paddingLG:l,margin:r,itemPaddingSM:n,itemPaddingLG:s,marginLG:o,borderRadiusLG:i}=e,c=(0,v.unit)(e.calc(i).sub(e.lineWidth).equal());return{[t]:{border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:i,[`${a}-header`]:{borderRadius:`${c} ${c} 0 0`},[`${a}-footer`]:{borderRadius:`0 0 ${c} ${c}`},[`${a}-header,${a}-footer,${a}-item`]:{paddingInline:l},[`${a}-pagination`]:{margin:`${(0,v.unit)(r)} ${(0,v.unit)(o)}`}},[`${t}${a}-sm`]:{[`${a}-item,${a}-header,${a}-footer`]:{padding:n}},[`${t}${a}-lg`]:{[`${a}-item,${a}-header,${a}-footer`]:{padding:s}}}})(t),(e=>{let{componentCls:t,screenSM:a,screenMD:l,marginLG:r,marginSM:n,margin:s}=e;return{[`@media screen and (max-width:${l}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:r}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:r}}}},[`@media screen and (max-width: ${a}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:n}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${(0,v.unit)(s)}`}}}}}})(t)]},e=>({contentWidth:220,itemPadding:`${(0,v.unit)(e.paddingContentVertical)} 0`,itemPaddingSM:`${(0,v.unit)(e.paddingContentVerticalSM)} ${(0,v.unit)(e.paddingContentHorizontal)}`,itemPaddingLG:`${(0,v.unit)(e.paddingContentVerticalLG)} ${(0,v.unit)(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}));var w=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,l=Object.getOwnPropertySymbols(e);rt.indexOf(l[r])&&Object.prototype.propertyIsEnumerable.call(e,l[r])&&(a[l[r]]=e[l[r]]);return a};let $=a.forwardRef(function(e,x){let{pagination:h=!1,prefixCls:g,bordered:f=!1,split:v=!0,className:b,rootClassName:y,style:j,children:$,itemLayout:C,loadMore:k,grid:S,dataSource:T=[],size:_,header:O,footer:E,loading:P=!1,rowKey:I,renderItem:B,locale:z}=e,M=w(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),D=h&&"object"==typeof h?h:{},[R,L]=a.useState(D.defaultCurrent||1),[H,A]=a.useState(D.defaultPageSize||10),{getPrefixCls:V,direction:F,className:W,style:U}=(0,s.useComponentConfig)("list"),{renderEmpty:J}=a.useContext(s.ConfigContext),K=e=>(t,a)=>{var l;L(t),A(a),h&&(null==(l=null==h?void 0:h[e])||l.call(h,t,a))},q=K("onChange"),X=K("onShowSizeChange"),G=!!(k||h||E),Y=V("list",g),[Z,Q,ee]=N(Y),et=P;"boolean"==typeof et&&(et={spinning:et});let ea=!!(null==et?void 0:et.spinning),el=(0,i.default)(_),er="";switch(el){case"large":er="lg";break;case"small":er="sm"}let en=(0,l.default)(Y,{[`${Y}-vertical`]:"vertical"===C,[`${Y}-${er}`]:er,[`${Y}-split`]:v,[`${Y}-bordered`]:f,[`${Y}-loading`]:ea,[`${Y}-grid`]:!!S,[`${Y}-something-after-last-item`]:G,[`${Y}-rtl`]:"rtl"===F},W,b,y,Q,ee),es=(0,r.default)({current:1,total:0,position:"bottom"},{total:T.length,current:R,pageSize:H},h||{}),eo=Math.ceil(es.total/es.pageSize);es.current=Math.min(es.current,eo);let ei=h&&a.createElement("div",{className:(0,l.default)(`${Y}-pagination`)},a.createElement(m.default,Object.assign({align:"end"},es,{onChange:q,onShowSizeChange:X}))),ec=(0,t.default)(T);h&&T.length>(es.current-1)*es.pageSize&&(ec=(0,t.default)(T).splice((es.current-1)*es.pageSize,es.pageSize));let ed=Object.keys(S||{}).some(e=>["xs","sm","md","lg","xl","xxl"].includes(e)),em=(0,d.default)(ed),ep=a.useMemo(()=>{for(let e=0;e{if(!S)return;let e=ep&&S[ep]?S[ep]:S.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(S),ep]),ex=ea&&a.createElement("div",{style:{minHeight:53}});if(ec.length>0){let e=ec.map((e,t)=>{let l;return B?((l="function"==typeof I?I(e):I?e[I]:e.key)||(l=`list-item-${t}`),a.createElement(a.Fragment,{key:l},B(e,t))):null});ex=S?a.createElement(c.Row,{gutter:S.gutter},a.Children.map(e,e=>a.createElement("div",{key:null==e?void 0:e.key,style:eu},e))):a.createElement("ul",{className:`${Y}-items`},e)}else $||ea||(ex=a.createElement("div",{className:`${Y}-empty-text`},(null==z?void 0:z.emptyText)||(null==J?void 0:J("List"))||a.createElement(o.default,{componentName:"List"})));let eh=es.position,eg=a.useMemo(()=>({grid:S,itemLayout:C}),[JSON.stringify(S),C]);return Z(a.createElement(u.Provider,{value:eg},a.createElement("div",Object.assign({ref:x,style:Object.assign(Object.assign({},U),j),className:en},M),("top"===eh||"both"===eh)&&ei,O&&a.createElement("div",{className:`${Y}-header`},O),a.createElement(p.default,Object.assign({},et),ex,$),E&&a.createElement("div",{className:`${Y}-footer`},E),k||("bottom"===eh||"both"===eh)&&ei)))});$.Item=f,e.s(["List",0,$],573421)},837007,e=>{"use strict";var t=e.i(603908);e.s(["PlusIcon",()=>t.default])},903446,e=>{"use strict";let t=(0,e.i(475254).default)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",()=>t])},132104,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};var r=e.i(9583),n=a.forwardRef(function(e,n){return a.createElement(r.default,(0,t.default)({},e,{ref:n,icon:l}))});e.s(["ArrowUpOutlined",0,n],132104)},447593,989022,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},r=e.i(9583),n=a.forwardRef(function(e,n){return a.createElement(r.default,(0,t.default)({},e,{ref:n,icon:l}))});e.s(["ClearOutlined",0,n],447593);var s=e.i(843476),o=e.i(592968),i=e.i(637235);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z"}}]},name:"number",theme:"outlined"};var d=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:c}))});let m={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"};var p=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:m}))}),u=e.i(872934),x=e.i(812618),h=e.i(366308),g=e.i(458505);e.s(["default",0,({timeToFirstToken:e,totalLatency:t,usage:a,toolName:l})=>e||t||a?(0,s.jsxs)("div",{className:"response-metrics mt-2 pt-2 border-t border-gray-100 text-xs text-gray-500 flex flex-wrap gap-3",children:[void 0!==e&&(0,s.jsx)(o.Tooltip,{title:"Time to first token",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(i.ClockCircleOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["TTFT: ",(e/1e3).toFixed(2),"s"]})]})}),void 0!==t&&(0,s.jsx)(o.Tooltip,{title:"Total latency",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(i.ClockCircleOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Total Latency: ",(t/1e3).toFixed(2),"s"]})]})}),a?.promptTokens!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Prompt tokens",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(p,{className:"mr-1"}),(0,s.jsxs)("span",{children:["In: ",a.promptTokens]})]})}),a?.completionTokens!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Completion tokens",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(u.ExportOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Out: ",a.completionTokens]})]})}),a?.reasoningTokens!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Reasoning tokens",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(x.BulbOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Reasoning: ",a.reasoningTokens]})]})}),a?.totalTokens!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Total tokens",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(d,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Total: ",a.totalTokens]})]})}),a?.cost!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Cost",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(g.DollarOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["$",a.cost.toFixed(6)]})]})}),l&&(0,s.jsx)(o.Tooltip,{title:"Tool used",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(h.ToolOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Tool: ",l]})]})})]}):null],989022)},440987,e=>{"use strict";var t=e.i(903446);e.s(["SettingsIcon",()=>t.default])},191403,180127,516430,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(994388),r=e.i(212931),n=e.i(199133),s=e.i(764205),o=e.i(269200),i=e.i(942232),c=e.i(977572),d=e.i(427612),m=e.i(64848),p=e.i(496020),u=e.i(94629),x=e.i(360820),h=e.i(871943),g=e.i(68155),f=e.i(592968),v=e.i(166406),b=e.i(152990),y=e.i(682830),j=e.i(916925);let N=e=>{let t=new Set,a=/\{\{(\w+)\}\}/g;if(e.messages.forEach(e=>{let l;for(;null!==(l=a.exec(e.content));)t.add(l[1])}),e.developerMessage){let l;for(;null!==(l=a.exec(e.developerMessage));)t.add(l[1])}return Array.from(t)},w=e=>{let t=N(e),a=`--- +model: ${e.model} +`;return void 0!==e.config.temperature&&(a+=`temperature: ${e.config.temperature} +`),void 0!==e.config.max_tokens&&(a+=`max_tokens: ${e.config.max_tokens} +`),void 0!==e.config.top_p&&(a+=`top_p: ${e.config.top_p} +`),a+=`input: + schema: +`,t.forEach(e=>{a+=` ${e}: string +`}),a+=`output: + format: text +`,e.tools&&e.tools.length>0&&(a+=`tools: +`,e.tools.forEach(e=>{let t=JSON.parse(e.json);a+=` - ${JSON.stringify(t)} +`})),a+=`--- + +`,e.developerMessage&&""!==e.developerMessage.trim()&&(a+=`Developer: ${e.developerMessage.trim()} + +`),e.messages.forEach(e=>{let t=e.role.charAt(0).toUpperCase()+e.role.slice(1);a+=`${t}: ${e.content} + +`}),a.trim()},$=e=>{let t=Number(e);return Number.isFinite(t)?t:void 0},C=e=>{let t=e?.prompt_spec?.litellm_params?.dotprompt_content||"";if(!t)throw Error("No dotprompt_content found in API response");let a=t.split("---");if(a.length<3)throw Error("Invalid dotprompt format");let l=a[1],r=a.slice(2).join("---").trim(),n=(e=>{let t={config:{},tools:[]},a=e.split("\n");for(let e of(t.tools=(e=>{let t=[],a=!1;for(let l of e){let e=l.trim();if(!a){("tools:"===e||e.startsWith("tools:"))&&(a=!0);continue}if(l.length>0&&!/^\s/.test(l)&&"-"!==e&&!e.startsWith("-"))break;let r=e.match(/^-+\s*(.+)$/);if(!r)continue;let n=r[1].trim();if(n)try{let e=JSON.parse(n);t.push({name:e?.function?.name||"Unnamed Tool",description:e?.function?.description||"",json:JSON.stringify(e,null,2)})}catch{}}return t})(a),a)){let a=e.trim();if(!a||a.startsWith("input:")||a.startsWith("output:")||a.startsWith("schema:")||a.startsWith("format:")||a.startsWith("tools:")||a.startsWith("-"))continue;let l=a.indexOf(":");if(l<=0)continue;let r=a.substring(0,l).trim(),n=a.substring(l+1).trim();if("model"===r){t.model=n;continue}"temperature"===r&&(t.config.temperature=$(n)),"max_tokens"===r&&(t.config.max_tokens=$(n)),"top_p"===r&&(t.config.top_p=$(n))}return t})(l),s=(e=>{let t=/^(System|Developer|User|Assistant):(?:\s(.*)|\s*)$/,a=[],l="",r=null,n=[],s=()=>{if(!r)return;let e=n.join("\n").trim();"developer"===r?e&&(l=l?`${l} + +${e}`:e):e?a.push({role:r,content:e}):a.push({role:r,content:""})};for(let a of e.split("\n")){let e=a.match(t);if(e){s(),r=e[1].toLowerCase(),n=[e[2]??""];continue}r&&n.push(a)}return s(),{developerMessage:l,messages:a}})(r),o=e?.prompt_spec?.prompt_id||"Unnamed Prompt";return{name:k(o)||o,model:n.model||"gpt-4o",config:n.config,tools:n.tools,developerMessage:s.developerMessage,messages:s.messages.length>0?s.messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:e?.prompt_spec?.environment||e?.prompt_spec?.prompt_info?.environment||"development"}},k=e=>e?e.replace(/[._-]v\d+$/,""):"",S=e=>e?.prompt_id||"",T=e=>{try{let t=e.litellm_params;if(t?.dotprompt_content){let e=t.dotprompt_content.match(/model:\s*([^\n]+)/);if(e)return e[1].trim()}if(t?.prompt_data?.model)return t.prompt_data.model;if(t?.model)return t.model;return null}catch(e){return console.error("Error extracting model:",e),null}},_=({promptsList:e,isLoading:r,onPromptClick:n,onDeleteClick:N,accessToken:w,isAdmin:$})=>{let[C,k]=(0,a.useState)([{id:"created_at",desc:!0}]),[S,_]=(0,a.useState)(new Map);(0,a.useEffect)(()=>{(async()=>{if(w)try{let e=await (0,s.modelHubCall)(w);if(e?.data){let t=new Map;e.data.forEach(e=>{t.set(e.model_group,e)}),_(t)}}catch(e){console.error("Error fetching model hub data:",e)}})()},[w]);let O=e=>e?new Date(e).toLocaleString():"-",E=[{header:"Prompt ID",accessorKey:"prompt_id",cell:e=>{let a=String(e.getValue()||""),r=a.length>25?`${a.slice(0,25)}...`:a;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f.Tooltip,{title:a,children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[220px] justify-start",onClick:()=>e.getValue()&&n?.(e.getValue()),children:r})}),(0,t.jsx)(f.Tooltip,{title:"Copy prompt ID",children:(0,t.jsx)(v.CopyOutlined,{onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(a)},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Model",accessorKey:"model",cell:({row:e})=>{let a=T(e.original);if(!a)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let l=((e,t)=>{if(!e)return null;let a=t.get(e);return a&&a.providers&&a.providers.length>0?a.providers[0]:null})(a,S),{logo:r}=(0,j.getProviderLogoAndName)(l||"");return(0,t.jsx)(f.Tooltip,{title:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:l&&r?(0,t.jsx)("img",{src:r,alt:`${l} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,a=t.parentElement;if(a&&a.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=l?.charAt(0)||"-",a.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}):(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})]})})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let a=e.original;return(0,t.jsx)(f.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:O(a.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let a=e.original;return(0,t.jsx)(f.Tooltip,{title:a.updated_at,children:(0,t.jsx)("span",{className:"text-xs",children:O(a.updated_at)})})}},{header:"Environment",accessorKey:"environment",cell:({row:e})=>{let a=e.original.environment||"development";return(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${{production:"text-red-600 bg-red-50",staging:"text-yellow-600 bg-yellow-50",development:"text-green-600 bg-green-50"}[a]||"text-gray-600 bg-gray-50"}`,children:a})}},{header:"Created By",accessorKey:"created_by",cell:({row:e})=>{let a=e.original;return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:a.created_by||"-"})}},{header:"Type",accessorKey:"prompt_info.prompt_type",cell:({row:e})=>{let a=e.original;return(0,t.jsx)(f.Tooltip,{title:a.prompt_info.prompt_type,children:(0,t.jsx)("span",{className:"text-xs",children:a.prompt_info.prompt_type})})}},...$?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let a=e.original,r=a.prompt_id||"Unknown Prompt";return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(f.Tooltip,{title:"Delete prompt",children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),N?.(a.prompt_id,r)},icon:g.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],P=(0,b.useReactTable)({data:e,columns:E,state:{sorting:C},onSortingChange:k,getCoreRowModel:(0,y.getCoreRowModel)(),getSortedRowModel:(0,y.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(o.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:P.getHeaderGroups().map(e=>(0,t.jsx)(p.TableRow,{children:e.headers.map(e=>(0,t.jsx)(m.TableHeaderCell,{className:"py-1 h-8",onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,b.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(x.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(h.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(u.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(i.TableBody,{children:r?(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:E.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e.length>0?P.getRowModel().rows.map(e=>(0,t.jsx)(p.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,b.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:E.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No prompts found"})})})})})]})})})};var O=e.i(304967),E=e.i(629569),P=e.i(599724),I=e.i(350967),B=e.i(389083),z=e.i(197647),M=e.i(653824),D=e.i(881073),R=e.i(404206),L=e.i(723731),H=e.i(464571),A=e.i(530212),V=e.i(797672),F=e.i(500330),W=e.i(678784),U=e.i(118366),J=e.i(727749),K=e.i(653496),q=e.i(245094),X=e.i(650056),G=e.i(219470);let Y=({promptId:e,model:s,promptVariables:o={},accessToken:i,version:c="1",proxySettings:d})=>{let[m,p]=(0,a.useState)(!1),[u,x]=(0,a.useState)("curl"),[h,g]=(0,a.useState)("basic"),[f,v]=(0,a.useState)(""),b=window.location.origin,y=d?.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?b=y:d?.PROXY_BASE_URL&&(b=d.PROXY_BASE_URL);let j=i||"sk-1234";return a.default.useEffect(()=>{m&&v((()=>{let t=Object.keys(o).length>0;if("curl"===u)if("basic"===h)return`curl -X POST '${b}/chat/completions' \\ + -H 'Content-Type: application/json' \\ + -H 'Authorization: Bearer ${j}' \\ + -d '{ + "model": "${s}", + "prompt_id": "${e}"${t?`, + "prompt_variables": ${JSON.stringify(o,null,6).replace(/\n/g,"\n ")}`:""} + }' | jq`;else if("messages"===h)return`curl -X POST '${b}/chat/completions' \\ + -H 'Content-Type: application/json' \\ + -H 'Authorization: Bearer ${j}' \\ + -d '{ + "model": "${s}", + "prompt_id": "${e}"${t?`, + "prompt_variables": ${JSON.stringify(o,null,6).replace(/\n/g,"\n ")}`:""}, + "messages": [ + { + "role": "user", + "content": "hi" + } + ] + }' | jq`;else return`curl -X POST '${b}/chat/completions' \\ + -H 'Content-Type: application/json' \\ + -H 'Authorization: Bearer ${j}' \\ + -d '{ + "model": "${s}", + "prompt_id": "${e}", + "prompt_version": ${c}, + "messages": [ + { + "role": "user", + "content": "Who are u" + } + ] + }' | jq`;if("python"===u){let a=`import openai + +client = openai.OpenAI( + api_key="${j}", + base_url="${b}" +) +`;return"basic"===h?`${a} +response = client.chat.completions.create( + model="${s}", + extra_body={ + "prompt_id": "${e}"${t?`, + "prompt_variables": ${JSON.stringify(o,null,8).replace(/\n/g,"\n ")}`:""} + } +) + +print(response)`:"messages"===h?`${a} +response = client.chat.completions.create( + model="${s}", + messages=[ + {"role": "user", "content": "hi"} + ], + extra_body={ + "prompt_id": "${e}"${t?`, + "prompt_variables": ${JSON.stringify(o,null,8).replace(/\n/g,"\n ")}`:""} + } +) + +print(response)`:`${a} +response = client.chat.completions.create( + model="${s}", + messages=[ + {"role": "user", "content": "Who are u"} + ], + extra_body={ + "prompt_id": "${e}", + "prompt_version": ${c} + } +) + +print(response)`}{let a=`import OpenAI from 'openai'; + +const client = new OpenAI({ + apiKey: "${j}", + baseURL: "${b}" +}); +`;return"basic"===h?`${a} +async function main() { + const response = await client.chat.completions.create({ + model: "${s}", + ${t?`prompt_id: "${e}", + prompt_variables: ${JSON.stringify(o,null,8).replace(/\n/g,"\n ")}`:`prompt_id: "${e}"`} + }); + + console.log(response); +} + +main();`:"messages"===h?`${a} +async function main() { + const response = await client.chat.completions.create({ + model: "${s}", + messages: [ + { role: "user", content: "hi" } + ], + ${t?`prompt_id: "${e}", + prompt_variables: ${JSON.stringify(o,null,8).replace(/\n/g,"\n ")}`:`prompt_id: "${e}"`} + }); + + console.log(response); +} + +main();`:`${a} +async function main() { + const response = await client.chat.completions.create({ + model: "${s}", + messages: [ + { role: "user", content: "Who are u" } + ], + prompt_id: "${e}", + prompt_version: ${c} + }); + + console.log(response); +} + +main();`}})())},[m,u,h,e,s,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Button,{variant:"secondary",icon:q.CodeOutlined,onClick:()=>{p(!0)},children:"Get Code"}),(0,t.jsxs)(r.Modal,{title:"Generated Code",open:m,onCancel:()=>{p(!1)},footer:null,width:800,children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium block mb-1 text-gray-700",children:"Language"}),(0,t.jsx)(n.Select,{value:u,onChange:e=>x(e),style:{width:180},options:[{value:"curl",label:"cURL"},{value:"python",label:"Python (OpenAI SDK)"},{value:"javascript",label:"JavaScript (OpenAI SDK)"}]})]}),(0,t.jsx)(H.Button,{onClick:()=>{navigator.clipboard.writeText(f),J.default.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,t.jsx)(K.Tabs,{activeKey:h,onChange:g,items:[{label:"Basic",key:"basic"},{label:"With Messages",key:"messages"},{label:"With Version",key:"version"}]}),(0,t.jsx)(X.Prism,{language:"curl"===u?"bash":"python"===u?"python":"javascript",style:G.coy,wrapLines:!0,wrapLongLines:!0,className:"rounded-md mt-0",customStyle:{maxHeight:"60vh",overflowY:"auto",marginTop:0,borderTopLeftRadius:0,borderTopRightRadius:0},children:f})]})]})},Z=({promptId:e,onClose:n,accessToken:u,isAdmin:x,onDelete:h,onEdit:f})=>{let[v,b]=(0,a.useState)(null),[y,j]=(0,a.useState)(null),[N,w]=(0,a.useState)(null),[$,C]=(0,a.useState)(!0),[k,_]=(0,a.useState)({}),[K,q]=(0,a.useState)(!1),[X,G]=(0,a.useState)(!1),[Z,Q]=(0,a.useState)([]),[ee,et]=(0,a.useState)(null),[ea,el]=(0,a.useState)([]),[er,en]=(0,a.useState)(null),[es,eo]=(0,a.useState)(!1),ei=async t=>{try{if(C(!0),!u)return;let a=await (0,s.getPromptInfo)(u,e,t);b(a.prompt_spec),j(a.raw_prompt_template),w(a),a.environments&&a.environments.length>0&&(Q(a.environments),ee||et(a.prompt_spec.environment||a.environments[0])),en(a.prompt_spec.version||null)}catch(e){J.default.fromBackend("Failed to load prompt information"),console.error("Error fetching prompt info:",e)}finally{C(!1)}},ec=async t=>{if(u){eo(!0);try{let a=await (0,s.getPromptVersions)(u,e,t);el(a.prompts||[])}catch{el([])}finally{eo(!1)}}},ed=(0,a.useRef)(!0);if((0,a.useEffect)(()=>{et(null),Q([]),el([]),ei()},[e,u]),(0,a.useEffect)(()=>{if(ed.current){ed.current=!1,ee&&u&&ec(ee);return}ee&&u&&(ei(ee),ec(ee))},[ee]),$&&!v)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!v)return(0,t.jsx)("div",{className:"p-4",children:"Prompt not found"});let em=e=>e?new Date(e).toLocaleString():"-",ep=async(e,t)=>{await (0,F.copyToClipboard)(e)&&(_(e=>({...e,[t]:!0})),setTimeout(()=>{_(e=>({...e,[t]:!1}))},2e3))},eu=async()=>{if(u&&v){G(!0);try{await (0,s.deletePromptCall)(u,eg),J.default.success(`Prompt "${eg}" deleted successfully`),h?.(),n()}catch(e){console.error("Error deleting prompt:",e),J.default.fromBackend("Failed to delete prompt")}finally{G(!1),q(!1)}}},ex=async t=>{if(!u||!ee)return;let a=t.version||1;en(a);try{let t=`${e}.v${a}`,l=await (0,s.getPromptInfo)(u,t,ee);b(l.prompt_spec),j(l.raw_prompt_template),w(l)}catch{J.default.fromBackend(`Failed to load version v${a}`)}},eh=v&&T(v)||"gpt-4o",eg=S(v),ef=(e=>{let t;if(e?.version)return String(e.version);var a=(t=S(e),e?.litellm_params?.prompt_id||t);if(!a)return"1";let l=a.match(/[._-]v(\d+)$/);return l?l[1]:"1"})(v),ev=ea.length>0?Math.max(...ea.map(e=>e.version||1)):null,eb=null!==ev&&null!==er&&erep(eg,"prompt-id"),className:`left-2 z-10 transition-all duration-200 ${k["prompt-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Y,{promptId:eg,model:eh,promptVariables:(e=>{let t;if(!e)return{};let a={},l=/\{\{(\w+)\}\}/g;for(;null!==(t=l.exec(e));){let e=t[1];a[e]||(a[e]=`example_${e}`)}return a})(y?.content),accessToken:u,version:ef}),(0,t.jsx)(l.Button,{icon:V.PencilIcon,variant:"primary",onClick:()=>f?.(N),className:"flex items-center",children:"Prompt Studio"}),x&&(0,t.jsx)(l.Button,{icon:g.TrashIcon,variant:"secondary",onClick:()=>{q(!0)},className:"flex items-center",children:"Delete Prompt"})]})]})]}),Z.length>0&&(0,t.jsx)("div",{className:"flex gap-2 mb-4",children:[...Z].sort((e,t)=>{let a={development:0,staging:1,production:2};return(a[e]??99)-(a[t]??99)}).map(e=>(0,t.jsxs)("button",{onClick:()=>{et(e),en(null)},className:`px-4 py-2 rounded-lg text-sm font-medium transition-all ${ee===e?"production"===e?"bg-red-100 text-red-800 border-2 border-red-300":"staging"===e?"bg-yellow-100 text-yellow-800 border-2 border-yellow-300":"bg-green-100 text-green-800 border-2 border-green-300":"bg-gray-100 text-gray-600 border-2 border-transparent hover:bg-gray-200"}`,children:[e,ea.length>0&&ee===e&&(0,t.jsxs)("span",{className:"ml-1 text-xs opacity-75",children:["(v",ev,")"]})]},e))}),eb&&(0,t.jsxs)("div",{className:"mb-4 p-3 bg-amber-50 border border-amber-200 rounded-lg flex items-center justify-between",children:[(0,t.jsxs)(P.Text,{className:"text-amber-800",children:["Viewing v",er," — not the latest version (v",ev,")"]}),(0,t.jsx)(l.Button,{variant:"light",size:"xs",onClick:()=>{let e=ea.find(e=>e.version===ev);e&&ex(e)},children:"Go to latest"})]}),(0,t.jsxs)(M.TabGroup,{children:[(0,t.jsxs)(D.TabList,{className:"mb-4",children:[(0,t.jsx)(z.Tab,{children:"Overview"},"overview"),y?(0,t.jsx)(z.Tab,{children:"Prompt Template"},"prompt-template"):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(z.Tab,{children:"Raw JSON"},"raw-json")]}),(0,t.jsxs)(L.TabPanels,{children:[(0,t.jsxs)(R.TabPanel,{children:[(0,t.jsxs)(I.Grid,{numItems:1,numItemsSm:2,numItemsLg:4,className:"gap-4",children:[(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(P.Text,{children:"Version"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(E.Title,{children:ef}),(0,t.jsxs)(B.Badge,{color:"blue",className:"mt-1",children:["v",ef]})]})]}),(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(P.Text,{children:"Prompt Type"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(E.Title,{children:v.prompt_info?.prompt_type||"-"})})]}),(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(P.Text,{children:"Created By"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(E.Title,{className:"text-sm",children:v.created_by||"-"})})]}),(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(P.Text,{children:"Created At"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(E.Title,{className:"text-sm",children:em(v.created_at)}),(0,t.jsxs)(P.Text,{className:"text-xs",children:["Updated: ",em(v.updated_at)]})]})]})]}),(0,t.jsxs)(O.Card,{className:"mt-6",children:[(0,t.jsxs)(E.Title,{className:"mb-3",children:["Version History — ",ee]}),es?(0,t.jsx)(P.Text,{children:"Loading versions..."}):ea.length>0?(0,t.jsxs)(o.Table,{children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(m.TableHeaderCell,{children:"Version"}),(0,t.jsx)(m.TableHeaderCell,{children:"Created By"}),(0,t.jsx)(m.TableHeaderCell,{children:"Date"}),(0,t.jsx)(m.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(i.TableBody,{children:ea.map(e=>{let a=e.version||1,r=a===er,n=a===ev;return(0,t.jsxs)(p.TableRow,{className:`cursor-pointer hover:bg-blue-50 transition-colors ${r?"bg-blue-50":""}`,onClick:()=>ex(e),children:[(0,t.jsxs)(c.TableCell,{children:[(0,t.jsxs)("span",{className:r?"font-bold":"",children:["v",a]}),n&&(0,t.jsx)(B.Badge,{color:"blue",className:"ml-2",size:"xs",children:"latest"})]}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)("span",{className:"text-sm",children:e.created_by||"-"})}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)("span",{className:"text-sm",children:em(e.created_at)})}),(0,t.jsx)(c.TableCell,{children:(0,t.jsx)(l.Button,{icon:V.PencilIcon,variant:"light",size:"xs",onClick:t=>{t.stopPropagation();let a={prompt_spec:{...e,prompt_id:eg,environment:ee},raw_prompt_template:r?y:null};f?.(a)},children:"Edit"})})]},a)})})]}):(0,t.jsxs)(P.Text,{className:"text-gray-400",children:["No versions found in ",ee]})]})]}),y&&(0,t.jsx)(R.TabPanel,{children:(0,t.jsxs)(O.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(E.Title,{children:"Prompt Template"}),(0,t.jsx)(H.Button,{type:"text",size:"small",icon:k["prompt-content"]?(0,t.jsx)(W.CheckIcon,{size:16}):(0,t.jsx)(U.CopyIcon,{size:16}),onClick:()=>ep(y.content,"prompt-content"),className:`transition-all duration-200 ${k["prompt-content"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:k["prompt-content"]?"Copied!":"Copy Content"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Template ID"}),(0,t.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:y.litellm_prompt_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Content"}),(0,t.jsx)("div",{className:"mt-2 p-4 bg-gray-50 rounded-md border overflow-auto max-h-96",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:y.content})})]}),y.metadata&&Object.keys(y.metadata).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Text,{className:"font-medium",children:"Template Metadata"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-64",children:JSON.stringify(y.metadata,null,2)})})]})]})]})}),(0,t.jsx)(R.TabPanel,{children:(0,t.jsxs)(O.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(E.Title,{children:"Raw API Response"}),(0,t.jsx)(H.Button,{type:"text",size:"small",icon:k["raw-json"]?(0,t.jsx)(W.CheckIcon,{size:16}):(0,t.jsx)(U.CopyIcon,{size:16}),onClick:()=>ep(JSON.stringify(N,null,2),"raw-json"),className:`transition-all duration-200 ${k["raw-json"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:k["raw-json"]?"Copied!":"Copy JSON"})]}),(0,t.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(N,null,2)})})]})})]})]}),(0,t.jsxs)(r.Modal,{title:"Delete Prompt",open:K,onOk:eu,onCancel:()=>{q(!1)},confirmLoading:X,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",(0,t.jsx)("strong",{children:eg}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var Q=e.i(808613),ee=e.i(515831),et=e.i(312361),ea=e.i(779241),el=e.i(519756);let{Option:er}=n.Select,en=({visible:e,onClose:l,accessToken:o,onSuccess:i})=>{let[c]=Q.Form.useForm(),[d,m]=(0,a.useState)(!1),[p,u]=(0,a.useState)([]),[x,h]=(0,a.useState)("dotprompt"),g=()=>{c.resetFields(),u([]),h("dotprompt"),l()},f=async()=>{try{let e=await c.validateFields();if(console.log("values: ",e),!o)return void J.default.fromBackend("Access token is required");if("dotprompt"===x&&0===p.length)return void J.default.fromBackend("Please upload a .prompt file");m(!0);let t={};if("dotprompt"===x&&p.length>0){let a=p[0].originFileObj;try{let l=await (0,s.convertPromptFileToJson)(o,a);console.log("Conversion result:",l),t={prompt_id:e.prompt_id,litellm_params:{prompt_integration:"dotprompt",prompt_id:l.prompt_id,prompt_data:l.json_data},prompt_info:{prompt_type:"db"}}}catch(e){console.error("Error converting prompt file:",e),J.default.fromBackend("Failed to convert prompt file to JSON"),m(!1);return}}try{await (0,s.createPromptCall)(o,t),J.default.success("Prompt created successfully!"),g(),i()}catch(e){console.error("Error creating prompt:",e),J.default.fromBackend("Failed to create prompt")}}catch(e){console.error("Form validation error:",e)}finally{m(!1)}};return(0,t.jsx)(r.Modal,{title:"Add New Prompt",open:e,onCancel:g,footer:[(0,t.jsx)(H.Button,{onClick:g,children:"Cancel"},"cancel"),(0,t.jsx)(H.Button,{loading:d,onClick:f,children:"Create Prompt"},"submit")],width:600,children:(0,t.jsxs)(Q.Form,{form:c,layout:"vertical",requiredMark:!1,children:[(0,t.jsx)(Q.Form.Item,{label:"Prompt ID",name:"prompt_id",rules:[{required:!0,message:"Please enter a prompt ID"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Prompt ID can only contain letters, numbers, underscores, and hyphens"}],children:(0,t.jsx)(ea.TextInput,{placeholder:"Enter unique prompt ID (e.g., my_prompt_id)"})}),(0,t.jsx)(Q.Form.Item,{label:"Prompt Integration",name:"prompt_integration",initialValue:"dotprompt",children:(0,t.jsx)(n.Select,{value:x,onChange:h,children:(0,t.jsx)(er,{value:"dotprompt",children:"dotprompt"})})}),"dotprompt"===x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Divider,{}),(0,t.jsxs)(Q.Form.Item,{label:"Prompt File",extra:"Upload a .prompt file that follows the Dotprompt specification",children:[(0,t.jsx)(ee.Upload,{...{beforeUpload:e=>(e.name.endsWith(".prompt")||J.default.fromBackend("Please upload a .prompt file"),!1),fileList:p,onChange:({fileList:e})=>{u(e.slice(-1))},onRemove:()=>{u([])}},children:(0,t.jsx)(H.Button,{icon:(0,t.jsx)(el.UploadOutlined,{}),children:"Select .prompt File"})}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",p[0].name]})]})]})]})})},es=`{ + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA" + }, + "unit": { + "type": "string", + "enum": ["celsius", "fahrenheit"] + } + }, + "required": ["location"] + } + } +}`,eo=({visible:e,initialJson:l,onSave:n,onClose:s})=>{let[o,i]=(0,a.useState)(l||es),[c,d]=(0,a.useState)(null),m=()=>{d(null),s()};return(0,t.jsx)(r.Modal,{title:(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsx)("span",{className:"text-lg font-medium",children:"Add Tool"})}),open:e,onCancel:m,width:800,footer:[(0,t.jsx)(H.Button,{onClick:m,children:"Cancel"},"cancel"),(0,t.jsx)(H.Button,{type:"primary",onClick:()=>{try{JSON.parse(o),d(null),n(o)}catch(e){d("Invalid JSON format. Please check your syntax.")}},children:"Add"},"save")],children:(0,t.jsxs)("div",{className:"space-y-3",children:[c&&(0,t.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-red-600 text-sm",children:c}),(0,t.jsx)("textarea",{value:o,onChange:e=>i(e.target.value),className:"w-full min-h-[400px] px-4 py-3 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",placeholder:"Paste your tool JSON here..."})]})})};var ei=e.i(311451),ec=e.i(475254);let ed=(0,ec.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",()=>ed],180127),e.s(["ArrowLeftIcon",()=>ed],516430);let em=(0,ec.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),ep=(0,ec.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),eu=({promptName:e,onNameChange:a,onBack:r,onSave:s,isSaving:o,editMode:i=!1,onShowHistory:c,version:d,promptModel:m="gpt-4o",promptVariables:p={},accessToken:u,proxySettings:x,environment:h,onEnvironmentChange:g})=>(0,t.jsxs)("div",{className:"bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(l.Button,{icon:ed,variant:"light",onClick:r,size:"xs",children:"Back"}),(0,t.jsx)(ei.Input,{value:e,onChange:e=>a(e.target.value),className:"text-base font-medium border-none shadow-none",style:{width:"200px"}}),d&&(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium",children:d}),(0,t.jsx)(n.Select,{value:h,onChange:g,style:{width:140},size:"small",options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]}),(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Draft"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Unsaved changes"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(Y,{promptId:e,model:m,promptVariables:p,accessToken:u,version:d?.replace("v","")||"1",proxySettings:x}),i&&c&&(0,t.jsx)(l.Button,{icon:ep,variant:"secondary",onClick:c,children:"History"}),(0,t.jsx)(l.Button,{icon:em,onClick:s,loading:o,disabled:o,children:i?"Update":"Save"})]})]});var ex=e.i(440987),eh=e.i(992619);let eg=({model:e,temperature:l=1,maxTokens:r=1e3,accessToken:n,onModelChange:s,onTemperatureChange:o,onMaxTokensChange:i})=>{let[c,d]=(0,a.useState)(!1);return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-[300px]",children:(0,t.jsx)(eh.default,{accessToken:n||"",value:e,onChange:s,showLabel:!1})}),(0,t.jsxs)("button",{onClick:()=>d(!c),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(ex.SettingsIcon,{size:16}),(0,t.jsx)("span",{children:"Parameters"})]}),c&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-96",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:"Model Parameters"}),(0,t.jsx)("button",{onClick:()=>d(!1),className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm text-gray-700",children:"Temperature"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:0,max:2,step:.1,value:l,onChange:e=>o(parseFloat(e.target.value)||0),className:"w-20"})]})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm text-gray-700",children:"Max Tokens"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:1,max:32768,value:r,onChange:e=>i(parseInt(e.target.value)||1e3),className:"w-24"})]})})]})]})})]})};var ef=e.i(837007);let ev=(0,ec.default)("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),eb=({tools:e,onAddTool:a,onEditTool:l,onRemoveTool:r})=>(0,t.jsxs)(O.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm font-medium",children:"Tools"}),(0,t.jsxs)("button",{onClick:a,className:"text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add"]})]}),0===e.length?(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs",children:"No tools added"}):(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 border border-gray-200 rounded",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"font-medium text-xs truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1 ml-2",children:[(0,t.jsx)("button",{onClick:()=>l(a),className:"text-xs text-blue-600 hover:text-blue-700",children:"Edit"}),(0,t.jsx)("button",{onClick:()=>r(a),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})})]})]},a))})]});var ey=e.i(282786),ej=e.i(262218),eN=e.i(751904);let{TextArea:ew}=ei.Input,e$=({value:e,onChange:l,placeholder:r,rows:n=4,className:s})=>{let[o,i]=(0,a.useState)(null),[c,d]=(0,a.useState)(""),m=()=>{c.trim()&&o&&(l(e.substring(0,o.start)+`{{${c}}}`+e.substring(o.end)),i(null),d(""))},p=(()=>{let t,a=/\{\{(\w+)\}\}/g,l=[];for(;null!==(t=a.exec(e));)l.push({name:t[1],start:t.index,end:t.index+t[0].length});return l})();return(0,t.jsxs)("div",{className:`variable-textarea-container ${s}`,children:[(0,t.jsx)("style",{children:` + .variable-highlight-text { + color: #f97316; + background-color: #fff7ed; + border-radius: 4px; + padding: 0 2px; + border: 1px solid #fed7aa; + font-family: monospace; + } + `}),(0,t.jsx)(ew,{value:e,onChange:e=>l(e.target.value),placeholder:r,rows:n,className:"font-sans"}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),p.map((e,a)=>(0,t.jsx)(ey.Popover,{content:(0,t.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,t.jsx)(ei.Input,{size:"small",value:c,onChange:e=>d(e.target.value),onPressEnter:m,placeholder:"Variable name",autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,t.jsx)("button",{onClick:()=>{i(null),d("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:o?.start===e.start,onOpenChange:e=>{e||(i(null),d(""))},trigger:"click",children:(0,t.jsx)(ej.Tag,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,t.jsx)(eN.EditOutlined,{}),onClick:()=>{i({oldName:e.name,start:e.start,end:e.end}),d(e.name)},children:e.name})},`${e.start}-${a}`))]})]})},eC=({value:e,onChange:a})=>(0,t.jsxs)(O.Card,{className:"p-3",children:[(0,t.jsx)(P.Text,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,t.jsx)(e$,{value:e,onChange:a,rows:3,placeholder:"e.g., You are a helpful assistant..."})]}),ek=(0,ec.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),{Option:eS}=n.Select,eT=({messages:e,onAddMessage:l,onUpdateMessage:r,onRemoveMessage:s,onMoveMessage:o})=>{let[i,c]=(0,a.useState)(null),[d,m]=(0,a.useState)(null),p=()=>{c(null),m(null)};return(0,t.jsxs)(O.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)(P.Text,{className:"text-sm font-medium",children:"Prompt messages"}),(0,t.jsxs)(P.Text,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.map((a,l)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{c(l)},onDragOver:e=>{e.preventDefault(),m(l)},onDrop:e=>{e.preventDefault(),null!==i&&i!==l&&o(i,l),c(null),m(null)},onDragEnd:p,className:`border border-gray-300 rounded overflow-hidden bg-white transition-all ${i===l?"opacity-50":""} ${d===l&&i!==l?"border-blue-500 border-2":""}`,children:[(0,t.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,t.jsxs)(n.Select,{value:a.role,onChange:e=>r(l,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,t.jsx)(eS,{value:"user",children:"User"}),(0,t.jsx)(eS,{value:"assistant",children:"Assistant"}),(0,t.jsx)(eS,{value:"system",children:"System"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[e.length>1&&(0,t.jsx)("button",{onClick:()=>s(l),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})}),(0,t.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,t.jsx)(ek,{size:16})})]})]}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(e$,{value:a.content,onChange:e=>r(l,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},l))}),(0,t.jsxs)("button",{onClick:l,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add message"]})]})};var e_=e.i(447593);let eO=({extractedVariables:e,variables:a,onVariableChange:l})=>0===e.length?null:(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,t.jsx)(ei.Input,{value:a[e]||"",onChange:t=>l(e,t.target.value),placeholder:`Enter value for ${e}`,size:"small"})]},e))})]});var eE=e.i(56456),eP=e.i(482725),eI=e.i(983561);let eB=({hasVariables:e})=>(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(eI.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)("span",{className:"text-base",children:e?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]});var ez=e.i(771674),eM=e.i(918789),eD=e.i(989022);let eR=({message:e})=>(0,t.jsx)("div",{className:`mb-4 flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,t.jsx)(ez.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(eI.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===e.role?(0,t.jsx)(eM.default,{components:{code({node:e,inline:a,className:l,children:r,...n}){let s=/language-(\w+)/.exec(l||"");return!a&&s?(0,t.jsx)(X.Prism,{style:G.coy,language:s[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...n,children:String(r).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${l} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...n,children:r})},pre:({node:e,...a})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...a})},children:e.content}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.content}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&(0,t.jsx)(eD.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage})]})]})}),eL=({messages:e,isLoading:a,hasVariables:l,messagesEndRef:r})=>{let n=(0,t.jsx)(eE.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===e.length&&(0,t.jsx)(eB,{hasVariables:l}),e.map((e,a)=>(0,t.jsx)(eR,{message:e},a)),a&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(eP.Spin,{indicator:n})}),(0,t.jsx)("div",{ref:r,style:{height:"1px"}})]})},eH=({extractedVariables:e,variables:a})=>{let l=e.filter(e=>!a[e]||""===a[e].trim());return 0===l.length?null:(0,t.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,t.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",l.map(e=>`{{${e}}}`).join(", ")]})]})]})})};var eA=e.i(132104);let{TextArea:eV}=ei.Input,eF=({inputMessage:e,isLoading:a,isDisabled:r,onInputChange:n,onSend:s,onKeyDown:o,onCancel:i})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,t.jsx)(eV,{value:e,onChange:e=>n(e.target.value),onKeyDown:o,placeholder:"Type your message... (Shift+Enter for new line)",disabled:a,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,t.jsx)(l.Button,{onClick:s,disabled:r,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,t.jsx)(eA.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),a&&(0,t.jsx)(l.Button,{onClick:i,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]}),eW=({prompt:e,accessToken:r})=>{let{isLoading:n,messages:o,inputMessage:i,variables:c,variablesFilled:d,extractedVariables:m,allVariablesFilled:p,messagesEndRef:u,setInputMessage:x,handleSendMessage:h,handleCancelRequest:g,handleClearConversation:f,handleKeyDown:v,handleVariableChange:b}=((e,t)=>{let[l,r]=(0,a.useState)(!1),[n,o]=(0,a.useState)([]),[i,c]=(0,a.useState)(""),[d,m]=(0,a.useState)({}),[p,u]=(0,a.useState)(!1),[x,h]=(0,a.useState)(null),g=(0,a.useRef)(null),f=N(e),v=f.every(e=>d[e]&&""!==d[e].trim());(0,a.useEffect)(()=>{g.current&&setTimeout(()=>{g.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[n]);let b=async()=>{let a;if(!t)return void J.default.fromBackend("Access token is required");if(f.length>0&&!v)return void J.default.fromBackend("Please fill in all template variables");if(!i.trim())return;!p&&f.length>0&&u(!0);let l={role:"user",content:i};o(e=>[...e,l]),c("");let m=new AbortController;h(m),r(!0);let x=Date.now();try{let l,r,c=w(e),p=(0,s.getProxyBaseUrl)(),u={dotprompt_content:c};0===n.length?u.prompt_variables=d:u.conversation_history=[...n.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch(`${p}/prompts/test`,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(u),signal:m.signal});if(!h.ok){let e=await h.text();throw Error(`HTTP error! status: ${h.status}, ${e}`)}if(!h.body)throw Error("No response body");let g=h.body.getReader(),f=new TextDecoder,v="";for(o(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await g.read();if(e)break;for(let e of f.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{let e=JSON.parse(t);!l&&e.model&&(l=e.model),e.usage&&(r=e.usage);let n=e.choices?.[0]?.delta?.content;n&&(a||(a=Date.now()-x),v+=n,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:v,model:l,timeToFirstToken:a},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let b=Date.now()-x;o(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:b,usage:r},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),o(t=>{let a=t[t.length-1];return a&&"assistant"===a.role&&""===a.content?[...t.slice(0,-1),{role:"assistant",content:`Error: ${e.message}`}]:[...t,{role:"assistant",content:`Error: ${e.message}`}]}))}finally{r(!1),h(null)}};return{isLoading:l,messages:n,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:f,allVariablesFilled:v,messagesEndRef:g,setInputMessage:c,handleSendMessage:b,handleCancelRequest:()=>{x&&(x.abort(),h(null),r(!1),J.default.info("Request cancelled"))},handleClearConversation:()=>{o([]),u(!1),J.default.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),b())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}})(e,r);return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!d&&(0,t.jsx)(eO,{extractedVariables:m,variables:c,onVariableChange:b}),o.length>0&&(0,t.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,t.jsx)(l.Button,{onClick:f,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:e_.ClearOutlined,children:"Clear Chat"})}),(0,t.jsx)(eL,{messages:o,isLoading:n,hasVariables:m.length>0,messagesEndRef:u}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,t.jsx)(eH,{extractedVariables:m,variables:c}),(0,t.jsx)(eF,{inputMessage:i,isLoading:n,isDisabled:n||!i.trim()||m.length>0&&!p,onInputChange:x,onSend:h,onKeyDown:v,onCancel:g})]})]})},eU=({visible:e,promptName:a,isSaving:n,onNameChange:s,onPublish:o,onCancel:i})=>(0,t.jsx)(r.Modal,{title:"Publish Prompt",open:e,onCancel:i,footer:[(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(l.Button,{variant:"secondary",onClick:i,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:o,loading:n,children:"Publish"})]},"footer")],children:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)(P.Text,{className:"mb-2",children:"Name"}),(0,t.jsx)(ei.Input,{value:a,onChange:e=>s(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,t.jsx)(P.Text,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})}),eJ=({prompt:e})=>{let a=w(e);return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,t.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:a})})]})};var eK=e.i(608856),eq=e.i(573421),eX=e.i(981339);let{Text:eG}=e.i(898586).Typography,eY=({isOpen:e,onClose:l,accessToken:r,promptId:n,activeVersionId:o,onSelectVersion:i})=>{let[c,d]=(0,a.useState)([]),[m,p]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&r&&n&&u()},[e,r,n]);let u=async()=>{p(!0);try{let e=n.includes(".v")?n.split(".v")[0]:n,t=await (0,s.getPromptVersions)(r,e);d(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{p(!1)}},x=e=>{if(e.version)return`v${e.version}`;let t=e.litellm_params?.prompt_id||e.prompt_id;return t.includes(".v")?`v${t.split(".v")[1]}`:t.includes("_v")?`v${t.split("_v")[1]}`:"v1"};return(0,t.jsx)(eK.Drawer,{title:"Version History",placement:"right",onClose:l,open:e,width:400,mask:!1,maskClosable:!1,children:m?(0,t.jsx)(eX.Skeleton,{active:!0,paragraph:{rows:4}}):0===c.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,t.jsx)(eq.List,{dataSource:c,renderItem:(e,a)=>{var l;let r=e.version||parseInt(x(e).replace("v","")),n=null;o&&(o.includes(".v")?n=parseInt(o.split(".v")[1]):o.includes("_v")&&(n=parseInt(o.split("_v")[1])));let s=n?r===n:0===a;return(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ${s?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,onClick:()=>i?.(e),children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ej.Tag,{className:"m-0",children:x(e)}),0===a&&(0,t.jsx)(ej.Tag,{color:"blue",className:"m-0",children:"Latest"})]}),s&&(0,t.jsx)(ej.Tag,{color:"green",className:"m-0",children:"Active"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eG,{className:"text-sm text-gray-600 font-medium",children:(l=e.created_at)?new Date(l).toLocaleString():"-"}),(0,t.jsx)(eG,{type:"secondary",className:"text-xs",children:e.prompt_info?.prompt_type==="db"?"Saved to Database":"Config Prompt"})]})]},`${e.prompt_id}-v${e.version||r}`)}})})},eZ=({onClose:e,onSuccess:l,accessToken:r,initialPromptData:n})=>{let[o,i]=(0,a.useState)((()=>{if(n)try{return C(n)}catch(e){console.error("Error parsing existing prompt:",e),J.default.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}],environment:"development"}})()),[c,d]=(0,a.useState)(!!n),[m,p]=(0,a.useState)(!1),[u,x]=(0,a.useState)((()=>{if(!n?.prompt_spec)return;let e=n.prompt_spec.prompt_id,t=n.prompt_spec.version||n.prompt_spec.litellm_params?.prompt_id;return"number"==typeof t?`${e}.v${t}`:"string"==typeof t&&(t.includes(".v")||t.includes("_v"))?t:e})()),[h,g]=(0,a.useState)(!1),[f,v]=(0,a.useState)(!1),[b,y]=(0,a.useState)(null),[j,N]=(0,a.useState)(!1),[$,k]=(0,a.useState)("pretty"),S=e=>{void 0!==e?y(e):y(null),g(!0)},T=async()=>{if(!r)return void J.default.fromBackend("Access token is required");if(!o.name||""===o.name.trim())return void J.default.fromBackend("Please enter a valid prompt name");N(!0);try{let t=o.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),a=w(o),i={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:a},prompt_info:{prompt_type:"db",environment:o.environment}};c&&n?.prompt_spec?.prompt_id?(await (0,s.updatePromptCall)(r,n.prompt_spec.prompt_id,i),J.default.success("Prompt updated successfully!")):(await (0,s.createPromptCall)(r,i),J.default.success("Prompt created successfully!")),l(),e()}catch(e){console.error("Error saving prompt:",e),J.default.fromBackend(c?"Failed to update prompt":"Failed to save prompt")}finally{N(!1),v(!1)}},_=u&&u.includes(".v")?`v${u.split(".v")[1]}`:null;return(0,t.jsxs)("div",{className:"flex h-full bg-white",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,t.jsx)(eu,{promptName:o.name,onNameChange:e=>i({...o,name:e}),onBack:e,onSave:()=>{o.name&&""!==o.name.trim()&&"New prompt"!==o.name?T():v(!0)},isSaving:j,editMode:c,onShowHistory:()=>p(!0),version:_,promptModel:o.model,promptVariables:(()=>{let e,t={},a=[o.developerMessage,...o.messages.map(e=>e.content)].join(" "),l=/\{\{(\w+)\}\}/g;for(;null!==(e=l.exec(a));){let a=e[1];t[a]||(t[a]=`example_${a}`)}return t})(),accessToken:r,environment:o.environment,onEnvironmentChange:async e=>{if(i({...o,environment:e}),c&&r&&n?.prompt_spec?.prompt_id)try{let t=await (0,s.getPromptInfo)(r,n.prompt_spec.prompt_id,e);if(t?.prompt_spec){let a=C(t);i({...a,environment:e});let l=t.prompt_spec.version||1;x(`${t.prompt_spec.prompt_id}.v${l}`)}}catch{}}}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,t.jsx)(eg,{model:o.model,temperature:o.config.temperature,maxTokens:o.config.max_tokens,accessToken:r,onModelChange:e=>i({...o,model:e}),onTemperatureChange:e=>i({...o,config:{...o.config,temperature:e}}),onMaxTokensChange:e=>i({...o,config:{...o.config,max_tokens:e}})}),(0,t.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"pretty"===$?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("pretty"),children:"PRETTY"}),(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"dotprompt"===$?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===$?(0,t.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,t.jsx)(eb,{tools:o.tools,onAddTool:()=>S(),onEditTool:S,onRemoveTool:e=>{i({...o,tools:o.tools.filter((t,a)=>a!==e)})}}),(0,t.jsx)(eC,{value:o.developerMessage,onChange:e=>i({...o,developerMessage:e})}),(0,t.jsx)(eT,{messages:o.messages,onAddMessage:()=>{i({...o,messages:[...o.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,a)=>{let l=[...o.messages];l[e][t]=a,i({...o,messages:l})},onRemoveMessage:e=>{o.messages.length>1&&i({...o,messages:o.messages.filter((t,a)=>a!==e)})},onMoveMessage:(e,t)=>{let a=[...o.messages],[l]=a.splice(e,1);a.splice(t,0,l),i({...o,messages:a})}})]}):(0,t.jsx)(eJ,{prompt:o})]}),(0,t.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,t.jsx)(eW,{prompt:o,accessToken:r})})]})]}),(0,t.jsx)(eU,{visible:f,promptName:o.name,isSaving:j,onNameChange:e=>i({...o,name:e}),onPublish:T,onCancel:()=>v(!1)}),h&&(0,t.jsx)(eo,{visible:h,initialJson:null!==b?o.tools[b].json:"",onSave:e=>{try{let t=JSON.parse(e),a={name:t.function?.name||"Unnamed Tool",description:t.function?.description||"",json:e};if(null!==b){let e=[...o.tools];e[b]=a,i({...o,tools:e})}else i({...o,tools:[...o.tools,a]});g(!1),y(null)}catch(e){J.default.fromBackend("Invalid JSON format")}},onClose:()=>{g(!1),y(null)}}),(0,t.jsx)(eY,{isOpen:m,onClose:()=>p(!1),accessToken:r,promptId:n?.prompt_spec?.prompt_id||o.name,activeVersionId:u,onSelectVersion:e=>{try{let t=C({prompt_spec:e});i(t);let a=e.version||1;x(`${e.prompt_id}.v${a}`)}catch(e){console.error("Error loading version:",e),J.default.fromBackend("Failed to load prompt version")}}})]})};var eQ=e.i(708347);e.s(["default",0,({accessToken:e,userRole:o})=>{let[i,c]=(0,a.useState)([]),[d,m]=(0,a.useState)(!1),[p,u]=(0,a.useState)(void 0),[x,h]=(0,a.useState)(null),[g,f]=(0,a.useState)(!1),[v,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)(null),[N,w]=(0,a.useState)(!1),[$,C]=(0,a.useState)(null),k=!!o&&(0,eQ.isAdminRole)(o),S=async()=>{if(e){m(!0);try{let t=await (0,s.getPromptsList)(e,p);console.log(`prompts: ${JSON.stringify(t)}`),c(t.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{m(!1)}}};(0,a.useEffect)(()=>{S()},[e,p]);let T=()=>{S(),b(!1),j(null),h(null)},O=async()=>{if($&&e){w(!0);try{await (0,s.deletePromptCall)(e,$.id),J.default.success(`Prompt "${$.name}" deleted successfully`),S()}catch(e){console.error("Error deleting prompt:",e),J.default.fromBackend("Failed to delete prompt")}finally{w(!1),C(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[v?(0,t.jsx)(eZ,{onClose:()=>{b(!1),j(null)},onSuccess:T,accessToken:e,initialPromptData:y}):x?(0,t.jsx)(Z,{promptId:x,onClose:()=>h(null),accessToken:e,isAdmin:k,onDelete:S,onEdit:e=>{j(e),b(!0)}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(l.Button,{onClick:()=>{x&&h(null),j(null),b(!0)},disabled:!e,children:"+ Add New Prompt"}),(0,t.jsx)(l.Button,{onClick:()=>{x&&h(null),f(!0)},disabled:!e,variant:"secondary",children:"Upload .prompt File"})]}),(0,t.jsx)(n.Select,{placeholder:"All Environments",allowClear:!0,value:p,onChange:e=>u(e),style:{width:180},options:[{label:"Development",value:"development"},{label:"Staging",value:"staging"},{label:"Production",value:"production"}]})]}),(0,t.jsx)(_,{promptsList:i,isLoading:d,onPromptClick:e=>{h(e)},onDeleteClick:(e,t)=>{C({id:e,name:t})},accessToken:e,isAdmin:k})]}),(0,t.jsx)(en,{visible:g,onClose:()=>{f(!1)},accessToken:e,onSuccess:T}),$&&(0,t.jsxs)(r.Modal,{title:"Delete Prompt",open:null!==$,onOk:O,onCancel:()=>{C(null)},confirmLoading:N,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",$.name," ?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],191403)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/63aff161ddf8e0ba.js b/litellm/proxy/_experimental/out/_next/static/chunks/63aff161ddf8e0ba.js deleted file mode 100644 index 388774af63c..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/63aff161ddf8e0ba.js +++ /dev/null @@ -1,167 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,191403,180127,516430,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(994388),a=e.i(212931),l=e.i(764205),n=e.i(269200),o=e.i(942232),i=e.i(977572),c=e.i(427612),d=e.i(64848),m=e.i(496020),p=e.i(94629),x=e.i(360820),u=e.i(871943),h=e.i(68155),g=e.i(592968),f=e.i(166406),j=e.i(152990),v=e.i(682830),y=e.i(916925);let b=e=>{let t=new Set,s=/\{\{(\w+)\}\}/g;if(e.messages.forEach(e=>{let r;for(;null!==(r=s.exec(e.content));)t.add(r[1])}),e.developerMessage){let r;for(;null!==(r=s.exec(e.developerMessage));)t.add(r[1])}return Array.from(t)},N=e=>{let t=b(e),s=`--- -model: ${e.model} -`;return void 0!==e.config.temperature&&(s+=`temperature: ${e.config.temperature} -`),void 0!==e.config.max_tokens&&(s+=`max_tokens: ${e.config.max_tokens} -`),void 0!==e.config.top_p&&(s+=`top_p: ${e.config.top_p} -`),s+=`input: - schema: -`,t.forEach(e=>{s+=` ${e}: string -`}),s+=`output: - format: text -`,e.tools&&e.tools.length>0&&(s+=`tools: -`,e.tools.forEach(e=>{let t=JSON.parse(e.json);s+=` - ${JSON.stringify(t)} -`})),s+=`--- - -`,e.developerMessage&&""!==e.developerMessage.trim()&&(s+=`Developer: ${e.developerMessage.trim()} - -`),e.messages.forEach(e=>{let t=e.role.charAt(0).toUpperCase()+e.role.slice(1);s+=`${t}: ${e.content} - -`}),s.trim()},w=e=>{let t=Number(e);return Number.isFinite(t)?t:void 0},C=e=>{let t=e?.prompt_spec?.litellm_params?.dotprompt_content||"";if(!t)throw Error("No dotprompt_content found in API response");let s=t.split("---");if(s.length<3)throw Error("Invalid dotprompt format");let r=s[1],a=s.slice(2).join("---").trim(),l=(e=>{let t={config:{},tools:[]},s=e.split("\n");for(let e of(t.tools=(e=>{let t=[],s=!1;for(let r of e){let e=r.trim();if(!s){("tools:"===e||e.startsWith("tools:"))&&(s=!0);continue}if(r.length>0&&!/^\s/.test(r)&&"-"!==e&&!e.startsWith("-"))break;let a=e.match(/^-+\s*(.+)$/);if(!a)continue;let l=a[1].trim();if(l)try{let e=JSON.parse(l);t.push({name:e?.function?.name||"Unnamed Tool",description:e?.function?.description||"",json:JSON.stringify(e,null,2)})}catch{}}return t})(s),s)){let s=e.trim();if(!s||s.startsWith("input:")||s.startsWith("output:")||s.startsWith("schema:")||s.startsWith("format:")||s.startsWith("tools:")||s.startsWith("-"))continue;let r=s.indexOf(":");if(r<=0)continue;let a=s.substring(0,r).trim(),l=s.substring(r+1).trim();if("model"===a){t.model=l;continue}"temperature"===a&&(t.config.temperature=w(l)),"max_tokens"===a&&(t.config.max_tokens=w(l)),"top_p"===a&&(t.config.top_p=w(l))}return t})(r),n=(e=>{let t=/^(System|Developer|User|Assistant):(?:\s(.*)|\s*)$/,s=[],r="",a=null,l=[],n=()=>{if(!a)return;let e=l.join("\n").trim();"developer"===a?e&&(r=r?`${r} - -${e}`:e):e?s.push({role:a,content:e}):s.push({role:a,content:""})};for(let s of e.split("\n")){let e=s.match(t);if(e){n(),a=e[1].toLowerCase(),l=[e[2]??""];continue}a&&l.push(s)}return n(),{developerMessage:r,messages:s}})(a),o=e?.prompt_spec?.prompt_id||"Unnamed Prompt";return{name:_(o)||o,model:l.model||"gpt-4o",config:l.config,tools:l.tools,developerMessage:n.developerMessage,messages:n.messages.length>0?n.messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}]}},_=e=>e?e.replace(/[._-]v\d+$/,""):"",k=e=>e?.prompt_id||"",T=e=>{try{let t=e.litellm_params;if(t?.dotprompt_content){let e=t.dotprompt_content.match(/model:\s*([^\n]+)/);if(e)return e[1].trim()}if(t?.prompt_data?.model)return t.prompt_data.model;if(t?.model)return t.model;return null}catch(e){return console.error("Error extracting model:",e),null}},S=({promptsList:e,isLoading:a,onPromptClick:b,onDeleteClick:N,accessToken:w,isAdmin:C})=>{let[_,k]=(0,s.useState)([{id:"created_at",desc:!0}]),[S,$]=(0,s.useState)(new Map);(0,s.useEffect)(()=>{(async()=>{if(w)try{let e=await (0,l.modelHubCall)(w);if(e?.data){let t=new Map;e.data.forEach(e=>{t.set(e.model_group,e)}),$(t)}}catch(e){console.error("Error fetching model hub data:",e)}})()},[w]);let P=e=>e?new Date(e).toLocaleString():"-",I=[{header:"Prompt ID",accessorKey:"prompt_id",cell:e=>{let s=String(e.getValue()||""),a=s.length>25?`${s.slice(0,25)}...`:s;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[220px] justify-start",onClick:()=>e.getValue()&&b?.(e.getValue()),children:a})}),(0,t.jsx)(g.Tooltip,{title:"Copy prompt ID",children:(0,t.jsx)(f.CopyOutlined,{onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(s)},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Model",accessorKey:"model",cell:({row:e})=>{let s=T(e.original);if(!s)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let r=((e,t)=>{if(!e)return null;let s=t.get(e);return s&&s.providers&&s.providers.length>0?s.providers[0]:null})(s,S),{logo:a}=(0,y.getProviderLogoAndName)(r||"");return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:r&&a?(0,t.jsx)("img",{src:a,alt:`${r} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,s=t.parentElement;if(s&&s.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r?.charAt(0)||"-",s.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}):(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:s})]})})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let s=e.original;return(0,t.jsx)(g.Tooltip,{title:s.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:P(s.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let s=e.original;return(0,t.jsx)(g.Tooltip,{title:s.updated_at,children:(0,t.jsx)("span",{className:"text-xs",children:P(s.updated_at)})})}},{header:"Type",accessorKey:"prompt_info.prompt_type",cell:({row:e})=>{let s=e.original;return(0,t.jsx)(g.Tooltip,{title:s.prompt_info.prompt_type,children:(0,t.jsx)("span",{className:"text-xs",children:s.prompt_info.prompt_type})})}},...C?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let s=e.original,a=s.prompt_id||"Unknown Prompt";return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(g.Tooltip,{title:"Delete prompt",children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),N?.(s.prompt_id,a)},icon:h.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],O=(0,j.useReactTable)({data:e,columns:I,state:{sorting:_},onSortingChange:k,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(n.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:O.getHeaderGroups().map(e=>(0,t.jsx)(m.TableRow,{children:e.headers.map(e=>(0,t.jsx)(d.TableHeaderCell,{className:"py-1 h-8",onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(x.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(u.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(p.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(o.TableBody,{children:a?(0,t.jsx)(m.TableRow,{children:(0,t.jsx)(i.TableCell,{colSpan:I.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e.length>0?O.getRowModel().rows.map(e=>(0,t.jsx)(m.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(i.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(m.TableRow,{children:(0,t.jsx)(i.TableCell,{colSpan:I.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No prompts found"})})})})})]})})})};var $=e.i(304967),P=e.i(629569),I=e.i(599724),O=e.i(350967),B=e.i(389083),E=e.i(197647),D=e.i(653824),A=e.i(881073),L=e.i(404206),M=e.i(723731),z=e.i(464571),R=e.i(530212),F=e.i(797672),U=e.i(500330),J=e.i(678784),V=e.i(118366),H=e.i(727749),W=e.i(199133),K=e.i(653496),q=e.i(245094),G=e.i(650056),X=e.i(219470);let Y=({promptId:e,model:l,promptVariables:n={},accessToken:o,version:i="1",proxySettings:c})=>{let[d,m]=(0,s.useState)(!1),[p,x]=(0,s.useState)("curl"),[u,h]=(0,s.useState)("basic"),[g,f]=(0,s.useState)(""),j=window.location.origin,v=c?.LITELLM_UI_API_DOC_BASE_URL;v&&v.trim()?j=v:c?.PROXY_BASE_URL&&(j=c.PROXY_BASE_URL);let y=o||"sk-1234";return s.default.useEffect(()=>{d&&f((()=>{let t=Object.keys(n).length>0;if("curl"===p)if("basic"===u)return`curl -X POST '${j}/chat/completions' \\ - -H 'Content-Type: application/json' \\ - -H 'Authorization: Bearer ${y}' \\ - -d '{ - "model": "${l}", - "prompt_id": "${e}"${t?`, - "prompt_variables": ${JSON.stringify(n,null,6).replace(/\n/g,"\n ")}`:""} - }' | jq`;else if("messages"===u)return`curl -X POST '${j}/chat/completions' \\ - -H 'Content-Type: application/json' \\ - -H 'Authorization: Bearer ${y}' \\ - -d '{ - "model": "${l}", - "prompt_id": "${e}"${t?`, - "prompt_variables": ${JSON.stringify(n,null,6).replace(/\n/g,"\n ")}`:""}, - "messages": [ - { - "role": "user", - "content": "hi" - } - ] - }' | jq`;else return`curl -X POST '${j}/chat/completions' \\ - -H 'Content-Type: application/json' \\ - -H 'Authorization: Bearer ${y}' \\ - -d '{ - "model": "${l}", - "prompt_id": "${e}", - "prompt_version": ${i}, - "messages": [ - { - "role": "user", - "content": "Who are u" - } - ] - }' | jq`;if("python"===p){let s=`import openai - -client = openai.OpenAI( - api_key="${y}", - base_url="${j}" -) -`;return"basic"===u?`${s} -response = client.chat.completions.create( - model="${l}", - extra_body={ - "prompt_id": "${e}"${t?`, - "prompt_variables": ${JSON.stringify(n,null,8).replace(/\n/g,"\n ")}`:""} - } -) - -print(response)`:"messages"===u?`${s} -response = client.chat.completions.create( - model="${l}", - messages=[ - {"role": "user", "content": "hi"} - ], - extra_body={ - "prompt_id": "${e}"${t?`, - "prompt_variables": ${JSON.stringify(n,null,8).replace(/\n/g,"\n ")}`:""} - } -) - -print(response)`:`${s} -response = client.chat.completions.create( - model="${l}", - messages=[ - {"role": "user", "content": "Who are u"} - ], - extra_body={ - "prompt_id": "${e}", - "prompt_version": ${i} - } -) - -print(response)`}{let s=`import OpenAI from 'openai'; - -const client = new OpenAI({ - apiKey: "${y}", - baseURL: "${j}" -}); -`;return"basic"===u?`${s} -async function main() { - const response = await client.chat.completions.create({ - model: "${l}", - ${t?`prompt_id: "${e}", - prompt_variables: ${JSON.stringify(n,null,8).replace(/\n/g,"\n ")}`:`prompt_id: "${e}"`} - }); - - console.log(response); -} - -main();`:"messages"===u?`${s} -async function main() { - const response = await client.chat.completions.create({ - model: "${l}", - messages: [ - { role: "user", content: "hi" } - ], - ${t?`prompt_id: "${e}", - prompt_variables: ${JSON.stringify(n,null,8).replace(/\n/g,"\n ")}`:`prompt_id: "${e}"`} - }); - - console.log(response); -} - -main();`:`${s} -async function main() { - const response = await client.chat.completions.create({ - model: "${l}", - messages: [ - { role: "user", content: "Who are u" } - ], - prompt_id: "${e}", - prompt_version: ${i} - }); - - console.log(response); -} - -main();`}})())},[d,p,u,e,l,n]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"secondary",icon:q.CodeOutlined,onClick:()=>{m(!0)},children:"Get Code"}),(0,t.jsxs)(a.Modal,{title:"Generated Code",open:d,onCancel:()=>{m(!1)},footer:null,width:800,children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium block mb-1 text-gray-700",children:"Language"}),(0,t.jsx)(W.Select,{value:p,onChange:e=>x(e),style:{width:180},options:[{value:"curl",label:"cURL"},{value:"python",label:"Python (OpenAI SDK)"},{value:"javascript",label:"JavaScript (OpenAI SDK)"}]})]}),(0,t.jsx)(z.Button,{onClick:()=>{navigator.clipboard.writeText(g),H.default.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,t.jsx)(K.Tabs,{activeKey:u,onChange:h,items:[{label:"Basic",key:"basic"},{label:"With Messages",key:"messages"},{label:"With Version",key:"version"}]}),(0,t.jsx)(G.Prism,{language:"curl"===p?"bash":"python"===p?"python":"javascript",style:X.coy,wrapLines:!0,wrapLongLines:!0,className:"rounded-md mt-0",customStyle:{maxHeight:"60vh",overflowY:"auto",marginTop:0,borderTopLeftRadius:0,borderTopRightRadius:0},children:g})]})]})},Z=({promptId:e,onClose:n,accessToken:o,isAdmin:i,onDelete:c,onEdit:d})=>{let[m,p]=(0,s.useState)(null),[x,u]=(0,s.useState)(null),[g,f]=(0,s.useState)(null),[j,v]=(0,s.useState)(!0),[y,b]=(0,s.useState)({}),[N,w]=(0,s.useState)(!1),[C,_]=(0,s.useState)(!1),S=async()=>{try{if(v(!0),!o)return;let t=await (0,l.getPromptInfo)(o,e);p(t.prompt_spec),u(t.raw_prompt_template),f(t)}catch(e){H.default.fromBackend("Failed to load prompt information"),console.error("Error fetching prompt info:",e)}finally{v(!1)}};if((0,s.useEffect)(()=>{S()},[e,o]),j)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!m)return(0,t.jsx)("div",{className:"p-4",children:"Prompt not found"});let W=e=>e?new Date(e).toLocaleString():"-",K=async(e,t)=>{await (0,U.copyToClipboard)(e)&&(b(e=>({...e,[t]:!0})),setTimeout(()=>{b(e=>({...e,[t]:!1}))},2e3))},q=async()=>{if(o&&m){_(!0);try{await (0,l.deletePromptCall)(o,X),H.default.success(`Prompt "${X}" deleted successfully`),c?.(),n()}catch(e){console.error("Error deleting prompt:",e),H.default.fromBackend("Failed to delete prompt")}finally{_(!1),w(!1)}}},G=m&&T(m)||"gpt-4o",X=k(m),Z=(e=>{let t;if(e?.version)return String(e.version);var s=(t=k(e),e?.litellm_params?.prompt_id||t);if(!s)return"1";let r=s.match(/[._-]v(\d+)$/);return r?r[1]:"1"})(m);return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Button,{icon:R.ArrowLeftIcon,variant:"light",onClick:n,className:"mb-4",children:"Back to Prompts"}),(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(P.Title,{children:"Prompt Details"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(I.Text,{className:"text-gray-500 font-mono",children:X}),(0,t.jsx)(z.Button,{type:"text",size:"small",icon:y["prompt-id"]?(0,t.jsx)(J.CheckIcon,{size:12}):(0,t.jsx)(V.CopyIcon,{size:12}),onClick:()=>K(X,"prompt-id"),className:`left-2 z-10 transition-all duration-200 ${y["prompt-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Y,{promptId:X,model:G,promptVariables:(e=>{let t;if(!e)return{};let s={},r=/\{\{(\w+)\}\}/g;for(;null!==(t=r.exec(e));){let e=t[1];s[e]||(s[e]=`example_${e}`)}return s})(x?.content),accessToken:o,version:Z}),(0,t.jsx)(r.Button,{icon:F.PencilIcon,variant:"primary",onClick:()=>d?.(g),className:"flex items-center",children:"Prompt Studio"}),i&&(0,t.jsx)(r.Button,{icon:h.TrashIcon,variant:"secondary",onClick:()=>{w(!0)},className:"flex items-center",children:"Delete Prompt"})]})]})]}),(0,t.jsxs)(D.TabGroup,{children:[(0,t.jsxs)(A.TabList,{className:"mb-4",children:[(0,t.jsx)(E.Tab,{children:"Overview"},"overview"),x?(0,t.jsx)(E.Tab,{children:"Prompt Template"},"prompt-template"):(0,t.jsx)(t.Fragment,{}),i?(0,t.jsx)(E.Tab,{children:"Details"},"details"):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(E.Tab,{children:"Raw JSON"},"raw-json")]}),(0,t.jsxs)(M.TabPanels,{children:[(0,t.jsxs)(L.TabPanel,{children:[(0,t.jsxs)(O.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)($.Card,{children:[(0,t.jsx)(I.Text,{children:"Prompt ID"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(P.Title,{className:"font-mono text-sm",children:X})})]}),(0,t.jsxs)($.Card,{children:[(0,t.jsx)(I.Text,{children:"Version"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(P.Title,{children:Z}),(0,t.jsxs)(B.Badge,{color:"blue",className:"mt-1",children:["v",Z]})]})]}),(0,t.jsxs)($.Card,{children:[(0,t.jsx)(I.Text,{children:"Prompt Type"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(P.Title,{children:m.prompt_info?.prompt_type||"-"}),(0,t.jsx)(B.Badge,{color:"blue",className:"mt-1",children:m.prompt_info?.prompt_type||"Unknown"})]})]}),(0,t.jsxs)($.Card,{children:[(0,t.jsx)(I.Text,{children:"Created At"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(P.Title,{children:W(m.created_at)}),(0,t.jsxs)(I.Text,{children:["Last Updated: ",W(m.updated_at)]})]})]})]}),m.litellm_params&&Object.keys(m.litellm_params).length>0&&(0,t.jsxs)($.Card,{className:"mt-6",children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"LiteLLM Parameters"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(m.litellm_params,null,2)})})]})]}),x&&(0,t.jsx)(L.TabPanel,{children:(0,t.jsxs)($.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(P.Title,{children:"Prompt Template"}),(0,t.jsx)(z.Button,{type:"text",size:"small",icon:y["prompt-content"]?(0,t.jsx)(J.CheckIcon,{size:16}):(0,t.jsx)(V.CopyIcon,{size:16}),onClick:()=>K(x.content,"prompt-content"),className:`transition-all duration-200 ${y["prompt-content"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:y["prompt-content"]?"Copied!":"Copy Content"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"Template ID"}),(0,t.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:x.litellm_prompt_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"Content"}),(0,t.jsx)("div",{className:"mt-2 p-4 bg-gray-50 rounded-md border overflow-auto max-h-96",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:x.content})})]}),x.metadata&&Object.keys(x.metadata).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"Template Metadata"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-64",children:JSON.stringify(x.metadata,null,2)})})]})]})]})}),i&&(0,t.jsx)(L.TabPanel,{children:(0,t.jsxs)($.Card,{children:[(0,t.jsx)(P.Title,{className:"mb-4",children:"Prompt Details"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"Prompt ID"}),(0,t.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:X})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"Prompt Type"}),(0,t.jsx)("div",{children:m.prompt_info?.prompt_type||"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:W(m.created_at)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)("div",{children:W(m.updated_at)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"LiteLLM Parameters"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-96",children:JSON.stringify(m.litellm_params,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(I.Text,{className:"font-medium",children:"Prompt Info"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(m.prompt_info,null,2)})})]})]})]})}),(0,t.jsx)(L.TabPanel,{children:(0,t.jsxs)($.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(P.Title,{children:"Raw API Response"}),(0,t.jsx)(z.Button,{type:"text",size:"small",icon:y["raw-json"]?(0,t.jsx)(J.CheckIcon,{size:16}):(0,t.jsx)(V.CopyIcon,{size:16}),onClick:()=>K(JSON.stringify(g,null,2),"raw-json"),className:`transition-all duration-200 ${y["raw-json"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:y["raw-json"]?"Copied!":"Copy JSON"})]}),(0,t.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(g,null,2)})})]})})]})]}),(0,t.jsxs)(a.Modal,{title:"Delete Prompt",open:N,onOk:q,onCancel:()=>{w(!1)},confirmLoading:C,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",(0,t.jsx)("strong",{children:X}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var Q=e.i(808613),ee=e.i(515831),et=e.i(312361),es=e.i(779241),er=e.i(519756);let{Option:ea}=W.Select,el=({visible:e,onClose:r,accessToken:n,onSuccess:o})=>{let[i]=Q.Form.useForm(),[c,d]=(0,s.useState)(!1),[m,p]=(0,s.useState)([]),[x,u]=(0,s.useState)("dotprompt"),h=()=>{i.resetFields(),p([]),u("dotprompt"),r()},g=async()=>{try{let e=await i.validateFields();if(console.log("values: ",e),!n)return void H.default.fromBackend("Access token is required");if("dotprompt"===x&&0===m.length)return void H.default.fromBackend("Please upload a .prompt file");d(!0);let t={};if("dotprompt"===x&&m.length>0){let s=m[0].originFileObj;try{let r=await (0,l.convertPromptFileToJson)(n,s);console.log("Conversion result:",r),t={prompt_id:e.prompt_id,litellm_params:{prompt_integration:"dotprompt",prompt_id:r.prompt_id,prompt_data:r.json_data},prompt_info:{prompt_type:"db"}}}catch(e){console.error("Error converting prompt file:",e),H.default.fromBackend("Failed to convert prompt file to JSON"),d(!1);return}}try{await (0,l.createPromptCall)(n,t),H.default.success("Prompt created successfully!"),h(),o()}catch(e){console.error("Error creating prompt:",e),H.default.fromBackend("Failed to create prompt")}}catch(e){console.error("Form validation error:",e)}finally{d(!1)}};return(0,t.jsx)(a.Modal,{title:"Add New Prompt",open:e,onCancel:h,footer:[(0,t.jsx)(z.Button,{onClick:h,children:"Cancel"},"cancel"),(0,t.jsx)(z.Button,{loading:c,onClick:g,children:"Create Prompt"},"submit")],width:600,children:(0,t.jsxs)(Q.Form,{form:i,layout:"vertical",requiredMark:!1,children:[(0,t.jsx)(Q.Form.Item,{label:"Prompt ID",name:"prompt_id",rules:[{required:!0,message:"Please enter a prompt ID"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Prompt ID can only contain letters, numbers, underscores, and hyphens"}],children:(0,t.jsx)(es.TextInput,{placeholder:"Enter unique prompt ID (e.g., my_prompt_id)"})}),(0,t.jsx)(Q.Form.Item,{label:"Prompt Integration",name:"prompt_integration",initialValue:"dotprompt",children:(0,t.jsx)(W.Select,{value:x,onChange:u,children:(0,t.jsx)(ea,{value:"dotprompt",children:"dotprompt"})})}),"dotprompt"===x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Divider,{}),(0,t.jsxs)(Q.Form.Item,{label:"Prompt File",extra:"Upload a .prompt file that follows the Dotprompt specification",children:[(0,t.jsx)(ee.Upload,{...{beforeUpload:e=>(e.name.endsWith(".prompt")||H.default.fromBackend("Please upload a .prompt file"),!1),fileList:m,onChange:({fileList:e})=>{p(e.slice(-1))},onRemove:()=>{p([])}},children:(0,t.jsx)(z.Button,{icon:(0,t.jsx)(er.UploadOutlined,{}),children:"Select .prompt File"})}),m.length>0&&(0,t.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",m[0].name]})]})]})]})})},en=`{ - "type": "function", - "function": { - "name": "get_current_weather", - "description": "Get the current weather in a given location", - "parameters": { - "type": "object", - "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA" - }, - "unit": { - "type": "string", - "enum": ["celsius", "fahrenheit"] - } - }, - "required": ["location"] - } - } -}`,eo=({visible:e,initialJson:r,onSave:l,onClose:n})=>{let[o,i]=(0,s.useState)(r||en),[c,d]=(0,s.useState)(null),m=()=>{d(null),n()};return(0,t.jsx)(a.Modal,{title:(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsx)("span",{className:"text-lg font-medium",children:"Add Tool"})}),open:e,onCancel:m,width:800,footer:[(0,t.jsx)(z.Button,{onClick:m,children:"Cancel"},"cancel"),(0,t.jsx)(z.Button,{type:"primary",onClick:()=>{try{JSON.parse(o),d(null),l(o)}catch(e){d("Invalid JSON format. Please check your syntax.")}},children:"Add"},"save")],children:(0,t.jsxs)("div",{className:"space-y-3",children:[c&&(0,t.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-red-600 text-sm",children:c}),(0,t.jsx)("textarea",{value:o,onChange:e=>i(e.target.value),className:"w-full min-h-[400px] px-4 py-3 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",placeholder:"Paste your tool JSON here..."})]})})};var ei=e.i(311451),ec=e.i(475254);let ed=(0,ec.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",()=>ed],180127),e.s(["ArrowLeftIcon",()=>ed],516430);let em=(0,ec.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),ep=(0,ec.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),ex=({promptName:e,onNameChange:s,onBack:a,onSave:l,isSaving:n,editMode:o=!1,onShowHistory:i,version:c,promptModel:d="gpt-4o",promptVariables:m={},accessToken:p,proxySettings:x})=>(0,t.jsxs)("div",{className:"bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(r.Button,{icon:ed,variant:"light",onClick:a,size:"xs",children:"Back"}),(0,t.jsx)(ei.Input,{value:e,onChange:e=>s(e.target.value),className:"text-base font-medium border-none shadow-none",style:{width:"200px"}}),c&&(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium",children:c}),(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Draft"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Unsaved changes"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(Y,{promptId:e,model:d,promptVariables:m,accessToken:p,version:c?.replace("v","")||"1",proxySettings:x}),o&&i&&(0,t.jsx)(r.Button,{icon:ep,variant:"secondary",onClick:i,children:"History"}),(0,t.jsx)(r.Button,{icon:em,onClick:l,loading:n,disabled:n,children:o?"Update":"Save"})]})]});var eu=e.i(440987),eh=e.i(992619);let eg=({model:e,temperature:r=1,maxTokens:a=1e3,accessToken:l,onModelChange:n,onTemperatureChange:o,onMaxTokensChange:i})=>{let[c,d]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-[300px]",children:(0,t.jsx)(eh.default,{accessToken:l||"",value:e,onChange:n,showLabel:!1})}),(0,t.jsxs)("button",{onClick:()=>d(!c),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(eu.SettingsIcon,{size:16}),(0,t.jsx)("span",{children:"Parameters"})]}),c&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-96",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:"Model Parameters"}),(0,t.jsx)("button",{onClick:()=>d(!1),className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(I.Text,{className:"text-sm text-gray-700",children:"Temperature"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:0,max:2,step:.1,value:r,onChange:e=>o(parseFloat(e.target.value)||0),className:"w-20"})]})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(I.Text,{className:"text-sm text-gray-700",children:"Max Tokens"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:1,max:32768,value:a,onChange:e=>i(parseInt(e.target.value)||1e3),className:"w-24"})]})})]})]})})]})};var ef=e.i(837007);let ej=(0,ec.default)("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),ev=({tools:e,onAddTool:s,onEditTool:r,onRemoveTool:a})=>(0,t.jsxs)($.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(I.Text,{className:"text-sm font-medium",children:"Tools"}),(0,t.jsxs)("button",{onClick:s,className:"text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add"]})]}),0===e.length?(0,t.jsx)(I.Text,{className:"text-gray-500 text-xs",children:"No tools added"}):(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 border border-gray-200 rounded",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"font-medium text-xs truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1 ml-2",children:[(0,t.jsx)("button",{onClick:()=>r(s),className:"text-xs text-blue-600 hover:text-blue-700",children:"Edit"}),(0,t.jsx)("button",{onClick:()=>a(s),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ej,{size:14})})]})]},s))})]});var ey=e.i(282786),eb=e.i(262218),eN=e.i(751904);let{TextArea:ew}=ei.Input,eC=({value:e,onChange:r,placeholder:a,rows:l=4,className:n})=>{let[o,i]=(0,s.useState)(null),[c,d]=(0,s.useState)(""),m=()=>{c.trim()&&o&&(r(e.substring(0,o.start)+`{{${c}}}`+e.substring(o.end)),i(null),d(""))},p=(()=>{let t,s=/\{\{(\w+)\}\}/g,r=[];for(;null!==(t=s.exec(e));)r.push({name:t[1],start:t.index,end:t.index+t[0].length});return r})();return(0,t.jsxs)("div",{className:`variable-textarea-container ${n}`,children:[(0,t.jsx)("style",{children:` - .variable-highlight-text { - color: #f97316; - background-color: #fff7ed; - border-radius: 4px; - padding: 0 2px; - border: 1px solid #fed7aa; - font-family: monospace; - } - `}),(0,t.jsx)(ew,{value:e,onChange:e=>r(e.target.value),placeholder:a,rows:l,className:"font-sans"}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),p.map((e,s)=>(0,t.jsx)(ey.Popover,{content:(0,t.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,t.jsx)(ei.Input,{size:"small",value:c,onChange:e=>d(e.target.value),onPressEnter:m,placeholder:"Variable name",autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,t.jsx)("button",{onClick:()=>{i(null),d("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:o?.start===e.start,onOpenChange:e=>{e||(i(null),d(""))},trigger:"click",children:(0,t.jsx)(eb.Tag,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,t.jsx)(eN.EditOutlined,{}),onClick:()=>{i({oldName:e.name,start:e.start,end:e.end}),d(e.name)},children:e.name})},`${e.start}-${s}`))]})]})},e_=({value:e,onChange:s})=>(0,t.jsxs)($.Card,{className:"p-3",children:[(0,t.jsx)(I.Text,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,t.jsx)(I.Text,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,t.jsx)(eC,{value:e,onChange:s,rows:3,placeholder:"e.g., You are a helpful assistant..."})]}),ek=(0,ec.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),{Option:eT}=W.Select,eS=({messages:e,onAddMessage:r,onUpdateMessage:a,onRemoveMessage:l,onMoveMessage:n})=>{let[o,i]=(0,s.useState)(null),[c,d]=(0,s.useState)(null),m=()=>{i(null),d(null)};return(0,t.jsxs)($.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)(I.Text,{className:"text-sm font-medium",children:"Prompt messages"}),(0,t.jsxs)(I.Text,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.map((s,r)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{i(r)},onDragOver:e=>{e.preventDefault(),d(r)},onDrop:e=>{e.preventDefault(),null!==o&&o!==r&&n(o,r),i(null),d(null)},onDragEnd:m,className:`border border-gray-300 rounded overflow-hidden bg-white transition-all ${o===r?"opacity-50":""} ${c===r&&o!==r?"border-blue-500 border-2":""}`,children:[(0,t.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,t.jsxs)(W.Select,{value:s.role,onChange:e=>a(r,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,t.jsx)(eT,{value:"user",children:"User"}),(0,t.jsx)(eT,{value:"assistant",children:"Assistant"}),(0,t.jsx)(eT,{value:"system",children:"System"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[e.length>1&&(0,t.jsx)("button",{onClick:()=>l(r),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ej,{size:14})}),(0,t.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,t.jsx)(ek,{size:16})})]})]}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(eC,{value:s.content,onChange:e=>a(r,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},r))}),(0,t.jsxs)("button",{onClick:r,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(ef.PlusIcon,{size:14,className:"mr-1"}),"Add message"]})]})};var e$=e.i(447593);let eP=({extractedVariables:e,variables:s,onVariableChange:r})=>0===e.length?null:(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,t.jsx)(ei.Input,{value:s[e]||"",onChange:t=>r(e,t.target.value),placeholder:`Enter value for ${e}`,size:"small"})]},e))})]});var eI=e.i(56456),eO=e.i(482725),eB=e.i(983561);let eE=({hasVariables:e})=>(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(eB.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)("span",{className:"text-base",children:e?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]});var eD=e.i(771674),eA=e.i(918789),eL=e.i(989022);let eM=({message:e})=>(0,t.jsx)("div",{className:`mb-4 flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,t.jsx)(eD.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(eB.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===e.role?(0,t.jsx)(eA.default,{components:{code({node:e,inline:s,className:r,children:a,...l}){let n=/language-(\w+)/.exec(r||"");return!s&&n?(0,t.jsx)(G.Prism,{style:X.coy,language:n[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...l,children:String(a).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...l,children:a})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:e.content}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.content}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&(0,t.jsx)(eL.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage})]})]})}),ez=({messages:e,isLoading:s,hasVariables:r,messagesEndRef:a})=>{let l=(0,t.jsx)(eI.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===e.length&&(0,t.jsx)(eE,{hasVariables:r}),e.map((e,s)=>(0,t.jsx)(eM,{message:e},s)),s&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(eO.Spin,{indicator:l})}),(0,t.jsx)("div",{ref:a,style:{height:"1px"}})]})},eR=({extractedVariables:e,variables:s})=>{let r=e.filter(e=>!s[e]||""===s[e].trim());return 0===r.length?null:(0,t.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,t.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",r.map(e=>`{{${e}}}`).join(", ")]})]})]})})};var eF=e.i(132104);let{TextArea:eU}=ei.Input,eJ=({inputMessage:e,isLoading:s,isDisabled:a,onInputChange:l,onSend:n,onKeyDown:o,onCancel:i})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,t.jsx)(eU,{value:e,onChange:e=>l(e.target.value),onKeyDown:o,placeholder:"Type your message... (Shift+Enter for new line)",disabled:s,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,t.jsx)(r.Button,{onClick:n,disabled:a,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,t.jsx)(eF.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),s&&(0,t.jsx)(r.Button,{onClick:i,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]}),eV=({prompt:e,accessToken:a})=>{let{isLoading:n,messages:o,inputMessage:i,variables:c,variablesFilled:d,extractedVariables:m,allVariablesFilled:p,messagesEndRef:x,setInputMessage:u,handleSendMessage:h,handleCancelRequest:g,handleClearConversation:f,handleKeyDown:j,handleVariableChange:v}=((e,t)=>{let[r,a]=(0,s.useState)(!1),[n,o]=(0,s.useState)([]),[i,c]=(0,s.useState)(""),[d,m]=(0,s.useState)({}),[p,x]=(0,s.useState)(!1),[u,h]=(0,s.useState)(null),g=(0,s.useRef)(null),f=b(e),j=f.every(e=>d[e]&&""!==d[e].trim());(0,s.useEffect)(()=>{g.current&&setTimeout(()=>{g.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[n]);let v=async()=>{let s;if(!t)return void H.default.fromBackend("Access token is required");if(f.length>0&&!j)return void H.default.fromBackend("Please fill in all template variables");if(!i.trim())return;!p&&f.length>0&&x(!0);let r={role:"user",content:i};o(e=>[...e,r]),c("");let m=new AbortController;h(m),a(!0);let u=Date.now();try{let r,a,c=N(e),p=(0,l.getProxyBaseUrl)(),x={dotprompt_content:c};0===n.length?x.prompt_variables=d:x.conversation_history=[...n.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch(`${p}/prompts/test`,{method:"POST",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(x),signal:m.signal});if(!h.ok){let e=await h.text();throw Error(`HTTP error! status: ${h.status}, ${e}`)}if(!h.body)throw Error("No response body");let g=h.body.getReader(),f=new TextDecoder,j="";for(o(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await g.read();if(e)break;for(let e of f.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{let e=JSON.parse(t);!r&&e.model&&(r=e.model),e.usage&&(a=e.usage);let l=e.choices?.[0]?.delta?.content;l&&(s||(s=Date.now()-u),j+=l,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:j,model:r,timeToFirstToken:s},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let v=Date.now()-u;o(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:v,usage:a},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),o(t=>{let s=t[t.length-1];return s&&"assistant"===s.role&&""===s.content?[...t.slice(0,-1),{role:"assistant",content:`Error: ${e.message}`}]:[...t,{role:"assistant",content:`Error: ${e.message}`}]}))}finally{a(!1),h(null)}};return{isLoading:r,messages:n,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:f,allVariablesFilled:j,messagesEndRef:g,setInputMessage:c,handleSendMessage:v,handleCancelRequest:()=>{u&&(u.abort(),h(null),a(!1),H.default.info("Request cancelled"))},handleClearConversation:()=>{o([]),x(!1),H.default.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}})(e,a);return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!d&&(0,t.jsx)(eP,{extractedVariables:m,variables:c,onVariableChange:v}),o.length>0&&(0,t.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,t.jsx)(r.Button,{onClick:f,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:e$.ClearOutlined,children:"Clear Chat"})}),(0,t.jsx)(ez,{messages:o,isLoading:n,hasVariables:m.length>0,messagesEndRef:x}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,t.jsx)(eR,{extractedVariables:m,variables:c}),(0,t.jsx)(eJ,{inputMessage:i,isLoading:n,isDisabled:n||!i.trim()||m.length>0&&!p,onInputChange:u,onSend:h,onKeyDown:j,onCancel:g})]})]})},eH=({visible:e,promptName:s,isSaving:l,onNameChange:n,onPublish:o,onCancel:i})=>(0,t.jsx)(a.Modal,{title:"Publish Prompt",open:e,onCancel:i,footer:[(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:o,loading:l,children:"Publish"})]},"footer")],children:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)(I.Text,{className:"mb-2",children:"Name"}),(0,t.jsx)(ei.Input,{value:s,onChange:e=>n(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,t.jsx)(I.Text,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})}),eW=({prompt:e})=>{let s=N(e);return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,t.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:s})})]})};var eK=e.i(608856),eq=e.i(573421),eG=e.i(981339);let{Text:eX}=e.i(898586).Typography,eY=({isOpen:e,onClose:r,accessToken:a,promptId:n,activeVersionId:o,onSelectVersion:i})=>{let[c,d]=(0,s.useState)([]),[m,p]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&a&&n&&x()},[e,a,n]);let x=async()=>{p(!0);try{let e=n.includes(".v")?n.split(".v")[0]:n,t=await (0,l.getPromptVersions)(a,e);d(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{p(!1)}},u=e=>{if(e.version)return`v${e.version}`;let t=e.litellm_params?.prompt_id||e.prompt_id;return t.includes(".v")?`v${t.split(".v")[1]}`:t.includes("_v")?`v${t.split("_v")[1]}`:"v1"};return(0,t.jsx)(eK.Drawer,{title:"Version History",placement:"right",onClose:r,open:e,width:400,mask:!1,maskClosable:!1,children:m?(0,t.jsx)(eG.Skeleton,{active:!0,paragraph:{rows:4}}):0===c.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,t.jsx)(eq.List,{dataSource:c,renderItem:(e,s)=>{var r;let a=e.version||parseInt(u(e).replace("v","")),l=null;o&&(o.includes(".v")?l=parseInt(o.split(".v")[1]):o.includes("_v")&&(l=parseInt(o.split("_v")[1])));let n=l?a===l:0===s;return(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ${n?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,onClick:()=>i?.(e),children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(eb.Tag,{className:"m-0",children:u(e)}),0===s&&(0,t.jsx)(eb.Tag,{color:"blue",className:"m-0",children:"Latest"})]}),n&&(0,t.jsx)(eb.Tag,{color:"green",className:"m-0",children:"Active"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eX,{className:"text-sm text-gray-600 font-medium",children:(r=e.created_at)?new Date(r).toLocaleString():"-"}),(0,t.jsx)(eX,{type:"secondary",className:"text-xs",children:e.prompt_info?.prompt_type==="db"?"Saved to Database":"Config Prompt"})]})]},`${e.prompt_id}-v${e.version||a}`)}})})},eZ=({onClose:e,onSuccess:r,accessToken:a,initialPromptData:n})=>{let[o,i]=(0,s.useState)((()=>{if(n)try{return C(n)}catch(e){console.error("Error parsing existing prompt:",e),H.default.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}]}})()),[c,d]=(0,s.useState)(!!n),[m,p]=(0,s.useState)(!1),[x,u]=(0,s.useState)((()=>{if(!n?.prompt_spec)return;let e=n.prompt_spec.prompt_id,t=n.prompt_spec.version||n.prompt_spec.litellm_params?.prompt_id;return"number"==typeof t?`${e}.v${t}`:"string"==typeof t&&(t.includes(".v")||t.includes("_v"))?t:e})()),[h,g]=(0,s.useState)(!1),[f,j]=(0,s.useState)(!1),[v,y]=(0,s.useState)(null),[b,w]=(0,s.useState)(!1),[_,k]=(0,s.useState)("pretty"),T=e=>{void 0!==e?y(e):y(null),g(!0)},S=async()=>{if(!a)return void H.default.fromBackend("Access token is required");if(!o.name||""===o.name.trim())return void H.default.fromBackend("Please enter a valid prompt name");w(!0);try{let t=o.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),s=N(o),i={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:s},prompt_info:{prompt_type:"db"}};c&&n?.prompt_spec?.prompt_id?(await (0,l.updatePromptCall)(a,n.prompt_spec.prompt_id,i),H.default.success("Prompt updated successfully!")):(await (0,l.createPromptCall)(a,i),H.default.success("Prompt created successfully!")),r(),e()}catch(e){console.error("Error saving prompt:",e),H.default.fromBackend(c?"Failed to update prompt":"Failed to save prompt")}finally{w(!1),j(!1)}},$=x&&x.includes(".v")?`v${x.split(".v")[1]}`:null;return(0,t.jsxs)("div",{className:"flex h-full bg-white",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,t.jsx)(ex,{promptName:o.name,onNameChange:e=>i({...o,name:e}),onBack:e,onSave:()=>{o.name&&""!==o.name.trim()&&"New prompt"!==o.name?S():j(!0)},isSaving:b,editMode:c,onShowHistory:()=>p(!0),version:$,promptModel:o.model,promptVariables:(()=>{let e,t={},s=[o.developerMessage,...o.messages.map(e=>e.content)].join(" "),r=/\{\{(\w+)\}\}/g;for(;null!==(e=r.exec(s));){let s=e[1];t[s]||(t[s]=`example_${s}`)}return t})(),accessToken:a}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,t.jsx)(eg,{model:o.model,temperature:o.config.temperature,maxTokens:o.config.max_tokens,accessToken:a,onModelChange:e=>i({...o,model:e}),onTemperatureChange:e=>i({...o,config:{...o.config,temperature:e}}),onMaxTokensChange:e=>i({...o,config:{...o.config,max_tokens:e}})}),(0,t.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"pretty"===_?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("pretty"),children:"PRETTY"}),(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"dotprompt"===_?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===_?(0,t.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,t.jsx)(ev,{tools:o.tools,onAddTool:()=>T(),onEditTool:T,onRemoveTool:e=>{i({...o,tools:o.tools.filter((t,s)=>s!==e)})}}),(0,t.jsx)(e_,{value:o.developerMessage,onChange:e=>i({...o,developerMessage:e})}),(0,t.jsx)(eS,{messages:o.messages,onAddMessage:()=>{i({...o,messages:[...o.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,s)=>{let r=[...o.messages];r[e][t]=s,i({...o,messages:r})},onRemoveMessage:e=>{o.messages.length>1&&i({...o,messages:o.messages.filter((t,s)=>s!==e)})},onMoveMessage:(e,t)=>{let s=[...o.messages],[r]=s.splice(e,1);s.splice(t,0,r),i({...o,messages:s})}})]}):(0,t.jsx)(eW,{prompt:o})]}),(0,t.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,t.jsx)(eV,{prompt:o,accessToken:a})})]})]}),(0,t.jsx)(eH,{visible:f,promptName:o.name,isSaving:b,onNameChange:e=>i({...o,name:e}),onPublish:S,onCancel:()=>j(!1)}),h&&(0,t.jsx)(eo,{visible:h,initialJson:null!==v?o.tools[v].json:"",onSave:e=>{try{let t=JSON.parse(e),s={name:t.function?.name||"Unnamed Tool",description:t.function?.description||"",json:e};if(null!==v){let e=[...o.tools];e[v]=s,i({...o,tools:e})}else i({...o,tools:[...o.tools,s]});g(!1),y(null)}catch(e){H.default.fromBackend("Invalid JSON format")}},onClose:()=>{g(!1),y(null)}}),(0,t.jsx)(eY,{isOpen:m,onClose:()=>p(!1),accessToken:a,promptId:n?.prompt_spec?.prompt_id||o.name,activeVersionId:x,onSelectVersion:e=>{try{let t=C({prompt_spec:e});i(t);let s=e.version||1;u(`${e.prompt_id}.v${s}`)}catch(e){console.error("Error loading version:",e),H.default.fromBackend("Failed to load prompt version")}}})]})};var eQ=e.i(708347);e.s(["default",0,({accessToken:e,userRole:n})=>{let[o,i]=(0,s.useState)([]),[c,d]=(0,s.useState)(!1),[m,p]=(0,s.useState)(null),[x,u]=(0,s.useState)(!1),[h,g]=(0,s.useState)(!1),[f,j]=(0,s.useState)(null),[v,y]=(0,s.useState)(!1),[b,N]=(0,s.useState)(null),w=!!n&&(0,eQ.isAdminRole)(n),C=async()=>{if(e){d(!0);try{let t=await (0,l.getPromptsList)(e);console.log(`prompts: ${JSON.stringify(t)}`),i(t.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{d(!1)}}};(0,s.useEffect)(()=>{C()},[e]);let _=()=>{C(),g(!1),j(null),p(null)},k=async()=>{if(b&&e){y(!0);try{await (0,l.deletePromptCall)(e,b.id),H.default.success(`Prompt "${b.name}" deleted successfully`),C()}catch(e){console.error("Error deleting prompt:",e),H.default.fromBackend("Failed to delete prompt")}finally{y(!1),N(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[h?(0,t.jsx)(eZ,{onClose:()=>{g(!1),j(null)},onSuccess:_,accessToken:e,initialPromptData:f}):m?(0,t.jsx)(Z,{promptId:m,onClose:()=>p(null),accessToken:e,isAdmin:w,onDelete:C,onEdit:e=>{j(e),g(!0)}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{onClick:()=>{m&&p(null),j(null),g(!0)},disabled:!e,children:"+ Add New Prompt"}),(0,t.jsx)(r.Button,{onClick:()=>{m&&p(null),u(!0)},disabled:!e,variant:"secondary",children:"Upload .prompt File"})]})}),(0,t.jsx)(S,{promptsList:o,isLoading:c,onPromptClick:e=>{p(e)},onDeleteClick:(e,t)=>{N({id:e,name:t})},accessToken:e,isAdmin:w})]}),(0,t.jsx)(el,{visible:x,onClose:()=>{u(!1)},accessToken:e,onSuccess:_}),b&&(0,t.jsxs)(a.Modal,{title:"Delete Prompt",open:null!==b,onOk:k,onCancel:()=>{N(null)},confirmLoading:v,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",b.name," ?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],191403)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5929da573d876909.js b/litellm/proxy/_experimental/out/_next/static/chunks/6e0ab2908f7cc2a6.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/5929da573d876909.js rename to litellm/proxy/_experimental/out/_next/static/chunks/6e0ab2908f7cc2a6.js index 7f89c53d933..9b9abb3930c 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5929da573d876909.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/6e0ab2908f7cc2a6.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,109034,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(764205),l=e.i(135214);let s=(0,r.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:r,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&r&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),r=e.i(199133),a=e.i(981339),l=e.i(645526),s=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),c=e.i(708347),d=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),r=`${t}/v1/access_group`,a=await fetch(r,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return a.json()},p=()=>{let{accessToken:e,userRole:t}=(0,d.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&c.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:c,className:d,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:f,isError:x}=p();if(f)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(s.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...c}})]});let y=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(s.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(r.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...c},className:`rounded-md ${d??""}`,notFoundContent:x?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:y.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},552130,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:n,placeholder:o="Select agents",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[m,p]=(0,r.useState)([]),[g,h]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let r=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>r.add(e))}),p(Array.from(r))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let f=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...d.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],x=[...s?.agents||[],...(s?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:x,loading:g,className:i,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:c,filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:f.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},844565,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:c=!1,teamId:d})=>{let[u,m]=(0,r.useState)([]),[p,g]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,l.getPassThroughEndpointsCall)(n,d);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,r=e.methods;return r&&r.length>0?r.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,d]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:s,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,r],810757);let a=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",r=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:`${t}langfuse.png`,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:`${t}langfuse.png`,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:`${t}langsmith.png`,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:`${t}openmeter.png`,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],a=r.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=r.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),s=r.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,a,"callback_map",0,l,"mapDisplayToInternalNames",0,e=>e.map(e=>l[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>s[e]||e),"reverse_callback_map",0,s])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),a=e.i(243652),l=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(199133);e.s(["default",0,({onChange:e,value:a,className:c,accessToken:d,placeholder:u="Select MCP servers",disabled:m=!1,teamId:p})=>{let{data:g=[],isLoading:h}=(0,n.useMCPServers)(p),{data:f=[],isLoading:x}=(()=>{let{accessToken:e}=(0,s.default)();return(0,r.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),y=[...f.map(e=>({label:e,value:e,isAccessGroup:!0,searchText:`${e} Access Group`})),...g.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,isAccessGroup:!1,searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`}))],b=[...a?.servers||[],...a?.accessGroups||[]];return(0,t.jsx)("div",{children:(0,t.jsx)(o.Select,{mode:"multiple",placeholder:u,onChange:t=>{e({servers:t.filter(e=>!f.includes(e)),accessGroups:t.filter(e=>f.includes(e))})},value:b,loading:h||x,className:c,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:m,filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:y.map(e=>(0,t.jsx)(o.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#1890ff",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#1890ff",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"MCP Server"})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(764205),l=e.i(599724),s=e.i(482725),i=e.i(91739),n=e.i(500727),o=e.i(531516),c=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:d,toolPermissions:u,onChange:m,disabled:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,f]=(0,r.useState)({}),[x,y]=(0,r.useState)({}),[b,v]=(0,r.useState)({}),[j,_]=(0,r.useState)({}),w=(0,r.useRef)(u);(0,r.useEffect)(()=>{w.current=u},[u]);let k=(0,r.useMemo)(()=>0===d.length?[]:g.filter(e=>d.includes(e.server_id)),[g,d]),C=async(e,t)=>{y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:""}));try{let r=await (0,a.listMCPTools)(t,e);if(r.error)v(t=>({...t,[e]:r.message||"Failed to fetch tools"})),f(t=>({...t,[e]:[]}));else{let t=r.tools||[];f(r=>({...r,[e]:t}));let a=w.current;if(!a[e]&&t.length>0){let r=t.filter(e=>"delete"!==(0,c.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:r})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),v(t=>({...t,[e]:"Failed to fetch tools"})),f(t=>({...t,[e]:[]}))}finally{y(t=>({...t,[e]:!1}))}};(0,r.useEffect)(()=>{k.forEach(t=>{h[t.server_id]||x[t.server_id]||C(t.server_id,e)})},[k,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===d.length?null:(0,t.jsx)("div",{className:"space-y-4",children:k.map(e=>{let r=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],c=x[e.server_id],d=b[e.server_id],g=j[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Text,{className:"font-semibold text-gray-900",children:r}),e.description&&(0,t.jsx)(l.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&a.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>_(r=>({...r,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let r;return r=h[t=e.server_id]||[],void m({...u,[t]:r.map(e=>e.name)})},disabled:c,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:c,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[c&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(s.Spin,{size:"large"}),(0,t.jsx)(l.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),d&&!c&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(l.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(l.Text,{className:"text-sm text-red-500 mt-1",children:d})]}),!c&&!d&&a.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:p}),!c&&!d&&a.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(r=>{let a=n.includes(r.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(p)return;let t=a?n.filter(e=>e!==r.name):[...n,r.name];N(e.server_id,t)},disabled:p,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Text,{className:"font-medium text-gray-900",children:r.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",r.description||"No description"]})]})})]},r.name)})}),!c&&!d&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(l.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),r=e.i(199133),a=e.i(592968),l=e.i(312361),s=e.i(827252),i=e.i(994388),n=e.i(304967),o=e.i(779241),c=e.i(988297),d=e.i(68155),u=e.i(810757),m=e.i(477386),p=e.i(557662),g=e.i(435451);let{Option:h}=r.Select;e.s(["default",0,({value:e=[],onChange:f,disabledCallbacks:x=[],onDisabledCallbacksChange:y})=>{let b=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),v=Object.keys(p.callbackInfo),j=e=>{f?.(e)},_=(t,r,a)=>{let l=[...e];if("callback_name"===r){let e=p.callback_map[a]||a;l[t]={...l[t],[r]:e,callback_vars:{}}}else l[t]={...l[t],[r]:a};j(l)},w=(t,r,a)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[r]:a}},j(l)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(s.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(r.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:x,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);y?.(t)},style:{width:"100%"},optionLabelProp:"label",children:v.map(e=>{let r=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,t.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let r=t.target,a=r.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),a.replaceChild(t,r)}}}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(l.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(s.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:c.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((l,c)=>{let u=l.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===l.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==c))},icon:d.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(r.Select,{value:u,placeholder:"Select integration",onChange:e=>_(c,"callback_name",e),className:"w-full",optionLabelProp:"label",children:b.map(e=>{let r=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,t.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let r=t.target,a=r.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),a.replaceChild(t,r)}}}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(r.Select,{value:l.callback_type,onChange:e=>_(c,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(h,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(h,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,r)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,r])=>r===e.callback_name)?.[0];if(!l)return null;let i=p.callbackInfo[l]?.dynamic_params||{};return 0===Object.keys(i).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(i).map(([l,i])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:l.replace(/_/g," ")}),(0,t.jsx)(a.Tooltip,{title:`Environment variable reference recommended: os.environ/${l.toUpperCase()}`,children:(0,t.jsx)(s.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(r,l,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(r,l,e.target.value)})]},l))})]})})(l,c)]})]},c)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},207082,e=>{"use strict";var t=e.i(619273),r=e.i(266027),a=e.i(243652),l=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("keys"),n=async(e,t,r,a={})=>{try{let s=(0,l.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:r,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${s?`${s}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}let c=await o.json();return console.log("/key/list API Response:",c),c}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,a,l={})=>{let{accessToken:i}=(0,s.default)();return(0,r.useQuery)({queryKey:o.list({page:e,limit:a,...l}),queryFn:async()=>await n(i,e,a,{...l,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,l={})=>{let{accessToken:o}=(0,s.default)();return(0,r.useQuery)({queryKey:i.list({page:e,limit:a,...l}),queryFn:async()=>await n(o,e,a,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(764205),l=e.i(708347),s=e.i(135214);let i=(0,r.createQueryKeys)("projects"),n=async e=>{let t=(0,a.getProxyBaseUrl)(),r=`${t}/project/list`,l=await fetch(r,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return l.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&l.all_admin_roles.includes(r||"")})}])},392110,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(592968),s=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),c=e.i(779241);let{Option:d}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:f=!1,onNeverExpireChange:x})=>{let y=p&&!["7d","30d","90d","180d","365d"].includes(p),[b,v]=(0,r.useState)(y),[j,_]=(0,r.useState)(y?p:""),[w,k]=(0,r.useState)(e?.getFieldValue?.("duration")||"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(l.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&x&&(0,t.jsx)(n.Checkbox,{checked:f,onChange:t=>{let r=t.target.checked;x(r),r&&(k(""),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(c.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{k(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&f})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(l.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(l.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:b?"custom":p,onChange:e=>{"custom"===e?v(!0):(v(!1),_(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(d,{value:"7d",children:"7 days"}),(0,t.jsx)(d,{value:"30d",children:"30 days"}),(0,t.jsx)(d,{value:"90d",children:"90 days"}),(0,t.jsx)(d,{value:"180d",children:"180 days"}),(0,t.jsx)(d,{value:"365d",children:"365 days"}),(0,t.jsx)(d,{value:"custom",children:"Custom interval"})]}),b&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:j,onChange:e=>{let t=e.target.value;_(t),g(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),u&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),r=e.i(808613),a=e.i(199133),l=e.i(592968),s=e.i(827252);let{Option:i}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:c="",initialValue:d=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(r.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(s.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:d,className:c,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",p," (e.g. 2 ",p,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:s,disabled:i,loading:n,style:o})=>(0,t.jsx)(r.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:s,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,r)=>{if(!r)return!1;let a=e?.find(e=>e.organization_id===r.key);if(!a)return!1;let l=t.toLowerCase().trim(),s=(a.organization_alias||"").toLowerCase(),i=(a.organization_id||"").toLowerCase();return s.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(r.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},533882,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(250980),l=e.i(797672),s=e.i(68155),i=e.i(304967),n=e.i(629569),o=e.i(599724),c=e.i(269200),d=e.i(427612),u=e.i(64848),m=e.i(942232),p=e.i(496020),g=e.i(977572),h=e.i(992619),f=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:x={},onAliasUpdate:y,showExampleConfig:b=!0})=>{let[v,j]=(0,r.useState)([]),[_,w]=(0,r.useState)({aliasName:"",targetModel:""}),[k,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{j(Object.entries(x).map(([e,t],r)=>({id:`${r}-${e}`,aliasName:e,targetModel:t})))},[x]);let N=()=>{if(!k)return;if(!k.aliasName||!k.targetModel)return void f.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.id!==k.id&&e.aliasName===k.aliasName))return void f.default.fromBackend("An alias with this name already exists");let e=v.map(e=>e.id===k.id?k:e);j(e),C(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),f.default.success("Alias updated successfully")},S=()=>{C(null)},$=v.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:_.aliasName,onChange:e=>w({..._,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:_.targetModel,placeholder:"Select target model",onChange:e=>w({..._,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!_.aliasName||!_.targetModel)return void f.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.aliasName===_.aliasName))return void f.default.fromBackend("An alias with this name already exists");let e=[...v,{id:`${Date.now()}-${_.aliasName}`,aliasName:_.aliasName,targetModel:_.targetModel}];j(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),f.default.success("Alias added successfully")},disabled:!_.aliasName||!_.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!_.aliasName||!_.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[v.map(r=>(0,t.jsx)(p.TableRow,{className:"h-8",children:k&&k.id===r.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:k.aliasName,onChange:e=>C({...k,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:k.targetModel,onChange:e=>C({...k,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:r.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:r.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{C({...r})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(l.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=r.id,j(t=v.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),y&&y(a),f.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(s.TrashIcon,{className:"w-3 h-3"})})]})})]})},r.id)),0===v.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys($).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries($).map(([e,r])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',r,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:s=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return s?(0,t.jsx)(a.default,{value:e,onChange:l,disabledCallbacks:i,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(r.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},460285,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(404206),l=e.i(723731),s=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),c=e.i(158392),d=e.i(419470),u=e.i(689020);let m=(0,r.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[f,x]=(0,r.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[y,b]=(0,r.useState)([]),[v,j]=(0,r.useState)([]),[_,w]=(0,r.useState)([]),[k,C]=(0,r.useState)([]),[N,S]=(0,r.useState)({}),[$,T]=(0,r.useState)({}),E=(0,r.useRef)(!1),I=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(E.current&&e===I.current){E.current=!1;return}if(E.current&&e!==I.current&&(E.current=!1),e!==I.current)if(I.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...r}=e;x({routerSettings:r,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];b(a),j(a&&0!==a.length?a.map((e,t)=>{let[r,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:r||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else x({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),b([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,r.useEffect)(()=>{e&&(0,o.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),S(t);let r=e.fields.find(e=>"routing_strategy"===e.field_name);r?.options&&C(r.options),e.routing_strategy_descriptions&&T(e.routing_strategy_descriptions)}})},[e]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...f.routerSettings,enable_tag_filtering:f.enableTagFiltering,routing_strategy:f.selectedStrategy,fallbacks:y.length>0?y:null}).map(([r,a])=>{if("routing_strategy_args"!==r&&"routing_strategy"!==r&&"enable_tag_filtering"!==r&&"fallbacks"!==r){let l=document.querySelector(`input[name="${r}"]`);if(l&&void 0!==l.value&&""!==l.value){let s=((r,a,l)=>{if(null==a)return l;let s=String(a).trim();if(""===s||"null"===s.toLowerCase())return null;if(e.has(r)){let e=Number(s);return Number.isNaN(e)?l:e}if(t.has(r)){if(""===s)return null;try{return JSON.parse(s)}catch{return l}}return"true"===s.toLowerCase()||"false"!==s.toLowerCase()&&s})(r,l.value,a);return[r,s]}}else if("routing_strategy"===r)return[r,f.selectedStrategy];else if("enable_tag_filtering"===r)return[r,f.enableTagFiltering];else if("fallbacks"===r)return[r,y.length>0?y:null];else if("routing_strategy_args"===r&&"latency-based-routing"===f.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),r={};return e?.value&&(r.lowest_latency_buffer=Number(e.value)),t?.value&&(r.ttl=Number(t.value)),["routing_strategy_args",Object.keys(r).length>0?r:null]}return[r,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(r.routing_strategy),allowed_fails:a(r.allowed_fails,!0),cooldown_time:a(r.cooldown_time,!0),num_retries:a(r.num_retries,!0),timeout:a(r.timeout,!0),retry_after:a(r.retry_after,!0),fallbacks:y.length>0?y:null,context_window_fallbacks:a(r.context_window_fallbacks),retry_policy:a(r.retry_policy),model_group_alias:a(r.model_group_alias),enable_tag_filtering:f.enableTagFiltering,routing_strategy_args:a(r.routing_strategy_args)}};(0,r.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{E.current=!0,p({router_settings:O()})},100);return()=>clearTimeout(e)},[f,y]);let M=Array.from(new Set(_.map(e=>e.model_group))).sort();return((0,r.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(s.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(l.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:f,onChange:x,routerFieldsMetadata:N,availableRoutingStrategies:k,routingStrategyDescriptions:$})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(d.FallbackSelectionForm,{groups:v,onGroupsChange:e=>{j(e),b(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),r=e.i(199133),a=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:s,onChange:i,disabled:n,loading:o,teamId:c})=>{let d=c?e?.filter(e=>e.team_id===c):e;return(0,t.jsx)(r.Select,{showSearch:!0,placeholder:"Search or select a project",value:s,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(l.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let r=d?.find(e=>e.project_id===t.key);if(!r)return!1;let a=e.toLowerCase().trim(),l=(r.project_alias||"").toLowerCase(),s=(r.project_id||"").toLowerCase();return l.includes(a)||s.includes(a)},optionFilterProp:"children",children:!o&&d?.map(e=>(0,t.jsxs)(r.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),r=e.i(207082),a=e.i(109799),l=e.i(510674),s=e.i(109034),i=e.i(292639),n=e.i(135214),o=e.i(500330),c=e.i(827252),d=e.i(912598),u=e.i(677667),m=e.i(130643),p=e.i(898667),g=e.i(994388),h=e.i(309426),f=e.i(350967),x=e.i(599724),y=e.i(779241),b=e.i(629569),v=e.i(464571),j=e.i(808613),_=e.i(311451),w=e.i(212931),k=e.i(91739),C=e.i(199133),N=e.i(790848),S=e.i(262218),$=e.i(592968),T=e.i(374009),E=e.i(271645),I=e.i(708347),O=e.i(552130),M=e.i(557662),P=e.i(9314),A=e.i(860585),L=e.i(82946),F=e.i(392110),D=e.i(533882),R=e.i(844565),z=e.i(651904),B=e.i(939510),G=e.i(460285),K=e.i(663435),V=e.i(363256),H=e.i(575260),W=e.i(371455),U=e.i(355619),q=e.i(75921),Q=e.i(390605),X=e.i(727749),J=e.i(764205),Y=e.i(237016),Z=e.i(888259);let ee=({apiKey:e})=>{let[r,a]=(0,E.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(Y.CopyToClipboard,{text:e,onCopy:()=>{a(!0),Z.default.success("Key copied to clipboard"),setTimeout(()=>a(!1),2e3)},children:(0,t.jsx)(v.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,ee],364769);var et=e.i(435451),er=e.i(916940);let{Option:ea}=C.Select,el=async(e,t,r,a)=>{try{if(null===e||null===t)return[];if(null!==r){let l=(await (0,J.modelAvailableCall)(r,e,t,!0,a,!0)).data.map(e=>e.id);return console.log("available_model_names:",l),l}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},es=async(e,t,r,a)=>{try{if(null===e||null===t)return;if(null!==r){let l=(await (0,J.modelAvailableCall)(r,e,t)).data.map(e=>e.id);console.log("available_model_names:",l),a(l)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Y,data:Z,addKey:ei,autoOpenCreate:en,prefillData:eo})=>{let{accessToken:ec,userId:ed,userRole:eu,premiumUser:em}=(0,n.default)(),ep=em||null!=eu&&I.rolesWithWriteAccess.includes(eu),{data:eg,isLoading:eh}=(0,a.useOrganizations)(),{data:ef,isLoading:ex}=(0,l.useProjects)(),{data:ey}=(0,i.useUISettings)(),{data:eb}=(0,s.useTags)(),ev=!!ey?.values?.enable_projects_ui,ej=!!ey?.values?.disable_custom_api_keys,e_=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],ew=(0,d.useQueryClient)(),[ek]=j.Form.useForm(),[eC,eN]=(0,E.useState)(!1),[eS,e$]=(0,E.useState)(null),[eT,eE]=(0,E.useState)(null),[eI,eO]=(0,E.useState)([]),[eM,eP]=(0,E.useState)([]),[eA,eL]=(0,E.useState)("you"),[eF,eD]=(0,E.useState)(!1),[eR,ez]=(0,E.useState)(null),[eB,eG]=(0,E.useState)([]),[eK,eV]=(0,E.useState)([]),[eH,eW]=(0,E.useState)([]),[eU,eq]=(0,E.useState)([]),[eQ,eX]=(0,E.useState)(e),[eJ,eY]=(0,E.useState)(null),[eZ,e0]=(0,E.useState)(null),[e1,e2]=(0,E.useState)(!1),[e4,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)({}),[e7,e8]=(0,E.useState)([]),[e9,te]=(0,E.useState)(!1),[tt,tr]=(0,E.useState)([]),[ta,tl]=(0,E.useState)([]),[ts,ti]=(0,E.useState)("llm_api"),[tn,to]=(0,E.useState)({}),[tc,td]=(0,E.useState)(!1),[tu,tm]=(0,E.useState)("30d"),[tp,tg]=(0,E.useState)(null),[th,tf]=(0,E.useState)(0),[tx,ty]=(0,E.useState)([]),[tb,tv]=(0,E.useState)(null),tj=()=>{eN(!1),ek.resetFields(),eq([]),tl([]),ti("llm_api"),to({}),td(!1),tm("30d"),tg(null),tf(e=>e+1),tv(null),eY(null),e0(null)},t_=()=>{eN(!1),e$(null),eX(null),ek.resetFields(),eq([]),tl([]),ti("llm_api"),to({}),td(!1),tm("30d"),tg(null),tf(e=>e+1),tv(null),eY(null),e0(null)};(0,E.useEffect)(()=>{ed&&eu&&ec&&es(ed,eu,ec,eO)},[ec,ed,eu]),(0,E.useEffect)(()=>{ec&&(0,J.getAgentsList)(ec).then(e=>ty(e?.agents||[])).catch(()=>ty([]))},[ec]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,J.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eV(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,J.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,J.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);eG(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,E.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e5(JSON.parse(e));else{let e=await (0,J.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e5(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,E.useEffect)(()=>{if(en&&!eF&&Y&&eu&&I.rolesWithWriteAccess.includes(eu)&&(eN(!0),eD(!0),eo)){if(eo.owned_by&&("another_user"===eo.owned_by&&"Admin"!==eu?eL("you"):eL(eo.owned_by)),eo.team_id){let e=Y?.find(e=>e.team_id===eo.team_id)||null;e&&(eX(e),ek.setFieldsValue({team_id:eo.team_id}))}eo.key_alias&&ek.setFieldsValue({key_alias:eo.key_alias}),eo.models&&eo.models.length>0&&ez(eo.models),eo.key_type&&(ti(eo.key_type),ek.setFieldsValue({key_type:eo.key_type}))}},[en,eo,Y,eF,ek,eu]);let tw=eM.includes("no-default-models")&&!eQ,tk=async e=>{try{let t,a=e?.key_alias??"",l=e?.team_id??null;if((Z?.filter(e=>e.team_id===l).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${l}, please provide another key alias`);if(X.default.info("Making API Call"),eN(!0),"you"===eA)e.user_id=ed;else if("agent"===eA){if(!tb)return void X.default.fromBackend("Please select an agent");e.agent_id=tb}let s={};try{s=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eA&&(s.service_account_id=e.key_alias),eU.length>0&&(s={...s,logging:eU.filter(e=>e.callback_name)}),ta.length>0){let e=(0,M.mapDisplayToInternalNames)(ta);s={...s,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tu),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(s),e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:r}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),r&&r.length>0&&(e.object_permission.mcp_access_groups=r),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:r}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),r&&r.length>0&&(e.object_permission.agent_access_groups=r),delete e.allowed_agents_and_groups}Object.keys(tn).length>0&&(e.aliases=JSON.stringify(tn)),tp?.router_settings&&Object.values(tp.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tp.router_settings),t="service_account"===eA?await (0,J.keyCreateServiceAccountCall)(ec,e):await (0,J.keyCreateCall)(ec,ed,e),console.log("key create Response:",t),ei(t),ew.invalidateQueries({queryKey:r.keyKeys.lists()}),e$(t.key),eE(t.soft_budget),X.default.success("Virtual Key Created"),ek.resetFields(),localStorage.removeItem("userData"+ed)}catch(t){console.log("error in create key:",t);let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let r=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(r=a.message)}}else{let t=e?.error||e;t?.message&&(r=t.message)}}catch(e){}return t.includes("team_member_permission_error")||r.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);X.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(eZ){let e=ef?.find(e=>e.project_id===eZ);eP(e?.models??[]),ek.setFieldValue("models",[]);return}ed&&eu&&ec&&el(ed,eu,ec,eQ?.team_id??null).then(e=>{eP(Array.from(new Set([...eQ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eQ,eZ,ec,ed,eu,ek]),(0,E.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),ez(null)},[eR,eM,ek]),(0,E.useEffect)(()=>{if(!eZ||!Y)return;let e=ef?.find(e=>e.project_id===eZ);if(!e?.team_id||eQ?.team_id===e.team_id)return;let t=Y.find(t=>t.team_id===e.team_id)||null;t&&(eX(t),ek.setFieldValue("team_id",t.team_id))},[Y,eZ,ef]);let tC=async e=>{if(!e)return void e8([]);te(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let r=(await (0,J.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(r)}catch(e){console.error("Error fetching users:",e),X.default.fromBackend("Failed to search for users")}finally{te(!1)}},tN=(0,E.useCallback)((0,T.default)(e=>tC(e),300),[ec]);return(0,t.jsxs)("div",{children:[eu&&I.rolesWithWriteAccess.includes(eu)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eN(!0),children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eC,width:1e3,footer:null,onOk:tj,onCancel:t_,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tk,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)($.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(k.Radio.Group,{onChange:e=>eL(e.target.value),value:eA,children:[(0,t.jsx)(k.Radio,{value:"you",children:"You"}),(0,t.jsx)(k.Radio,{value:"service_account",children:"Service Account"}),"Admin"===eu&&(0,t.jsx)(k.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(k.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eA&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)($.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===eA,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(C.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tN(e)},onSelect:(e,t)=>{let r;return r=t.user,void ek.setFieldsValue({user_id:r.user_id})},options:e7,loading:e9,allowClear:!0,style:{width:"100%"},notFoundContent:e9?"Searching...":"No users found"}),(0,t.jsx)(v.Button,{onClick:()=>e2(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===eA&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(C.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tb,onChange:e=>tv(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tx.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)($.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(V.default,{organizations:eg,loading:eh,disabled:"Admin"!==eu,onChange:e=>{eY(e||null),eX(null),e0(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)($.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===eA,message:"Please select a team for the service account"}],help:"service_account"===eA?"required":"",children:(0,t.jsx)(K.default,{disabled:null!==eZ,organizationId:eJ,onTeamSelect:e=>{eX(e),e0(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eY(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eY(null),ek.setFieldValue("organization_id",void 0))}})}),ev&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)($.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ef,teamId:eQ?.team_id,loading:ex||!Y,onChange:e=>{if(!e){e0(null),eX(null),ek.setFieldValue("team_id",void 0);return}e0(e)}})})]}),tw&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(x.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tw&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eA||"another_user"===eA?"Key Name":"Service Account ID"," ",(0,t.jsx)($.Tooltip,{title:"you"===eA||"another_user"===eA?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===eA?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(y.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)($.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===ts||"read_only"===ts?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(C.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===ts||"read_only"===ts,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!eZ&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,U.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)($.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(C.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{ti(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tw&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)($.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.max_budget&&r>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(et.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)($.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(A.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)($.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.tpm_limit&&r>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(et.default,{step:1,width:400})}),(0,t.jsx)(B.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)($.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.rpm_limit&&r>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(et.default,{step:1,width:400})}),(0,t.jsx)(B.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)($.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:ep?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(C.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eB.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)($.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:ep?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!ep,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)($.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:em?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(C.Select,{mode:"tags",style:{width:"100%"},disabled:!em,placeholder:em?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)($.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:em?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(C.Select,{mode:"tags",style:{width:"100%"},disabled:!em,placeholder:em?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)($.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(P.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)($.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:em?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(R.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:em?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!em,teamId:eQ?eQ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)($.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)($.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(_.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)($.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(C.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:e_})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)($.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eQ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(_.Input,{type:"hidden"})}),(0,t.jsx)(j.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(Q.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)($.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(O.default,{onChange:e=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),em?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(z.default,{value:eU,onChange:eq,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tl})})})]}):(0,t.jsx)($.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(z.default,{value:eU,onChange:eq,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tl})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:ec||"",value:tp||void 0,onChange:tg,modelData:eI.length>0?{data:eI.map(e=>({model_name:e}))}:void 0},th)})})]},`router-settings-accordion-${th}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(x.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(D.default,{accessToken:ec,initialModelAliases:tn,onAliasUpdate:to,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(F.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:td,rotationInterval:tu,onRotationIntervalChange:tm,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(_.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)($.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:J.proxyBaseUrl?`${J.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(c.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(L.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ej?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(v.Button,{htmlType:"submit",disabled:tw,style:{opacity:tw?.5:1},children:"Create Key"})})]})}),e1&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e1,onCancel:()=>e2(!1),footer:null,width:800,children:(0,t.jsx)(W.CreateUserButton,{userID:ed,accessToken:ec,teams:Y,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e2(!1)},isEmbedded:!0})}),eS&&(0,t.jsx)(w.Modal,{open:eC,onOk:tj,onCancel:t_,footer:null,children:(0,t.jsxs)(f.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eS?(0,t.jsx)(ee,{apiKey:eS}):(0,t.jsx)(x.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,el,"fetchUserModels",0,es],702597)},309426,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),l=e.i(271645),s=e.i(46757);let i=(0,a.makeClassName)("Col"),n=l.default.forwardRef((e,a)=>{let n,o,c,d,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:p,numColSpanLg:g,children:h,className:f}=e,x=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),y=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(i("root"),(n=y(u,s.colSpan),o=y(m,s.colSpanSm),c=y(p,s.colSpanMd),d=y(g,s.colSpanLg),(0,r.tremorTwMerge)(n,o,c,d)),f)},x),h)});n.displayName="Col",e.s(["Col",()=>n],309426)},950724,(e,t,r)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},100236,(e,t,r)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,r)=>{var a=e.r(100236),l="object"==typeof self&&self&&self.Object===Object&&self;t.exports=a||l||Function("return this")()},631926,(e,t,r)=>{var a=e.r(139088);t.exports=function(){return a.Date.now()}},748891,(e,t,r)=>{var a=/\s/;t.exports=function(e){for(var t=e.length;t--&&a.test(e.charAt(t)););return t}},830364,(e,t,r)=>{var a=e.r(748891),l=/^\s+/;t.exports=function(e){return e?e.slice(0,a(e)+1).replace(l,""):e}},630353,(e,t,r)=>{t.exports=e.r(139088).Symbol},243436,(e,t,r)=>{var a=e.r(630353),l=Object.prototype,s=l.hasOwnProperty,i=l.toString,n=a?a.toStringTag:void 0;t.exports=function(e){var t=s.call(e,n),r=e[n];try{e[n]=void 0;var a=!0}catch(e){}var l=i.call(e);return a&&(t?e[n]=r:delete e[n]),l}},223243,(e,t,r)=>{var a=Object.prototype.toString;t.exports=function(e){return a.call(e)}},377684,(e,t,r)=>{var a=e.r(630353),l=e.r(243436),s=e.r(223243),i=a?a.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?l(e):s(e)}},877289,(e,t,r)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},361884,(e,t,r)=>{var a=e.r(377684),l=e.r(877289);t.exports=function(e){return"symbol"==typeof e||l(e)&&"[object Symbol]"==a(e)}},773759,(e,t,r)=>{var a=e.r(830364),l=e.r(950724),s=e.r(361884),i=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(s(e))return i;if(l(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=l(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var r=o.test(e);return r||c.test(e)?d(e.slice(2),r?2:8):n.test(e)?i:+e}},374009,(e,t,r)=>{var a=e.r(950724),l=e.r(631926),s=e.r(773759),i=Math.max,n=Math.min;t.exports=function(e,t,r){var o,c,d,u,m,p,g=0,h=!1,f=!1,x=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=o,a=c;return o=c=void 0,g=t,u=e.apply(a,r)}function b(e){var r=e-p,a=e-g;return void 0===p||r>=t||r<0||f&&a>=d}function v(){var e,r,a,s=l();if(b(s))return j(s);m=setTimeout(v,(e=s-p,r=s-g,a=t-e,f?n(a,d-r):a))}function j(e){return(m=void 0,x&&o)?y(e):(o=c=void 0,u)}function _(){var e,r=l(),a=b(r);if(o=arguments,c=this,p=r,a){if(void 0===m)return g=e=p,m=setTimeout(v,t),h?y(e):u;if(f)return clearTimeout(m),m=setTimeout(v,t),y(p)}return void 0===m&&(m=setTimeout(v,t)),u}return t=s(t)||0,a(r)&&(h=!!r.leading,d=(f="maxWait"in r)?i(s(r.maxWait)||0,t):d,x="trailing"in r?!!r.trailing:x),_.cancel=function(){void 0!==m&&clearTimeout(m),g=0,o=p=c=m=void 0},_.flush=function(){return void 0===m?u:j(l())},_}},964306,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["XCircleIcon",0,r],964306)},435451,620250,e=>{"use strict";var t=e.i(843476),r=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),a.default.createElement("path",{d:"M12 4v16m8-8H4"}))},s=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),a.default.createElement("path",{d:"M20 12H4"}))};var i=e.i(444755),n=e.i(673706),o=e.i(677955);let c="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",d="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=a.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:h}=e,f=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),x=(0,a.useRef)(null),[y,b]=a.default.useState(!1),v=a.default.useCallback(()=>{b(!0)},[]),j=a.default.useCallback(()=>{b(!1)},[]),[_,w]=a.default.useState(!1),k=a.default.useCallback(()=>{w(!0)},[]),C=a.default.useCallback(()=>{w(!1)},[]);return a.default.createElement(o.default,Object.assign({type:"number",ref:(0,n.mergeRefs)([x,t]),disabled:p,makeInputClassName:(0,n.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=x.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&v(),"ArrowUp"===e.key&&k()},onKeyUp:e=>{"ArrowDown"===e.key&&j(),"ArrowUp"===e.key&&C()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==h||h(e))},stepper:m?a.default.createElement("div",{className:(0,i.tremorTwMerge)("flex justify-center align-middle")},a.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null==(e=x.current)||e.stepDown(),null==(t=x.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},a.default.createElement(s,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),a.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null==(e=x.current)||e.stepUp(),null==(t=x.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},a.default.createElement(l,{"data-testid":"step-up",className:(_?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},f))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:a="Enter a numerical value",min:l,max:s,onChange:i,...n})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:a,min:l,max:s,onChange:i,...n})],435451)},677667,674175,886148,543086,e=>{"use strict";let t,r;var a,l=e.i(290571),s=e.i(429427),i=e.i(371330),n=e.i(271645),o=e.i(394487),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(83733);let p=(0,n.createContext)(()=>{});function g({value:e,children:t}){return n.default.createElement(p.Provider,{value:e},t)}e.s(["CloseProvider",()=>g],674175);var h=e.i(233137),f=e.i(233538),x=e.i(397701),y=e.i(402155),b=e.i(700020);let v=null!=(a=n.default.startTransition)?a:function(e){e()};var j=e.i(998348),_=((t=_||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),w=((r=w||{})[r.ToggleDisclosure=0]="ToggleDisclosure",r[r.CloseDisclosure=1]="CloseDisclosure",r[r.SetButtonId=2]="SetButtonId",r[r.SetPanelId=3]="SetPanelId",r[r.SetButtonElement=4]="SetButtonElement",r[r.SetPanelElement=5]="SetPanelElement",r);let k={0:e=>({...e,disclosureState:(0,x.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},C=(0,n.createContext)(null);function N(e){let t=(0,n.useContext)(C);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return t}C.displayName="DisclosureContext";let S=(0,n.createContext)(null);S.displayName="DisclosureAPIContext";let $=(0,n.createContext)(null);function T(e,t){return(0,x.match)(t.type,k,e,t)}$.displayName="DisclosurePanelContext";let E=n.Fragment,I=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,O=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:r=!1,...a}=e,l=(0,n.useRef)(null),s=(0,u.useSyncRefs)(t,(0,u.optionalRef)(e=>{l.current=e},void 0===e.as||e.as===n.Fragment)),i=(0,n.useReducer)(T,{disclosureState:+!r,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:d},m]=i,p=(0,c.useEvent)(e=>{m({type:1});let t=(0,y.getOwnerDocument)(l);if(!t||!d)return;let r=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(d):t.getElementById(d);null==r||r.focus()}),f=(0,n.useMemo)(()=>({close:p}),[p]),v=(0,n.useMemo)(()=>({open:0===o,close:p}),[o,p]),j=(0,b.useRender)();return n.default.createElement(C.Provider,{value:i},n.default.createElement(S.Provider,{value:f},n.default.createElement(g,{value:p},n.default.createElement(h.OpenClosedProvider,{value:(0,x.match)(o,{0:h.State.Open,1:h.State.Closed})},j({ourProps:{ref:s},theirProps:a,slot:v,defaultTag:E,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let r=(0,n.useId)(),{id:a=`headlessui-disclosure-button-${r}`,disabled:l=!1,autoFocus:m=!1,...p}=e,[g,h]=N("Disclosure.Button"),x=(0,n.useContext)($),y=null!==x&&x===g.panelId,v=(0,n.useRef)(null),_=(0,u.useSyncRefs)(v,t,(0,c.useEvent)(e=>{if(!y)return h({type:4,element:e})}));(0,n.useEffect)(()=>{if(!y)return h({type:2,buttonId:a}),()=>{h({type:2,buttonId:null})}},[a,h,y]);let w=(0,c.useEvent)(e=>{var t;if(y){if(1===g.disclosureState)return;switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0}),null==(t=g.buttonElement)||t.focus()}}else switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0})}}),k=(0,c.useEvent)(e=>{e.key===j.Keys.Space&&e.preventDefault()}),C=(0,c.useEvent)(e=>{var t;(0,f.isDisabledReactIssue7711)(e.currentTarget)||l||(y?(h({type:0}),null==(t=g.buttonElement)||t.focus()):h({type:0}))}),{isFocusVisible:S,focusProps:T}=(0,s.useFocusRing)({autoFocus:m}),{isHovered:E,hoverProps:I}=(0,i.useHover)({isDisabled:l}),{pressed:O,pressProps:M}=(0,o.useActivePress)({disabled:l}),P=(0,n.useMemo)(()=>({open:0===g.disclosureState,hover:E,active:O,disabled:l,focus:S,autofocus:m}),[g,E,O,S,l,m]),A=(0,d.useResolveButtonType)(e,g.buttonElement),L=y?(0,b.mergeProps)({ref:_,type:A,disabled:l||void 0,autoFocus:m,onKeyDown:w,onClick:C},T,I,M):(0,b.mergeProps)({ref:_,id:a,type:A,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:l||void 0,autoFocus:m,onKeyDown:w,onKeyUp:k,onClick:C},T,I,M);return(0,b.useRender)()({ourProps:L,theirProps:p,slot:P,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let r=(0,n.useId)(),{id:a=`headlessui-disclosure-panel-${r}`,transition:l=!1,...s}=e,[i,o]=N("Disclosure.Panel"),{close:d}=function e(t){let r=(0,n.useContext)(S);if(null===r){let r=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}("Disclosure.Panel"),[p,g]=(0,n.useState)(null),f=(0,u.useSyncRefs)(t,(0,c.useEvent)(e=>{v(()=>o({type:5,element:e}))}),g);(0,n.useEffect)(()=>(o({type:3,panelId:a}),()=>{o({type:3,panelId:null})}),[a,o]);let x=(0,h.useOpenClosed)(),[y,j]=(0,m.useTransition)(l,p,null!==x?(x&h.State.Open)===h.State.Open:0===i.disclosureState),_=(0,n.useMemo)(()=>({open:0===i.disclosureState,close:d}),[i.disclosureState,d]),w={ref:f,id:a,...(0,m.transitionDataAttributes)(j)},k=(0,b.useRender)();return n.default.createElement(h.ResetOpenClosedProvider,null,n.default.createElement($.Provider,{value:i.panelId},k({ourProps:w,theirProps:s,slot:_,defaultTag:"div",features:I,visible:y,name:"Disclosure.Panel"})))})});e.s(["Disclosure",()=>O],886148);let M=(0,n.createContext)(void 0);var P=e.i(444755);let A=(0,e.i(673706).makeClassName)("Accordion"),L=(0,n.createContext)({isOpen:!1}),F=n.default.forwardRef((e,t)=>{var r;let{defaultOpen:a=!1,children:s,className:i}=e,o=(0,l.__rest)(e,["defaultOpen","children","className"]),c=null!=(r=(0,n.useContext)(M))?r:(0,P.tremorTwMerge)("rounded-tremor-default border");return n.default.createElement(O,Object.assign({as:"div",ref:t,className:(0,P.tremorTwMerge)(A("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",c,i),defaultOpen:a},o),({open:e})=>n.default.createElement(L.Provider,{value:{isOpen:e}},s))});F.displayName="Accordion",e.s(["OpenContext",()=>L,"default",()=>F],543086),e.s(["Accordion",()=>F],677667)},898667,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(886148);let l=e=>{var a=(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"},a),r.default.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var s=e.i(543086),i=e.i(444755);let n=(0,e.i(673706).makeClassName)("AccordionHeader"),o=r.default.forwardRef((e,o)=>{let{children:c,className:d}=e,u=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,r.useContext)(s.OpenContext);return r.default.createElement(a.Disclosure.Button,Object.assign({ref:o,className:(0,i.tremorTwMerge)(n("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",d)},u),r.default.createElement("div",{className:(0,i.tremorTwMerge)(n("children"),"flex flex-1 text-inherit mr-4")},c),r.default.createElement("div",null,r.default.createElement(l,{className:(0,i.tremorTwMerge)(n("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});o.displayName="AccordionHeader",e.s(["AccordionHeader",()=>o],898667)},130643,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(886148),l=e.i(444755);let s=(0,e.i(673706).makeClassName)("AccordionBody"),i=r.default.forwardRef((e,i)=>{let{children:n,className:o}=e,c=(0,t.__rest)(e,["children","className"]);return r.default.createElement(a.Disclosure.Panel,Object.assign({ref:i,className:(0,l.tremorTwMerge)(s("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},c),n)});i.displayName="AccordionBody",e.s(["AccordionBody",()=>i],130643)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:n,placeholder:o="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[m,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,l.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:e,value:s,loading:m,className:i,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["RobotOutlined",0,s],983561)},56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),a=e.i(201072),l=e.i(121229),s=e.i(726289),i=e.i(864517),n=e.i(343794),o=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),m=e.i(703923),p={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},g=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),a=!1;e.current.forEach(function(e){if(e){a=!0;var l=e.style;l.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(l.transitionDuration="0s, 0s")}}),a&&(r.current=Date.now())}),e.current},h=e.i(410160),f=e.i(392221),x=e.i(654310),y=0,b=(0,x.default)();let v=function(e){var r=t.useState(),a=(0,f.default)(r,2),l=a[0],s=a[1];return t.useEffect(function(){var e;s("rc_progress_".concat((b?(e=y,y+=1):e="TEST_OR_SSR",e)))},[]),e||l};var j=function(e){var r=e.bg,a=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},a)};function _(e,t){return Object.keys(e).map(function(r){var a=parseFloat(r),l="".concat(Math.floor(a*t),"%");return"".concat(e[r]," ").concat(l)})}var w=t.forwardRef(function(e,r){var a=e.prefixCls,l=e.color,s=e.gradientId,i=e.radius,n=e.style,o=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,m=e.gapDegree,p=l&&"object"===(0,h.default)(l),g=u/2,f=t.createElement("circle",{className:"".concat(a,"-circle-path"),r:i,cx:g,cy:g,stroke:p?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==o),style:n,ref:r});if(!p)return f;var x="".concat(s,"-conic"),y=_(l,(360-m)/360),b=_(l,1),v="conic-gradient(from ".concat(m?"".concat(180+m/2,"deg"):"0deg",", ").concat(y.join(", "),")"),w="linear-gradient(to ".concat(m?"bottom":"top",", ").concat(b.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:x},f),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(x,")")},t.createElement(j,{bg:w},t.createElement(j,{bg:v}))))}),k=function(e,t,r,a,l,s,i,n,o,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-a)/100*t;return"round"===o&&100!==a&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof n?n:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(l+r/100*360*((360-s)/360)+(0===s?0:({bottom:0,top:180,left:90,right:-90})[i]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},C=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function N(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let S=function(e){var r,a,l,s,i=(0,u.default)((0,u.default)({},p),e),o=i.id,c=i.prefixCls,f=i.steps,x=i.strokeWidth,y=i.trailWidth,b=i.gapDegree,j=void 0===b?0:b,_=i.gapPosition,S=i.trailColor,$=i.strokeLinecap,T=i.style,E=i.className,I=i.strokeColor,O=i.percent,M=(0,m.default)(i,C),P=v(o),A="".concat(P,"-gradient"),L=50-x/2,F=2*Math.PI*L,D=j>0?90+j/2:-90,R=(360-j)/360*F,z="object"===(0,h.default)(f)?f:{count:f,gap:2},B=z.count,G=z.gap,K=N(O),V=N(I),H=V.find(function(e){return e&&"object"===(0,h.default)(e)}),W=H&&"object"===(0,h.default)(H)?"butt":$,U=k(F,R,0,100,D,j,_,S,W,x),q=g();return t.createElement("svg",(0,d.default)({className:(0,n.default)("".concat(c,"-circle"),E),viewBox:"0 0 ".concat(100," ").concat(100),style:T,id:o,role:"presentation"},M),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:L,cx:50,cy:50,stroke:S,strokeLinecap:W,strokeWidth:y||x,style:U}),B?(r=Math.round(B*(K[0]/100)),a=100/B,l=0,Array(B).fill(null).map(function(e,s){var i=s<=r-1?V[0]:S,n=i&&"object"===(0,h.default)(i)?"url(#".concat(A,")"):void 0,o=k(F,R,l,a,D,j,_,i,"butt",x,G);return l+=(R-o.strokeDashoffset+G)*100/R,t.createElement("circle",{key:s,className:"".concat(c,"-circle-path"),r:L,cx:50,cy:50,stroke:n,strokeWidth:x,opacity:1,style:o,ref:function(e){q[s]=e}})})):(s=0,K.map(function(e,r){var a=V[r]||V[V.length-1],l=k(F,R,s,e,D,j,_,a,W,x);return s+=e,t.createElement(w,{key:r,color:a,ptg:e,radius:L,prefixCls:c,gradientId:A,style:l,strokeLinecap:W,strokeWidth:x,gapDegree:j,ref:function(e){q[r]=e},size:100})}).reverse()))};var $=e.i(491816);e.i(765846);var T=e.i(896091);function E(e){return!e||e<0?0:e>100?100:e}function I({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let O=(e,t,r)=>{var a,l,s,i;let n=-1,o=-1;if("step"===t){let t=r.steps,a=r.strokeWidth;"string"==typeof e||void 0===e?(n="small"===e?2:14,o=null!=a?a:8):"number"==typeof e?[n,o]=[e,e]:[n=14,o=8]=Array.isArray(e)?e:[e.width,e.height],n*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?o=t||("small"===e?6:8):"number"==typeof e?[n,o]=[e,e]:[n=-1,o=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[n,o]="small"===e?[60,60]:[120,120]:"number"==typeof e?[n,o]=[e,e]:Array.isArray(e)&&(n=null!=(l=null!=(a=e[0])?a:e[1])?l:120,o=null!=(i=null!=(s=e[0])?s:e[1])?i:120));return[n,o]},M=e=>{let{prefixCls:r,trailColor:a=null,strokeLinecap:l="round",gapPosition:s,gapDegree:i,width:o=120,type:c,children:d,success:u,size:m=o,steps:p}=e,[g,h]=O(m,"circle"),{strokeWidth:f}=e;void 0===f&&(f=Math.max(3/g*100,6));let x=t.useMemo(()=>i||0===i?i:"dashboard"===c?75:void 0,[i,c]),y=(({percent:e,success:t,successPercent:r})=>{let a=E(I({success:t,successPercent:r}));return[a,E(E(e)-a)]})(e),b="[object Object]"===Object.prototype.toString.call(e.strokeColor),v=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||T.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),j=(0,n.default)(`${r}-inner`,{[`${r}-circle-gradient`]:b}),_=t.createElement(S,{steps:p,percent:p?y[1]:y,strokeWidth:f,trailWidth:f,strokeColor:p?v[1]:v,strokeLinecap:l,trailColor:a,prefixCls:r,gapDegree:x,gapPosition:s||"dashboard"===c&&"bottom"||void 0}),w=g<=20,k=t.createElement("div",{className:j,style:{width:g,height:h,fontSize:.15*g+6}},_,!w&&d);return w?t.createElement($.default,{title:d},k):k};e.i(296059);var P=e.i(694758),A=e.i(915654),L=e.i(183293),F=e.i(246422),D=e.i(838378);let R="--progress-line-stroke-color",z="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new P.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},G=(0,F.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,D.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,L.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${R})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,A.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var K=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let V=e=>{let{prefixCls:r,direction:a,percent:l,size:s,strokeWidth:i,strokeColor:o,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:m,success:p}=e,{align:g,type:h}=m,f=o&&"string"!=typeof o?((e,t)=>{let{from:r=T.presetPrimaryColors.blue,to:a=T.presetPrimaryColors.blue,direction:l="rtl"===t?"to left":"to right"}=e,s=K(e,["from","to","direction"]);if(0!==Object.keys(s).length){let e,t=(e=[],Object.keys(s).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:s[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${l}, ${t})`;return{background:r,[R]:r}}let i=`linear-gradient(${l}, ${r}, ${a})`;return{background:i,[R]:i}})(o,a):{[R]:o,background:o},x="square"===c||"butt"===c?0:void 0,[y,b]=O(null!=s?s:[-1,i||("small"===s?6:8)],"line",{strokeWidth:i}),v=Object.assign(Object.assign({width:`${E(l)}%`,height:b,borderRadius:x},f),{[z]:E(l)/100}),j=I(e),_={width:`${E(j)}%`,height:b,borderRadius:x,backgroundColor:null==p?void 0:p.strokeColor},w=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:x}},t.createElement("div",{className:(0,n.default)(`${r}-bg`,`${r}-bg-${h}`),style:v},"inner"===h&&d),void 0!==j&&t.createElement("div",{className:`${r}-success-bg`,style:_})),k="outer"===h&&"start"===g,C="outer"===h&&"end"===g;return"outer"===h&&"center"===g?t.createElement("div",{className:`${r}-layout-bottom`},w,d):t.createElement("div",{className:`${r}-outer`,style:{width:y<0?"100%":y}},k&&d,w,C&&d)},H=e=>{let{size:r,steps:a,rounding:l=Math.round,percent:s=0,strokeWidth:i=8,strokeColor:o,trailColor:c=null,prefixCls:d,children:u}=e,m=l(s/100*a),[p,g]=O(null!=r?r:["small"===r?2:14,i],"step",{steps:a,strokeWidth:i}),h=p/a,f=Array.from({length:a});for(let e=0;et.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let U=["normal","exception","active","success"],q=t.forwardRef((e,d)=>{let u,{prefixCls:m,className:p,rootClassName:g,steps:h,strokeColor:f,percent:x=0,size:y="default",showInfo:b=!0,type:v="line",status:j,format:_,style:w,percentPosition:k={}}=e,C=W(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:N="end",type:S="outer"}=k,$=Array.isArray(f)?f[0]:f,T="string"==typeof f||Array.isArray(f)?f:void 0,P=t.useMemo(()=>{if($){let e="string"==typeof $?$:Object.values($)[0];return new r.FastColor(e).isLight()}return!1},[f]),A=t.useMemo(()=>{var t,r;let a=I(e);return Number.parseInt(void 0!==a?null==(t=null!=a?a:0)?void 0:t.toString():null==(r=null!=x?x:0)?void 0:r.toString(),10)},[x,e.success,e.successPercent]),L=t.useMemo(()=>!U.includes(j)&&A>=100?"success":j||"normal",[j,A]),{getPrefixCls:F,direction:D,progress:R}=t.useContext(c.ConfigContext),z=F("progress",m),[B,K,q]=G(z),Q="line"===v,X=Q&&!h,J=t.useMemo(()=>{let r;if(!b)return null;let o=I(e),c=_||(e=>`${e}%`),d=Q&&P&&"inner"===S;return"inner"===S||_||"exception"!==L&&"success"!==L?r=c(E(x),E(o)):"exception"===L?r=Q?t.createElement(s.default,null):t.createElement(i.default,null):"success"===L&&(r=Q?t.createElement(a.default,null):t.createElement(l.default,null)),t.createElement("span",{className:(0,n.default)(`${z}-text`,{[`${z}-text-bright`]:d,[`${z}-text-${N}`]:X,[`${z}-text-${S}`]:X}),title:"string"==typeof r?r:void 0},r)},[b,x,A,L,v,z,_]);"line"===v?u=h?t.createElement(H,Object.assign({},e,{strokeColor:T,prefixCls:z,steps:"object"==typeof h?h.count:h}),J):t.createElement(V,Object.assign({},e,{strokeColor:$,prefixCls:z,direction:D,percentPosition:{align:N,type:S}}),J):("circle"===v||"dashboard"===v)&&(u=t.createElement(M,Object.assign({},e,{strokeColor:$,prefixCls:z,progressStatus:L}),J));let Y=(0,n.default)(z,`${z}-status-${L}`,{[`${z}-${"dashboard"===v&&"circle"||v}`]:"line"!==v,[`${z}-inline-circle`]:"circle"===v&&O(y,"circle")[0]<=20,[`${z}-line`]:X,[`${z}-line-align-${N}`]:X,[`${z}-line-position-${S}`]:X,[`${z}-steps`]:h,[`${z}-show-info`]:b,[`${z}-${y}`]:"string"==typeof y,[`${z}-rtl`]:"rtl"===D},null==R?void 0:R.className,p,g,K,q);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==R?void 0:R.style),w),className:Y,role:"progressbar","aria-valuenow":A,"aria-valuemin":0,"aria-valuemax":100},(0,o.default)(C,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,q],309821)},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["default",0,s],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},500727,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(764205),l=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,l.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,a.fetchMCPServers)(r,e),enabled:!!r})}],500727);var i=e.i(843476),n=e.i(271645),o=e.i(536916),c=e.i(599724),d=e.i(409797),u=e.i(246349),u=u;let m=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,p=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,g=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,h=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function f(e,t=""){let r=e.toLowerCase();if(h.test(r))return"read";if(m.test(r))return"delete";if(g.test(r))return"update";if(p.test(r))return"create";if(t){let e=t.toLowerCase();if(h.test(e))return"read";if(m.test(e))return"delete";if(g.test(e))return"update";if(p.test(e))return"create"}return"unknown"}function x(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[f(r.name,r.description)].push(r);return t}let y={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,y,"classifyToolOp",()=>f,"groupToolsByCrud",()=>x],696609);let b=["read","create","update","delete","unknown"],v={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},j={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},_={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:a=!1,searchFilter:l=""})=>{let[s,m]=(0,n.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),p=(0,n.useMemo)(()=>x(e),[e]),g=(0,n.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),h=e=>{if(a)return;let t=new Set(g);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,i.jsx)("div",{className:"space-y-3",children:b.map(e=>{let t,n=p[e];if(0===n.length)return null;if(l){let e=l.toLowerCase();if(!n.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let f=y[e],x=(t=p[e]).length>0&&t.every(e=>g.has(e.name)),b=(e=>{let t=p[e];if(0===t.length)return!1;let r=t.filter(e=>g.has(e.name)).length;return r>0&&r{m(t=>({...t,[e]:!t[e]}))},children:[w?(0,i.jsx)(u.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,i.jsx)(d.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,i.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:f.label}),(0,i.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${v[f.risk]}`,children:"high"===f.risk?"High Risk":"medium"===f.risk?"Medium Risk":"low"===f.risk?"Safe":"Unclassified"}),(0,i.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[n.filter(e=>g.has(e.name)).length,"/",n.length," allowed"]})]}),!a&&(0,i.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,i.jsx)(c.Text,{className:"text-xs text-gray-500",children:x?"All on":b?"Partial":"All off"}),(0,i.jsx)(o.Checkbox,{checked:x,indeterminate:b,onChange:t=>((e,t)=>{if(a)return;let l=new Set(g);for(let r of p[e])t?l.add(r.name):l.delete(r.name);r(Array.from(l))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!w&&(0,i.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:f.description}),!w&&(0,i.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:n.filter(e=>!l||e.name.toLowerCase().includes(l.toLowerCase())||(e.description??"").toLowerCase().includes(l.toLowerCase())).map(e=>{let t,r=(t=e.name,g.has(t));return(0,i.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!a?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>h(e.name),children:[(0,i.jsx)(o.Checkbox,{checked:r,onChange:()=>h(e.name),disabled:a,onClick:e=>e.stopPropagation()}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,i.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,i.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),l=e.i(271645),s=e.i(394487),i=e.i(503269),n=e.i(214520),o=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(601893),p=e.i(140721),g=e.i(942803),h=e.i(233538),f=e.i(694421),x=e.i(700020),y=e.i(35889),b=e.i(998348),v=e.i(722678);let j=(0,l.createContext)(null);j.displayName="GroupContext";let _=l.Fragment,w=Object.assign((0,x.forwardRefWithAs)(function(e,t){var _;let w=(0,l.useId)(),k=(0,g.useProvidedId)(),C=(0,m.useDisabled)(),{id:N=k||`headlessui-switch-${w}`,disabled:S=C||!1,checked:$,defaultChecked:T,onChange:E,name:I,value:O,form:M,autoFocus:P=!1,...A}=e,L=(0,l.useContext)(j),[F,D]=(0,l.useState)(null),R=(0,l.useRef)(null),z=(0,u.useSyncRefs)(R,t,null===L?null:L.setSwitch,D),B=(0,n.useDefaultValue)(T),[G,K]=(0,i.useControllable)($,E,null!=B&&B),V=(0,o.useDisposables)(),[H,W]=(0,l.useState)(!1),U=(0,c.useEvent)(()=>{W(!0),null==K||K(!G),V.nextFrame(()=>{W(!1)})}),q=(0,c.useEvent)(e=>{if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),U()}),Q=(0,c.useEvent)(e=>{e.key===b.Keys.Space?(e.preventDefault(),U()):e.key===b.Keys.Enter&&(0,f.attemptSubmit)(e.currentTarget)}),X=(0,c.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Y=(0,y.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:P}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:el}=(0,s.useActivePress)({disabled:S}),es=(0,l.useMemo)(()=>({checked:G,disabled:S,hover:et,focus:Z,active:ea,autofocus:P,changing:H}),[G,et,Z,ea,S,H,P]),ei=(0,x.mergeProps)({id:N,ref:z,role:"switch",type:(0,d.useResolveButtonType)(e,F),tabIndex:-1===e.tabIndex?0:null!=(_=e.tabIndex)?_:0,"aria-checked":G,"aria-labelledby":J,"aria-describedby":Y,disabled:S||void 0,autoFocus:P,onClick:q,onKeyUp:Q,onKeyPress:X},ee,er,el),en=(0,l.useCallback)(()=>{if(void 0!==B)return null==K?void 0:K(B)},[K,B]),eo=(0,x.useRender)();return l.default.createElement(l.default.Fragment,null,null!=I&&l.default.createElement(p.FormFields,{disabled:S,data:{[I]:O||"on"},overrides:{type:"checkbox",checked:G},form:M,onReset:en}),eo({ourProps:ei,theirProps:A,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,l.useState)(null),[s,i]=(0,v.useLabels)(),[n,o]=(0,y.useDescriptions)(),c=(0,l.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),d=(0,x.useRender)();return l.default.createElement(o,{name:"Switch.Description",value:n},l.default.createElement(i,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.default.createElement(j.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:_,name:"Switch.Group"}))))},Label:v.Label,Description:y.Description});var k=e.i(888288),C=e.i(95779),N=e.i(444755),S=e.i(673706),$=e.i(829087);let T=(0,S.makeClassName)("Switch"),E=l.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:s=!1,onChange:i,color:n,name:o,error:c,errorMessage:d,disabled:u,required:m,tooltip:p,id:g}=e,h=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),f={bgColor:n?(0,S.getColorClassNames)(n,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:n?(0,S.getColorClassNames)(n,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[x,y]=(0,k.default)(s,a),[b,v]=(0,l.useState)(!1),{tooltipProps:j,getReferenceProps:_}=(0,$.useTooltip)(300);return l.default.createElement("div",{className:"flex flex-row items-center justify-start"},l.default.createElement($.default,Object.assign({text:p},j)),l.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([r,j.refs.setReference]),className:(0,N.tremorTwMerge)(T("root"),"flex flex-row relative h-5")},h,_),l.default.createElement("input",{type:"checkbox",className:(0,N.tremorTwMerge)(T("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:x,onChange:e=>{e.preventDefault()}}),l.default.createElement(w,{checked:x,onChange:e=>{y(e),null==i||i(e)},disabled:u,className:(0,N.tremorTwMerge)(T("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:g},l.default.createElement("span",{className:(0,N.tremorTwMerge)(T("sr-only"),"sr-only")},"Switch ",x?"on":"off"),l.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(T("background"),x?f.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),l.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(T("round"),x?(0,N.tremorTwMerge)(f.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",b?(0,N.tremorTwMerge)("ring-2",f.ringColor):"")}))),c&&d?l.default.createElement("p",{className:(0,N.tremorTwMerge)(T("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});E.displayName="Switch",e.s(["Switch",()=>E],793130)},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let a={ttl:3600,lowest_latency_buffer:0},l=({routingStrategyArgs:e})=>{let l={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||a).map(([e,a])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof a?JSON.stringify(a,null,2):a?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:a})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,l])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:a[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:a[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==l||"null"===l?"":"object"==typeof l?JSON.stringify(l,null,2):l?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let n=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:a,routerFieldsMetadata:l,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:l.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(i.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(i.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),a[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:a[e]})]})},e))})})]});var o=e.i(793130);let c=({enabled:e,routerFieldsMetadata:r,onToggle:a})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(o.Switch,{checked:e,onChange:a,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:a,availableRoutingStrategies:i,routingStrategyDescriptions:o})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),i.length>0&&(0,t.jsx)(n,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:o,routerFieldsMetadata:a,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:a,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(l,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:a})]})],158392);var d=e.i(994388),u=e.i(653496),m=e.i(107233),p=e.i(271645),g=e.i(888259),h=e.i(592968),f=e.i(361653),f=f;let x=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var y=e.i(37727);function b({group:e,onChange:r,availableModels:a,maxFallbacks:l}){let s=a.filter(t=>t!==e.primaryModel),n=e.fallbackModels.length{let a=[...e.fallbackModels];a.includes(t)&&(a=a.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:a})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:a.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(f.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(x,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",l," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:n?"Select fallback models to add...":`Maximum ${l} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let a=t.slice(0,l);r({...e,fallbackModels:a})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,a)=>{let l=e.fallbackModels.includes(r.value),s=l?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(h.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:n?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${l} used)`:`Maximum ${l} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((a,l)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:l+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:a})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==l),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(y.X,{className:"w-4 h-4"})})]},`${a}-${l}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:a,maxFallbacks:l=10,maxGroups:s=5}){let[i,n]=(0,p.useState)(e.length>0?e[0].id:"1");(0,p.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||n(e[0].id):n("1")},[e]);let o=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),n(t)},c=t=>{r(e.map(e=>e.id===t.id?t:e))},h=e.map((r,s)=>{let i=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:i,closable:e.length>1,children:(0,t.jsx)(b,{group:r,onChange:c,availableModels:a,maxFallbacks:l})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(d.Button,{variant:"primary",onClick:o,icon:()=>(0,t.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:n,onEdit:(t,a)=>{"add"===a?o():"remove"===a&&e.length>1&&(t=>{if(1===e.length)return g.default.warning("At least one group is required");let a=e.filter(e=>e.id!==t);r(a),i===t&&a.length>0&&n(a[a.length-1].id)})(t)},items:h,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},645526,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["TeamOutlined",0,s],645526)},109799,e=>{"use strict";var t=e.i(135214),r=e.i(764205),a=e.i(266027),l=e.i(912598);let s=(0,e.i(243652).createQueryKeys)("organizations");e.s(["useOrganization",0,e=>{let i=(0,l.useQueryClient)(),{accessToken:n}=(0,t.default)();return(0,a.useQuery)({queryKey:s.detail(e),enabled:!!(n&&e),queryFn:async()=>{if(!n||!e)throw Error("Missing auth or teamId");return(0,r.organizationInfoCall)(n,e)},initialData:()=>{if(!e)return;let t=i.getQueryData(s.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:l,userRole:i}=(0,t.default)();return(0,a.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,r.organizationListCall)(e),enabled:!!(e&&l&&i)})}])},621482,e=>{"use strict";var t=e.i(869230),r=e.i(992571),a=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,r.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,r.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:a}=e,l=super.createResult(e,t),{isFetching:s,isRefetching:i,isError:n,isRefetchError:o}=l,c=a.fetchMeta?.fetchMore?.direction,d=n&&"forward"===c,u=s&&"forward"===c,m=n&&"backward"===c,p=s&&"backward"===c;return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.hasNextPage)(t,a.data),hasPreviousPage:(0,r.hasPreviousPage)(t,a.data),isFetchNextPageError:d,isFetchingNextPage:u,isFetchPreviousPageError:m,isFetchingPreviousPage:p,isRefetchError:o&&!d&&!m,isRefetching:i&&!u&&!p}}},l=e.i(469637);function s(e,t){return(0,l.useBaseQuery)(e,a,t)}e.s(["useInfiniteQuery",()=>s],621482)},270345,e=>{"use strict";var t=e.i(764205);let r=async(e,r,a,l)=>"Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,l?.organization_id||null,r):await (0,t.teamListCall)(e,l?.organization_id||null);e.s(["fetchTeams",0,r])},785242,e=>{"use strict";var t=e.i(619273),r=e.i(621482),a=e.i(266027),l=e.i(912598),s=e.i(135214),i=e.i(270345),n=e.i(243652),o=e.i(764205);let c=async(e,t,r,a={})=>{try{let l=(0,o.getProxyBaseUrl)(),s=new URLSearchParams(Object.entries({team_id:a.teamID,organization_id:a.organizationID,team_alias:a.team_alias,user_id:a.userID,page:t,page_size:r,sort_by:a.sortBy,sort_order:a.sortOrder,status:a.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${s}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let c=await n.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to list teams:",e),e}},d=(0,n.createQueryKeys)("teams"),u=(0,n.createQueryKeys)("infiniteTeams"),m=async(e,t,r,a={})=>{try{let l=(0,o.getProxyBaseUrl)(),s=new URLSearchParams(Object.entries({team_id:a.teamID,organization_id:a.organizationID,team_alias:a.team_alias,user_id:a.userID,page:t,page_size:r,sort_by:a.sortBy,sort_order:a.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${s}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let c=await n.json();if(console.log("/team/list?status=deleted API Response:",c),c&&"object"==typeof c&&"teams"in c)return c.teams;return c}catch(e){throw console.error("Failed to list deleted teams:",e),e}},p=(0,n.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,c,"useDeletedTeams",0,(e,r,l={})=>{let{accessToken:i}=(0,s.default)();return(0,a.useQuery)({queryKey:p.list({page:e,limit:r,...l}),queryFn:async()=>await m(i,e,r,l),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,a)=>{let{accessToken:l,userId:i,userRole:n}=(0,s.default)(),o="Admin"===n||"Admin Viewer"===n;return(0,r.useInfiniteQuery)({queryKey:u.list({filters:{pageSize:e,...t&&{search:t},...a&&{organizationId:a},...i&&{userId:i}}}),queryFn:async({pageParam:r})=>await c(l,r,e,{team_alias:t||void 0,organizationID:a,userID:o?void 0:i}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,s.default)(),r=(0,l.useQueryClient)();return(0,a.useQuery)({queryKey:d.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,o.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=r.getQueryData(d.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:r}=(0,s.default)();return(0,a.useQuery)({queryKey:d.list({}),queryFn:async()=>await (0,i.fetchTeams)(e,t,r,null),enabled:!!e})}])},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(876556);function l(e){return["small","middle","large"].includes(e)}function s(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>l,"isValidGapNumber",()=>s],908286);var i=e.i(242064),n=e.i(249616),o=e.i(372409),c=e.i(246422);let d=(0,c.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:r,paddingSM:a,colorBorder:l,paddingXS:s,fontSizeLG:i,fontSizeSM:n,borderRadiusLG:c,borderRadiusSM:d,colorBgContainerDisabled:u,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:a,margin:0,background:u,borderWidth:m,borderStyle:"solid",borderColor:l,borderRadius:r,"&-large":{fontSize:i,borderRadius:c},"&-small":{paddingInline:s,borderRadius:d,fontSize:n},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,o.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let m=t.default.forwardRef((e,a)=>{let{className:l,children:s,style:o,prefixCls:c}=e,m=u(e,["className","children","style","prefixCls"]),{getPrefixCls:p,direction:g}=t.default.useContext(i.ConfigContext),h=p("space-addon",c),[f,x,y]=d(h),{compactItemClassnames:b,compactSize:v}=(0,n.useCompactItemContext)(h,g),j=(0,r.default)(h,x,b,y,{[`${h}-${v}`]:v},l);return f(t.default.createElement("div",Object.assign({ref:a,className:j,style:o},m),s))}),p=t.default.createContext({latestIndex:0}),g=p.Provider,h=({className:e,index:r,children:a,split:l,style:s})=>{let{latestIndex:i}=t.useContext(p);return null==a?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:s},a),r{let t=(0,f.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var y=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let b=t.forwardRef((e,n)=>{var o;let{getPrefixCls:c,direction:d,size:u,className:m,style:p,classNames:f,styles:b}=(0,i.useComponentConfig)("space"),{size:v=null!=u?u:"small",align:j,className:_,rootClassName:w,children:k,direction:C="horizontal",prefixCls:N,split:S,style:$,wrap:T=!1,classNames:E,styles:I}=e,O=y(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[M,P]=Array.isArray(v)?v:[v,v],A=l(P),L=l(M),F=s(P),D=s(M),R=(0,a.default)(k,{keepEmpty:!0}),z=void 0===j&&"horizontal"===C?"center":j,B=c("space",N),[G,K,V]=x(B),H=(0,r.default)(B,m,K,`${B}-${C}`,{[`${B}-rtl`]:"rtl"===d,[`${B}-align-${z}`]:z,[`${B}-gap-row-${P}`]:A,[`${B}-gap-col-${M}`]:L},_,w,V),W=(0,r.default)(`${B}-item`,null!=(o=null==E?void 0:E.item)?o:f.item),U=Object.assign(Object.assign({},b.item),null==I?void 0:I.item),q=R.map((e,r)=>{let a=(null==e?void 0:e.key)||`${W}-${r}`;return t.createElement(h,{className:W,key:a,index:r,split:S,style:U},e)}),Q=t.useMemo(()=>({latestIndex:R.reduce((e,t,r)=>null!=t?r:e,0)}),[R]);if(0===R.length)return null;let X={};return T&&(X.flexWrap="wrap"),!L&&D&&(X.columnGap=M),!A&&F&&(X.rowGap=P),G(t.createElement("div",Object.assign({ref:n,className:H,style:Object.assign(Object.assign(Object.assign({},X),p),$)},O),t.createElement(g,{value:Q},q)))});b.Compact=n.default,b.Addon=m,e.s(["default",0,b],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(702779),s=e.i(563113),i=e.i(763731),n=e.i(121872),o=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var d=e.i(135551),u=e.i(183293),m=e.i(246422),p=e.i(838378);let g=e=>{let{lineWidth:t,fontSizeIcon:r,calc:a}=e,l=e.fontSizeSM;return(0,p.mergeToken)(e,{tagFontSize:l,tagLineHeight:(0,c.unit)(a(e.lineHeightSM).mul(l).equal()),tagIconSize:a(r).sub(a(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},h=e=>({defaultBg:new d.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),f=(0,m.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:a,componentCls:l,calc:s}=e,i=s(a).sub(r).equal(),n=s(t).sub(r).equal();return{[l]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${l}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${l}-close-icon`]:{marginInlineStart:n,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${l}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${l}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${l}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(g(e)),h);var x=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let y=t.forwardRef((e,a)=>{let{prefixCls:l,style:s,className:i,checked:n,children:c,icon:d,onChange:u,onClick:m}=e,p=x(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:g,tag:h}=t.useContext(o.ConfigContext),y=g("tag",l),[b,v,j]=f(y),_=(0,r.default)(y,`${y}-checkable`,{[`${y}-checkable-checked`]:n},null==h?void 0:h.className,i,v,j);return b(t.createElement("span",Object.assign({},p,{ref:a,style:Object.assign(Object.assign({},s),null==h?void 0:h.style),className:_,onClick:e=>{null==u||u(!n),null==m||m(e)}}),d,t.createElement("span",null,c)))});var b=e.i(403541);let v=(0,m.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=g(e),(0,b.genPresetColor)(t,(e,{textColor:r,lightBorderColor:a,lightColor:l,darkColor:s})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:l,borderColor:a,"&-inverse":{color:t.colorTextLightSolid,background:s,borderColor:s},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},h),j=(e,t,r)=>{let a="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${a}Bg`],borderColor:e[`color${a}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},_=(0,m.genSubStyleComponent)(["Tag","status"],e=>{let t=g(e);return[j(t,"success","Success"),j(t,"processing","Info"),j(t,"error","Error"),j(t,"warning","Warning")]},h);var w=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let k=t.forwardRef((e,c)=>{let{prefixCls:d,className:u,rootClassName:m,style:p,children:g,icon:h,color:x,onClose:y,bordered:b=!0,visible:j}=e,k=w(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:C,direction:N,tag:S}=t.useContext(o.ConfigContext),[$,T]=t.useState(!0),E=(0,a.default)(k,["closeIcon","closable"]);t.useEffect(()=>{void 0!==j&&T(j)},[j]);let I=(0,l.isPresetColor)(x),O=(0,l.isPresetStatusColor)(x),M=I||O,P=Object.assign(Object.assign({backgroundColor:x&&!M?x:void 0},null==S?void 0:S.style),p),A=C("tag",d),[L,F,D]=f(A),R=(0,r.default)(A,null==S?void 0:S.className,{[`${A}-${x}`]:M,[`${A}-has-color`]:x&&!M,[`${A}-hidden`]:!$,[`${A}-rtl`]:"rtl"===N,[`${A}-borderless`]:!b},u,m,F,D),z=e=>{e.stopPropagation(),null==y||y(e),e.defaultPrevented||T(!1)},[,B]=(0,s.useClosable)((0,s.pickClosable)(e),(0,s.pickClosable)(S),{closable:!1,closeIconRender:e=>{let a=t.createElement("span",{className:`${A}-close-icon`,onClick:z},e);return(0,i.replaceElement)(e,a,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),z(t)},className:(0,r.default)(null==e?void 0:e.className,`${A}-close-icon`)}))}}),G="function"==typeof k.onClick||g&&"a"===g.type,K=h||null,V=K?t.createElement(t.Fragment,null,K,g&&t.createElement("span",null,g)):g,H=t.createElement("span",Object.assign({},E,{ref:c,className:R,style:P}),V,B,I&&t.createElement(v,{key:"preset",prefixCls:A}),O&&t.createElement(_,{key:"status",prefixCls:A}));return L(G?t.createElement(n.default,{component:"Tag"},H):H)});k.CheckableTag=y,e.s(["Tag",0,k],262218)},801312,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["default",0,s],801312)},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},a=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:n="",children:o,iconNode:c,...d},u)=>(0,t.createElement)("svg",{ref:u,...l,width:r,height:r,stroke:e,strokeWidth:i?24*Number(s)/Number(r):s,className:a("lucide",n),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(o)?o:[o]])),i=(e,l)=>{let i=(0,t.forwardRef)(({className:i,...n},o)=>(0,t.createElement)(s,{ref:o,iconNode:l,className:a(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...n}));return i.displayName=r(e),i};e.s(["default",()=>i],475254)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(517455);e.i(296059);var s=e.i(915654),i=e.i(183293),n=e.i(246422),o=e.i(838378);let c=(0,n.genStyleHooks)("Divider",e=>{let t=(0,o.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:a,lineWidth:l,textPaddingInline:n,orientationMargin:o,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,i.resetComponent)(e)),{borderBlockStart:`${(0,s.unit)(l)} solid ${a}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,s.unit)(l)} solid ${a}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,s.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,s.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${a}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,s.unit)(l)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${o} * 100%)`},"&::after":{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${o} * 100%)`},"&::after":{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:n},"&-dashed":{background:"none",borderColor:a,borderStyle:"dashed",borderWidth:`${(0,s.unit)(l)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:l,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:a,borderStyle:"dotted",borderWidth:`${(0,s.unit)(l)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:l,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var d=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:s,direction:i,className:n,style:o}=(0,a.useComponentConfig)("divider"),{prefixCls:m,type:p="horizontal",orientation:g="center",orientationMargin:h,className:f,rootClassName:x,children:y,dashed:b,variant:v="solid",plain:j,style:_,size:w}=e,k=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),C=s("divider",m),[N,S,$]=c(C),T=u[(0,l.default)(w)],E=!!y,I=t.useMemo(()=>"left"===g?"rtl"===i?"end":"start":"right"===g?"rtl"===i?"start":"end":g,[i,g]),O="start"===I&&null!=h,M="end"===I&&null!=h,P=(0,r.default)(C,n,S,$,`${C}-${p}`,{[`${C}-with-text`]:E,[`${C}-with-text-${I}`]:E,[`${C}-dashed`]:!!b,[`${C}-${v}`]:"solid"!==v,[`${C}-plain`]:!!j,[`${C}-rtl`]:"rtl"===i,[`${C}-no-default-orientation-margin-start`]:O,[`${C}-no-default-orientation-margin-end`]:M,[`${C}-${T}`]:!!T},f,x),A=t.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return N(t.createElement("div",Object.assign({className:P,style:Object.assign(Object.assign({},o),_)},k,{role:"separator"}),y&&"vertical"!==p&&t.createElement("span",{className:`${C}-inner-text`,style:{marginInlineStart:O?A:void 0,marginInlineEnd:M?A:void 0}},y)))}],312361)},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["FileTextOutlined",0,s],993914)},631171,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",()=>t])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(779241),l=e.i(599724),s=e.i(199133),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:o,placeholder:c="Select a Model",onChange:d,disabled:u=!1,style:m,className:p,showLabel:g=!0,labelText:h="Select Model"})=>{let[f,x]=(0,r.useState)(o),[y,b]=(0,r.useState)(!1),[v,j]=(0,r.useState)([]),_=(0,r.useRef)(null);return(0,r.useEffect)(()=>{x(o)},[o]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&j(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[g&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(s.Select,{value:f,placeholder:c,onChange:e=>{"custom"===e?(b(!0),x(void 0)):(b(!1),x(e),d&&d(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...m},showSearch:!0,className:`rounded-md ${p||""}`,disabled:u}),y&&(0,t.jsx)(a.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{x(e),d&&d(e)},500)},disabled:u})]})}])},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,a]of Object.entries(t))e in r&&(r[e]=a);return r}let a=(e,t=0,r=!1,a=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!a)return"-";let l={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",l);let s=e<0?"-":"",i=Math.abs(e),n=i,o="";return i>=1e6?(n=i/1e6,o="M"):i>=1e3&&(n=i/1e3,o="K"),`${s}${n.toLocaleString("en-US",l)}${o}`},l=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(e,r)=>{try{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",a.setAttribute("readonly",""),document.body.appendChild(a),a.focus(),a.select();let l=document.execCommand("copy");if(document.body.removeChild(a),l)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,l,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=a(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,109034,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(764205),l=e.i(135214);let s=(0,r.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:r,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&r&&i)})}])},9314,263147,e=>{"use strict";var t=e.i(843476),r=e.i(199133),a=e.i(981339),l=e.i(645526),s=e.i(599724),i=e.i(266027),n=e.i(243652),o=e.i(764205),c=e.i(708347),d=e.i(135214);let u=(0,n.createQueryKeys)("accessGroups"),m=async e=>{let t=(0,o.getProxyBaseUrl)(),r=`${t}/v1/access_group`,a=await fetch(r,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}return a.json()},p=()=>{let{accessToken:e,userRole:t}=(0,d.default)();return(0,i.useQuery)({queryKey:u.list({}),queryFn:async()=>m(e),enabled:!!e&&c.all_admin_roles.includes(t||"")})};e.s(["accessGroupKeys",0,u,"useAccessGroups",0,p],263147),e.s(["default",0,({value:e,onChange:i,placeholder:n="Select access groups",disabled:o=!1,style:c,className:d,showLabel:u=!1,labelText:m="Access Group",allowClear:g=!0})=>{let{data:h,isLoading:f,isError:x}=p();if(f)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(s.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...c}})]});let y=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(s.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(l.TeamOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(r.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...c},className:`rounded-md ${d??""}`,notFoundContent:x?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:y.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},552130,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:n,placeholder:o="Select agents",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[m,p]=(0,r.useState)([]),[g,h]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let r=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>r.add(e))}),p(Array.from(r))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let f=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...d.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],x=[...s?.agents||[],...(s?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:x,loading:g,className:i,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:c,filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:f.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},844565,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:c=!1,teamId:d})=>{let[u,m]=(0,r.useState)([]),[p,g]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){g(!0);try{let e=await (0,l.getPassThroughEndpointsCall)(n,d);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,r=e.methods;return r&&r.length>0?r.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{g(!1)}}})()},[n,d]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:s,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,r],810757);let a=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},557662,e=>{"use strict";let t="../ui/assets/logos/",r=[{id:"arize",displayName:"Arize",logo:`${t}arize.png`,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:`${t}braintrust.png`,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",logo:`${t}custom.svg`,supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:`${t}datadog.png`,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:`${t}lago.svg`,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:`${t}langfuse.png`,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:`${t}langfuse.png`,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:`${t}langsmith.png`,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:`${t}openmeter.png`,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:`${t}otel.png`,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:`${t}aws.svg`,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],a=r.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=r.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),s=r.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,a,"callback_map",0,l,"mapDisplayToInternalNames",0,e=>e.map(e=>l[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>s[e]||e),"reverse_callback_map",0,s])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),a=e.i(243652),l=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("mcpAccessGroups");var n=e.i(500727),o=e.i(199133);e.s(["default",0,({onChange:e,value:a,className:c,accessToken:d,placeholder:u="Select MCP servers",disabled:m=!1,teamId:p})=>{let{data:g=[],isLoading:h}=(0,n.useMCPServers)(p),{data:f=[],isLoading:x}=(()=>{let{accessToken:e}=(0,s.default)();return(0,r.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,l.fetchMCPAccessGroups)(e),enabled:!!e})})(),y=[...f.map(e=>({label:e,value:e,isAccessGroup:!0,searchText:`${e} Access Group`})),...g.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,isAccessGroup:!1,searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`}))],b=[...a?.servers||[],...a?.accessGroups||[]];return(0,t.jsx)("div",{children:(0,t.jsx)(o.Select,{mode:"multiple",placeholder:u,onChange:t=>{e({servers:t.filter(e=>!f.includes(e)),accessGroups:t.filter(e=>f.includes(e))})},value:b,loading:h||x,className:c,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:m,filterOption:(e,t)=>(y.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:y.map(e=>(0,t.jsx)(o.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#1890ff",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#1890ff",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"MCP Server"})]})},e.value))})})}],75921)},390605,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(764205),l=e.i(599724),s=e.i(482725),i=e.i(91739),n=e.i(500727),o=e.i(531516),c=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:d,toolPermissions:u,onChange:m,disabled:p=!1})=>{let{data:g=[]}=(0,n.useMCPServers)(),[h,f]=(0,r.useState)({}),[x,y]=(0,r.useState)({}),[b,v]=(0,r.useState)({}),[j,_]=(0,r.useState)({}),w=(0,r.useRef)(u);(0,r.useEffect)(()=>{w.current=u},[u]);let k=(0,r.useMemo)(()=>0===d.length?[]:g.filter(e=>d.includes(e.server_id)),[g,d]),C=async(e,t)=>{y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:""}));try{let r=await (0,a.listMCPTools)(t,e);if(r.error)v(t=>({...t,[e]:r.message||"Failed to fetch tools"})),f(t=>({...t,[e]:[]}));else{let t=r.tools||[];f(r=>({...r,[e]:t}));let a=w.current;if(!a[e]&&t.length>0){let r=t.filter(e=>"delete"!==(0,c.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:r})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),v(t=>({...t,[e]:"Failed to fetch tools"})),f(t=>({...t,[e]:[]}))}finally{y(t=>({...t,[e]:!1}))}};(0,r.useEffect)(()=>{k.forEach(t=>{h[t.server_id]||x[t.server_id]||C(t.server_id,e)})},[k,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===d.length?null:(0,t.jsx)("div",{className:"space-y-4",children:k.map(e=>{let r=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],c=x[e.server_id],d=b[e.server_id],g=j[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.Text,{className:"font-semibold text-gray-900",children:r}),e.description&&(0,t.jsx)(l.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!p&&a.length>0&&(0,t.jsx)(i.Radio.Group,{value:g,onChange:t=>_(r=>({...r,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let r;return r=h[t=e.server_id]||[],void m({...u,[t]:r.map(e=>e.name)})},disabled:c,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:c,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[c&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(s.Spin,{size:"large"}),(0,t.jsx)(l.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),d&&!c&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(l.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(l.Text,{className:"text-sm text-red-500 mt-1",children:d})]}),!c&&!d&&a.length>0&&"crud"===g&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:p}),!c&&!d&&a.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(r=>{let a=n.includes(r.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(p)return;let t=a?n.filter(e=>e!==r.name):[...n,r.name];N(e.server_id,t)},disabled:p,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Text,{className:"font-medium text-gray-900",children:r.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",r.description||"No description"]})]})})]},r.name)})}),!c&&!d&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(l.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),r=e.i(199133),a=e.i(592968),l=e.i(312361),s=e.i(827252),i=e.i(994388),n=e.i(304967),o=e.i(779241),c=e.i(988297),d=e.i(68155),u=e.i(810757),m=e.i(477386),p=e.i(557662),g=e.i(435451);let{Option:h}=r.Select;e.s(["default",0,({value:e=[],onChange:f,disabledCallbacks:x=[],onDisabledCallbacksChange:y})=>{let b=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),v=Object.keys(p.callbackInfo),j=e=>{f?.(e)},_=(t,r,a)=>{let l=[...e];if("callback_name"===r){let e=p.callback_map[a]||a;l[t]={...l[t],[r]:e,callback_vars:{}}}else l[t]={...l[t],[r]:a};j(l)},w=(t,r,a)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[r]:a}},j(l)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(s.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(r.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:x,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);y?.(t)},style:{width:"100%"},optionLabelProp:"label",children:v.map(e=>{let r=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,t.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let r=t.target,a=r.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),a.replaceChild(t,r)}}}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(l.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(s.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{j([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:c.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((l,c)=>{let u=l.callback_name?Object.entries(p.callback_map).find(([e,t])=>t===l.callback_name)?.[0]:void 0,m=u?p.callbackInfo[u]?.logo:null;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,t.jsx)("img",{src:m,alt:u,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[u||"New Integration"," Configuration"]})]}),(0,t.jsx)(i.Button,{variant:"light",onClick:()=>{j(e.filter((e,t)=>t!==c))},icon:d.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(r.Select,{value:u,placeholder:"Select integration",onChange:e=>_(c,"callback_name",e),className:"w-full",optionLabelProp:"label",children:b.map(e=>{let r=p.callbackInfo[e]?.logo,l=p.callbackInfo[e]?.description;return(0,t.jsx)(h,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,t.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let r=t.target,a=r.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),a.replaceChild(t,r)}}}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(r.Select,{value:l.callback_type,onChange:e=>_(c,"callback_type",e),className:"w-full",children:[(0,t.jsx)(h,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(h,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(h,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,r)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,r])=>r===e.callback_name)?.[0];if(!l)return null;let i=p.callbackInfo[l]?.dynamic_params||{};return 0===Object.keys(i).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(i).map(([l,i])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:l.replace(/_/g," ")}),(0,t.jsx)(a.Tooltip,{title:`Environment variable reference recommended: os.environ/${l.toUpperCase()}`,children:(0,t.jsx)(s.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),"password"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===i&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===i&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===i?(0,t.jsx)(g.default,{step:.01,width:400,placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(r,l,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===i?"password":"text",placeholder:`os.environ/${l.toUpperCase()}`,value:e.callback_vars[l]||"",onChange:e=>w(r,l,e.target.value)})]},l))})]})})(l,c)]})]},c)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},207082,e=>{"use strict";var t=e.i(619273),r=e.i(266027),a=e.i(243652),l=e.i(764205),s=e.i(135214);let i=(0,a.createQueryKeys)("keys"),n=async(e,t,r,a={})=>{try{let s=(0,l.getProxyBaseUrl)(),i=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:r,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),n=`${s?`${s}/key/list`:"/key/list"}?${i}`,o=await fetch(n,{method:"GET",headers:{[(0,l.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=(0,l.deriveErrorMessage)(e);throw(0,l.handleError)(t),Error(t)}let c=await o.json();return console.log("/key/list API Response:",c),c}catch(e){throw console.error("Failed to list keys:",e),e}},o=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,i,"useDeletedKeys",0,(e,a,l={})=>{let{accessToken:i}=(0,s.default)();return(0,r.useQuery)({queryKey:o.list({page:e,limit:a,...l}),queryFn:async()=>await n(i,e,a,{...l,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,l={})=>{let{accessToken:o}=(0,s.default)();return(0,r.useQuery)({queryKey:i.list({page:e,limit:a,...l}),queryFn:async()=>await n(o,e,a,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(764205),l=e.i(708347),s=e.i(135214);let i=(0,r.createQueryKeys)("projects"),n=async e=>{let t=(0,a.getProxyBaseUrl)(),r=`${t}/project/list`,l=await fetch(r,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=(0,a.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return l.json()};e.s(["projectKeys",0,i,"useProjects",0,()=>{let{accessToken:e,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&l.all_admin_roles.includes(r||"")})}])},392110,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(592968),s=e.i(312361),i=e.i(790848),n=e.i(536916),o=e.i(827252),c=e.i(779241);let{Option:d}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:u,onAutoRotationChange:m,rotationInterval:p,onRotationIntervalChange:g,isCreateMode:h=!1,neverExpire:f=!1,onNeverExpireChange:x})=>{let y=p&&!["7d","30d","90d","180d","365d"].includes(p),[b,v]=(0,r.useState)(y),[j,_]=(0,r.useState)(y?p:""),[w,k]=(0,r.useState)(e?.getFieldValue?.("duration")||"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(l.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!h&&x&&(0,t.jsx)(n.Checkbox,{checked:f,onChange:t=>{let r=t.target.checked;x(r),r&&(k(""),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(c.TextInput,{name:"duration",placeholder:h?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",value:w,onValueChange:t=>{k(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&f})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(l.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(i.Switch,{checked:u,onChange:m,size:"default",className:u?"":"bg-gray-400"})]}),u&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(l.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(o.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:b?"custom":p,onChange:e=>{"custom"===e?v(!0):(v(!1),_(""),g(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(d,{value:"7d",children:"7 days"}),(0,t.jsx)(d,{value:"30d",children:"30 days"}),(0,t.jsx)(d,{value:"90d",children:"90 days"}),(0,t.jsx)(d,{value:"180d",children:"180 days"}),(0,t.jsx)(d,{value:"365d",children:"365 days"}),(0,t.jsx)(d,{value:"custom",children:"Custom interval"})]}),b&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:j,onChange:e=>{let t=e.target.value;_(t),g(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),u&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),r=e.i(808613),a=e.i(199133),l=e.i(592968),s=e.i(827252);let{Option:i}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:c="",initialValue:d=null,form:u,onChange:m})=>{let p=e.toUpperCase(),g=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${p} limit when the key belongs to a Team with specific ${p} limits.`;return(0,t.jsx)(r.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(s.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:d,className:c,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",g," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(i,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",g," (also checks model-specific limits)"]})]})}),(0,t.jsx)(i,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",p," (e.g. 2 ",p,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(i,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(i,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:s,disabled:i,loading:n,style:o})=>(0,t.jsx)(r.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:s,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,r)=>{if(!r)return!1;let a=e?.find(e=>e.organization_id===r.key);if(!a)return!1;let l=t.toLowerCase().trim(),s=(a.organization_alias||"").toLowerCase(),i=(a.organization_id||"").toLowerCase();return s.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(r.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},533882,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(250980),l=e.i(797672),s=e.i(68155),i=e.i(304967),n=e.i(629569),o=e.i(599724),c=e.i(269200),d=e.i(427612),u=e.i(64848),m=e.i(942232),p=e.i(496020),g=e.i(977572),h=e.i(992619),f=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:x={},onAliasUpdate:y,showExampleConfig:b=!0})=>{let[v,j]=(0,r.useState)([]),[_,w]=(0,r.useState)({aliasName:"",targetModel:""}),[k,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{j(Object.entries(x).map(([e,t],r)=>({id:`${r}-${e}`,aliasName:e,targetModel:t})))},[x]);let N=()=>{if(!k)return;if(!k.aliasName||!k.targetModel)return void f.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.id!==k.id&&e.aliasName===k.aliasName))return void f.default.fromBackend("An alias with this name already exists");let e=v.map(e=>e.id===k.id?k:e);j(e),C(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),f.default.success("Alias updated successfully")},S=()=>{C(null)},$=v.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:_.aliasName,onChange:e=>w({..._,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:_.targetModel,placeholder:"Select target model",onChange:e=>w({..._,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!_.aliasName||!_.targetModel)return void f.default.fromBackend("Please provide both alias name and target model");if(v.some(e=>e.aliasName===_.aliasName))return void f.default.fromBackend("An alias with this name already exists");let e=[...v,{id:`${Date.now()}-${_.aliasName}`,aliasName:_.aliasName,targetModel:_.targetModel}];j(e),w({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),y&&y(t),f.default.success("Alias added successfully")},disabled:!_.aliasName||!_.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!_.aliasName||!_.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(d.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[v.map(r=>(0,t.jsx)(p.TableRow,{className:"h-8",children:k&&k.id===r.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:k.aliasName,onChange:e=>C({...k,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:k.targetModel,onChange:e=>C({...k,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-900",children:r.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:r.targetModel}),(0,t.jsx)(g.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{C({...r})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,t.jsx)(l.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=r.id,j(t=v.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),y&&y(a),f.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,t.jsx)(s.TrashIcon,{className:"w-3 h-3"})})]})})]})},r.id)),0===v.length&&(0,t.jsx)(p.TableRow,{children:(0,t.jsx)(g.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys($).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries($).map(([e,r])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',r,'"']},e))]})})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:s=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return s?(0,t.jsx)(a.default,{value:e,onChange:l,disabledCallbacks:i,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(r.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},460285,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(404206),l=e.i(723731),s=e.i(653824),i=e.i(881073),n=e.i(197647),o=e.i(764205),c=e.i(158392),d=e.i(419470),u=e.i(689020);let m=(0,r.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[f,x]=(0,r.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[y,b]=(0,r.useState)([]),[v,j]=(0,r.useState)([]),[_,w]=(0,r.useState)([]),[k,C]=(0,r.useState)([]),[N,S]=(0,r.useState)({}),[$,T]=(0,r.useState)({}),E=(0,r.useRef)(!1),I=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=m?.router_settings?JSON.stringify({routing_strategy:m.router_settings.routing_strategy,fallbacks:m.router_settings.fallbacks,enable_tag_filtering:m.router_settings.enable_tag_filtering}):null;if(E.current&&e===I.current){E.current=!1;return}if(E.current&&e!==I.current&&(E.current=!1),e!==I.current)if(I.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...r}=e;x({routerSettings:r,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];b(a),j(a&&0!==a.length?a.map((e,t)=>{let[r,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:r||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else x({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),b([]),j([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,r.useEffect)(()=>{e&&(0,o.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),S(t);let r=e.fields.find(e=>"routing_strategy"===e.field_name);r?.options&&C(r.options),e.routing_strategy_descriptions&&T(e.routing_strategy_descriptions)}})},[e]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),r=Object.fromEntries(Object.entries({...f.routerSettings,enable_tag_filtering:f.enableTagFiltering,routing_strategy:f.selectedStrategy,fallbacks:y.length>0?y:null}).map(([r,a])=>{if("routing_strategy_args"!==r&&"routing_strategy"!==r&&"enable_tag_filtering"!==r&&"fallbacks"!==r){let l=document.querySelector(`input[name="${r}"]`);if(l&&void 0!==l.value&&""!==l.value){let s=((r,a,l)=>{if(null==a)return l;let s=String(a).trim();if(""===s||"null"===s.toLowerCase())return null;if(e.has(r)){let e=Number(s);return Number.isNaN(e)?l:e}if(t.has(r)){if(""===s)return null;try{return JSON.parse(s)}catch{return l}}return"true"===s.toLowerCase()||"false"!==s.toLowerCase()&&s})(r,l.value,a);return[r,s]}}else if("routing_strategy"===r)return[r,f.selectedStrategy];else if("enable_tag_filtering"===r)return[r,f.enableTagFiltering];else if("fallbacks"===r)return[r,y.length>0?y:null];else if("routing_strategy_args"===r&&"latency-based-routing"===f.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),r={};return e?.value&&(r.lowest_latency_buffer=Number(e.value)),t?.value&&(r.ttl=Number(t.value)),["routing_strategy_args",Object.keys(r).length>0?r:null]}return[r,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(r.routing_strategy),allowed_fails:a(r.allowed_fails,!0),cooldown_time:a(r.cooldown_time,!0),num_retries:a(r.num_retries,!0),timeout:a(r.timeout,!0),retry_after:a(r.retry_after,!0),fallbacks:y.length>0?y:null,context_window_fallbacks:a(r.context_window_fallbacks),retry_policy:a(r.retry_policy),model_group_alias:a(r.model_group_alias),enable_tag_filtering:f.enableTagFiltering,routing_strategy_args:a(r.routing_strategy_args)}};(0,r.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{E.current=!0,p({router_settings:O()})},100);return()=>clearTimeout(e)},[f,y]);let M=Array.from(new Set(_.map(e=>e.model_group))).sort();return((0,r.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(s.TabGroup,{className:"w-full",children:[(0,t.jsxs)(i.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(l.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:f,onChange:x,routerFieldsMetadata:N,availableRoutingStrategies:k,routingStrategyDescriptions:$})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(d.FallbackSelectionForm,{groups:v,onGroupsChange:e=>{j(e),b(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),r=e.i(199133),a=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:s,onChange:i,disabled:n,loading:o,teamId:c})=>{let d=c?e?.filter(e=>e.team_id===c):e;return(0,t.jsx)(r.Select,{showSearch:!0,placeholder:"Search or select a project",value:s,onChange:i,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(l.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let r=d?.find(e=>e.project_id===t.key);if(!r)return!1;let a=e.toLowerCase().trim(),l=(r.project_alias||"").toLowerCase(),s=(r.project_id||"").toLowerCase();return l.includes(a)||s.includes(a)},optionFilterProp:"children",children:!o&&d?.map(e=>(0,t.jsxs)(r.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},702597,364769,e=>{"use strict";var t=e.i(843476),r=e.i(207082),a=e.i(109799),l=e.i(510674),s=e.i(109034),i=e.i(292639),n=e.i(135214),o=e.i(500330),c=e.i(827252),d=e.i(912598),u=e.i(677667),m=e.i(130643),p=e.i(898667),g=e.i(994388),h=e.i(309426),f=e.i(350967),x=e.i(599724),y=e.i(779241),b=e.i(629569),v=e.i(464571),j=e.i(808613),_=e.i(311451),w=e.i(212931),k=e.i(91739),C=e.i(199133),N=e.i(790848),S=e.i(262218),$=e.i(592968),T=e.i(374009),E=e.i(271645),I=e.i(708347),O=e.i(552130),M=e.i(557662),P=e.i(9314),A=e.i(860585),L=e.i(82946),F=e.i(392110),D=e.i(533882),R=e.i(844565),z=e.i(651904),B=e.i(939510),G=e.i(460285),K=e.i(663435),V=e.i(363256),H=e.i(575260),W=e.i(371455),U=e.i(355619),q=e.i(75921),Q=e.i(390605),X=e.i(727749),J=e.i(764205),Y=e.i(237016),Z=e.i(888259);let ee=({apiKey:e})=>{let[r,a]=(0,E.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(Y.CopyToClipboard,{text:e,onCopy:()=>{a(!0),Z.default.success("Key copied to clipboard"),setTimeout(()=>a(!1),2e3)},children:(0,t.jsx)(v.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,ee],364769);var et=e.i(435451),er=e.i(916940);let{Option:ea}=C.Select,el=async(e,t,r,a)=>{try{if(null===e||null===t)return[];if(null!==r){let l=(await (0,J.modelAvailableCall)(r,e,t,!0,a,!0)).data.map(e=>e.id);return console.log("available_model_names:",l),l}return[]}catch(e){return console.error("Error fetching user models:",e),[]}},es=async(e,t,r,a)=>{try{if(null===e||null===t)return;if(null!==r){let l=(await (0,J.modelAvailableCall)(r,e,t)).data.map(e=>e.id);console.log("available_model_names:",l),a(l)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:Y,data:Z,addKey:ei,autoOpenCreate:en,prefillData:eo})=>{let{accessToken:ec,userId:ed,userRole:eu,premiumUser:em}=(0,n.default)(),ep=em||null!=eu&&I.rolesWithWriteAccess.includes(eu),{data:eg,isLoading:eh}=(0,a.useOrganizations)(),{data:ef,isLoading:ex}=(0,l.useProjects)(),{data:ey}=(0,i.useUISettings)(),{data:eb}=(0,s.useTags)(),ev=!!ey?.values?.enable_projects_ui,ej=!!ey?.values?.disable_custom_api_keys,e_=eb?Object.values(eb).map(e=>({value:e.name,label:e.name})):[],ew=(0,d.useQueryClient)(),[ek]=j.Form.useForm(),[eC,eN]=(0,E.useState)(!1),[eS,e$]=(0,E.useState)(null),[eT,eE]=(0,E.useState)(null),[eI,eO]=(0,E.useState)([]),[eM,eP]=(0,E.useState)([]),[eA,eL]=(0,E.useState)("you"),[eF,eD]=(0,E.useState)(!1),[eR,ez]=(0,E.useState)(null),[eB,eG]=(0,E.useState)([]),[eK,eV]=(0,E.useState)([]),[eH,eW]=(0,E.useState)([]),[eU,eq]=(0,E.useState)([]),[eQ,eX]=(0,E.useState)(e),[eJ,eY]=(0,E.useState)(null),[eZ,e0]=(0,E.useState)(null),[e1,e2]=(0,E.useState)(!1),[e4,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)({}),[e7,e8]=(0,E.useState)([]),[e9,te]=(0,E.useState)(!1),[tt,tr]=(0,E.useState)([]),[ta,tl]=(0,E.useState)([]),[ts,ti]=(0,E.useState)("llm_api"),[tn,to]=(0,E.useState)({}),[tc,td]=(0,E.useState)(!1),[tu,tm]=(0,E.useState)("30d"),[tp,tg]=(0,E.useState)(null),[th,tf]=(0,E.useState)(0),[tx,ty]=(0,E.useState)([]),[tb,tv]=(0,E.useState)(null),tj=()=>{eN(!1),ek.resetFields(),eq([]),tl([]),ti("llm_api"),to({}),td(!1),tm("30d"),tg(null),tf(e=>e+1),tv(null),eY(null),e0(null)},t_=()=>{eN(!1),e$(null),eX(null),ek.resetFields(),eq([]),tl([]),ti("llm_api"),to({}),td(!1),tm("30d"),tg(null),tf(e=>e+1),tv(null),eY(null),e0(null)};(0,E.useEffect)(()=>{ed&&eu&&ec&&es(ed,eu,ec,eO)},[ec,ed,eu]),(0,E.useEffect)(()=>{ec&&(0,J.getAgentsList)(ec).then(e=>ty(e?.agents||[])).catch(()=>ty([]))},[ec]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,J.getPoliciesList)(ec)).policies.map(e=>e.policy_name);eV(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,J.getPromptsList)(ec);eW(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,J.getGuardrailsList)(ec)).guardrails.map(e=>e.guardrail_name);eG(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[ec]),(0,E.useEffect)(()=>{(async()=>{try{if(ec){let e=sessionStorage.getItem("possibleUserRoles");if(e)e5(JSON.parse(e));else{let e=await (0,J.getPossibleUserRoles)(ec);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e5(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[ec]),(0,E.useEffect)(()=>{if(en&&!eF&&Y&&eu&&I.rolesWithWriteAccess.includes(eu)&&(eN(!0),eD(!0),eo)){if(eo.owned_by&&("another_user"===eo.owned_by&&"Admin"!==eu?eL("you"):eL(eo.owned_by)),eo.team_id){let e=Y?.find(e=>e.team_id===eo.team_id)||null;e&&(eX(e),ek.setFieldsValue({team_id:eo.team_id}))}eo.key_alias&&ek.setFieldsValue({key_alias:eo.key_alias}),eo.models&&eo.models.length>0&&ez(eo.models),eo.key_type&&(ti(eo.key_type),ek.setFieldsValue({key_type:eo.key_type}))}},[en,eo,Y,eF,ek,eu]);let tw=eM.includes("no-default-models")&&!eQ,tk=async e=>{try{let t,a=e?.key_alias??"",l=e?.team_id??null;if((Z?.filter(e=>e.team_id===l).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${l}, please provide another key alias`);if(X.default.info("Making API Call"),eN(!0),"you"===eA)e.user_id=ed;else if("agent"===eA){if(!tb)return void X.default.fromBackend("Please select an agent");e.agent_id=tb}let s={};try{s=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eA&&(s.service_account_id=e.key_alias),eU.length>0&&(s={...s,logging:eU.filter(e=>e.callback_name)}),ta.length>0){let e=(0,M.mapDisplayToInternalNames)(ta);s={...s,litellm_disabled_callbacks:e}}if(tc&&(e.auto_rotate=!0,e.rotation_interval=tu),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(s),e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:r}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),r&&r.length>0&&(e.object_permission.mcp_access_groups=r),delete e.allowed_mcp_servers_and_groups}let i=e.mcp_tool_permissions||{};if(Object.keys(i).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=i),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:r}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),r&&r.length>0&&(e.object_permission.agent_access_groups=r),delete e.allowed_agents_and_groups}Object.keys(tn).length>0&&(e.aliases=JSON.stringify(tn)),tp?.router_settings&&Object.values(tp.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tp.router_settings),t="service_account"===eA?await (0,J.keyCreateServiceAccountCall)(ec,e):await (0,J.keyCreateCall)(ec,ed,e),console.log("key create Response:",t),ei(t),ew.invalidateQueries({queryKey:r.keyKeys.lists()}),e$(t.key),eE(t.soft_budget),X.default.success("Virtual Key Created"),ek.resetFields(),localStorage.removeItem("userData"+ed)}catch(t){console.log("error in create key:",t);let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let r=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(r=a.message)}}else{let t=e?.error||e;t?.message&&(r=t.message)}}catch(e){}return t.includes("team_member_permission_error")||r.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);X.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(eZ){let e=ef?.find(e=>e.project_id===eZ);eP(e?.models??[]),ek.setFieldValue("models",[]);return}ed&&eu&&ec&&el(ed,eu,ec,eQ?.team_id??null).then(e=>{eP(Array.from(new Set([...eQ?.models??[],...e])))}),eR||ek.setFieldValue("models",[]),ek.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eQ,eZ,ec,ed,eu,ek]),(0,E.useEffect)(()=>{if(!eR||0===eR.length||!eM||0===eM.length)return;let e=eR.filter(e=>eM.includes(e));e.length>0&&ek.setFieldsValue({models:e}),ez(null)},[eR,eM,ek]),(0,E.useEffect)(()=>{if(!eZ||!Y)return;let e=ef?.find(e=>e.project_id===eZ);if(!e?.team_id||eQ?.team_id===e.team_id)return;let t=Y.find(t=>t.team_id===e.team_id)||null;t&&(eX(t),ek.setFieldValue("team_id",t.team_id))},[Y,eZ,ef]);let tC=async e=>{if(!e)return void e8([]);te(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==ec)return;let r=(await (0,J.userFilterUICall)(ec,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));e8(r)}catch(e){console.error("Error fetching users:",e),X.default.fromBackend("Failed to search for users")}finally{te(!1)}},tN=(0,E.useCallback)((0,T.default)(e=>tC(e),300),[ec]);return(0,t.jsxs)("div",{children:[eu&&I.rolesWithWriteAccess.includes(eu)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eN(!0),children:"+ Create New Key"}),(0,t.jsx)(w.Modal,{open:eC,width:1e3,footer:null,onOk:tj,onCancel:t_,children:(0,t.jsxs)(j.Form,{form:ek,onFinish:tk,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)($.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(k.Radio.Group,{onChange:e=>eL(e.target.value),value:eA,children:[(0,t.jsx)(k.Radio,{value:"you",children:"You"}),(0,t.jsx)(k.Radio,{value:"service_account",children:"Service Account"}),"Admin"===eu&&(0,t.jsx)(k.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(k.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eA&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)($.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===eA,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(C.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tN(e)},onSelect:(e,t)=>{let r;return r=t.user,void ek.setFieldsValue({user_id:r.user_id})},options:e7,loading:e9,allowClear:!0,style:{width:"100%"},notFoundContent:e9?"Searching...":"No users found"}),(0,t.jsx)(v.Button,{onClick:()=>e2(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===eA&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(C.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tb,onChange:e=>tv(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tx.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)($.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(V.default,{organizations:eg,loading:eh,disabled:"Admin"!==eu,onChange:e=>{eY(e||null),eX(null),e0(null),ek.setFieldValue("team_id",void 0),ek.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)($.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===eA,message:"Please select a team for the service account"}],help:"service_account"===eA?"required":"",children:(0,t.jsx)(K.default,{disabled:null!==eZ,organizationId:eJ,onTeamSelect:e=>{eX(e),e0(null),ek.setFieldValue("project_id",void 0),e?.organization_id?(eY(e.organization_id),ek.setFieldValue("organization_id",e.organization_id)):e||(eY(null),ek.setFieldValue("organization_id",void 0))}})}),ev&&(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)($.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ef,teamId:eQ?.team_id,loading:ex||!Y,onChange:e=>{if(!e){e0(null),eX(null),ek.setFieldValue("team_id",void 0);return}e0(e)}})})]}),tw&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(x.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tw&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eA||"another_user"===eA?"Key Name":"Service Account ID"," ",(0,t.jsx)($.Tooltip,{title:"you"===eA||"another_user"===eA?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===eA?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(y.TextInput,{placeholder:""})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)($.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===ts||"read_only"===ts?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(C.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===ts||"read_only"===ts,onChange:e=>{e.includes("all-team-models")&&ek.setFieldsValue({models:["all-team-models"]})},children:[!eZ&&(0,t.jsx)(ea,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eM.map(e=>(0,t.jsx)(ea,{value:e,children:(0,U.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)($.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(C.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{ti(e),("management"===e||"read_only"===e)&&ek.setFieldsValue({models:[]})},children:[(0,t.jsx)(ea,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(ea,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ea,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})})]}),!tw&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)($.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.max_budget&&r>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(et.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)($.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(A.default,{onChange:e=>ek.setFieldValue("budget_duration",e)})}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)($.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.tpm_limit&&r>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(et.default,{step:1,width:400})}),(0,t.jsx)(B.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)($.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,r)=>{if(r&&e&&null!==e.rpm_limit&&r>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(et.default,{step:1,width:400})}),(0,t.jsx)(B.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:ek,showDetailedDescriptions:!0}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)($.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:ep?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(C.Select,{mode:"tags",style:{width:"100%"},disabled:!ep,placeholder:ep?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eB.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)($.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:ep?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!ep,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)($.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:em?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(C.Select,{mode:"tags",style:{width:"100%"},disabled:!em,placeholder:em?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)($.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:em?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(C.Select,{mode:"tags",style:{width:"100%"},disabled:!em,placeholder:em?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)($.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(P.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)($.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:em?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(R.default,{onChange:e=>ek.setFieldValue("allowed_passthrough_routes",e),value:ek.getFieldValue("allowed_passthrough_routes"),accessToken:ec,placeholder:em?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!em,teamId:eQ?eQ.team_id:null})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)($.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>ek.setFieldValue("allowed_vector_store_ids",e),value:ek.getFieldValue("allowed_vector_store_ids"),accessToken:ec,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)($.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(_.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)($.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(C.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:e_})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)($.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(q.default,{onChange:e=>ek.setFieldValue("allowed_mcp_servers_and_groups",e),value:ek.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:ec,teamId:eQ?.team_id??null,placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(j.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(_.Input,{type:"hidden"})}),(0,t.jsx)(j.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(Q.default,{accessToken:ec,selectedServers:ek.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:ek.getFieldValue("mcp_tool_permissions")||{},onChange:e=>ek.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(j.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)($.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(O.default,{onChange:e=>ek.setFieldValue("allowed_agents_and_groups",e),value:ek.getFieldValue("allowed_agents_and_groups"),accessToken:ec,placeholder:"Select agents or access groups (optional)"})})})]}),em?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(z.default,{value:eU,onChange:eq,premiumUser:!0,disabledCallbacks:ta,onDisabledCallbacksChange:tl})})})]}):(0,t.jsx)($.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(z.default,{value:eU,onChange:eq,premiumUser:!1,disabledCallbacks:ta,onDisabledCallbacksChange:tl})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:ec||"",value:tp||void 0,onChange:tg,modelData:eI.length>0?{data:eI.map(e=>({model_name:e}))}:void 0},th)})})]},`router-settings-accordion-${th}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(x.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(D.default,{accessToken:ec,initialModelAliases:tn,onAliasUpdate:to,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(F.default,{form:ek,autoRotationEnabled:tc,onAutoRotationChange:td,rotationInterval:tu,onRotationIntervalChange:tm,isCreateMode:!0})})}),(0,t.jsx)(j.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(_.Input,{})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(p.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)($.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:J.proxyBaseUrl?`${J.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(c.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(L.default,{schemaComponent:"GenerateKeyRequest",form:ek,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ej?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(v.Button,{htmlType:"submit",disabled:tw,style:{opacity:tw?.5:1},children:"Create Key"})})]})}),e1&&(0,t.jsx)(w.Modal,{title:"Create New User",open:e1,onCancel:()=>e2(!1),footer:null,width:800,children:(0,t.jsx)(W.CreateUserButton,{userID:ed,accessToken:ec,teams:Y,possibleUIRoles:e6,onUserCreated:e=>{e3(e),ek.setFieldsValue({user_id:e}),e2(!1)},isEmbedded:!0})}),eS&&(0,t.jsx)(w.Modal,{open:eC,onOk:tj,onCancel:t_,footer:null,children:(0,t.jsxs)(f.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eS?(0,t.jsx)(ee,{apiKey:eS}):(0,t.jsx)(x.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,el,"fetchUserModels",0,es],702597)},309426,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),l=e.i(271645),s=e.i(46757);let i=(0,a.makeClassName)("Col"),n=l.default.forwardRef((e,a)=>{let n,o,c,d,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:p,numColSpanLg:g,children:h,className:f}=e,x=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),y=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(i("root"),(n=y(u,s.colSpan),o=y(m,s.colSpanSm),c=y(p,s.colSpanMd),d=y(g,s.colSpanLg),(0,r.tremorTwMerge)(n,o,c,d)),f)},x),h)});n.displayName="Col",e.s(["Col",()=>n],309426)},950724,(e,t,r)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},100236,(e,t,r)=>{t.exports=e.g&&e.g.Object===Object&&e.g},139088,(e,t,r)=>{var a=e.r(100236),l="object"==typeof self&&self&&self.Object===Object&&self;t.exports=a||l||Function("return this")()},631926,(e,t,r)=>{var a=e.r(139088);t.exports=function(){return a.Date.now()}},748891,(e,t,r)=>{var a=/\s/;t.exports=function(e){for(var t=e.length;t--&&a.test(e.charAt(t)););return t}},830364,(e,t,r)=>{var a=e.r(748891),l=/^\s+/;t.exports=function(e){return e?e.slice(0,a(e)+1).replace(l,""):e}},630353,(e,t,r)=>{t.exports=e.r(139088).Symbol},243436,(e,t,r)=>{var a=e.r(630353),l=Object.prototype,s=l.hasOwnProperty,i=l.toString,n=a?a.toStringTag:void 0;t.exports=function(e){var t=s.call(e,n),r=e[n];try{e[n]=void 0;var a=!0}catch(e){}var l=i.call(e);return a&&(t?e[n]=r:delete e[n]),l}},223243,(e,t,r)=>{var a=Object.prototype.toString;t.exports=function(e){return a.call(e)}},377684,(e,t,r)=>{var a=e.r(630353),l=e.r(243436),s=e.r(223243),i=a?a.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?l(e):s(e)}},877289,(e,t,r)=>{t.exports=function(e){return null!=e&&"object"==typeof e}},361884,(e,t,r)=>{var a=e.r(377684),l=e.r(877289);t.exports=function(e){return"symbol"==typeof e||l(e)&&"[object Symbol]"==a(e)}},773759,(e,t,r)=>{var a=e.r(830364),l=e.r(950724),s=e.r(361884),i=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(s(e))return i;if(l(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=l(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var r=o.test(e);return r||c.test(e)?d(e.slice(2),r?2:8):n.test(e)?i:+e}},374009,(e,t,r)=>{var a=e.r(950724),l=e.r(631926),s=e.r(773759),i=Math.max,n=Math.min;t.exports=function(e,t,r){var o,c,d,u,m,p,g=0,h=!1,f=!1,x=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=o,a=c;return o=c=void 0,g=t,u=e.apply(a,r)}function b(e){var r=e-p,a=e-g;return void 0===p||r>=t||r<0||f&&a>=d}function v(){var e,r,a,s=l();if(b(s))return j(s);m=setTimeout(v,(e=s-p,r=s-g,a=t-e,f?n(a,d-r):a))}function j(e){return(m=void 0,x&&o)?y(e):(o=c=void 0,u)}function _(){var e,r=l(),a=b(r);if(o=arguments,c=this,p=r,a){if(void 0===m)return g=e=p,m=setTimeout(v,t),h?y(e):u;if(f)return clearTimeout(m),m=setTimeout(v,t),y(p)}return void 0===m&&(m=setTimeout(v,t)),u}return t=s(t)||0,a(r)&&(h=!!r.leading,d=(f="maxWait"in r)?i(s(r.maxWait)||0,t):d,x="trailing"in r?!!r.trailing:x),_.cancel=function(){void 0!==m&&clearTimeout(m),g=0,o=p=c=m=void 0},_.flush=function(){return void 0===m?u:j(l())},_}},964306,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["XCircleIcon",0,r],964306)},435451,620250,e=>{"use strict";var t=e.i(843476),r=e.i(290571),a=e.i(271645);let l=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),a.default.createElement("path",{d:"M12 4v16m8-8H4"}))},s=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),a.default.createElement("path",{d:"M20 12H4"}))};var i=e.i(444755),n=e.i(673706),o=e.i(677955);let c="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",d="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",u=a.default.forwardRef((e,t)=>{let{onSubmit:u,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:h}=e,f=(0,r.__rest)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),x=(0,a.useRef)(null),[y,b]=a.default.useState(!1),v=a.default.useCallback(()=>{b(!0)},[]),j=a.default.useCallback(()=>{b(!1)},[]),[_,w]=a.default.useState(!1),k=a.default.useCallback(()=>{w(!0)},[]),C=a.default.useCallback(()=>{w(!1)},[]);return a.default.createElement(o.default,Object.assign({type:"number",ref:(0,n.mergeRefs)([x,t]),disabled:p,makeInputClassName:(0,n.makeClassName)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null==(t=x.current)?void 0:t.value;null==u||u(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&v(),"ArrowUp"===e.key&&k()},onKeyUp:e=>{"ArrowDown"===e.key&&j(),"ArrowUp"===e.key&&C()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==h||h(e))},stepper:m?a.default.createElement("div",{className:(0,i.tremorTwMerge)("flex justify-center align-middle")},a.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null==(e=x.current)||e.stepDown(),null==(t=x.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},a.default.createElement(s,{"data-testid":"step-down",className:(y?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),a.default.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;p||(null==(e=x.current)||e.stepUp(),null==(t=x.current)||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.tremorTwMerge)(!p&&d,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},a.default.createElement(l,{"data-testid":"step-up",className:(_?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},f))});u.displayName="NumberInput",e.s(["NumberInput",()=>u],620250),e.s(["default",0,({step:e=.01,style:r={width:"100%"},placeholder:a="Enter a numerical value",min:l,max:s,onChange:i,...n})=>(0,t.jsx)(u,{onWheel:e=>e.currentTarget.blur(),step:e,style:r,placeholder:a,min:l,max:s,onChange:i,...n})],435451)},677667,674175,886148,543086,e=>{"use strict";let t,r;var a,l=e.i(290571),s=e.i(429427),i=e.i(371330),n=e.i(271645),o=e.i(394487),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(83733);let p=(0,n.createContext)(()=>{});function g({value:e,children:t}){return n.default.createElement(p.Provider,{value:e},t)}e.s(["CloseProvider",()=>g],674175);var h=e.i(233137),f=e.i(233538),x=e.i(397701),y=e.i(402155),b=e.i(700020);let v=null!=(a=n.default.startTransition)?a:function(e){e()};var j=e.i(998348),_=((t=_||{})[t.Open=0]="Open",t[t.Closed=1]="Closed",t),w=((r=w||{})[r.ToggleDisclosure=0]="ToggleDisclosure",r[r.CloseDisclosure=1]="CloseDisclosure",r[r.SetButtonId=2]="SetButtonId",r[r.SetPanelId=3]="SetPanelId",r[r.SetButtonElement=4]="SetButtonElement",r[r.SetPanelElement=5]="SetPanelElement",r);let k={0:e=>({...e,disclosureState:(0,x.match)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},C=(0,n.createContext)(null);function N(e){let t=(0,n.useContext)(C);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return t}C.displayName="DisclosureContext";let S=(0,n.createContext)(null);S.displayName="DisclosureAPIContext";let $=(0,n.createContext)(null);function T(e,t){return(0,x.match)(t.type,k,e,t)}$.displayName="DisclosurePanelContext";let E=n.Fragment,I=b.RenderFeatures.RenderStrategy|b.RenderFeatures.Static,O=Object.assign((0,b.forwardRefWithAs)(function(e,t){let{defaultOpen:r=!1,...a}=e,l=(0,n.useRef)(null),s=(0,u.useSyncRefs)(t,(0,u.optionalRef)(e=>{l.current=e},void 0===e.as||e.as===n.Fragment)),i=(0,n.useReducer)(T,{disclosureState:+!r,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:o,buttonId:d},m]=i,p=(0,c.useEvent)(e=>{m({type:1});let t=(0,y.getOwnerDocument)(l);if(!t||!d)return;let r=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(d):t.getElementById(d);null==r||r.focus()}),f=(0,n.useMemo)(()=>({close:p}),[p]),v=(0,n.useMemo)(()=>({open:0===o,close:p}),[o,p]),j=(0,b.useRender)();return n.default.createElement(C.Provider,{value:i},n.default.createElement(S.Provider,{value:f},n.default.createElement(g,{value:p},n.default.createElement(h.OpenClosedProvider,{value:(0,x.match)(o,{0:h.State.Open,1:h.State.Closed})},j({ourProps:{ref:s},theirProps:a,slot:v,defaultTag:E,name:"Disclosure"})))))}),{Button:(0,b.forwardRefWithAs)(function(e,t){let r=(0,n.useId)(),{id:a=`headlessui-disclosure-button-${r}`,disabled:l=!1,autoFocus:m=!1,...p}=e,[g,h]=N("Disclosure.Button"),x=(0,n.useContext)($),y=null!==x&&x===g.panelId,v=(0,n.useRef)(null),_=(0,u.useSyncRefs)(v,t,(0,c.useEvent)(e=>{if(!y)return h({type:4,element:e})}));(0,n.useEffect)(()=>{if(!y)return h({type:2,buttonId:a}),()=>{h({type:2,buttonId:null})}},[a,h,y]);let w=(0,c.useEvent)(e=>{var t;if(y){if(1===g.disclosureState)return;switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0}),null==(t=g.buttonElement)||t.focus()}}else switch(e.key){case j.Keys.Space:case j.Keys.Enter:e.preventDefault(),e.stopPropagation(),h({type:0})}}),k=(0,c.useEvent)(e=>{e.key===j.Keys.Space&&e.preventDefault()}),C=(0,c.useEvent)(e=>{var t;(0,f.isDisabledReactIssue7711)(e.currentTarget)||l||(y?(h({type:0}),null==(t=g.buttonElement)||t.focus()):h({type:0}))}),{isFocusVisible:S,focusProps:T}=(0,s.useFocusRing)({autoFocus:m}),{isHovered:E,hoverProps:I}=(0,i.useHover)({isDisabled:l}),{pressed:O,pressProps:M}=(0,o.useActivePress)({disabled:l}),P=(0,n.useMemo)(()=>({open:0===g.disclosureState,hover:E,active:O,disabled:l,focus:S,autofocus:m}),[g,E,O,S,l,m]),A=(0,d.useResolveButtonType)(e,g.buttonElement),L=y?(0,b.mergeProps)({ref:_,type:A,disabled:l||void 0,autoFocus:m,onKeyDown:w,onClick:C},T,I,M):(0,b.mergeProps)({ref:_,id:a,type:A,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:l||void 0,autoFocus:m,onKeyDown:w,onKeyUp:k,onClick:C},T,I,M);return(0,b.useRender)()({ourProps:L,theirProps:p,slot:P,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,b.forwardRefWithAs)(function(e,t){let r=(0,n.useId)(),{id:a=`headlessui-disclosure-panel-${r}`,transition:l=!1,...s}=e,[i,o]=N("Disclosure.Panel"),{close:d}=function e(t){let r=(0,n.useContext)(S);if(null===r){let r=Error(`<${t} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}("Disclosure.Panel"),[p,g]=(0,n.useState)(null),f=(0,u.useSyncRefs)(t,(0,c.useEvent)(e=>{v(()=>o({type:5,element:e}))}),g);(0,n.useEffect)(()=>(o({type:3,panelId:a}),()=>{o({type:3,panelId:null})}),[a,o]);let x=(0,h.useOpenClosed)(),[y,j]=(0,m.useTransition)(l,p,null!==x?(x&h.State.Open)===h.State.Open:0===i.disclosureState),_=(0,n.useMemo)(()=>({open:0===i.disclosureState,close:d}),[i.disclosureState,d]),w={ref:f,id:a,...(0,m.transitionDataAttributes)(j)},k=(0,b.useRender)();return n.default.createElement(h.ResetOpenClosedProvider,null,n.default.createElement($.Provider,{value:i.panelId},k({ourProps:w,theirProps:s,slot:_,defaultTag:"div",features:I,visible:y,name:"Disclosure.Panel"})))})});e.s(["Disclosure",()=>O],886148);let M=(0,n.createContext)(void 0);var P=e.i(444755);let A=(0,e.i(673706).makeClassName)("Accordion"),L=(0,n.createContext)({isOpen:!1}),F=n.default.forwardRef((e,t)=>{var r;let{defaultOpen:a=!1,children:s,className:i}=e,o=(0,l.__rest)(e,["defaultOpen","children","className"]),c=null!=(r=(0,n.useContext)(M))?r:(0,P.tremorTwMerge)("rounded-tremor-default border");return n.default.createElement(O,Object.assign({as:"div",ref:t,className:(0,P.tremorTwMerge)(A("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",c,i),defaultOpen:a},o),({open:e})=>n.default.createElement(L.Provider,{value:{isOpen:e}},s))});F.displayName="Accordion",e.s(["OpenContext",()=>L,"default",()=>F],543086),e.s(["Accordion",()=>F],677667)},898667,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(886148);let l=e=>{var a=(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"},a),r.default.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var s=e.i(543086),i=e.i(444755);let n=(0,e.i(673706).makeClassName)("AccordionHeader"),o=r.default.forwardRef((e,o)=>{let{children:c,className:d}=e,u=(0,t.__rest)(e,["children","className"]),{isOpen:m}=(0,r.useContext)(s.OpenContext);return r.default.createElement(a.Disclosure.Button,Object.assign({ref:o,className:(0,i.tremorTwMerge)(n("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",d)},u),r.default.createElement("div",{className:(0,i.tremorTwMerge)(n("children"),"flex flex-1 text-inherit mr-4")},c),r.default.createElement("div",null,r.default.createElement(l,{className:(0,i.tremorTwMerge)(n("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});o.displayName="AccordionHeader",e.s(["AccordionHeader",()=>o],898667)},130643,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(886148),l=e.i(444755);let s=(0,e.i(673706).makeClassName)("AccordionBody"),i=r.default.forwardRef((e,i)=>{let{children:n,className:o}=e,c=(0,t.__rest)(e,["children","className"]);return r.default.createElement(a.Disclosure.Panel,Object.assign({ref:i,className:(0,l.tremorTwMerge)(s("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},c),n)});i.displayName="AccordionBody",e.s(["AccordionBody",()=>i],130643)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:i,accessToken:n,placeholder:o="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[m,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,l.vectorStoreListCall)(n);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:e,value:s,loading:m,className:i,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},983561,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["RobotOutlined",0,s],983561)},56456,e=>{"use strict";var t=e.i(739295);e.s(["LoadingOutlined",()=>t.default])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),a=e.i(201072),l=e.i(121229),s=e.i(726289),i=e.i(864517),n=e.i(343794),o=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),m=e.i(703923),p={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},g=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),a=!1;e.current.forEach(function(e){if(e){a=!0;var l=e.style;l.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(l.transitionDuration="0s, 0s")}}),a&&(r.current=Date.now())}),e.current},h=e.i(410160),f=e.i(392221),x=e.i(654310),y=0,b=(0,x.default)();let v=function(e){var r=t.useState(),a=(0,f.default)(r,2),l=a[0],s=a[1];return t.useEffect(function(){var e;s("rc_progress_".concat((b?(e=y,y+=1):e="TEST_OR_SSR",e)))},[]),e||l};var j=function(e){var r=e.bg,a=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},a)};function _(e,t){return Object.keys(e).map(function(r){var a=parseFloat(r),l="".concat(Math.floor(a*t),"%");return"".concat(e[r]," ").concat(l)})}var w=t.forwardRef(function(e,r){var a=e.prefixCls,l=e.color,s=e.gradientId,i=e.radius,n=e.style,o=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,m=e.gapDegree,p=l&&"object"===(0,h.default)(l),g=u/2,f=t.createElement("circle",{className:"".concat(a,"-circle-path"),r:i,cx:g,cy:g,stroke:p?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==o),style:n,ref:r});if(!p)return f;var x="".concat(s,"-conic"),y=_(l,(360-m)/360),b=_(l,1),v="conic-gradient(from ".concat(m?"".concat(180+m/2,"deg"):"0deg",", ").concat(y.join(", "),")"),w="linear-gradient(to ".concat(m?"bottom":"top",", ").concat(b.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:x},f),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(x,")")},t.createElement(j,{bg:w},t.createElement(j,{bg:v}))))}),k=function(e,t,r,a,l,s,i,n,o,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-a)/100*t;return"round"===o&&100!==a&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof n?n:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(l+r/100*360*((360-s)/360)+(0===s?0:({bottom:0,top:180,left:90,right:-90})[i]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},C=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function N(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let S=function(e){var r,a,l,s,i=(0,u.default)((0,u.default)({},p),e),o=i.id,c=i.prefixCls,f=i.steps,x=i.strokeWidth,y=i.trailWidth,b=i.gapDegree,j=void 0===b?0:b,_=i.gapPosition,S=i.trailColor,$=i.strokeLinecap,T=i.style,E=i.className,I=i.strokeColor,O=i.percent,M=(0,m.default)(i,C),P=v(o),A="".concat(P,"-gradient"),L=50-x/2,F=2*Math.PI*L,D=j>0?90+j/2:-90,R=(360-j)/360*F,z="object"===(0,h.default)(f)?f:{count:f,gap:2},B=z.count,G=z.gap,K=N(O),V=N(I),H=V.find(function(e){return e&&"object"===(0,h.default)(e)}),W=H&&"object"===(0,h.default)(H)?"butt":$,U=k(F,R,0,100,D,j,_,S,W,x),q=g();return t.createElement("svg",(0,d.default)({className:(0,n.default)("".concat(c,"-circle"),E),viewBox:"0 0 ".concat(100," ").concat(100),style:T,id:o,role:"presentation"},M),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:L,cx:50,cy:50,stroke:S,strokeLinecap:W,strokeWidth:y||x,style:U}),B?(r=Math.round(B*(K[0]/100)),a=100/B,l=0,Array(B).fill(null).map(function(e,s){var i=s<=r-1?V[0]:S,n=i&&"object"===(0,h.default)(i)?"url(#".concat(A,")"):void 0,o=k(F,R,l,a,D,j,_,i,"butt",x,G);return l+=(R-o.strokeDashoffset+G)*100/R,t.createElement("circle",{key:s,className:"".concat(c,"-circle-path"),r:L,cx:50,cy:50,stroke:n,strokeWidth:x,opacity:1,style:o,ref:function(e){q[s]=e}})})):(s=0,K.map(function(e,r){var a=V[r]||V[V.length-1],l=k(F,R,s,e,D,j,_,a,W,x);return s+=e,t.createElement(w,{key:r,color:a,ptg:e,radius:L,prefixCls:c,gradientId:A,style:l,strokeLinecap:W,strokeWidth:x,gapDegree:j,ref:function(e){q[r]=e},size:100})}).reverse()))};var $=e.i(491816);e.i(765846);var T=e.i(896091);function E(e){return!e||e<0?0:e>100?100:e}function I({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let O=(e,t,r)=>{var a,l,s,i;let n=-1,o=-1;if("step"===t){let t=r.steps,a=r.strokeWidth;"string"==typeof e||void 0===e?(n="small"===e?2:14,o=null!=a?a:8):"number"==typeof e?[n,o]=[e,e]:[n=14,o=8]=Array.isArray(e)?e:[e.width,e.height],n*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?o=t||("small"===e?6:8):"number"==typeof e?[n,o]=[e,e]:[n=-1,o=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[n,o]="small"===e?[60,60]:[120,120]:"number"==typeof e?[n,o]=[e,e]:Array.isArray(e)&&(n=null!=(l=null!=(a=e[0])?a:e[1])?l:120,o=null!=(i=null!=(s=e[0])?s:e[1])?i:120));return[n,o]},M=e=>{let{prefixCls:r,trailColor:a=null,strokeLinecap:l="round",gapPosition:s,gapDegree:i,width:o=120,type:c,children:d,success:u,size:m=o,steps:p}=e,[g,h]=O(m,"circle"),{strokeWidth:f}=e;void 0===f&&(f=Math.max(3/g*100,6));let x=t.useMemo(()=>i||0===i?i:"dashboard"===c?75:void 0,[i,c]),y=(({percent:e,success:t,successPercent:r})=>{let a=E(I({success:t,successPercent:r}));return[a,E(E(e)-a)]})(e),b="[object Object]"===Object.prototype.toString.call(e.strokeColor),v=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||T.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),j=(0,n.default)(`${r}-inner`,{[`${r}-circle-gradient`]:b}),_=t.createElement(S,{steps:p,percent:p?y[1]:y,strokeWidth:f,trailWidth:f,strokeColor:p?v[1]:v,strokeLinecap:l,trailColor:a,prefixCls:r,gapDegree:x,gapPosition:s||"dashboard"===c&&"bottom"||void 0}),w=g<=20,k=t.createElement("div",{className:j,style:{width:g,height:h,fontSize:.15*g+6}},_,!w&&d);return w?t.createElement($.default,{title:d},k):k};e.i(296059);var P=e.i(694758),A=e.i(915654),L=e.i(183293),F=e.i(246422),D=e.i(838378);let R="--progress-line-stroke-color",z="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new P.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},G=(0,F.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,D.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,L.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${R})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,A.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var K=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let V=e=>{let{prefixCls:r,direction:a,percent:l,size:s,strokeWidth:i,strokeColor:o,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:m,success:p}=e,{align:g,type:h}=m,f=o&&"string"!=typeof o?((e,t)=>{let{from:r=T.presetPrimaryColors.blue,to:a=T.presetPrimaryColors.blue,direction:l="rtl"===t?"to left":"to right"}=e,s=K(e,["from","to","direction"]);if(0!==Object.keys(s).length){let e,t=(e=[],Object.keys(s).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:s[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${l}, ${t})`;return{background:r,[R]:r}}let i=`linear-gradient(${l}, ${r}, ${a})`;return{background:i,[R]:i}})(o,a):{[R]:o,background:o},x="square"===c||"butt"===c?0:void 0,[y,b]=O(null!=s?s:[-1,i||("small"===s?6:8)],"line",{strokeWidth:i}),v=Object.assign(Object.assign({width:`${E(l)}%`,height:b,borderRadius:x},f),{[z]:E(l)/100}),j=I(e),_={width:`${E(j)}%`,height:b,borderRadius:x,backgroundColor:null==p?void 0:p.strokeColor},w=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:x}},t.createElement("div",{className:(0,n.default)(`${r}-bg`,`${r}-bg-${h}`),style:v},"inner"===h&&d),void 0!==j&&t.createElement("div",{className:`${r}-success-bg`,style:_})),k="outer"===h&&"start"===g,C="outer"===h&&"end"===g;return"outer"===h&&"center"===g?t.createElement("div",{className:`${r}-layout-bottom`},w,d):t.createElement("div",{className:`${r}-outer`,style:{width:y<0?"100%":y}},k&&d,w,C&&d)},H=e=>{let{size:r,steps:a,rounding:l=Math.round,percent:s=0,strokeWidth:i=8,strokeColor:o,trailColor:c=null,prefixCls:d,children:u}=e,m=l(s/100*a),[p,g]=O(null!=r?r:["small"===r?2:14,i],"step",{steps:a,strokeWidth:i}),h=p/a,f=Array.from({length:a});for(let e=0;et.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let U=["normal","exception","active","success"],q=t.forwardRef((e,d)=>{let u,{prefixCls:m,className:p,rootClassName:g,steps:h,strokeColor:f,percent:x=0,size:y="default",showInfo:b=!0,type:v="line",status:j,format:_,style:w,percentPosition:k={}}=e,C=W(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:N="end",type:S="outer"}=k,$=Array.isArray(f)?f[0]:f,T="string"==typeof f||Array.isArray(f)?f:void 0,P=t.useMemo(()=>{if($){let e="string"==typeof $?$:Object.values($)[0];return new r.FastColor(e).isLight()}return!1},[f]),A=t.useMemo(()=>{var t,r;let a=I(e);return Number.parseInt(void 0!==a?null==(t=null!=a?a:0)?void 0:t.toString():null==(r=null!=x?x:0)?void 0:r.toString(),10)},[x,e.success,e.successPercent]),L=t.useMemo(()=>!U.includes(j)&&A>=100?"success":j||"normal",[j,A]),{getPrefixCls:F,direction:D,progress:R}=t.useContext(c.ConfigContext),z=F("progress",m),[B,K,q]=G(z),Q="line"===v,X=Q&&!h,J=t.useMemo(()=>{let r;if(!b)return null;let o=I(e),c=_||(e=>`${e}%`),d=Q&&P&&"inner"===S;return"inner"===S||_||"exception"!==L&&"success"!==L?r=c(E(x),E(o)):"exception"===L?r=Q?t.createElement(s.default,null):t.createElement(i.default,null):"success"===L&&(r=Q?t.createElement(a.default,null):t.createElement(l.default,null)),t.createElement("span",{className:(0,n.default)(`${z}-text`,{[`${z}-text-bright`]:d,[`${z}-text-${N}`]:X,[`${z}-text-${S}`]:X}),title:"string"==typeof r?r:void 0},r)},[b,x,A,L,v,z,_]);"line"===v?u=h?t.createElement(H,Object.assign({},e,{strokeColor:T,prefixCls:z,steps:"object"==typeof h?h.count:h}),J):t.createElement(V,Object.assign({},e,{strokeColor:$,prefixCls:z,direction:D,percentPosition:{align:N,type:S}}),J):("circle"===v||"dashboard"===v)&&(u=t.createElement(M,Object.assign({},e,{strokeColor:$,prefixCls:z,progressStatus:L}),J));let Y=(0,n.default)(z,`${z}-status-${L}`,{[`${z}-${"dashboard"===v&&"circle"||v}`]:"line"!==v,[`${z}-inline-circle`]:"circle"===v&&O(y,"circle")[0]<=20,[`${z}-line`]:X,[`${z}-line-align-${N}`]:X,[`${z}-line-position-${S}`]:X,[`${z}-steps`]:h,[`${z}-show-info`]:b,[`${z}-${y}`]:"string"==typeof y,[`${z}-rtl`]:"rtl"===D},null==R?void 0:R.className,p,g,K,q);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==R?void 0:R.style),w),className:Y,role:"progressbar","aria-valuenow":A,"aria-valuemin":0,"aria-valuemax":100},(0,o.default)(C,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,q],309821)},597440,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["default",0,s],597440)},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},500727,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(764205),l=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,l.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,a.fetchMCPServers)(r,e),enabled:!!r})}],500727);var i=e.i(843476),n=e.i(271645),o=e.i(536916),c=e.i(599724),d=e.i(409797),u=e.i(246349),u=u;let m=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,p=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,g=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,h=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function f(e,t=""){let r=e.toLowerCase();if(h.test(r))return"read";if(m.test(r))return"delete";if(g.test(r))return"update";if(p.test(r))return"create";if(t){let e=t.toLowerCase();if(h.test(e))return"read";if(m.test(e))return"delete";if(g.test(e))return"update";if(p.test(e))return"create"}return"unknown"}function x(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[f(r.name,r.description)].push(r);return t}let y={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,y,"classifyToolOp",()=>f,"groupToolsByCrud",()=>x],696609);let b=["read","create","update","delete","unknown"],v={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},j={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},_={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:a=!1,searchFilter:l=""})=>{let[s,m]=(0,n.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),p=(0,n.useMemo)(()=>x(e),[e]),g=(0,n.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),h=e=>{if(a)return;let t=new Set(g);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,i.jsx)("div",{className:"space-y-3",children:b.map(e=>{let t,n=p[e];if(0===n.length)return null;if(l){let e=l.toLowerCase();if(!n.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let f=y[e],x=(t=p[e]).length>0&&t.every(e=>g.has(e.name)),b=(e=>{let t=p[e];if(0===t.length)return!1;let r=t.filter(e=>g.has(e.name)).length;return r>0&&r{m(t=>({...t,[e]:!t[e]}))},children:[w?(0,i.jsx)(u.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,i.jsx)(d.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,i.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:f.label}),(0,i.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${v[f.risk]}`,children:"high"===f.risk?"High Risk":"medium"===f.risk?"Medium Risk":"low"===f.risk?"Safe":"Unclassified"}),(0,i.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[n.filter(e=>g.has(e.name)).length,"/",n.length," allowed"]})]}),!a&&(0,i.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,i.jsx)(c.Text,{className:"text-xs text-gray-500",children:x?"All on":b?"Partial":"All off"}),(0,i.jsx)(o.Checkbox,{checked:x,indeterminate:b,onChange:t=>((e,t)=>{if(a)return;let l=new Set(g);for(let r of p[e])t?l.add(r.name):l.delete(r.name);r(Array.from(l))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!w&&(0,i.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:f.description}),!w&&(0,i.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:n.filter(e=>!l||e.name.toLowerCase().includes(l.toLowerCase())||(e.description??"").toLowerCase().includes(l.toLowerCase())).map(e=>{let t,r=(t=e.name,g.has(t));return(0,i.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!a?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>h(e.name),children:[(0,i.jsx)(o.Checkbox,{checked:r,onChange:()=>h(e.name),disabled:a,onClick:e=>e.stopPropagation()}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,i.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,i.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},361653,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),a=e.i(371330),l=e.i(271645),s=e.i(394487),i=e.i(503269),n=e.i(214520),o=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),m=e.i(601893),p=e.i(140721),g=e.i(942803),h=e.i(233538),f=e.i(694421),x=e.i(700020),y=e.i(35889),b=e.i(998348),v=e.i(722678);let j=(0,l.createContext)(null);j.displayName="GroupContext";let _=l.Fragment,w=Object.assign((0,x.forwardRefWithAs)(function(e,t){var _;let w=(0,l.useId)(),k=(0,g.useProvidedId)(),C=(0,m.useDisabled)(),{id:N=k||`headlessui-switch-${w}`,disabled:S=C||!1,checked:$,defaultChecked:T,onChange:E,name:I,value:O,form:M,autoFocus:P=!1,...A}=e,L=(0,l.useContext)(j),[F,D]=(0,l.useState)(null),R=(0,l.useRef)(null),z=(0,u.useSyncRefs)(R,t,null===L?null:L.setSwitch,D),B=(0,n.useDefaultValue)(T),[G,K]=(0,i.useControllable)($,E,null!=B&&B),V=(0,o.useDisposables)(),[H,W]=(0,l.useState)(!1),U=(0,c.useEvent)(()=>{W(!0),null==K||K(!G),V.nextFrame(()=>{W(!1)})}),q=(0,c.useEvent)(e=>{if((0,h.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),U()}),Q=(0,c.useEvent)(e=>{e.key===b.Keys.Space?(e.preventDefault(),U()):e.key===b.Keys.Enter&&(0,f.attemptSubmit)(e.currentTarget)}),X=(0,c.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Y=(0,y.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:P}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:el}=(0,s.useActivePress)({disabled:S}),es=(0,l.useMemo)(()=>({checked:G,disabled:S,hover:et,focus:Z,active:ea,autofocus:P,changing:H}),[G,et,Z,ea,S,H,P]),ei=(0,x.mergeProps)({id:N,ref:z,role:"switch",type:(0,d.useResolveButtonType)(e,F),tabIndex:-1===e.tabIndex?0:null!=(_=e.tabIndex)?_:0,"aria-checked":G,"aria-labelledby":J,"aria-describedby":Y,disabled:S||void 0,autoFocus:P,onClick:q,onKeyUp:Q,onKeyPress:X},ee,er,el),en=(0,l.useCallback)(()=>{if(void 0!==B)return null==K?void 0:K(B)},[K,B]),eo=(0,x.useRender)();return l.default.createElement(l.default.Fragment,null,null!=I&&l.default.createElement(p.FormFields,{disabled:S,data:{[I]:O||"on"},overrides:{type:"checkbox",checked:G},form:M,onReset:en}),eo({ourProps:ei,theirProps:A,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,l.useState)(null),[s,i]=(0,v.useLabels)(),[n,o]=(0,y.useDescriptions)(),c=(0,l.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),d=(0,x.useRender)();return l.default.createElement(o,{name:"Switch.Description",value:n},l.default.createElement(i,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.default.createElement(j.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:_,name:"Switch.Group"}))))},Label:v.Label,Description:y.Description});var k=e.i(888288),C=e.i(95779),N=e.i(444755),S=e.i(673706),$=e.i(829087);let T=(0,S.makeClassName)("Switch"),E=l.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:s=!1,onChange:i,color:n,name:o,error:c,errorMessage:d,disabled:u,required:m,tooltip:p,id:g}=e,h=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),f={bgColor:n?(0,S.getColorClassNames)(n,C.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:n?(0,S.getColorClassNames)(n,C.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[x,y]=(0,k.default)(s,a),[b,v]=(0,l.useState)(!1),{tooltipProps:j,getReferenceProps:_}=(0,$.useTooltip)(300);return l.default.createElement("div",{className:"flex flex-row items-center justify-start"},l.default.createElement($.default,Object.assign({text:p},j)),l.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([r,j.refs.setReference]),className:(0,N.tremorTwMerge)(T("root"),"flex flex-row relative h-5")},h,_),l.default.createElement("input",{type:"checkbox",className:(0,N.tremorTwMerge)(T("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:o,required:m,checked:x,onChange:e=>{e.preventDefault()}}),l.default.createElement(w,{checked:x,onChange:e=>{y(e),null==i||i(e)},disabled:u,className:(0,N.tremorTwMerge)(T("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:g},l.default.createElement("span",{className:(0,N.tremorTwMerge)(T("sr-only"),"sr-only")},"Switch ",x?"on":"off"),l.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(T("background"),x?f.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),l.default.createElement("span",{"aria-hidden":"true",className:(0,N.tremorTwMerge)(T("round"),x?(0,N.tremorTwMerge)(f.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",b?(0,N.tremorTwMerge)("ring-2",f.ringColor):"")}))),c&&d?l.default.createElement("p",{className:(0,N.tremorTwMerge)(T("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});E.displayName="Switch",e.s(["Switch",()=>E],793130)},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let a={ttl:3600,lowest_latency_buffer:0},l=({routingStrategyArgs:e})=>{let l={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||a).map(([e,a])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof a?JSON.stringify(a,null,2):a?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:a})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,l])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:a[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:a[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==l||"null"===l?"":"object"==typeof l?JSON.stringify(l,null,2):l?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var i=e.i(199133);let n=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:a,routerFieldsMetadata:l,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:l.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:l.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(i.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(i.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),a[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:a[e]})]})},e))})})]});var o=e.i(793130);let c=({enabled:e,routerFieldsMetadata:r,onToggle:a})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(o.Switch,{checked:e,onChange:a,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:a,availableRoutingStrategies:i,routingStrategyDescriptions:o})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),i.length>0&&(0,t.jsx)(n,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:i,routingStrategyDescriptions:o,routerFieldsMetadata:a,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:a,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(l,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:a})]})],158392);var d=e.i(994388),u=e.i(653496),m=e.i(107233),p=e.i(271645),g=e.i(888259),h=e.i(592968),f=e.i(361653),f=f;let x=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var y=e.i(37727);function b({group:e,onChange:r,availableModels:a,maxFallbacks:l}){let s=a.filter(t=>t!==e.primaryModel),n=e.fallbackModels.length{let a=[...e.fallbackModels];a.includes(t)&&(a=a.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:a})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:a.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(f.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(x,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",l," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(i.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:n?"Select fallback models to add...":`Maximum ${l} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let a=t.slice(0,l);r({...e,fallbackModels:a})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,a)=>{let l=e.fallbackModels.includes(r.value),s=l?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[l&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(h.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:n?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${l} used)`:`Maximum ${l} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((a,l)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:l+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:a})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==l),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(y.X,{className:"w-4 h-4"})})]},`${a}-${l}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:a,maxFallbacks:l=10,maxGroups:s=5}){let[i,n]=(0,p.useState)(e.length>0?e[0].id:"1");(0,p.useEffect)(()=>{e.length>0?e.some(e=>e.id===i)||n(e[0].id):n("1")},[e]);let o=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),n(t)},c=t=>{r(e.map(e=>e.id===t.id?t:e))},h=e.map((r,s)=>{let i=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:i,closable:e.length>1,children:(0,t.jsx)(b,{group:r,onChange:c,availableModels:a,maxFallbacks:l})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(d.Button,{variant:"primary",onClick:o,icon:()=>(0,t.jsx)(m.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:i,onChange:n,onEdit:(t,a)=>{"add"===a?o():"remove"===a&&e.length>1&&(t=>{if(1===e.length)return g.default.warning("At least one group is required");let a=e.filter(e=>e.id!==t);r(a),i===t&&a.length>0&&n(a[a.length-1].id)})(t)},items:h,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},645526,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["TeamOutlined",0,s],645526)},109799,e=>{"use strict";var t=e.i(135214),r=e.i(764205),a=e.i(266027),l=e.i(912598);let s=(0,e.i(243652).createQueryKeys)("organizations");e.s(["useOrganization",0,e=>{let i=(0,l.useQueryClient)(),{accessToken:n}=(0,t.default)();return(0,a.useQuery)({queryKey:s.detail(e),enabled:!!(n&&e),queryFn:async()=>{if(!n||!e)throw Error("Missing auth or teamId");return(0,r.organizationInfoCall)(n,e)},initialData:()=>{if(!e)return;let t=i.getQueryData(s.list({}));return t?.find(t=>t.organization_id===e)}})},"useOrganizations",0,()=>{let{accessToken:e,userId:l,userRole:i}=(0,t.default)();return(0,a.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,r.organizationListCall)(e),enabled:!!(e&&l&&i)})}])},621482,e=>{"use strict";var t=e.i(869230),r=e.i(992571),a=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,r.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,r.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:a}=e,l=super.createResult(e,t),{isFetching:s,isRefetching:i,isError:n,isRefetchError:o}=l,c=a.fetchMeta?.fetchMore?.direction,d=n&&"forward"===c,u=s&&"forward"===c,m=n&&"backward"===c,p=s&&"backward"===c;return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,r.hasNextPage)(t,a.data),hasPreviousPage:(0,r.hasPreviousPage)(t,a.data),isFetchNextPageError:d,isFetchingNextPage:u,isFetchPreviousPageError:m,isFetchingPreviousPage:p,isRefetchError:o&&!d&&!m,isRefetching:i&&!u&&!p}}},l=e.i(469637);function s(e,t){return(0,l.useBaseQuery)(e,a,t)}e.s(["useInfiniteQuery",()=>s],621482)},270345,e=>{"use strict";var t=e.i(764205);let r=async(e,r,a,l)=>"Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,l?.organization_id||null,r):await (0,t.teamListCall)(e,l?.organization_id||null);e.s(["fetchTeams",0,r])},785242,e=>{"use strict";var t=e.i(619273),r=e.i(621482),a=e.i(266027),l=e.i(912598),s=e.i(135214),i=e.i(270345),n=e.i(243652),o=e.i(764205);let c=async(e,t,r,a={})=>{try{let l=(0,o.getProxyBaseUrl)(),s=new URLSearchParams(Object.entries({team_id:a.teamID,organization_id:a.organizationID,team_alias:a.team_alias,user_id:a.userID,page:t,page_size:r,sort_by:a.sortBy,sort_order:a.sortOrder,status:a.status}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${s}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let c=await n.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to list teams:",e),e}},d=(0,n.createQueryKeys)("teams"),u=(0,n.createQueryKeys)("infiniteTeams"),m=async(e,t,r,a={})=>{try{let l=(0,o.getProxyBaseUrl)(),s=new URLSearchParams(Object.entries({team_id:a.teamID,organization_id:a.organizationID,team_alias:a.team_alias,user_id:a.userID,page:t,page_size:r,sort_by:a.sortBy,sort_order:a.sortOrder,status:"deleted"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),i=`${l?`${l}/v2/team/list`:"/v2/team/list"}?${s}`,n=await fetch(i,{method:"GET",headers:{[(0,o.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=(0,o.deriveErrorMessage)(e);throw(0,o.handleError)(t),Error(t)}let c=await n.json();if(console.log("/team/list?status=deleted API Response:",c),c&&"object"==typeof c&&"teams"in c)return c.teams;return c}catch(e){throw console.error("Failed to list deleted teams:",e),e}},p=(0,n.createQueryKeys)("deletedTeams");e.s(["teamListCall",0,c,"useDeletedTeams",0,(e,r,l={})=>{let{accessToken:i}=(0,s.default)();return(0,a.useQuery)({queryKey:p.list({page:e,limit:r,...l}),queryFn:async()=>await m(i,e,r,l),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useInfiniteTeams",0,(e=50,t,a)=>{let{accessToken:l,userId:i,userRole:n}=(0,s.default)(),o="Admin"===n||"Admin Viewer"===n;return(0,r.useInfiniteQuery)({queryKey:u.list({filters:{pageSize:e,...t&&{search:t},...a&&{organizationId:a},...i&&{userId:i}}}),queryFn:async({pageParam:r})=>await c(l,r,e,{team_alias:t||void 0,organizationID:a,userID:o?void 0:i}),initialPageParam:1,getNextPageParam:e=>{if(e.page{let{accessToken:t}=(0,s.default)(),r=(0,l.useQueryClient)();return(0,a.useQuery)({queryKey:d.detail(e),enabled:!!(t&&e),queryFn:async()=>{if(!t||!e)throw Error("Missing auth or teamId");return(0,o.teamInfoCall)(t,e)},initialData:()=>{if(!e)return;let t=r.getQueryData(d.list({}));return t?.find(t=>t.team_id===e)}})},"useTeams",0,()=>{let{accessToken:e,userId:t,userRole:r}=(0,s.default)();return(0,a.useQuery)({queryKey:d.list({}),queryFn:async()=>await (0,i.fetchTeams)(e,t,r,null),enabled:!!e})}])},38243,908286,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(876556);function l(e){return["small","middle","large"].includes(e)}function s(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}e.s(["isPresetSize",()=>l,"isValidGapNumber",()=>s],908286);var i=e.i(242064),n=e.i(249616),o=e.i(372409),c=e.i(246422);let d=(0,c.genStyleHooks)(["Space","Addon"],e=>[(e=>{let{componentCls:t,borderRadius:r,paddingSM:a,colorBorder:l,paddingXS:s,fontSizeLG:i,fontSizeSM:n,borderRadiusLG:c,borderRadiusSM:d,colorBgContainerDisabled:u,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:a,margin:0,background:u,borderWidth:m,borderStyle:"solid",borderColor:l,borderRadius:r,"&-large":{fontSize:i,borderRadius:c},"&-small":{paddingInline:s,borderRadius:d,fontSize:n},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,o.genCompactItemStyle)(e,{focus:!1})]}})(e)]);var u=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let m=t.default.forwardRef((e,a)=>{let{className:l,children:s,style:o,prefixCls:c}=e,m=u(e,["className","children","style","prefixCls"]),{getPrefixCls:p,direction:g}=t.default.useContext(i.ConfigContext),h=p("space-addon",c),[f,x,y]=d(h),{compactItemClassnames:b,compactSize:v}=(0,n.useCompactItemContext)(h,g),j=(0,r.default)(h,x,b,y,{[`${h}-${v}`]:v},l);return f(t.default.createElement("div",Object.assign({ref:a,className:j,style:o},m),s))}),p=t.default.createContext({latestIndex:0}),g=p.Provider,h=({className:e,index:r,children:a,split:l,style:s})=>{let{latestIndex:i}=t.useContext(p);return null==a?null:t.createElement(t.Fragment,null,t.createElement("div",{className:e,style:s},a),r{let t=(0,f.mergeToken)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[(e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}})(t)]},()=>({}),{resetStyle:!1});var y=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let b=t.forwardRef((e,n)=>{var o;let{getPrefixCls:c,direction:d,size:u,className:m,style:p,classNames:f,styles:b}=(0,i.useComponentConfig)("space"),{size:v=null!=u?u:"small",align:j,className:_,rootClassName:w,children:k,direction:C="horizontal",prefixCls:N,split:S,style:$,wrap:T=!1,classNames:E,styles:I}=e,O=y(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[M,P]=Array.isArray(v)?v:[v,v],A=l(P),L=l(M),F=s(P),D=s(M),R=(0,a.default)(k,{keepEmpty:!0}),z=void 0===j&&"horizontal"===C?"center":j,B=c("space",N),[G,K,V]=x(B),H=(0,r.default)(B,m,K,`${B}-${C}`,{[`${B}-rtl`]:"rtl"===d,[`${B}-align-${z}`]:z,[`${B}-gap-row-${P}`]:A,[`${B}-gap-col-${M}`]:L},_,w,V),W=(0,r.default)(`${B}-item`,null!=(o=null==E?void 0:E.item)?o:f.item),U=Object.assign(Object.assign({},b.item),null==I?void 0:I.item),q=R.map((e,r)=>{let a=(null==e?void 0:e.key)||`${W}-${r}`;return t.createElement(h,{className:W,key:a,index:r,split:S,style:U},e)}),Q=t.useMemo(()=>({latestIndex:R.reduce((e,t,r)=>null!=t?r:e,0)}),[R]);if(0===R.length)return null;let X={};return T&&(X.flexWrap="wrap"),!L&&D&&(X.columnGap=M),!A&&F&&(X.rowGap=P),G(t.createElement("div",Object.assign({ref:n,className:H,style:Object.assign(Object.assign(Object.assign({},X),p),$)},O),t.createElement(g,{value:Q},q)))});b.Compact=n.default,b.Addon=m,e.s(["default",0,b],38243)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},262218,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(702779),s=e.i(563113),i=e.i(763731),n=e.i(121872),o=e.i(242064);e.i(296059);var c=e.i(915654);e.i(262370);var d=e.i(135551),u=e.i(183293),m=e.i(246422),p=e.i(838378);let g=e=>{let{lineWidth:t,fontSizeIcon:r,calc:a}=e,l=e.fontSizeSM;return(0,p.mergeToken)(e,{tagFontSize:l,tagLineHeight:(0,c.unit)(a(e.lineHeightSM).mul(l).equal()),tagIconSize:a(r).sub(a(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},h=e=>({defaultBg:new d.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),f=(0,m.genStyleHooks)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:a,componentCls:l,calc:s}=e,i=s(a).sub(r).equal(),n=s(t).sub(r).equal();return{[l]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,c.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${l}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${l}-close-icon`]:{marginInlineStart:n,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${l}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${l}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${l}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(g(e)),h);var x=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let y=t.forwardRef((e,a)=>{let{prefixCls:l,style:s,className:i,checked:n,children:c,icon:d,onChange:u,onClick:m}=e,p=x(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:g,tag:h}=t.useContext(o.ConfigContext),y=g("tag",l),[b,v,j]=f(y),_=(0,r.default)(y,`${y}-checkable`,{[`${y}-checkable-checked`]:n},null==h?void 0:h.className,i,v,j);return b(t.createElement("span",Object.assign({},p,{ref:a,style:Object.assign(Object.assign({},s),null==h?void 0:h.style),className:_,onClick:e=>{null==u||u(!n),null==m||m(e)}}),d,t.createElement("span",null,c)))});var b=e.i(403541);let v=(0,m.genSubStyleComponent)(["Tag","preset"],e=>{let t;return t=g(e),(0,b.genPresetColor)(t,(e,{textColor:r,lightBorderColor:a,lightColor:l,darkColor:s})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:r,background:l,borderColor:a,"&-inverse":{color:t.colorTextLightSolid,background:s,borderColor:s},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}))},h),j=(e,t,r)=>{let a="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${a}Bg`],borderColor:e[`color${a}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},_=(0,m.genSubStyleComponent)(["Tag","status"],e=>{let t=g(e);return[j(t,"success","Success"),j(t,"processing","Info"),j(t,"error","Error"),j(t,"warning","Warning")]},h);var w=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let k=t.forwardRef((e,c)=>{let{prefixCls:d,className:u,rootClassName:m,style:p,children:g,icon:h,color:x,onClose:y,bordered:b=!0,visible:j}=e,k=w(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:C,direction:N,tag:S}=t.useContext(o.ConfigContext),[$,T]=t.useState(!0),E=(0,a.default)(k,["closeIcon","closable"]);t.useEffect(()=>{void 0!==j&&T(j)},[j]);let I=(0,l.isPresetColor)(x),O=(0,l.isPresetStatusColor)(x),M=I||O,P=Object.assign(Object.assign({backgroundColor:x&&!M?x:void 0},null==S?void 0:S.style),p),A=C("tag",d),[L,F,D]=f(A),R=(0,r.default)(A,null==S?void 0:S.className,{[`${A}-${x}`]:M,[`${A}-has-color`]:x&&!M,[`${A}-hidden`]:!$,[`${A}-rtl`]:"rtl"===N,[`${A}-borderless`]:!b},u,m,F,D),z=e=>{e.stopPropagation(),null==y||y(e),e.defaultPrevented||T(!1)},[,B]=(0,s.useClosable)((0,s.pickClosable)(e),(0,s.pickClosable)(S),{closable:!1,closeIconRender:e=>{let a=t.createElement("span",{className:`${A}-close-icon`,onClick:z},e);return(0,i.replaceElement)(e,a,e=>({onClick:t=>{var r;null==(r=null==e?void 0:e.onClick)||r.call(e,t),z(t)},className:(0,r.default)(null==e?void 0:e.className,`${A}-close-icon`)}))}}),G="function"==typeof k.onClick||g&&"a"===g.type,K=h||null,V=K?t.createElement(t.Fragment,null,K,g&&t.createElement("span",null,g)):g,H=t.createElement("span",Object.assign({},E,{ref:c,className:R,style:P}),V,B,I&&t.createElement(v,{key:"preset",prefixCls:A}),O&&t.createElement(_,{key:"status",prefixCls:A}));return L(G?t.createElement(n.default,{component:"Tag"},H):H)});k.CheckableTag=y,e.s(["Tag",0,k],262218)},801312,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["default",0,s],801312)},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},a=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:n="",children:o,iconNode:c,...d},u)=>(0,t.createElement)("svg",{ref:u,...l,width:r,height:r,stroke:e,strokeWidth:i?24*Number(s)/Number(r):s,className:a("lucide",n),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(o)?o:[o]])),i=(e,l)=>{let i=(0,t.forwardRef)(({className:i,...n},o)=>(0,t.createElement)(s,{ref:o,iconNode:l,className:a(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...n}));return i.displayName=r(e),i};e.s(["default",()=>i],475254)},312361,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),l=e.i(517455);e.i(296059);var s=e.i(915654),i=e.i(183293),n=e.i(246422),o=e.i(838378);let c=(0,n.genStyleHooks)("Divider",e=>{let t=(0,o.mergeToken)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:a,lineWidth:l,textPaddingInline:n,orientationMargin:o,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,i.resetComponent)(e)),{borderBlockStart:`${(0,s.unit)(l)} solid ${a}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,s.unit)(l)} solid ${a}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,s.unit)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,s.unit)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${a}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,s.unit)(l)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${o} * 100%)`},"&::after":{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${o} * 100%)`},"&::after":{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:n},"&-dashed":{background:"none",borderColor:a,borderStyle:"dashed",borderWidth:`${(0,s.unit)(l)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:l,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:a,borderStyle:"dotted",borderWidth:`${(0,s.unit)(l)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:l,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var d=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let u={small:"sm",middle:"md"};e.s(["Divider",0,e=>{let{getPrefixCls:s,direction:i,className:n,style:o}=(0,a.useComponentConfig)("divider"),{prefixCls:m,type:p="horizontal",orientation:g="center",orientationMargin:h,className:f,rootClassName:x,children:y,dashed:b,variant:v="solid",plain:j,style:_,size:w}=e,k=d(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),C=s("divider",m),[N,S,$]=c(C),T=u[(0,l.default)(w)],E=!!y,I=t.useMemo(()=>"left"===g?"rtl"===i?"end":"start":"right"===g?"rtl"===i?"start":"end":g,[i,g]),O="start"===I&&null!=h,M="end"===I&&null!=h,P=(0,r.default)(C,n,S,$,`${C}-${p}`,{[`${C}-with-text`]:E,[`${C}-with-text-${I}`]:E,[`${C}-dashed`]:!!b,[`${C}-${v}`]:"solid"!==v,[`${C}-plain`]:!!j,[`${C}-rtl`]:"rtl"===i,[`${C}-no-default-orientation-margin-start`]:O,[`${C}-no-default-orientation-margin-end`]:M,[`${C}-${T}`]:!!T},f,x),A=t.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return N(t.createElement("div",Object.assign({className:P,style:Object.assign(Object.assign({},o),_)},k,{role:"separator"}),y&&"vertical"!==p&&t.createElement("span",{className:`${C}-inner-text`,style:{marginInlineStart:O?A:void 0,marginInlineEnd:M?A:void 0}},y)))}],312361)},993914,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["FileTextOutlined",0,s],993914)},631171,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",()=>t])},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(779241),l=e.i(599724),s=e.i(199133),i=e.i(983561),n=e.i(689020);e.s(["default",0,({accessToken:e,value:o,placeholder:c="Select a Model",onChange:d,disabled:u=!1,style:m,className:p,showLabel:g=!0,labelText:h="Select Model"})=>{let[f,x]=(0,r.useState)(o),[y,b]=(0,r.useState)(!1),[v,j]=(0,r.useState)([]),_=(0,r.useRef)(null);return(0,r.useEffect)(()=>{x(o)},[o]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,n.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&j(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[g&&(0,t.jsxs)(l.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.RobotOutlined,{className:"mr-2"})," ",h]}),(0,t.jsx)(s.Select,{value:f,placeholder:c,onChange:e=>{"custom"===e?(b(!0),x(void 0)):(b(!1),x(e),d&&d(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...m},showSearch:!0,className:`rounded-md ${p||""}`,disabled:u}),y&&(0,t.jsx)(a.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{x(e),d&&d(e)},500)},disabled:u})]})}])},519756,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var l=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(l.default,(0,t.default)({},e,{ref:s,icon:a}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,a]of Object.entries(t))e in r&&(r[e]=a);return r}let a=(e,t=0,r=!1,a=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!a)return"-";let l={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",l);let s=e<0?"-":"",i=Math.abs(e),n=i,o="";return i>=1e6?(n=i/1e6,o="M"):i>=1e3&&(n=i/1e3,o="K"),`${s}${n.toLocaleString("en-US",l)}${o}`},l=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(e,r)=>{try{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",a.setAttribute("readonly",""),document.body.appendChild(a),a.focus(),a.select();let l=document.execCommand("copy");if(document.body.removeChild(a),l)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,l,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=a(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9b281b0ff32cbdac.js b/litellm/proxy/_experimental/out/_next/static/chunks/6e42aecc62a828a4.js similarity index 82% rename from litellm/proxy/_experimental/out/_next/static/chunks/9b281b0ff32cbdac.js rename to litellm/proxy/_experimental/out/_next/static/chunks/6e42aecc62a828a4.js index da192ab5bfc..f737ca92fea 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/9b281b0ff32cbdac.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/6e42aecc62a828a4.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,976883,174886,e=>{"use strict";var s=e.i(843476),t=e.i(275144),l=e.i(434626),a=e.i(271645);let r=a.forwardRef(function(e,s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});var i=e.i(994388),n=e.i(304967),c=e.i(599724),o=e.i(629569),d=e.i(212931),x=e.i(199133),m=e.i(653496),h=e.i(262218),u=e.i(592968),p=e.i(991124);e.s(["Copy",()=>p.default],174886);var p=p,g=e.i(879664),g=g,j=e.i(798496),b=e.i(727749),f=e.i(402874),v=e.i(764205),_=e.i(190272),N=e.i(785913),y=e.i(916925);let{TabPane:T}=m.Tabs;e.s(["default",0,({accessToken:e,isEmbedded:w=!1})=>{let S,C,A,k,M,P,L,[z,E]=(0,a.useState)(null),[O,D]=(0,a.useState)(null),[K,R]=(0,a.useState)(null),[I,U]=(0,a.useState)("LiteLLM Gateway"),[H,F]=(0,a.useState)(null),[W,$]=(0,a.useState)(""),[B,q]=(0,a.useState)({}),[G,V]=(0,a.useState)(!0),[X,J]=(0,a.useState)(!0),[Y,Q]=(0,a.useState)(!0),[Z,ee]=(0,a.useState)(""),[es,et]=(0,a.useState)(""),[el,ea]=(0,a.useState)(""),[er,ei]=(0,a.useState)([]),[en,ec]=(0,a.useState)([]),[eo,ed]=(0,a.useState)([]),[ex,em]=(0,a.useState)([]),[eh,eu]=(0,a.useState)([]),[ep,eg]=(0,a.useState)("I'm alive! ✓"),[ej,eb]=(0,a.useState)(!1),[ef,ev]=(0,a.useState)(!1),[e_,eN]=(0,a.useState)(!1),[ey,eT]=(0,a.useState)(null),[ew,eS]=(0,a.useState)(null),[eC,eA]=(0,a.useState)(null),[ek,eM]=(0,a.useState)({}),[eP,eL]=(0,a.useState)("models");(0,a.useEffect)(()=>{(async()=>{try{await (0,v.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{V(!0);let e=await (0,v.modelHubPublicModelsCall)();console.log("ModelHubData:",e),E(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public model data",e),eg("Service unavailable")}finally{V(!1)}},s=async()=>{try{J(!0);let e=await (0,v.agentHubPublicModelsCall)();console.log("AgentHubData:",e),D(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public agent data",e)}finally{J(!1)}},t=async()=>{try{Q(!0);let e=await (0,v.mcpHubPublicServersCall)();console.log("MCPHubData:",e),R(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{Q(!1)}};(async()=>{let e=await (0,v.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),U(e.docs_title),F(e.custom_docs_description),$(e.litellm_version),q(e.useful_links||{})})(),e(),s(),t()})()},[]),(0,a.useEffect)(()=>{},[Z,er,en,eo]);let ez=(0,a.useMemo)(()=>{if(!z||!Array.isArray(z))return[];let e=z;if(Z.trim()){let s=Z.toLowerCase(),t=s.split(/\s+/),l=z.filter(e=>{let l=e.model_group.toLowerCase();return!!l.includes(s)||t.every(e=>l.includes(e))});l.length>0&&(e=l.sort((e,t)=>{let l=e.model_group.toLowerCase(),a=t.model_group.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=50*!!s.split(/\s+/).every(e=>l.includes(e)),d=50*!!s.split(/\s+/).every(e=>a.includes(e)),x=l.length;return i+c+d+(1e3-a.length)-(r+n+o+(1e3-x))}))}return e.filter(e=>{let s=0===er.length||er.some(s=>e.providers.includes(s)),t=0===en.length||en.includes(e.mode||""),l=0===eo.length||Object.entries(e).filter(([e,s])=>e.startsWith("supports_")&&!0===s).some(([e])=>{let s=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return eo.includes(s)});return s&&t&&l})},[z,Z,er,en,eo]),eE=(0,a.useMemo)(()=>{if(!O||!Array.isArray(O))return[];let e=O;if(es.trim()){let s=es.toLowerCase(),t=s.split(/\s+/);e=(e=O.filter(e=>{let l=e.name.toLowerCase(),a=e.description.toLowerCase();return!!(l.includes(s)||a.includes(s))||t.every(e=>l.includes(e)||a.includes(e))})).sort((e,t)=>{let l=e.name.toLowerCase(),a=t.name.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=r+n+(1e3-l.length);return i+c+(1e3-a.length)-o})}return e.filter(e=>0===ex.length||e.skills?.some(e=>e.tags?.some(e=>ex.includes(e))))},[O,es,ex]),eO=(0,a.useMemo)(()=>{if(!K||!Array.isArray(K))return[];let e=K;if(el.trim()){let s=el.toLowerCase(),t=s.split(/\s+/);e=(e=K.filter(e=>{let l=e.server_name.toLowerCase(),a=(e.mcp_info?.description||"").toLowerCase();return!!(l.includes(s)||a.includes(s))||t.every(e=>l.includes(e)||a.includes(e))})).sort((e,t)=>{let l=e.server_name.toLowerCase(),a=t.server_name.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=r+n+(1e3-l.length);return i+c+(1e3-a.length)-o})}return e.filter(e=>0===eh.length||eh.includes(e.transport))},[K,el,eh]),eD=e=>{navigator.clipboard.writeText(e),b.default.success("Copied to clipboard!")},eK=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),eR=e=>`$${(1e6*e).toFixed(4)}`,eI=e=>e?e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString():"N/A";return(0,s.jsx)(t.ThemeProvider,{accessToken:e,children:(0,s.jsxs)("div",{className:w?"w-full":"min-h-screen bg-white",children:[!w&&(0,s.jsx)(f.default,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:eM,proxySettings:ek,accessToken:e||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,s.jsxs)("div",{className:w?"w-full p-6":"w-full px-8 py-12",children:[w&&(0,s.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,s.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!w&&(0,s.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,s.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:H||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,s.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,s.jsxs)("span",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"w-4 h-4 mr-2",children:"🔧"}),"Built with litellm: v",W]})})]}),B&&Object.keys(B).length>0&&(0,s.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(B||{}).map(([e,s])=>({title:e,url:"string"==typeof s?s:s.url,index:"string"==typeof s?0:s.index??0})).sort((e,s)=>e.index-s.index).map(({title:e,url:t})=>(0,s.jsxs)("button",{onClick:()=>window.open(t,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"}),(0,s.jsx)(c.Text,{className:"text-sm font-medium",children:e})]},e))})]}),!w&&(0,s.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,s.jsxs)(c.Text,{className:"text-green-600 font-medium text-sm",children:["Service status: ",ep]})})]}),(0,s.jsx)(n.Card,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,s.jsxs)(m.Tabs,{activeKey:eP,onChange:eL,size:"large",className:"public-hub-tabs",children:[(0,s.jsxs)(T,{tab:"Model Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,s.jsx)(u.Tooltip,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,s.jsx)(g.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(r,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:Z,onChange:e=>ee(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:er,onChange:e=>ei(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,y.getProviderLogoAndName)(e.value);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,s.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e.label})]})},children:z&&Array.isArray(z)&&(S=new Set,z.forEach(e=>{(e.providers??[]).forEach(e=>S.add(e))}),Array.from(S)).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:en,onChange:e=>ec(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:z&&Array.isArray(z)&&(C=new Set,z.forEach(e=>{e.mode&&C.add(e.mode)}),Array.from(C)).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:eo,onChange:e=>ed(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:z&&Array.isArray(z)&&(A=new Set,z.forEach(e=>{Object.entries(e).filter(([e,s])=>e.startsWith("supports_")&&!0===s).forEach(([e])=>{let s=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");A.add(s)})}),Array.from(A).sort()).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(u.Tooltip,{title:e.original.model_group,children:(0,s.jsx)(i.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eT(e.original),eb(!0)},children:e.original.model_group})})}),size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:({row:e})=>{let t=e.original.providers??[];return(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>{let{logo:t}=(0,y.getProviderLogoAndName)(e);return(0,s.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,s.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:({row:e})=>{let t=e.original.mode;return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:(e=>{switch(e?.toLowerCase()){case"chat":return"💬";case"rerank":return"🔄";case"embedding":return"📄";default:return"🤖"}})(t||"")}),(0,s.jsx)(c.Text,{children:t||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(c.Text,{className:"text-center",children:eI(e.original.max_input_tokens)}),size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(c.Text,{className:"text-center",children:eI(e.original.max_output_tokens)}),size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:({row:e})=>{let t=e.original.input_cost_per_token;return(0,s.jsx)(c.Text,{className:"text-center",children:t?eR(t):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:({row:e})=>{let t=e.original.output_cost_per_token;return(0,s.jsx)(c.Text,{className:"text-center",children:t?eR(t):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:({row:e})=>{let t=Object.entries(e.original).filter(([e,s])=>e.startsWith("supports_")&&!0===s).map(([e])=>eK(e));return 0===t.length?(0,s.jsx)(c.Text,{className:"text-gray-400",children:"-"}):1===t.length?(0,s.jsx)("div",{className:"h-6 flex items-center",children:(0,s.jsx)(h.Tag,{color:"blue",className:"text-xs",children:t[0]})}):(0,s.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,s.jsx)(h.Tag,{color:"blue",className:"text-xs",children:t[0]}),(0,s.jsx)(u.Tooltip,{title:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:"All Features:"}),t.map((e,t)=>(0,s.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,s.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",t.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:({row:e})=>{let t=e.original,l="healthy"===t.health_status?"green":"unhealthy"===t.health_status?"red":"default",a=t.health_response_time?`Response Time: ${Number(t.health_response_time).toFixed(2)}ms`:"N/A",r=t.health_checked_at?`Last Checked: ${new Date(t.health_checked_at).toLocaleString()}`:"N/A";return(0,s.jsx)(u.Tooltip,{title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{children:a}),(0,s.jsx)("div",{children:r})]}),children:(0,s.jsx)(h.Tag,{color:l,children:(0,s.jsx)("span",{className:"capitalize",children:t.health_status??"Unknown"})},t.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:({row:e})=>{var t,l;let a,r=e.original;return(0,s.jsx)(c.Text,{className:"text-xs text-gray-600",children:(t=r.rpm,l=r.tpm,a=[],t&&a.push(`RPM: ${t.toLocaleString()}`),l&&a.push(`TPM: ${l.toLocaleString()}`),a.length>0?a.join(", "):"N/A")})},size:150}],data:ez,isLoading:G,defaultSorting:[{id:"model_group",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(c.Text,{className:"text-sm text-gray-600",children:["Showing ",ez.length," of ",z?.length||0," models"]})})]},"models"),O&&Array.isArray(O)&&O.length>0&&(0,s.jsxs)(T,{tab:"Agent Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,s.jsx)(u.Tooltip,{title:"Search agents by name or description",placement:"top",children:(0,s.jsx)(g.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(r,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:es,onChange:e=>et(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:ex,onChange:e=>em(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:O&&Array.isArray(O)&&(k=new Set,O.forEach(e=>{e.skills?.forEach(e=>{e.tags?.forEach(e=>k.add(e))})}),Array.from(k).sort()).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(u.Tooltip,{title:e.original.name,children:(0,s.jsx)(i.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eS(e.original),ev(!0)},children:e.original.name})})}),size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>{let t=e.original.description??"",l=t.length>80?t.substring(0,80)+"...":t;return(0,s.jsx)(u.Tooltip,{title:t,children:(0,s.jsx)(c.Text,{className:"text-sm text-gray-700",children:l})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(c.Text,{className:"text-sm",children:e.original.version}),size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:({row:e})=>{let t=e.original.provider;return t?(0,s.jsx)("div",{className:"text-sm",children:(0,s.jsx)(c.Text,{className:"font-medium",children:t.organization})}):(0,s.jsx)(c.Text,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let t=e.original.skills||[];return 0===t.length?(0,s.jsx)(c.Text,{className:"text-gray-400",children:"-"}):1===t.length?(0,s.jsx)("div",{className:"h-6 flex items-center",children:(0,s.jsx)(h.Tag,{color:"purple",className:"text-xs",children:t[0].name})}):(0,s.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,s.jsx)(h.Tag,{color:"purple",className:"text-xs",children:t[0].name}),(0,s.jsx)(u.Tooltip,{title:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:"All Skills:"}),t.map((e,t)=>(0,s.jsxs)("div",{className:"text-xs",children:["• ",e.name]},t))]}),trigger:"click",placement:"topLeft",children:(0,s.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",t.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let t=Object.entries(e.original.capabilities||{}).filter(([e,s])=>!0===s).map(([e])=>e);return 0===t.length?(0,s.jsx)(c.Text,{className:"text-gray-400",children:"-"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,s.jsx)(h.Tag,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eE,isLoading:X,defaultSorting:[{id:"name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(c.Text,{className:"text-sm text-gray-600",children:["Showing ",eE.length," of ",O?.length||0," agents"]})})]},"agents"),K&&Array.isArray(K)&&K.length>0&&(0,s.jsxs)(T,{tab:"MCP Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,s.jsx)(u.Tooltip,{title:"Search MCP servers by name or description",placement:"top",children:(0,s.jsx)(g.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(r,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:el,onChange:e=>ea(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:eh,onChange:e=>eu(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:K&&Array.isArray(K)&&(M=new Set,K.forEach(e=>{e.transport&&M.add(e.transport)}),Array.from(M).sort()).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(u.Tooltip,{title:e.original.server_name,children:(0,s.jsx)(i.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eA(e.original),eN(!0)},children:e.original.server_name})})}),size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:({row:e})=>{let t=String(e.original.mcp_info?.description??"-"),l=t.length>80?t.substring(0,80)+"...":t;return(0,s.jsx)(u.Tooltip,{title:t,children:(0,s.jsx)(c.Text,{className:"text-sm text-gray-700",children:l})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:({row:e})=>{let t=e.original.url??"",l=t.length>40?t.substring(0,40)+"...":t;return(0,s.jsx)(u.Tooltip,{title:t,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(c.Text,{className:"text-xs font-mono",children:l}),(0,s.jsx)(p.default,{onClick:()=>eD(t),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:({row:e})=>{let t=e.original.transport;return(0,s.jsx)(h.Tag,{color:"blue",className:"text-xs uppercase",children:t})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:({row:e})=>{let t=e.original.auth_type;return(0,s.jsx)(h.Tag,{color:"none"===t?"gray":"green",className:"text-xs capitalize",children:t})},size:100}],data:eO,isLoading:Y,defaultSorting:[{id:"server_name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(c.Text,{className:"text-sm text-gray-600",children:["Showing ",eO.length," of ",K?.length||0," MCP servers"]})})]},"mcp")]})})]}),(0,s.jsx)(d.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ey?.model_group||"Model Details"}),ey&&(0,s.jsx)(u.Tooltip,{title:"Copy model name",children:(0,s.jsx)(p.default,{onClick:()=>eD(ey.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ej,footer:null,onOk:()=>{eb(!1),eT(null)},onCancel:()=>{eb(!1),eT(null)},children:ey&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Model Name:"}),(0,s.jsx)(c.Text,{children:ey.model_group})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Mode:"}),(0,s.jsx)(c.Text,{children:ey.mode||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Providers:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ey.providers??[]).map(e=>{let{logo:t}=(0,y.getProviderLogoAndName)(e);return(0,s.jsx)(h.Tag,{color:"blue",children:(0,s.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,s.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),ey.model_group.includes("*")&&(0,s.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,s.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,s.jsx)(g.default,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,s.jsxs)(c.Text,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,s.jsxs)(c.Text,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group}),", you can use any string (",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group.replace("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,s.jsx)(c.Text,{children:ey.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,s.jsx)(c.Text,{children:ey.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,s.jsx)(c.Text,{children:ey.input_cost_per_token?eR(ey.input_cost_per_token):"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,s.jsx)(c.Text,{children:ey.output_cost_per_token?eR(ey.output_cost_per_token):"Not specified"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:(P=Object.entries(ey).filter(([e,s])=>e.startsWith("supports_")&&!0===s).map(([e])=>e),L=["green","blue","purple","orange","red","yellow"],0===P.length?(0,s.jsx)(c.Text,{className:"text-gray-500",children:"No special capabilities listed"}):P.map((e,t)=>(0,s.jsx)(h.Tag,{color:L[t%L.length],children:eK(e)},e)))})]}),(ey.tpm||ey.rpm)&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[ey.tpm&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,s.jsx)(c.Text,{children:ey.tpm.toLocaleString()})]}),ey.rpm&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,s.jsx)(c.Text,{children:ey.rpm.toLocaleString()})]})]})]}),ey.supported_openai_params&&ey.supported_openai_params.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.supported_openai_params.map(e=>(0,s.jsx)(h.Tag,{color:"green",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-sm",children:(0,_.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,N.getEndpointType)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"})})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eD((0,_.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,N.getEndpointType)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,s.jsx)(d.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ew?.name||"Agent Details"}),ew&&(0,s.jsx)(u.Tooltip,{title:"Copy agent name",children:(0,s.jsx)(p.default,{onClick:()=>eD(ew.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ef,footer:null,onOk:()=>{ev(!1),eS(null)},onCancel:()=>{ev(!1),eS(null)},children:ew&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Name:"}),(0,s.jsx)(c.Text,{children:ew.name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Version:"}),(0,s.jsx)(c.Text,{children:ew.version})]}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Description:"}),(0,s.jsx)(c.Text,{children:ew.description})]}),ew.url&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"URL:"}),(0,s.jsx)("a",{href:ew.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:ew.url})]})]})]}),ew.capabilities&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ew.capabilities).filter(([e,s])=>!0===s).map(([e])=>(0,s.jsx)(h.Tag,{color:"green",className:"capitalize",children:e},e))})]}),ew.skills&&ew.skills.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,s.jsx)("div",{className:"space-y-4",children:ew.skills.map((e,t)=>(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium text-base",children:e.name}),(0,s.jsx)(c.Text,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,s.jsx)(h.Tag,{color:"purple",className:"text-xs",children:e},e))})]},t))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Input Modes:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ew.defaultInputModes??[]).map(e=>(0,s.jsx)(h.Tag,{color:"blue",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Output Modes:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ew.defaultOutputModes??[]).map(e=>(0,s.jsx)(h.Tag,{color:"blue",children:e},e))})]})]})]}),ew.documentationUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,s.jsxs)("a",{href:ew.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"View Documentation"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-xs",children:`base_url = '${ew.url}' +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,976883,174886,e=>{"use strict";var s=e.i(843476),t=e.i(275144),l=e.i(434626),a=e.i(271645);let r=a.forwardRef(function(e,s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});var i=e.i(994388),n=e.i(304967),c=e.i(599724),o=e.i(629569),d=e.i(212931),x=e.i(199133),m=e.i(653496),h=e.i(262218),u=e.i(592968),p=e.i(991124);e.s(["Copy",()=>p.default],174886);var p=p,g=e.i(879664),g=g,j=e.i(798496),b=e.i(727749),f=e.i(402874),v=e.i(764205),_=e.i(190272),N=e.i(785913),y=e.i(916925);let{TabPane:T}=m.Tabs;e.s(["default",0,({accessToken:e,isEmbedded:w=!1})=>{let S,C,A,k,M,P,L,[z,E]=(0,a.useState)(null),[O,D]=(0,a.useState)(null),[K,R]=(0,a.useState)(null),[I,U]=(0,a.useState)("LiteLLM Gateway"),[H,F]=(0,a.useState)(null),[W,$]=(0,a.useState)(""),[B,q]=(0,a.useState)({}),[G,V]=(0,a.useState)(!0),[X,J]=(0,a.useState)(!0),[Y,Q]=(0,a.useState)(!0),[Z,ee]=(0,a.useState)(""),[es,et]=(0,a.useState)(""),[el,ea]=(0,a.useState)(""),[er,ei]=(0,a.useState)([]),[en,ec]=(0,a.useState)([]),[eo,ed]=(0,a.useState)([]),[ex,em]=(0,a.useState)([]),[eh,eu]=(0,a.useState)([]),[ep,eg]=(0,a.useState)("I'm alive! ✓"),[ej,eb]=(0,a.useState)(!1),[ef,ev]=(0,a.useState)(!1),[e_,eN]=(0,a.useState)(!1),[ey,eT]=(0,a.useState)(null),[ew,eS]=(0,a.useState)(null),[eC,eA]=(0,a.useState)(null),[ek,eM]=(0,a.useState)({}),[eP,eL]=(0,a.useState)("models");(0,a.useEffect)(()=>{(async()=>{try{await (0,v.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{V(!0);let e=await (0,v.modelHubPublicModelsCall)();console.log("ModelHubData:",e),E(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public model data",e),eg("Service unavailable")}finally{V(!1)}},s=async()=>{try{J(!0);let e=await (0,v.agentHubPublicModelsCall)();console.log("AgentHubData:",e),D(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public agent data",e)}finally{J(!1)}},t=async()=>{try{Q(!0);let e=await (0,v.mcpHubPublicServersCall)();console.log("MCPHubData:",e),R(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{Q(!1)}};(async()=>{let e=await (0,v.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),U(e.docs_title),F(e.custom_docs_description),$(e.litellm_version),q(e.useful_links||{})})(),e(),s(),t()})()},[]),(0,a.useEffect)(()=>{},[Z,er,en,eo]);let ez=(0,a.useMemo)(()=>{if(!z||!Array.isArray(z))return[];let e=z;if(Z.trim()){let s=Z.toLowerCase(),t=s.split(/\s+/),l=z.filter(e=>{let l=e.model_group.toLowerCase();return!!l.includes(s)||t.every(e=>l.includes(e))});l.length>0&&(e=l.sort((e,t)=>{let l=e.model_group.toLowerCase(),a=t.model_group.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=50*!!s.split(/\s+/).every(e=>l.includes(e)),d=50*!!s.split(/\s+/).every(e=>a.includes(e)),x=l.length;return i+c+d+(1e3-a.length)-(r+n+o+(1e3-x))}))}return e.filter(e=>{let s=0===er.length||er.some(s=>e.providers.includes(s)),t=0===en.length||en.includes(e.mode||""),l=0===eo.length||Object.entries(e).filter(([e,s])=>e.startsWith("supports_")&&!0===s).some(([e])=>{let s=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return eo.includes(s)});return s&&t&&l})},[z,Z,er,en,eo]),eE=(0,a.useMemo)(()=>{if(!O||!Array.isArray(O))return[];let e=O;if(es.trim()){let s=es.toLowerCase(),t=s.split(/\s+/);e=(e=O.filter(e=>{let l=e.name.toLowerCase(),a=e.description.toLowerCase();return!!(l.includes(s)||a.includes(s))||t.every(e=>l.includes(e)||a.includes(e))})).sort((e,t)=>{let l=e.name.toLowerCase(),a=t.name.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=r+n+(1e3-l.length);return i+c+(1e3-a.length)-o})}return e.filter(e=>0===ex.length||e.skills?.some(e=>e.tags?.some(e=>ex.includes(e))))},[O,es,ex]),eO=(0,a.useMemo)(()=>{if(!K||!Array.isArray(K))return[];let e=K;if(el.trim()){let s=el.toLowerCase(),t=s.split(/\s+/);e=(e=K.filter(e=>{let l=e.server_name.toLowerCase(),a=(e.mcp_info?.description||"").toLowerCase();return!!(l.includes(s)||a.includes(s))||t.every(e=>l.includes(e)||a.includes(e))})).sort((e,t)=>{let l=e.server_name.toLowerCase(),a=t.server_name.toLowerCase(),r=1e3*(l===s),i=1e3*(a===s),n=100*!!l.startsWith(s),c=100*!!a.startsWith(s),o=r+n+(1e3-l.length);return i+c+(1e3-a.length)-o})}return e.filter(e=>0===eh.length||eh.includes(e.transport))},[K,el,eh]),eD=e=>{navigator.clipboard.writeText(e),b.default.success("Copied to clipboard!")},eK=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),eR=e=>`$${(1e6*e).toFixed(4)}`,eI=e=>e?e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString():"N/A";return(0,s.jsx)(t.ThemeProvider,{accessToken:e,children:(0,s.jsxs)("div",{className:w?"w-full":"min-h-screen bg-white",children:[!w&&(0,s.jsx)(f.default,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:eM,proxySettings:ek,accessToken:e||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,s.jsxs)("div",{className:w?"w-full p-6":"w-full px-8 py-12",children:[w&&(0,s.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,s.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!w&&(0,s.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,s.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:H||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,s.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,s.jsxs)("span",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"w-4 h-4 mr-2",children:"🔧"}),"Built with litellm: v",W]})})]}),B&&Object.keys(B).length>0&&(0,s.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(B||{}).map(([e,s])=>({title:e,url:"string"==typeof s?s:s.url,index:"string"==typeof s?0:s.index??0})).sort((e,s)=>e.index-s.index).map(({title:e,url:t})=>(0,s.jsxs)("button",{onClick:()=>window.open(t,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"}),(0,s.jsx)(c.Text,{className:"text-sm font-medium",children:e})]},e))})]}),!w&&(0,s.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)(o.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,s.jsxs)(c.Text,{className:"text-green-600 font-medium text-sm",children:["Service status: ",ep]})})]}),(0,s.jsx)(n.Card,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,s.jsxs)(m.Tabs,{activeKey:eP,onChange:eL,size:"large",className:"public-hub-tabs",children:[(0,s.jsxs)(T,{tab:"Model Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,s.jsx)(u.Tooltip,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,s.jsx)(g.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(r,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:Z,onChange:e=>ee(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:er,onChange:e=>ei(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,y.getProviderLogoAndName)(e.value);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,s.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e.label})]})},children:z&&Array.isArray(z)&&(S=new Set,z.forEach(e=>{(e.providers??[]).forEach(e=>S.add(e))}),Array.from(S)).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:en,onChange:e=>ec(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:z&&Array.isArray(z)&&(C=new Set,z.forEach(e=>{e.mode&&C.add(e.mode)}),Array.from(C)).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:eo,onChange:e=>ed(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:z&&Array.isArray(z)&&(A=new Set,z.forEach(e=>{Object.entries(e).filter(([e,s])=>e.startsWith("supports_")&&!0===s).forEach(([e])=>{let s=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");A.add(s)})}),Array.from(A).sort()).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(u.Tooltip,{title:e.original.model_group,children:(0,s.jsx)(i.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eT(e.original),eb(!0)},children:e.original.model_group})})}),size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:({row:e})=>{let t=e.original.providers??[];return(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>{let{logo:t}=(0,y.getProviderLogoAndName)(e);return(0,s.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,s.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:({row:e})=>{let t=e.original.mode;return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:(e=>{switch(e?.toLowerCase()){case"chat":return"💬";case"rerank":return"🔄";case"embedding":return"📄";default:return"🤖"}})(t||"")}),(0,s.jsx)(c.Text,{children:t||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(c.Text,{className:"text-center",children:eI(e.original.max_input_tokens)}),size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(c.Text,{className:"text-center",children:eI(e.original.max_output_tokens)}),size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:({row:e})=>{let t=e.original.input_cost_per_token;return(0,s.jsx)(c.Text,{className:"text-center",children:t?eR(t):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:({row:e})=>{let t=e.original.output_cost_per_token;return(0,s.jsx)(c.Text,{className:"text-center",children:t?eR(t):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:({row:e})=>{let t=Object.entries(e.original).filter(([e,s])=>e.startsWith("supports_")&&!0===s).map(([e])=>eK(e));return 0===t.length?(0,s.jsx)(c.Text,{className:"text-gray-400",children:"-"}):1===t.length?(0,s.jsx)("div",{className:"h-6 flex items-center",children:(0,s.jsx)(h.Tag,{color:"blue",className:"text-xs",children:t[0]})}):(0,s.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,s.jsx)(h.Tag,{color:"blue",className:"text-xs",children:t[0]}),(0,s.jsx)(u.Tooltip,{title:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:"All Features:"}),t.map((e,t)=>(0,s.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,s.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",t.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:({row:e})=>{let t=e.original,l="healthy"===t.health_status?"green":"unhealthy"===t.health_status?"red":"default",a=t.health_response_time?`Response Time: ${Number(t.health_response_time).toFixed(2)}ms`:"N/A",r=t.health_checked_at?`Last Checked: ${new Date(t.health_checked_at).toLocaleString()}`:"N/A";return(0,s.jsx)(u.Tooltip,{title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{children:a}),(0,s.jsx)("div",{children:r})]}),children:(0,s.jsx)(h.Tag,{color:l,children:(0,s.jsx)("span",{className:"capitalize",children:t.health_status??"Unknown"})},t.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:({row:e})=>{var t,l;let a,r=e.original;return(0,s.jsx)(c.Text,{className:"text-xs text-gray-600",children:(t=r.rpm,l=r.tpm,a=[],t&&a.push(`RPM: ${t.toLocaleString()}`),l&&a.push(`TPM: ${l.toLocaleString()}`),a.length>0?a.join(", "):"N/A")})},size:150}],data:ez,isLoading:G,defaultSorting:[{id:"model_group",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(c.Text,{className:"text-sm text-gray-600",children:["Showing ",ez.length," of ",z?.length||0," models"]})})]},"models"),O&&Array.isArray(O)&&O.length>0&&(0,s.jsxs)(T,{tab:"Agent Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,s.jsx)(u.Tooltip,{title:"Search agents by name or description",placement:"top",children:(0,s.jsx)(g.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(r,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:es,onChange:e=>et(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:ex,onChange:e=>em(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:O&&Array.isArray(O)&&(k=new Set,O.forEach(e=>{e.skills?.forEach(e=>{e.tags?.forEach(e=>k.add(e))})}),Array.from(k).sort()).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(u.Tooltip,{title:e.original.name,children:(0,s.jsx)(i.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eS(e.original),ev(!0)},children:e.original.name})})}),size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>{let t=e.original.description??"",l=t.length>80?t.substring(0,80)+"...":t;return(0,s.jsx)(u.Tooltip,{title:t,children:(0,s.jsx)(c.Text,{className:"text-sm text-gray-700",children:l})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:({row:e})=>(0,s.jsx)(c.Text,{className:"text-sm",children:e.original.version}),size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:({row:e})=>{let t=e.original.provider;return t?(0,s.jsx)("div",{className:"text-sm",children:(0,s.jsx)(c.Text,{className:"font-medium",children:t.organization})}):(0,s.jsx)(c.Text,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let t=e.original.skills||[];return 0===t.length?(0,s.jsx)(c.Text,{className:"text-gray-400",children:"-"}):1===t.length?(0,s.jsx)("div",{className:"h-6 flex items-center",children:(0,s.jsx)(h.Tag,{color:"purple",className:"text-xs",children:t[0].name})}):(0,s.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,s.jsx)(h.Tag,{color:"purple",className:"text-xs",children:t[0].name}),(0,s.jsx)(u.Tooltip,{title:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:"All Skills:"}),t.map((e,t)=>(0,s.jsxs)("div",{className:"text-xs",children:["• ",e.name]},t))]}),trigger:"click",placement:"topLeft",children:(0,s.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",t.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let t=Object.entries(e.original.capabilities||{}).filter(([e,s])=>!0===s).map(([e])=>e);return 0===t.length?(0,s.jsx)(c.Text,{className:"text-gray-400",children:"-"}):(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,s.jsx)(h.Tag,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eE,isLoading:X,defaultSorting:[{id:"name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(c.Text,{className:"text-sm text-gray-600",children:["Showing ",eE.length," of ",O?.length||0," agents"]})})]},"agents"),K&&Array.isArray(K)&&K.length>0&&(0,s.jsxs)(T,{tab:"MCP Hub",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,s.jsx)(o.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,s.jsx)(u.Tooltip,{title:"Search MCP servers by name or description",placement:"top",children:(0,s.jsx)(g.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(r,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,s.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:el,onChange:e=>ea(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,s.jsx)(x.Select,{mode:"multiple",value:eh,onChange:e=>eu(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:K&&Array.isArray(K)&&(M=new Set,K.forEach(e=>{e.transport&&M.add(e.transport)}),Array.from(M).sort()).map(e=>(0,s.jsx)(x.Select.Option,{value:e,children:e},e))})]})]}),(0,s.jsx)(j.ModelDataTable,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:({row:e})=>(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(u.Tooltip,{title:e.original.server_name,children:(0,s.jsx)(i.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eA(e.original),eN(!0)},children:e.original.server_name})})}),size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:({row:e})=>{let t=String(e.original.mcp_info?.description??"-"),l=t.length>80?t.substring(0,80)+"...":t;return(0,s.jsx)(u.Tooltip,{title:t,children:(0,s.jsx)(c.Text,{className:"text-sm text-gray-700",children:l})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:({row:e})=>{let t=e.original.url??"",l=t.length>40?t.substring(0,40)+"...":t;return(0,s.jsx)(u.Tooltip,{title:t,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(c.Text,{className:"text-xs font-mono",children:l}),(0,s.jsx)(p.default,{onClick:()=>eD(t),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:({row:e})=>{let t=e.original.transport;return(0,s.jsx)(h.Tag,{color:"blue",className:"text-xs uppercase",children:t})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:({row:e})=>{let t=e.original.auth_type;return(0,s.jsx)(h.Tag,{color:"none"===t?"gray":"green",className:"text-xs capitalize",children:t})},size:100}],data:eO,isLoading:Y,defaultSorting:[{id:"server_name",desc:!1}]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)(c.Text,{className:"text-sm text-gray-600",children:["Showing ",eO.length," of ",K?.length||0," MCP servers"]})})]},"mcp")]})})]}),(0,s.jsx)(d.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ey?.model_group||"Model Details"}),ey&&(0,s.jsx)(u.Tooltip,{title:"Copy model name",children:(0,s.jsx)(p.default,{onClick:()=>eD(ey.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ej,footer:null,onOk:()=>{eb(!1),eT(null)},onCancel:()=>{eb(!1),eT(null)},children:ey&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Model Name:"}),(0,s.jsx)(c.Text,{children:ey.model_group})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Mode:"}),(0,s.jsx)(c.Text,{children:ey.mode||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Providers:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ey.providers??[]).map(e=>{let{logo:t}=(0,y.getProviderLogoAndName)(e);return(0,s.jsx)(h.Tag,{color:"blue",children:(0,s.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,s.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,s.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),ey.model_group.includes("*")&&(0,s.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,s.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,s.jsx)(g.default,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,s.jsxs)(c.Text,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,s.jsxs)(c.Text,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group}),", you can use any string (",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group.replaceAll("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,s.jsx)(c.Text,{children:ey.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,s.jsx)(c.Text,{children:ey.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,s.jsx)(c.Text,{children:ey.input_cost_per_token?eR(ey.input_cost_per_token):"Not specified"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,s.jsx)(c.Text,{children:ey.output_cost_per_token?eR(ey.output_cost_per_token):"Not specified"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:(P=Object.entries(ey).filter(([e,s])=>e.startsWith("supports_")&&!0===s).map(([e])=>e),L=["green","blue","purple","orange","red","yellow"],0===P.length?(0,s.jsx)(c.Text,{className:"text-gray-500",children:"No special capabilities listed"}):P.map((e,t)=>(0,s.jsx)(h.Tag,{color:L[t%L.length],children:eK(e)},e)))})]}),(ey.tpm||ey.rpm)&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[ey.tpm&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,s.jsx)(c.Text,{children:ey.tpm.toLocaleString()})]}),ey.rpm&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,s.jsx)(c.Text,{children:ey.rpm.toLocaleString()})]})]})]}),ey.supported_openai_params&&ey.supported_openai_params.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.supported_openai_params.map(e=>(0,s.jsx)(h.Tag,{color:"green",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-sm",children:(0,_.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,N.getEndpointType)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"})})}),(0,s.jsx)("div",{className:"mt-2 text-right",children:(0,s.jsx)("button",{onClick:()=>{eD((0,_.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,N.getEndpointType)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,s.jsx)(d.Modal,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{children:ew?.name||"Agent Details"}),ew&&(0,s.jsx)(u.Tooltip,{title:"Copy agent name",children:(0,s.jsx)(p.default,{onClick:()=>eD(ew.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ef,footer:null,onOk:()=>{ev(!1),eS(null)},onCancel:()=>{ev(!1),eS(null)},children:ew&&(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Name:"}),(0,s.jsx)(c.Text,{children:ew.name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Version:"}),(0,s.jsx)(c.Text,{children:ew.version})]}),(0,s.jsxs)("div",{className:"col-span-2",children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Description:"}),(0,s.jsx)(c.Text,{children:ew.description})]}),ew.url&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"URL:"}),(0,s.jsx)("a",{href:ew.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:ew.url})]})]})]}),ew.capabilities&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ew.capabilities).filter(([e,s])=>!0===s).map(([e])=>(0,s.jsx)(h.Tag,{color:"green",className:"capitalize",children:e},e))})]}),ew.skills&&ew.skills.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,s.jsx)("div",{className:"space-y-4",children:ew.skills.map((e,t)=>(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,s.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium text-base",children:e.name}),(0,s.jsx)(c.Text,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,s.jsx)(h.Tag,{color:"purple",className:"text-xs",children:e},e))})]},t))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Input Modes:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ew.defaultInputModes??[]).map(e=>(0,s.jsx)(h.Tag,{color:"blue",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"font-medium",children:"Output Modes:"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ew.defaultOutputModes??[]).map(e=>(0,s.jsx)(h.Tag,{color:"blue",children:e},e))})]})]})]}),ew.documentationUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,s.jsxs)("a",{href:ew.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,s.jsx)(l.ExternalLinkIcon,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"View Documentation"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(c.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(c.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,s.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,s.jsx)("pre",{className:"text-xs",children:`base_url = '${ew.url}' resolver = A2ACardResolver( httpx_client=httpx_client, diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7482f483a53ef533.js b/litellm/proxy/_experimental/out/_next/static/chunks/7482f483a53ef533.js new file mode 100644 index 00000000000..f405507565e --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/7482f483a53ef533.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},292639,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},743151,(e,t,r)=>{"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var l=i(e.r(271645)),o=i(e.r(844343)),n=["text","onCopy","options","children"];function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}(e,n),a=l.default.Children.only(t);return l.default.cloneElement(a,c(c({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var a=e.r(743151).CopyToClipboard;a.CopyToClipboard=a,t.exports=a},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),l=e.i(908286),o=e.i(242064),n=e.i(246422),i=e.i(838378);let s=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],f=function(e,t){let a,l,o;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&s.includes(a)})),(l={},u.forEach(r=>{l[`${e}-align-${r}`]=t.align===r}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(o={},c.forEach(r=>{o[`${e}-justify-${r}`]=t.justify===r}),o)))},d=(0,n.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,l=(0,i.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(l),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(l),(e=>{let{componentCls:t}=e,r={};return s.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(l),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(l)]},()=>({}),{resetStyle:!1});var p=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let y=t.default.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:s,className:c,style:u,flex:y,gap:m,vertical:b=!1,component:g="div",children:h}=e,v=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:w,direction:O,getPrefixCls:x}=t.default.useContext(o.ConfigContext),C=x("flex",i),[j,k,P]=d(C),E=null!=b?b:null==w?void 0:w.vertical,M=(0,r.default)(c,s,null==w?void 0:w.className,C,k,P,f(C,e),{[`${C}-rtl`]:"rtl"===O,[`${C}-gap-${m}`]:(0,l.isPresetSize)(m),[`${C}-vertical`]:E}),T=Object.assign(Object.assign({},null==w?void 0:w.style),u);return y&&(T.flex=y),m&&!(0,l.isPresetSize)(m)&&(T.gap=m),j(t.default.createElement(g,Object.assign({ref:n,className:M,style:T},(0,a.default)(v,["justify","wrap","align"])),h))});e.s(["Flex",0,y],525720)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,r]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;r(`${e}//${t}`)}},[]),e}])},688511,823429,e=>{"use strict";let t=(0,e.i(475254).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);e.s(["default",()=>t],823429),e.s(["Edit",()=>t],688511)},114600,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),l=e.i(271645);let o=(0,a.makeClassName)("Divider"),n=l.default.forwardRef((e,a)=>{let{className:n,children:i}=e,s=(0,t.__rest)(e,["className","children"]);return l.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(o("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",n)},s),i?l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.default.createElement("div",{className:(0,r.tremorTwMerge)("text-inherit whitespace-nowrap")},i),l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});n.displayName="Divider",e.s(["Divider",()=>n],114600)},366283,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(95779),l=e.i(444755),o=e.i(673706);let n=(0,o.makeClassName)("Callout"),i=r.default.forwardRef((e,i)=>{let{title:s,icon:c,color:u,className:f,children:d}=e,p=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,l.tremorTwMerge)(n("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",u?(0,l.tremorTwMerge)((0,o.getColorClassNames)(u,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(u,a.colorPalette.darkBorder).borderColor,(0,o.getColorClassNames)(u,a.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),f)},p),r.default.createElement("div",{className:(0,l.tremorTwMerge)(n("header"),"flex items-start")},c?r.default.createElement(c,{className:(0,l.tremorTwMerge)(n("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,l.tremorTwMerge)(n("title"),"font-semibold")},s)),r.default.createElement("p",{className:(0,l.tremorTwMerge)(n("body"),"overflow-y-auto",d?"mt-2":"")},d))});i.displayName="Callout",e.s(["Callout",()=>i],366283)},475647,286536,77705,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["PlusCircleOutlined",0,o],475647);var n=e.i(475254);let i=(0,n.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>i],286536);let s=(0,n.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>s],77705)},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",()=>t],727612)},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["LinkOutlined",0,o],596239)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},514236,e=>{"use strict";var t=e.i(843476),r=e.i(105278);e.s(["default",0,()=>(0,t.jsx)(r.default,{})])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ce9cf9f407f4b359.js b/litellm/proxy/_experimental/out/_next/static/chunks/76e98b80e3e54a38.js similarity index 86% rename from litellm/proxy/_experimental/out/_next/static/chunks/ce9cf9f407f4b359.js rename to litellm/proxy/_experimental/out/_next/static/chunks/76e98b80e3e54a38.js index b169c401925..f48079cce9a 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/ce9cf9f407f4b359.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/76e98b80e3e54a38.js @@ -95,4 +95,4 @@ ${u}${d}topRight `]:{animationName:i.slideDownOut},"&-hidden":{display:"none"},[n]: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(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-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),{[`${o}-rtl`]:{direction:"rtl"}},(0,r.genCompactItemStyle)(e,{borderElCls:`${o}-selector`,focusElCls:`${o}-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:o,controlHeight:n,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*o,x=Math.min(n-$,n-C),E=Math.min(a-$,a-C),S=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:`${(n-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:n,selectorBg:m,clearBg:m,singleItemHeightLG:i,multipleItemBg:h,multipleItemBorderColor:"transparent",multipleItemHeight:x,multipleItemHeightSM:E,multipleItemHeightLG:S,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 o={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 n=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(n.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["default",0,a],121229)},729151,e=>{"use strict";var t=e.i(271645),r=e.i(121229),o=e.i(726289),n=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(o.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:o})=>r&&o?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(n.default,null)}}e.s(["default",()=>s])},327494,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),o=e.i(123829),n=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),x=e.i(617206),E=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let S="SECRET_COMBOBOX_MODE_DO_NOT_USE",k=t.forwardRef((e,n)=>{var a,c,k,j,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:eo,prefix:en,dropdownRender:ea,popupRender:ei,onDropdownVisibleChange:el,onOpenChange:es,styles:ec,classNames:eu}=e,ed=E(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:ex}=(0,d.useComponentConfig)("select"),[,eE]=(0,b.useToken)(),eS=null!=D?D:null==eE?void 0:eE.controlHeight,ek=ep("select",P),ej=ep(),eO=null!=X?X:eh,{compactSize:eT,compactItemClassnames:eF}=(0,y.useCompactItemContext)(ek,eO),[e_,eI]=(0,v.default)("select",Q,N),eP=(0,m.default)(ek),[eN,eR,eM]=(0,$.default)(ek,eP),eB=t.useMemo(()=>{let{mode:t}=e;if("combobox"!==t)return t===S?"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==(k=e$.popup)?void 0:k.root)||ee,eD=(_=ei||ea,t.default.useMemo(()=>{if(_)return(...e)=>t.default.createElement(x.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:ek,componentName:"Select"})),eZ=(0,i.default)(ed,["suffixIcon","itemIcon"]),eQ=(0,r.default)((null==(j=null==eu?void 0:eu.popup)?void 0:j.root)||(null==(O=null==ex?void 0:ex.popup)?void 0:O.root)||A||z,{[`${ek}-dropdown-${eO}`]:"rtl"===eO},M,ex.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)({[`${ek}-lg`]:"large"===e0,[`${ek}-sm`]:"small"===e0,[`${ek}-rtl`]:"rtl"===eO,[`${ek}-${e_}`]:eI,[`${ek}-in-form-item`]:eG},(0,u.getStatusClassNames)(ek,eq,eW),eF,eC,R,ex.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(o.default,Object.assign({ref:n,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)(ej,"slide-up",et),builtinPlacements:(0,w.default)(q,ey),listHeight:L,listItemHeight:eS,mode:eB,prefixCls:ek,placement:e4,direction:eO,prefix:en,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?eo:void 0,tagRender:eA?er:void 0,dropdownRender:eD,onDropdownVisibleChange:es||el})))}),j=(0,c.default)(k,"dropdownAlign");k.SECRET_COMBOBOX_MODE_DO_NOT_USE=S,k.Option=a.Option,k.OptGroup=n.OptGroup,k._InternalPanelDoNotUseOrYouWillBeFired=j,e.s(["default",0,k],327494)},199133,e=>{"use strict";var t=e.i(327494);e.s(["Select",()=>t.default])},290571,e=>{"use strict";function t(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}"function"==typeof SuppressedError&&SuppressedError,e.s(["__rest",()=>t])},480731,e=>{"use strict";let t={Increase:"increase",ModerateIncrease:"moderateIncrease",Decrease:"decrease",ModerateDecrease:"moderateDecrease",Unchanged:"unchanged"},r={Slate:"slate",Gray:"gray",Zinc:"zinc",Neutral:"neutral",Stone:"stone",Red:"red",Orange:"orange",Amber:"amber",Yellow:"yellow",Lime:"lime",Green:"green",Emerald:"emerald",Teal:"teal",Cyan:"cyan",Sky:"sky",Blue:"blue",Indigo:"indigo",Violet:"violet",Purple:"purple",Fuchsia:"fuchsia",Pink:"pink",Rose:"rose"},o={XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl"},n={Left:"left",Right:"right"},a={Top:"top",Bottom:"bottom"};e.s(["BaseColors",()=>r,"DeltaTypes",()=>t,"HorizontalPositions",()=>n,"Sizes",()=>o,"VerticalPositions",()=>a])},673706,e=>{"use strict";e.i(480731);let t=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],r=e=>e.toString(),o=e=>e.reduce((e,t)=>e+t,0),n=(e,t)=>{for(let r=0;r{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function i(e){return t=>`tremor-${e}-${t}`}function l(e,r){let o=t.includes(e);if("white"===e||"black"===e||"transparent"===e||!r||!o){let t=e.includes("#")||e.includes("--")||e.includes("rgb")?`[${e}]`:e;return{bgColor:`bg-${t} dark:bg-${t}`,hoverBgColor:`hover:bg-${t} dark:hover:bg-${t}`,selectBgColor:`data-[selected]:bg-${t} dark:data-[selected]:bg-${t}`,textColor:`text-${t} dark:text-${t}`,selectTextColor:`data-[selected]:text-${t} dark:data-[selected]:text-${t}`,hoverTextColor:`hover:text-${t} dark:hover:text-${t}`,borderColor:`border-${t} dark:border-${t}`,selectBorderColor:`data-[selected]:border-${t} dark:data-[selected]:border-${t}`,hoverBorderColor:`hover:border-${t} dark:hover:border-${t}`,ringColor:`ring-${t} dark:ring-${t}`,strokeColor:`stroke-${t} dark:stroke-${t}`,fillColor:`fill-${t} dark:fill-${t}`}}return{bgColor:`bg-${e}-${r} dark:bg-${e}-${r}`,selectBgColor:`data-[selected]:bg-${e}-${r} dark:data-[selected]:bg-${e}-${r}`,hoverBgColor:`hover:bg-${e}-${r} dark:hover:bg-${e}-${r}`,textColor:`text-${e}-${r} dark:text-${e}-${r}`,selectTextColor:`data-[selected]:text-${e}-${r} dark:data-[selected]:text-${e}-${r}`,hoverTextColor:`hover:text-${e}-${r} dark:hover:text-${e}-${r}`,borderColor:`border-${e}-${r} dark:border-${e}-${r}`,selectBorderColor:`data-[selected]:border-${e}-${r} dark:data-[selected]:border-${e}-${r}`,hoverBorderColor:`hover:border-${e}-${r} dark:hover:border-${e}-${r}`,ringColor:`ring-${e}-${r} dark:ring-${e}-${r}`,strokeColor:`stroke-${e}-${r} dark:stroke-${e}-${r}`,fillColor:`fill-${e}-${r} dark:fill-${e}-${r}`}}e.s(["defaultValueFormatter",()=>r,"getColorClassNames",()=>l,"isValueInArray",()=>n,"makeClassName",()=>i,"mergeRefs",()=>a,"sumNumericArray",()=>o],673706)},689074,21243,98801,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let o=e=>{var o=(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"},o),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",()=>o],689074);let n=e=>{var o=(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"},o),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",()=>n],21243);let a=e=>{var o=(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"},o),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)},444755,e=>{"use strict";let t=(e,r)=>{if(0===e.length)return r.classGroupId;let o=e[0],n=r.nextPart.get(o),a=n?t(e.slice(1),n):void 0;if(a)return a;if(0===r.validators.length)return;let i=e.join("-");return r.validators.find(({validator:e})=>e(i))?.classGroupId},r=/^\[(.+)\]$/,o=(e,t,r,i)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:n(t,e)).classGroupId=r;return}"function"==typeof e?a(e)?o(e(i),t,r,i):t.validators.push({validator:e,classGroupId:r}):Object.entries(e).forEach(([e,a])=>{o(a,n(t,e),r,i)})})},n=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},a=e=>e.isThemeGetter,i=(e,t)=>t?e.map(([e,r])=>[e,r.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,r])=>[t+e,r])):e)]):e,l=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},s=/\s+/;function c(){let e,t,r=0,o="";for(;r{let t;if("string"==typeof e)return e;let r="";for(let o=0;o{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,o=new Map,n=(n,a)=>{r.set(n,a),++t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}})((s=n.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{separator:t,experimentalParseClassName:r}=e,o=1===t.length,n=t[0],a=t.length,i=e=>{let r,i=[],l=0,s=0;for(let c=0;cs?r-s:void 0}};return r?e=>r({className:e,parseClassName:i}):i})(s),...(e=>{let n=(e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return i(Object.entries(e.classGroups),r).forEach(([e,r])=>{o(r,n,e,t)}),n})(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:e=>{let o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),t(o,n)||(e=>{if(r.test(e)){let t=r.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}})(e)},getConflictingClassGroupIds:(e,t)=>{let r=a[e]||[];return t&&l[e]?[...r,...l[e]]:r}}})(s)}).cache.get,f=a.cache.set,p=m,m(l)};function m(e){let t=u(e);if(t)return t;let r=((e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(s),c="";for(let e=i.length-1;e>=0;e-=1){let t=i[e],{modifiers:s,hasImportantModifier:u,baseClassName:d,maybePostfixModifierPosition:f}=r(t),p=!!f,m=o(p?d.substring(0,f):d);if(!m){if(!p||!(m=o(d))){c=t+(c.length>0?" "+c:c);continue}p=!1}let h=l(s).join(":"),g=u?h+"!":h,v=g+m;if(a.includes(v))continue;a.push(v);let y=n(m,p);for(let e=0;e0?" "+c:c)}return c})(e,a);return f(e,r),r}return function(){return p(c.apply(null,arguments))}}let f=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},p=/^\[(?:([a-z-]+):)?(.+)\]$/i,m=/^\d+\/\d+$/,h=new Set(["px","full","screen"]),g=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,y=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,b=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,w=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$=e=>x(e)||h.has(e)||m.test(e),C=e=>M(e,"length",B),x=e=>!!e&&!Number.isNaN(Number(e)),E=e=>M(e,"number",x),S=e=>!!e&&Number.isInteger(Number(e)),k=e=>e.endsWith("%")&&x(e.slice(0,-1)),j=e=>p.test(e),O=e=>g.test(e),T=new Set(["length","size","percentage"]),F=e=>M(e,T,A),_=e=>M(e,"position",A),I=new Set(["image","url"]),P=e=>M(e,I,L),N=e=>M(e,"",z),R=()=>!0,M=(e,t,r)=>{let o=p.exec(e);return!!o&&(o[1]?"string"==typeof t?o[1]===t:t.has(o[1]):r(o[2]))},B=e=>v.test(e)&&!y.test(e),A=()=>!1,z=e=>b.test(e),L=e=>w.test(e),H=()=>{let e=f("colors"),t=f("spacing"),r=f("blur"),o=f("brightness"),n=f("borderColor"),a=f("borderRadius"),i=f("borderSpacing"),l=f("borderWidth"),s=f("contrast"),c=f("grayscale"),u=f("hueRotate"),d=f("invert"),p=f("gap"),m=f("gradientColorStops"),h=f("gradientColorStopPositions"),g=f("inset"),v=f("margin"),y=f("opacity"),b=f("padding"),w=f("saturate"),T=f("scale"),I=f("sepia"),M=f("skew"),B=f("space"),A=f("translate"),z=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",j,t],D=()=>[j,t],V=()=>["",$,C],W=()=>["auto",x,j],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",j],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[x,j];return{cacheSize:500,separator:":",theme:{colors:[R],spacing:[$,C],blur:["none","",O,j],brightness:Y(),borderColor:[e],borderRadius:["none","","full",O,j],borderSpacing:D(),borderWidth:V(),contrast:Y(),grayscale:K(),hueRotate:Y(),invert:K(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[k,C],inset:H(),margin:H(),opacity:Y(),padding:D(),saturate:Y(),scale:Y(),sepia:K(),skew:Y(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[O]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),j]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",S,j]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",S,j]}],"grid-cols":[{"grid-cols":[R]}],"col-start-end":[{col:["auto",{span:["full",S,j]},j]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[R]}],"row-start-end":[{row:["auto",{span:[S,j]},j]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...J()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...J(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...J(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[O]},O]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",O,C]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",E]}],"font-family":[{font:[R]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",x,E]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$,C]}],"underline-offset":[{"underline-offset":["auto",$,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",F]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},P]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:U()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[$,j]}],"outline-w":[{outline:[$,C]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[$,C]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",O,N]}],"shadow-color":[{shadow:[R]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",O,j]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[S,j]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$,C,E]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},D=(e,t,r)=>{void 0!==r&&(e[t]=r)},V=(e,t)=>{if(t)for(let r in t)D(e,r,t[r])},W=(e,t)=>{if(t)for(let r in t){let o=t[r];void 0!==o&&(e[r]=(e[r]||[]).concat(o))}},G=((e,...t)=>"function"==typeof e?d(H,e,...t):d(()=>((e,{cacheSize:t,prefix:r,separator:o,experimentalParseClassName:n,extend:a={},override:i={}})=>{for(let a in D(e,"cacheSize",t),D(e,"prefix",r),D(e,"separator",o),D(e,"experimentalParseClassName",n),i)V(e[a],i[a]);for(let t in a)W(e[t],a[t]);return e})(H(),e),...t))({extend:{classGroups:{shadow:[{shadow:[{tremor:["input","card","dropdown"],"dark-tremor":["input","card","dropdown"]}]}],rounded:[{rounded:[{tremor:["small","default","full"],"dark-tremor":["small","default","full"]}]}],"font-size":[{text:[{tremor:["default","title","metric"],"dark-tremor":["default","title","metric"]}]}]}}});e.s(["tremorTwMerge",()=>G],444755)},103471,e=>{"use strict";var t=e.i(444755),r=e.i(271645);let o=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(o).join(""):"object"==typeof e&&e?o(e.props.children):void 0;function n(e){let t=new Map;return r.default.Children.map(e,e=>{var r;t.set(e.props.value,null!=(r=o(e))?r:e.props.value)}),t}function a(e,t){return r.default.Children.map(t,t=>{var r;if((null!=(r=o(t))?r:t.props.value).toLowerCase().includes(e.toLowerCase()))return t})}let i=(e,r,o=!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",o&&"text-red-500 placeholder:text-red-500 dark:text-red-500 dark:placeholder:text-red-500",o?"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",()=>n,"getFilteredOptions",()=>a,"getNodeText",()=>o,"getSelectButtonColors",()=>i,"hasValue",()=>l])},779241,677955,e=>{"use strict";var t=e.i(290571),r=e.i(271645),o=e.i(673706),n=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:x,pattern:E}=e,S=(0,t.__rest)(e,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange","autoFocus","pattern"]),[k,j]=(0,r.useState)(x||!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=()=>j(!0),t=()=>j(!1),r=_.current;return r&&(r.addEventListener("focus",e),r.addEventListener("blur",t),x&&r.focus()),()=>{r&&(r.removeEventListener("focus",e),r.removeEventListener("blur",t))}},[x]),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),k&&(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,o.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:E},S)),"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(n.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,o.makeClassName)("TextInput"),d=r.default.forwardRef((e,o)=>{let{type:n="text"}=e,a=(0,t.__rest)(e,["type"]);return r.default.createElement(c,Object.assign({ref:o,type:n,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 o={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 n=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(n.default,(0,t.default)({},e,{ref:a,icon:o}))});e.s(["InfoCircleOutlined",0,a],827252)},592968,e=>{"use strict";var t=e.i(491816);e.s(["Tooltip",()=>t.default])},764205,122550,82946,e=>{"use strict";e.s(["addAllowedIP",()=>eA,"adminGlobalActivity",()=>eZ,"adminGlobalActivityPerModel",()=>e0,"adminGlobalCacheActivity",()=>eQ,"adminSpendLogsCall",()=>eJ,"adminTopEndUsersCall",()=>eX,"adminTopKeysCall",()=>eK,"adminTopModelsCall",()=>e1,"adminspendByProvider",()=>eY,"agentDailyActivityCall",()=>eS,"agentHubPublicModelsCall",()=>eN,"alertingSettingsCall",()=>Z,"allEndUsersCall",()=>eG,"allTagNamesCall",()=>eW,"applyGuardrail",()=>ol,"approveGuardrailSubmission",()=>tD,"approveMCPServer",()=>rT,"availableTeamListCall",()=>ef,"budgetCreateCall",()=>K,"budgetDeleteCall",()=>J,"budgetUpdateCall",()=>X,"buildMcpOAuthAuthorizeUrl",()=>ow,"cacheTemporaryMcpServer",()=>oy,"cachingHealthCheckCall",()=>tP,"callMCPTool",()=>rA,"cancelModelCostMapReload",()=>V,"checkEuAiActCompliance",()=>oD,"checkGdprCompliance",()=>oV,"claimOnboardingToken",()=>ej,"convertPromptFileToJson",()=>rf,"createAgentCall",()=>rp,"createGuardrailCall",()=>rm,"createMCPServer",()=>rE,"createPassThroughEndpoint",()=>tj,"createPolicyAttachmentCall",()=>re,"createPolicyCall",()=>t2,"createPolicyVersion",()=>t3,"createPromptCall",()=>rc,"createSearchTool",()=>rI,"credentialCreateCall",()=>te,"credentialDeleteCall",()=>to,"credentialGetCall",()=>tr,"credentialListCall",()=>tt,"credentialUpdateCall",()=>tn,"customerDailyActivityCall",()=>eE,"deleteAgentCall",()=>r6,"deleteAllowedIP",()=>ez,"deleteCallback",()=>og,"deleteClaudeCodePlugin",()=>oH,"deleteConfigFieldSetting",()=>tT,"deleteGuardrailCall",()=>r5,"deleteMCPOAuthUserCredential",()=>oY,"deleteMCPServer",()=>rk,"deletePassThroughEndpointsCall",()=>tF,"deletePolicyAttachmentCall",()=>rt,"deletePolicyCall",()=>t5,"deletePromptCall",()=>rd,"deleteSearchTool",()=>rN,"deleteToolPolicyOverride",()=>oK,"deriveErrorMessage",()=>oF,"disableClaudeCodePlugin",()=>oL,"enableClaudeCodePlugin",()=>oz,"enrichPolicyTemplate",()=>tY,"enrichPolicyTemplateStream",()=>t0,"estimateAttachmentImpactCall",()=>ra,"exchangeLoginCode",()=>oI,"exchangeMcpOAuthToken",()=>o$,"fetchAvailableSearchProviders",()=>rR,"fetchDiscoverableMCPServers",()=>rb,"fetchMCPAccessGroups",()=>rC,"fetchMCPClientIp",()=>rx,"fetchMCPServerHealth",()=>r$,"fetchMCPServers",()=>rw,"fetchMCPSubmissions",()=>rO,"fetchOpenAPIRegistry",()=>ry,"fetchSearchTools",()=>r_,"fetchToolDetail",()=>oq,"fetchToolPolicyOptions",()=>oW,"fetchToolsList",()=>oG,"formatDate",()=>y,"getAgentCreateMetadata",()=>I,"getAgentInfo",()=>oo,"getAgentsList",()=>or,"getAllowedIPs",()=>eB,"getBudgetList",()=>ty,"getCacheSettingsCall",()=>tC,"getCallbackConfigsCall",()=>b,"getCallbacksCall",()=>tb,"getCategoryYaml",()=>oe,"getClaudeCodeMarketplace",()=>oR,"getClaudeCodePluginDetails",()=>oB,"getClaudeCodePluginsList",()=>oM,"getConfigFieldSetting",()=>tk,"getDefaultTeamSettings",()=>rW,"getEmailEventSettings",()=>r1,"getGeneralSettingsCall",()=>tw,"getGlobalLitellmHeaderName",()=>R,"getGuardrailInfo",()=>on,"getGuardrailProviderSpecificParams",()=>r8,"getGuardrailUISettings",()=>r9,"getGuardrailsList",()=>tL,"getGuardrailsUsageDetail",()=>tG,"getGuardrailsUsageLogs",()=>tU,"getGuardrailsUsageOverview",()=>tW,"getInProductNudgesCall",()=>w,"getInternalUserSettings",()=>rg,"getLicenseInfo",()=>om,"getMCPOAuthUserCredentialStatus",()=>oZ,"getMCPSemanticFilterSettings",()=>tB,"getMajorAirlines",()=>ot,"getModelCostMapReloadStatus",()=>G,"getModelCostMapSource",()=>W,"getOnboardingCredentials",()=>ek,"getOpenAPISchema",()=>z,"getPassThroughEndpointsCall",()=>tS,"getPoliciesList",()=>tq,"getPolicyAttachmentsList",()=>t8,"getPolicyInfo",()=>t9,"getPolicyInfoWithGuardrails",()=>tK,"getPolicyTemplates",()=>tX,"getPossibleUserRoles",()=>e9,"getPromptInfo",()=>rl,"getPromptVersions",()=>rs,"getPromptsList",()=>ri,"getProviderCreateMetadata",()=>_,"getProxyBaseUrl",()=>S,"getProxyUISettings",()=>tR,"getPublicModelHubInfo",()=>A,"getRemainingUsers",()=>op,"getResolvedGuardrails",()=>ro,"getRouterSettingsCall",()=>t$,"getSSOSettings",()=>ou,"getTeamPermissionsCall",()=>rU,"getToolUsageLogs",()=>oU,"getUISettings",()=>tM,"getUiConfig",()=>B,"getUiSettings",()=>oP,"handleError",()=>F,"individualModelHealthCheckCall",()=>tI,"invitationCreateCall",()=>Y,"keyAliasesCall",()=>e7,"keyCreateCall",()=>ee,"keyCreateForAgentCall",()=>et,"keyCreateServiceAccountCall",()=>Q,"keyDeleteCall",()=>eo,"keyInfoCall",()=>e2,"keyInfoV1Call",()=>e6,"keyListCall",()=>e3,"keyUpdateCall",()=>ta,"latestHealthChecksCall",()=>tN,"listGuardrailSubmissions",()=>tH,"listMCPTools",()=>rB,"listMCPUserCredentials",()=>oQ,"listPolicyVersions",()=>t6,"loginCall",()=>o_,"makeAgentsPublicCall",()=>r3,"makeMCPPublicCall",()=>r7,"makeModelGroupPublic",()=>M,"mcpHubPublicServersCall",()=>eR,"modelAvailableCall",()=>eH,"modelCostMap",()=>L,"modelCreateCall",()=>U,"modelDeleteCall",()=>q,"modelHubCall",()=>eM,"modelHubPublicModelsCall",()=>eP,"modelInfoCall",()=>e_,"modelInfoV1Call",()=>eI,"modelPatchUpdateCall",()=>tl,"organizationCreateCall",()=>eh,"organizationDailyActivityCall",()=>ex,"organizationDeleteCall",()=>ev,"organizationInfoCall",()=>em,"organizationListCall",()=>ep,"organizationMemberAddCall",()=>tf,"organizationMemberDeleteCall",()=>tp,"organizationMemberUpdateCall",()=>tm,"organizationUpdateCall",()=>eg,"patchAgentCall",()=>oa,"perUserAnalyticsCall",()=>oT,"proxyBaseUrl",()=>E,"ragIngestCall",()=>r0,"regenerateKeyCall",()=>eO,"registerClaudeCodePlugin",()=>oA,"registerMCPServer",()=>rj,"registerMcpOAuthClient",()=>ob,"rejectGuardrailSubmission",()=>tV,"rejectMCPServer",()=>rF,"reloadModelCostMap",()=>H,"resetEmailEventSettings",()=>r4,"resolvePoliciesCall",()=>rn,"scheduleModelCostMapReload",()=>D,"searchToolQueryCall",()=>ox,"serverRootPath",()=>$,"serviceHealthCheck",()=>tv,"sessionSpendLogsCall",()=>rJ,"setCallbacksCall",()=>t_,"setGlobalLitellmHeaderName",()=>N,"storeMCPOAuthUserCredential",()=>oX,"suggestPolicyTemplates",()=>tZ,"switchToWorkerUrl",()=>k,"tagCreateCall",()=>rz,"tagDailyActivityCall",()=>e$,"tagDauCall",()=>oE,"tagDeleteCall",()=>rV,"tagDistinctCall",()=>oj,"tagInfoCall",()=>rH,"tagListCall",()=>rD,"tagMauCall",()=>ok,"tagUpdateCall",()=>rL,"tagWauCall",()=>oS,"tagsSpendLogsCall",()=>eV,"teamBulkMemberAddCall",()=>tc,"teamCreateCall",()=>e8,"teamDailyActivityCall",()=>eC,"teamDeleteCall",()=>ea,"teamInfoCall",()=>ec,"teamListCall",()=>ed,"teamMemberAddCall",()=>ts,"teamMemberDeleteCall",()=>td,"teamMemberUpdateCall",()=>tu,"teamPermissionsUpdateCall",()=>rq,"teamSpendLogsCall",()=>eD,"teamUpdateCall",()=>ti,"testCacheConnectionCall",()=>tx,"testConnectionRequest",()=>e4,"testCustomCodeGuardrail",()=>os,"testMCPSemanticFilter",()=>tz,"testMCPToolsListRequest",()=>ov,"testPipelineCall",()=>rr,"testPoliciesAndGuardrails",()=>tJ,"testPolicyTemplate",()=>tQ,"testSearchToolConnection",()=>rM,"transformRequestCall",()=>ey,"uiAuditLogsCall",()=>of,"uiSpendLogDetailsCall",()=>rh,"uiSpendLogsCall",()=>eq,"updateCacheSettingsCall",()=>tE,"updateConfigFieldSetting",()=>tO,"updateDefaultTeamSettings",()=>rG,"updateEmailEventSettings",()=>r2,"updateGuardrailCall",()=>oi,"updateInternalUserSettings",()=>rv,"updateMCPSemanticFilterSettings",()=>tA,"updateMCPServer",()=>rS,"updatePassThroughEndpoint",()=>oh,"updatePolicyCall",()=>t4,"updatePolicyVersionStatus",()=>t7,"updatePromptCall",()=>ru,"updateSSOSettings",()=>od,"updateSearchTool",()=>rP,"updateToolPolicy",()=>oJ,"updateUiSettings",()=>oN,"updateUsefulLinksCall",()=>eL,"usageAiChatStream",()=>t1,"userAgentSummaryCall",()=>oO,"userBulkUpdateUserCall",()=>tg,"userCreateCall",()=>er,"userDailyActivityAggregatedCall",()=>e5,"userDailyActivityCall",()=>ew,"userDeleteCall",()=>en,"userFilterUICall",()=>eU,"userGetInfoV2",()=>el,"userInfoCall",()=>es,"userListCall",()=>ei,"userUpdateUserCall",()=>th,"v2TeamListCall",()=>eu,"validateBlockedWordsFile",()=>oc,"vectorStoreCreateCall",()=>rK,"vectorStoreDeleteCall",()=>rY,"vectorStoreInfoCall",()=>rZ,"vectorStoreListCall",()=>rX,"vectorStoreSearchCall",()=>oC,"vectorStoreUpdateCall",()=>rQ],764205),e.i(247167);var t=e.i(888259),r=e.i(268004);e.s(["default",()=>g,"jsonFields",()=>m],82946);var o=e.i(843476),n=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);let f=e=>e?e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):e;function p(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,f,"truncateString",()=>p],122550);let m=["metadata","config","enforced_params","aliases"],h=(e,t)=>m.includes(e)||"json"===t.format,g=({schemaComponent:e,excludedFields:t=[],form:r,overrideLabels:p={},overrideTooltips:m={},customValidation:g={},defaultValues:v={}})=>{let[y,b]=(0,n.useState)(null),[w,$]=(0,n.useState)(null);return((0,n.useEffect)(()=>{(async()=>{try{let o=(await z()).components.schemas[e];if(!o)throw Error(`Schema component "${e}" not found`);b(o);let n={};Object.keys(o.properties).filter(e=>!t.includes(e)&&void 0!==v[e]).forEach(e=>{n[e]=v[e]}),r.setFieldsValue(n)}catch(e){console.error("Schema fetch error:",e),$(e instanceof Error?e.message:"Failed to fetch schema")}})()},[e,r,t]),w)?(0,o.jsxs)("div",{className:"text-red-500",children:["Error: ",w]}):y?.properties?(0,o.jsx)("div",{children:Object.entries(y.properties).filter(([e])=>!t.includes(e)).map(([e,t])=>{let r,n,b,w,$,C,x,E;return n=(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||f(e),$=m[e]||t.description,C=[],b&&C.push({required:!0,message:`${w} is required`}),g[e]&&C.push({validator:g[e]}),h(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")}}),x=$?(0,o.jsxs)("span",{children:[w," ",(0,o.jsx)(d.Tooltip,{title:$,children:(0,o.jsx)(u.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}):w,r=h(e,t)?(0,o.jsx)(i.Input.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,o.jsx)(s.Select,{children:t.enum.map(e=>(0,o.jsx)(s.Select.Option,{value:e,children:e},e))}):"number"===n||"integer"===n?(0,o.jsx)(l.InputNumber,{style:{width:"100%"},precision:"integer"===n?0:void 0}):"duration"===e?(0,o.jsx)(c.TextInput,{placeholder:"eg: 30s, 30h, 30d"}):(0,o.jsx)(c.TextInput,{placeholder:$||""}),(0,o.jsx)(a.Form.Item,{label:x,name:e,className:"mt-8",rules:C,initialValue:v[e],help:(0,o.jsx)("div",{className:"text-xs text-gray-500",children:(E=({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"})[n]||"Text input",h(e,t)?`${E} Must be valid JSON format`:t.enum?`Select from available options -Allowed values: ${t.enum.join(", ")}`:E)}),children:r},e)})}):null};var v=e.i(727749);let y=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`},b=async e=>{try{let t=E?`${E}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},w=async e=>{try{let t=E?`${E}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},$="/",C="litellm_worker_url",x=window.localStorage.getItem(C),E=(()=>{if(!x)return null;try{let e=new URL(x);if("http:"===e.protocol||"https:"===e.protocol)return x}catch{}return window.localStorage.removeItem(C),null})()??null;console.log=function(){};let S=()=>{if(E)return E;let e=window.location;return e?.origin??""};function k(e){(!e||function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))&&(e?window.localStorage.setItem(C,e):window.localStorage.removeItem(C),E=e??null)}let j="POST",O="DELETE",T=0,F=async e=>{let t=Date.now();if(t-T>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){v.default.info("UI Session Expired. Logging out."),T=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}T=t}else console.log("Error suppressed to prevent spam:",e)},_=async()=>{let e=E?`${E}/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()},I=async()=>{let e=E?`${E}/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()},P="Authorization";function N(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),P=e}function R(){return P}let M=async(e,t)=>{let r=E?`${E}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},B=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)=>{if(window.localStorage.getItem(C))return;let r=window.location,o=r?.origin??null,n=t||o;if(console.log("proxyBaseUrl:",E),console.log("serverRootPath:",e),!n)return console.log("Updated proxyBaseUrl:",E=E??null);e.length>0&&!n.endsWith(e)&&"/"!=e&&(n+=e),console.log("Updated proxyBaseUrl:",E=n)})(t.server_root_path,t.proxy_base_url),t},A=async()=>{let e=E?`${E}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},z=async()=>{let e=E?`${E}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},L=async()=>{try{let e=E?`${E}/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}},H=async e=>{try{let t=E?`${E}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to reload model cost map:",e),e}},D=async(e,t)=>{try{let r=E?`${E}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await o.json();return console.log(`Schedule model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},V=async e=>{try{let t=E?`${E}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Cancel model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},W=async e=>{try{let t=E?`${E}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let o=await r.json();return console.log("Model cost map source info:",o),o}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},G=async e=>{try{let t=E?`${E}/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:{[P]:`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 o=await r.json();return console.log("Model cost map reload status:",o),o}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},U=async(e,r)=>{try{let o=E?`${E}/model/new`:"/model/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),t.default.destroy(),v.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=E?`${E}/model/delete`:"/model/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=E?`${E}/budget/delete`:"/budget/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/new`:"/budget/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/update`:"/budget/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Y=async(e,t)=>{try{let r=E?`${E}/invitation/new`:"/invitation/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Z=async e=>{try{let t=E?`${E}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Q=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)),m))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=E?`${E}/key/service-account/generate`:"/key/service-account/generate",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ee=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)),m))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 o=E?`${E}/key/generate`:"/key/generate",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t,r,o,n,a)=>{let i=E?`${E}/key/generate`:"/key/generate",l={agent_id:t,key_alias:r,models:o.length>0?o:[]};a&&(l.team_id=a),n&&Object.keys(n).length>0&&(l.metadata=n);let s=await fetch(i,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw F(await s.text()),Error("Failed to create key for agent");return s.json()},er=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 o=E?`${E}/user/new`:"/user/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eo=async(e,t)=>{try{let r=E?`${E}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},en=async(e,t)=>{try{let r=E?`${E}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete user(s):",e),e}},ea=async(e,t)=>{try{let r=E?`${E}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},ei=async(e,t=null,r=null,o=null,n=null,a=null,i=null,l=null,s=null,c=null,u=null)=>{try{let d=E?`${E}/user/list`:"/user/list";console.log("in userListCall");let f=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");f.append("user_ids",e)}r&&f.append("page",r.toString()),o&&f.append("page_size",o.toString()),n&&f.append("user_email",n),a&&f.append("role",a),i&&f.append("team",i),l&&f.append("sso_user_ids",l),s&&f.append("sort_by",s),c&&f.append("sort_order",c),u&&u.length>0&&f.append("organization_ids",u.join(","));let p=f.toString();p&&(d+=`?${p}`);let m=await fetch(d,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!m.ok){let e=await m.json(),t=oF(e);throw F(t),Error(t)}let h=await m.json();return console.log("/user/list API Response:",h),h}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t)=>{try{let r=E?`${E}/v2/user/info`:"/v2/user/info";t&&(r+=`?user_id=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch user info v2:",e),e}},es=async(e,t,r,o=!1,n,a,i=!1)=>{console.log(`userInfoCall: ${t}, ${r}, ${o}, ${n}, ${a}, ${i}`);try{let l;if(o){l=E?`${E}/user/list`:"/user/list";let e=new URLSearchParams;null!=n&&e.append("page",n.toString()),null!=a&&e.append("page_size",a.toString()),l+=`?${e.toString()}`}else l=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ec=async(e,t)=>{try{let r=E?`${E}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t,r=null,o=null,n=null,a=1,i=10,l=null,s=null)=>{try{let a=E?`${E}/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()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ed=async(e,t,r=null,o=null,n=null)=>{try{let a=E?`${E}/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()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ef=async e=>{try{let t=E?`${E}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("/team/available_teams API Response:",o),o}catch(e){throw e}},ep=async(e,t=null,r=null)=>{try{let o=E?`${E}/organization/list`:"/organization/list",n=new URLSearchParams;t&&n.append("org_id",t.toString()),r&&n.append("org_alias",r.toString());let a=n.toString();a&&(o+=`?${a}`);let i=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{let r=E?`${E}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eh=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=E?`${E}/organization/new`:"/organization/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eg=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=E?`${E}/organization/update`:"/organization/update",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ev=async(e,t)=>{try{let r=E?`${E}/organization/delete`:"/organization/delete",o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!o.ok){let e=await o.text();throw F(e),Error(`Error deleting organization: ${e}`)}return await o.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},ey=async(e,t)=>{try{let r=E?`${E}/utils/transform_request`:"/utils/transform_request",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eb=async({accessToken:e,endpoint:t,startTime:r,endTime:o,page:n=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=E?`${E}${i}`:i,(s=new URLSearchParams).append("start_date",y(r)),s.append("end_date",y(o)),s.append("page_size","1000"),s.append("page",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=oF(e);throw F(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},ew=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{user_id:n}}),e$=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{tags:n}}),eC=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{team_ids:n,exclude_team_ids:"litellm-dashboard"}}),ex=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{organization_ids:n}}),eE=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{end_user_ids:n}}),eS=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{agent_ids:n}}),ek=async e=>{try{let t=E?`${E}/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=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ej=async(e,t,r,o)=>{let n=E?`${E}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:o})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},eO=async(e,t,r)=>{try{let o=E?`${E}/key/${t}/regenerate`:`/key/${t}/regenerate`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},eT=!1,eF=null,e_=async(e,t,r,o=1,n=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,o,n,a,i,l,s,c);let u=E?`${E}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",o.toString()),d.append("size",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${eT}`,eT||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),v.default.info(e),eT=!0,eF&&clearTimeout(eF),eF=setTimeout(()=>{eT=!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}},eI=async(e,t)=>{try{let r=E?`${E}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("modelInfoV1Call:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eP=async()=>{let e=E?`${E}/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}`),[])},eN=async()=>{let e=E?`${E}/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}`),[])},eR=async()=>{let e=E?`${E}/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}`),[])},eM=async e=>{try{let t=E?`${E}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("modelHubCall:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},eB=async e=>{try{let t=E?`${E}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("getAllowedIPs:",o),o.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eA=async(e,t)=>{try{let r=E?`${E}/add/allowed_ip`:"/add/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("addAllowedIP:",n),n}catch(e){throw console.error("Failed to add allowed IP:",e),e}},ez=async(e,t)=>{try{let r=E?`${E}/delete/allowed_ip`:"/delete/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("deleteAllowedIP:",n),n}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eL=async(e,t)=>{try{let r=E?`${E}/model_hub/update_useful_links`:"/model_hub/update_useful_links",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eH=async(e,t,r,o=!1,n=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",P);try{let t=E?`${E}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===o&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),n&&r.append("team_id",n.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eD=async e=>{try{let t=E?`${E}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eV=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/tags`:"/global/spend/tags";t&&r&&(n=`${n}?start_date=${t}&end_date=${r}`),o&&(n+=`&tags=${o.join(",")}`),console.log("in tagsSpendLogsCall:",n);let a=await fetch(`${n}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eG=async e=>{try{let t=E?`${E}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to fetch end users:",e),e}},eU=async(e,t)=>{try{let r=E?`${E}/user/filter/ui`:"/user/filter/ui",o=new URLSearchParams;t.get("user_email")&&o.append("user_email",t.get("user_email")),t.get("user_id")&&o.append("user_id",t.get("user_id")),t.get("team_id")&&o.append("team_id",t.get("team_id"));let n=o.toString(),a=n?`${r}?${n}`:r,i=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:o=1,page_size:n=50,params:a={}})=>{try{let i=E?`${E}/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",o.toString()),l.append("page_size",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=oF(e);throw F(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=E?`${E}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=E?`${E}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:o}):JSON.stringify({startTime:r,endTime:o});let i={method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(n,i);if(!l.ok){let e=await l.json(),t=oF(e);throw F(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,o)=>{try{let n=E?`${E}/global/spend/provider`:"/global/spend/provider";r&&o&&(n+=`?start_date=${r}&end_date=${o}`),t&&(n+=`&api_key=${t}`);let a={method:"GET",headers:{[P]:`Bearer ${e}`}},i=await fetch(n,a);if(!i.ok){let e=await i.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity`:"/global/activity";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity/model`:"/global/activity/model";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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=>{try{let t=E?`${E}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e2=async(e,t)=>{try{let r=E?`${E}/v2/key/info`:"/v2/key/info",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!o.ok){let e=await o.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw F(e),Error("Network response was not ok")}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e4=async(e,t,r,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let n=E?`${E}/health/test_connection`:"/health/test_connection",a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:o})}),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}},e6=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=E?`${E}/key/info`:"/key/info";r=`${r}?key=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",o),!o.ok){let e=await o.text();F(e),v.default.fromBackend("Failed to fetch key info - "+e)}let n=await o.json();return console.log("data",n),n}catch(e){throw console.error("Failed to fetch key info:",e),e}},e3=async(e,t,r,o,n,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=E?`${E}/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()),o&&p.append("key_alias",o),a&&p.append("key_hash",a),n&&p.append("user_id",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=oF(e);throw F(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}},e7=async(e,t=1,r=50,o)=>{try{let n=new URLSearchParams(Object.entries({page:String(t),size:String(r),...o?{search:o}:{}})),a=E?`${E}/key/aliases`:"/key/aliases";a=`${a}?${n}`;let i=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(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}},e5=async(e,t,r,o=null)=>{try{let n=E?`${E}/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"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),o&&a.append("user_id",o);let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},e9=async e=>{try{let t=E?`${E}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("response from user/available_role",o),o}catch(e){throw e}},e8=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=E?`${E}/team/new`:"/team/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},te=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=E?`${E}/credentials`:"/credentials",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=E?`${E}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("/credentials API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tr=async(e,t,r)=>{try{let o=E?`${E}/credentials`:"/credentials";t?o+=`/by_name/${t}`:r&&(o+=`/by_model/${r}`),console.log("in credentialListCall");let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},to=async(e,t)=>{try{let r=E?`${E}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},tn=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 o=E?`${E}/credentials/${t}`:`/credentials/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},ta=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=E?`${E}/key/update`:"/key/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("Update key Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=E?`${E}/team/update`:"/team/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),v.default.fromBackend("Failed to update team settings: "+e),Error(e)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to update team:",e),e}},tl=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let o=E?`${E}/model/${r}/update`:`/model/${r}/update`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await n.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},ts=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_add`:"/team/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!n.ok){let e=await n.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",o=Error(r);throw o.raw=t,o}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t,r,o,n)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:o});let a=E?`${E}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};n?i.all_users=!0:i.members=r,null!=o&&(i.max_budget_in_team=o);let l=await fetch(a,{method:"POST",headers:{[P]:`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",o=Error(r);throw o.raw=t,o}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}},tu=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 o=E?`${E}/team/member_update`:"/team/member_update",n={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(n.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(n.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(n.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(n.rpm_limit=r.rpm_limit),console.log("Final request body:",n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(n)});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",o=Error(r);throw o.raw=t,o}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},td=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_delete`:"/team/member_delete",n=await fetch(o,{method:"POST",headers:{[P]:`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(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/organization/member_add`:"/organization/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let o=E?`${E}/organization/member_delete`:"/organization/member_delete",n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},tm=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let o=E?`${E}/organization/member_update`:"/organization/member_update",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let o=E?`${E}/user/update`:"/user/update",n={...t};null!==r&&(n.user_role=r),n=JSON.stringify(n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!a.ok){let e=await a.json(),t=oF(e);throw F(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}},tg=async(e,t,r,o=!1)=>{try{let n;console.log("Form Values in userUpdateUserCall:",t);let a=E?`${E}/user/bulk_update`:"/user/bulk_update";if(o)n=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let o of r)e.push({user_id:o,...t});n=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!i.ok){let e=await i.json(),t=oF(e);throw F(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}},tv=async(e,t)=>{try{let r=E?`${E}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},ty=async e=>{try{let t=E?`${E}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tb=async(e,t,r)=>{try{let t=E?`${E}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tw=async e=>{try{let t=E?`${E}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t$=async e=>{try{let t=E?`${E}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tC=async e=>{try{let t=E?`${E}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tx=async(e,t)=>{try{let r=E?`${E}/cache/settings/test`:"/cache/settings/test",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tE=async(e,t)=>{try{let r=E?`${E}/cache/settings`:"/cache/settings",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tS=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tk=async(e,t)=>{try{let r=E?`${E}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tj=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tO=async(e,t,r)=>{try{let o=E?`${E}/config/field/update`:"/config/field/update",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return v.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tT=async(e,t)=>{try{let r=E?`${E}/config/field/delete`:"/config/field/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return v.default.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async(e,t)=>{try{let r=E?`${E}/config/update`:"/config/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tI=async(e,t)=>{try{let r=E?`${E}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tP=async e=>{try{let t=E?`${E}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tN=async e=>{try{let t=E?`${E}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tR=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",E);let t=E?`${E}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async e=>{try{let t=E?`${E}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(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}},tB=async e=>{try{let t=E?`${E}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tA=async(e,t)=>{try{let r=E?`${E}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tz=async(e,t,r)=>{try{let o=E?`${E}/v1/responses`:"/v1/responses",n=await fetch(o,{method:"POST",headers:{[P]:`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=n.headers.get("x-litellm-semantic-filter"),i=n.headers.get("x-litellm-semantic-filter-tools");if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return{data:await n.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},tL=async e=>{try{let t=E?`${E}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`v2 guardrails/list returned ${r.status}`);return await r.json()}catch(t){console.log("v2/guardrails/list failed, falling back to v1:",t);try{let t=E?`${E}/guardrails/list`:"/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}}},tH=async(e,t)=>{let r=E?`${E}/guardrails/submissions`:"/guardrails/submissions",o=new URLSearchParams;t?.status&&o.set("status",t.status),t?.team_id&&o.set("team_id",t.team_id),t?.team_guardrail!==void 0&&o.set("team_guardrail",String(t.team_guardrail)),t?.search&&o.set("search",t.search);let n=o.toString()?`${r}?${o.toString()}`:r,a=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=oF(await a.json().catch(()=>({})));throw F(e),Error(e)}return a.json()},tD=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/approve`:`/guardrails/submissions/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oF(await o.json().catch(()=>({})));throw F(e),Error(e)}return o.json()},tV=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/reject`:`/guardrails/submissions/${encodeURIComponent(t)}/reject`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oF(await o.json().catch(()=>({})));throw F(e),Error(e)}return o.json()},tW=async(e,t,r)=>{try{let o=E?`${E}/guardrails/usage/overview`:"/guardrails/usage/overview",n=new URLSearchParams;t&&n.append("start_date",t),r&&n.append("end_date",r),n.toString()&&(o+=`?${n.toString()}`);let a=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(oF(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},tG=async(e,t,r,o)=>{try{let n=E?`${E}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),o&&a.append("end_date",o),a.toString()&&(n+=`?${a.toString()}`);let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(oF(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},tU=async(e,t)=>{try{let r=E?`${E}/guardrails/usage/logs`:"/guardrails/usage/logs",o=new URLSearchParams;t.guardrailId&&o.append("guardrail_id",t.guardrailId),t.policyId&&o.append("policy_id",t.policyId),null!=t.page&&o.append("page",String(t.page)),null!=t.pageSize&&o.append("page_size",String(t.pageSize)),t.action&&o.append("action",t.action),t.startDate&&o.append("start_date",t.startDate),t.endDate&&o.append("end_date",t.endDate),o.toString()&&(r+=`?${o.toString()}`);let n=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json();throw Error(oF(e))}return n.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},tq=async e=>{try{let t=E?`${E}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},tJ=async(e,t,r)=>{try{let o=E?`${E}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",n=await fetch(o,{method:"POST",signal:r,headers:{[P]:`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(!n.ok){let e=await n.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 F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},tK=async(e,t)=>{try{let r=E?`${E}/policy/info/${t}`:`/policy/info/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},tX=async e=>{try{let t=E?`${E}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},tY=async(e,t,r,o,n)=>{try{let a=E?`${E}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};o&&(i.model=o),n&&(i.competitors=n);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},tZ=async(e,t,r,o)=>{try{let n=E?`${E}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:o})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},tQ=async(e,t,r)=>{try{let o=E?`${E}/policy/templates/test`:"/policy/templates/test",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},t0=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:o};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=oF(await d.json());throw F(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?n(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},t1=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=oF(await u.json());throw F(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?o(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?n():"error"===t.type&&a?.(t.message)}catch{}}},t2=async(e,t)=>{try{let r=E?`${E}/policies`:"/policies",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy:",e),e}},t4=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}`:`/policies/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy:",e),e}},t6=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},t3=async(e,t,r)=>{try{let o=encodeURIComponent(t),n=E?`${E}/policies/name/${o}/versions`:`/policies/name/${o}/versions`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},t7=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}/status`:`/policies/${t}/status`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},t5=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},t9=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},t8=async e=>{try{let t=E?`${E}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},re=async(e,t)=>{try{let r=E?`${E}/policies/attachments`:"/policies/attachments",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rt=async(e,t)=>{try{let r=E?`${E}/policies/attachments/${t}`:`/policies/attachments/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rr=async(e,t,r)=>{try{let o=E?`${E}/policies/test-pipeline`:"/policies/test-pipeline",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},ro=async(e,t)=>{try{let r=E?`${E}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rn=async(e,t)=>{try{let r=E?`${E}/policies/resolve`:"/policies/resolve",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},ra=async(e,t)=>{try{let r=E?`${E}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ri=async e=>{try{let t=E?`${E}/prompts/list`:"/prompts/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rl=async(e,t)=>{try{let r=E?`${E}/prompts/${t}/info`:`/prompts/${t}/info`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rs=async(e,t)=>{try{let r=E?`${E}/prompts/${t}/versions`:`/prompts/${t}/versions`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw 404!==o.status&&F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},rc=async(e,t)=>{try{let r=E?`${E}/prompts`:"/prompts",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},ru=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}`:`/prompts/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rd=async(e,t)=>{try{let r=E?`${E}/prompts/${t}`:`/prompts/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rf=async(e,t)=>{try{let r=new FormData;r.append("file",t);let o=E?`${E}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`},body:r});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rp=async(e,t)=>{try{let r=E?`${E}/v1/agents`:"/v1/agents",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Create agent response:",n),n}catch(e){throw console.error("Failed to create agent:",e),e}},rm=async(e,t)=>{try{let r=E?`${E}/guardrails`:"/guardrails",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Create guardrail response:",n),n}catch(e){throw console.error("Failed to create guardrail:",e),e}},rh=async(e,t,r)=>{try{let o=E?`${E}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",o);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rg=async e=>{try{let t=E?`${E}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched SSO settings:",o),o}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rv=async(e,t)=>{try{let r=E?`${E}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Updated internal user settings:",n),v.default.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},ry=async e=>{try{let t=E?`${E}/v1/mcp/openapi-registry`:"/v1/mcp/openapi-registry",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json();throw Error(oF(e))}return await r.json()}catch(e){throw console.error("Failed to fetch OpenAPI registry:",e),e}},rb=async e=>{try{let t=E?`${E}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rw=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server";if(t){let e=new URLSearchParams;e.append("team_id",t),r=`${r}?${e.toString()}`}console.log("Fetching MCP servers from:",r);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},r$=async(e,t)=>{try{let r=E?`${E}/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 o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Fetched MCP server health:",n),n}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rC=async e=>{try{let t=E?`${E}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched MCP access groups:",o),o.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rx=async e=>{try{let t=E?`${E}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rE=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},rS=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rk=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rj=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/server/register",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to register MCP server:",e),e}},rO=async e=>{try{let t=(E?`${E}`:"")+"/v1/mcp/server/submissions",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return r.json()}catch(e){throw console.error("Failed to fetch MCP submissions:",e),e}},rT=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to approve MCP server:",e),e}},rF=async(e,t,r)=>{try{let o=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/reject`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({review_notes:r??null})});if(!n.ok){let e=await n.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to reject MCP server:",e),e}},r_=async e=>{try{let t=E?`${E}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched search tools:",o),o}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rI=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=E?`${E}/search_tools`:"/search_tools",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Created search tool:",n),n}catch(e){throw console.error("Failed to create search tool:",e),e}},rP=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let o=E?`${E}/search_tools/${t}`:`/search_tools/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rN=async(e,t)=>{try{let r=(E?`${E}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Deleted search tool:",n),n}catch(e){throw console.error("Failed to delete search tool:",e),e}},rR=async e=>{try{let t=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched available search providers:",o),o}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rM=async(e,t)=>{try{let r=E?`${E}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Test connection response:",n),n}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rB=async(e,t,r)=>{try{let o=E?`${E}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",o);let n={[P]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(o,{method:"GET",headers:n}),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}}},rA=async(e,t,r,o,n)=>{try{let a=E?`${E}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",o,"for server:",t);let i={[P]:`Bearer ${e}`,"Content-Type":"application/json",...n?.customHeaders||{}},l={server_id:t,name:r,arguments:o};n?.guardrails&&n.guardrails.length>0&&(l.litellm_metadata={guardrails:n.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 o=JSON.parse(r);o.detail?"string"==typeof o.detail?e=o.detail:"object"==typeof o.detail&&(e=o.detail.message||o.detail.error||"An error occurred",t=o.detail):e=o.message||o.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let o=Error(e);throw o.status=s.status,o.statusText=s.statusText,o.details=t,F(e),o}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}},rz=async(e,t)=>{try{let r=E?`${E}/tag/new`:"/tag/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error creating tag:",e),e}},rL=async(e,t)=>{try{let r=E?`${E}/tag/update`:"/tag/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error updating tag:",e),e}},rH=async(e,t)=>{try{let r=E?`${E}/tag/info`:"/tag/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!o.ok){let e=await o.text();return await F(e),{}}return await o.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rD=async e=>{try{let t=E?`${E}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await F(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rV=async(e,t)=>{try{let r=E?`${E}/tag/delete`:"/tag/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rW=async e=>{try{let t=E?`${E}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched default team settings:",o),o}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},rG=async(e,t)=>{try{let r=E?`${E}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Updated default team settings:",n),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},rU=async(e,t)=>{try{let r=E?`${E}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,o=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Team permissions response:",n),n}catch(e){throw console.error("Failed to get team permissions:",e),e}},rq=async(e,t,r)=>{try{let o=E?`${E}/team/permissions_update`:"/team/permissions_update",n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},rJ=async(e,t)=>{try{let r=E?`${E}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},rK=async(e,t)=>{try{let r=E?`${E}/vector_store/new`:"/vector_store/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to create vector store")}return await o.json()}catch(e){throw console.error("Error creating vector store:",e),e}},rX=async(e,t=1,r=100)=>{try{let t=E?`${E}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[P]:`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}},rY=async(e,t)=>{try{let r=E?`${E}/vector_store/delete`:"/vector_store/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to delete vector store")}return await o.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},rZ=async(e,t)=>{try{let r=E?`${E}/vector_store/info`:"/vector_store/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to get vector store info")}return await o.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},rQ=async(e,t)=>{try{let r=E?`${E}/vector_store/update`:"/vector_store/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to update vector store")}return await o.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r0=async(e,t,r,o,n,a,i)=>{try{let l=E?`${E}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...o&&{vector_store_id:o},...i&&i}}};(n||a)&&(c.ingest_options.litellm_vector_store_params={},n&&(c.ingest_options.litellm_vector_store_params.vector_store_name=n),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:{[P]:`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}},r1=async e=>{try{let t=E?`${E}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get email event settings")}let o=await r.json();return console.log("Email event settings response:",o),o}catch(e){throw console.error("Failed to get email event settings:",e),e}},r2=async(e,t)=>{try{let r=E?`${E}/email/event_settings`:"/email/event_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to update email event settings")}let n=await o.json();return console.log("Update email event settings response:",n),n}catch(e){throw console.error("Failed to update email event settings:",e),e}},r4=async e=>{try{let t=E?`${E}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to reset email event settings")}let o=await r.json();return console.log("Reset email event settings response:",o),o}catch(e){throw console.error("Failed to reset email event settings:",e),e}},r6=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Delete agent response:",n),n}catch(e){throw console.error("Failed to delete agent:",e),e}},r3=async(e,t)=>{try{let r=E?`${E}/v1/agents/make_public`:"/v1/agents/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r7=async(e,t)=>{try{let r=E?`${E}/v1/mcp/make_public`:"/v1/mcp/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r5=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Delete guardrail response:",n),n}catch(e){throw console.error("Failed to delete guardrail:",e),e}},r9=async e=>{try{let t=E?`${E}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get guardrail UI settings")}let o=await r.json();return console.log("Guardrail UI settings response:",o),o}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},r8=async e=>{try{let t=E?`${E}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get guardrail provider specific parameters")}let o=await r.json();return console.log("Guardrail provider specific params response:",o),o}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},oe=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${o}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw console.error(`Failed to get category YAML. Status: ${n.status}, Error:`,e),F(e),Error(`Failed to get category YAML: ${n.status} ${e}`)}let a=await n.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},ot=async e=>{try{let t=E?`${E}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[P]:`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),F(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}},or=async(e,t=!1)=>{try{let r=t?"?health_check=true":"",o=E?`${E}/v1/agents${r}`:`/v1/agents${r}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to get agents list")}let a=await n.json();return console.log("Agents list response:",a),{agents:a}}catch(e){throw console.error("Failed to get agents list:",e),e}},oo=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to get agent info")}let n=await o.json();return console.log("Agent info response:",n),n}catch(e){throw console.error("Failed to get agent info:",e),e}},on=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}/info`:`/guardrails/${t}/info`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to get guardrail info")}let n=await o.json();return console.log("Guardrail info response:",n),n}catch(e){throw console.error("Failed to get guardrail info:",e),e}},oa=async(e,t,r)=>{try{let o=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to patch agent")}let a=await n.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},oi=async(e,t,r)=>{try{let o=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to update guardrail")}let a=await n.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ol=async(e,t,r,o,n)=>{try{let a=E?`${E}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};o&&(i.language=o),n&&n.length>0&&(i.entities=n);let l=await fetch(a,{method:"POST",headers:{[P]:`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 F(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}},os=async(e,t)=>{try{let r=E?`${E}/guardrails/test_custom_code`:"/guardrails/test_custom_code",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.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 F(e),Error(t)}let n=await o.json();return console.log("Test custom code guardrail response:",n),n}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},oc=async(e,t)=>{try{let r=E?`${E}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to validate blocked words file")}let n=await o.json();return console.log("Validate blocked words file response:",n),n}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},ou=async e=>{try{let t=E?`${E}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched SSO configuration:",o),o}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},od=async(e,t)=>{try{let r=E?`${E}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:oF(e);F(r);let n=Error(r);throw e?.detail!==void 0&&(n.detail=e.detail),n.rawError=e,n}let n=await o.json();return console.log("Updated SSO configuration:",n),n}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},of=async({accessToken:e,page:t=1,page_size:r=50,params:o={}})=>{try{let n=E?`${E}/audit`:"/audit",a=new URLSearchParams;for(let[e,n]of(a.append("page",t.toString()),a.append("page_size",r.toString()),Object.entries(o)))null!=n&&""!==n&&a.append(e,String(n));n+=`?${a.toString()}`;let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},op=async e=>{try{let t=E?`${E}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw F(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},om=async e=>{try{let t=E?`${E}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw F(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},oh=async(e,t,r)=>{try{let o=E?`${E}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return v.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},og=async(e,t)=>{try{let r=E?`${E}/config/callback/delete`:"/config/callback/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},ov=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=E?`${E}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",n={"Content-Type":"application/json"};e&&(n["x-litellm-api-key"]=e),r?n.Authorization=`Bearer ${r}`:e&&(n[P]=`Bearer ${e}`);let a=await fetch(o,{method:"POST",headers:n,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}},oy=async(e,t)=>{let r=E?`${E}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await o.json();if(!o.ok)throw Error(oF(n)||n?.error||"Failed to cache MCP server");return n},ob=async(e,t,r)=>{let o=S(),n=encodeURIComponent(t.trim()),a=`${o}/v1/mcp/server/oauth/${n}/register`,i=await fetch(a,{method:"POST",headers:{[P]:`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(oF(l)||l?.detail||"Failed to register OAuth client");return l},ow=({serverId:e,clientId:t,redirectUri:r,state:o,codeChallenge:n,scope:a})=>{let i=S(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:o,response_type:"code",code_challenge:n,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()}`},o$=async({serverId:e,code:t,clientId:r,clientSecret:o,codeVerifier:n,redirectUri:a})=>{let i=S(),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),o&&o.trim().length>0&&c.set("client_secret",o),c.set("code_verifier",n),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(oF(d)||d?.detail||"OAuth token exchange failed");return d},oC=async(e,t,r)=>{try{let o=`${S()}/v1/vector_stores/${t}/search`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!n.ok){let e=await n.text();return await F(e),null}return await n.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},ox=async(e,t,r,o)=>{try{let n=`${S()}/v1/search/${t}`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:o||5})});if(!a.ok){let e=await a.text();return await F(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},oE=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},oS=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},ok=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},oj=async e=>{try{let t=E?`${E}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},oO=async(e,t,r,o)=>{try{let n=E?`${E}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},oT=async(e,t=1,r=50,o)=>{try{let n=E?`${E}/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()),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(n+=`?${i}`);let l=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},oF=e=>{let t=e?.detail,r=Array.isArray(t)?t.map(e=>e?.msg||JSON.stringify(e)).join("; "):"string"==typeof t?t:void 0;return e?.error&&(e.error.message||("string"==typeof e.error?e.error:void 0))||e?.message||r||JSON.stringify(e)},o_=async(e,t,r)=>{let o=S(),n=r?"/v3/login":"/v2/login",a=o?`${o}${n}`:n,i=JSON.stringify({username:e,password:t}),l=await fetch(a,{method:"POST",body:i,credentials:"include",headers:{"Content-Type":"application/json"}});if(!l.ok)throw Error(oF(await l.json()));let s=await l.json();if(r&&s.code){let e=o?`${o}/v3/login/exchange`:"/v3/login/exchange",t=await fetch(e,{method:"POST",body:JSON.stringify({code:s.code}),credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error(oF(await t.json()));let r=await t.json();return r.token&&(document.cookie=`token=${r.token}; path=/; SameSite=Lax`),r}return s.token&&(document.cookie=`token=${s.token}; path=/; SameSite=Lax`),s},oI=async(e,t)=>{let r=t||S(),o=await fetch(`${r}/v3/login/exchange`,{method:"POST",body:JSON.stringify({code:e}),headers:{"Content-Type":"application/json"}});if(!o.ok)throw Error(oF(await o.json()));let n=await o.json();return n.token&&(document.cookie=`token=${n.token}; path=/; SameSite=Lax`),n.token},oP=async()=>{let e=S(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(oF(await r.json()));return await r.json()},oN=async(e,t)=>{let r=S(),o=r?`${r}/update/ui_settings`:"/update/ui_settings",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(oF(await n.json()));return await n.json()},oR=async()=>{try{let e=S(),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=oF(JSON.parse(e));throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},oM=async(e,t=!1)=>{try{let r=S(),o=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},oB=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},oA=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins`:"/claude-code/plugins",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},oz=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},oL=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},oH=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},oD=async(e,t)=>{let r=E?`${E}/compliance/eu-ai-act`:"/compliance/eu-ai-act",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oV=async(e,t)=>{let r=E?`${E}/compliance/gdpr`:"/compliance/gdpr",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oW=async e=>{let t=E?`${E}/v1/tool/policy/options`:"/v1/tool/policy/options",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return r.json()},oG=async e=>{let t=E?`${E}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},oU=async(e,t,r)=>{let o=encodeURIComponent(t),n=E?`${E}/v1/tool/${o}/logs`:`/v1/tool/${o}/logs`,a=new URLSearchParams;null!=r.page&&a.append("page",String(r.page)),null!=r.pageSize&&a.append("page_size",String(r.pageSize)),r.startDate&&a.append("start_date",r.startDate),r.endDate&&a.append("end_date",r.endDate);let i=a.toString()?`${n}?${a.toString()}`:n,l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok)throw Error(oF(await l.json().catch(()=>({}))));return l.json()},oq=async(e,t)=>{let r=encodeURIComponent(t),o=E?`${E}/v1/tool/${r}/detail`:`/v1/tool/${r}/detail`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok)throw Error(await n.text());return n.json()},oJ=async(e,t,r,o)=>{let n=E?`${E}/v1/tool/policy`:"/v1/tool/policy",a={tool_name:t};null!=r.input_policy&&(a.input_policy=r.input_policy),null!=r.output_policy&&(a.output_policy=r.output_policy),o?.team_id!=null&&(a.team_id=o.team_id||void 0),o?.key_hash!=null&&(a.key_hash=o.key_hash||void 0),o?.key_alias!=null&&(a.key_alias=o.key_alias||void 0);let i=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw Error(await i.text());return i.json()},oK=async(e,t,r)=>{let o=encodeURIComponent(t),n=new URLSearchParams;null!=r.team_id&&""!==r.team_id&&n.set("team_id",r.team_id),null!=r.key_hash&&""!==r.key_hash&&n.set("key_hash",r.key_hash);let a=n.toString(),i=E?`${E}/v1/tool/${o}/overrides${a?`?${a}`:""}`:`/v1/tool/${o}/overrides${a?`?${a}`:""}`,l=await fetch(i,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!l.ok)throw Error(await l.text());return l.json()},oX=async(e,t,r)=>{let o=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to store OAuth credential")}return n.json()},oY=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to revoke OAuth credential")}return o.json()},oZ=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential/status`:`/v1/mcp/server/${t}/oauth-user-credential/status`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`}});return o.ok?o.json():{server_id:t,has_credential:!1,is_expired:!1}},oQ=async e=>{let t=E?`${E}/v1/mcp/user-credentials`:"/v1/mcp/user-credentials",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});return r.ok?r.json():[]}}]); \ No newline at end of file +Allowed values: ${t.enum.join(", ")}`:E)}),children:r},e)})}):null};var v=e.i(727749);let y=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`},b=async e=>{try{let t=E?`${E}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},w=async e=>{try{let t=E?`${E}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},$="/",C="litellm_worker_url",x=window.localStorage.getItem(C),E=(()=>{if(!x)return null;try{let e=new URL(x);if("http:"===e.protocol||"https:"===e.protocol)return x}catch{}return window.localStorage.removeItem(C),null})()??null;console.log=function(){};let S=()=>{if(E)return E;let e=window.location;return e?.origin??""};function k(e){(!e||function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))&&(e?window.localStorage.setItem(C,e):window.localStorage.removeItem(C),E=e??null)}let j="POST",O="DELETE",T=0,F=async e=>{let t=Date.now();if(t-T>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){v.default.info("UI Session Expired. Logging out."),T=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}T=t}else console.log("Error suppressed to prevent spam:",e)},_=async()=>{let e=E?`${E}/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()},I=async()=>{let e=E?`${E}/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()},P="Authorization";function N(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),P=e}function R(){return P}let M=async(e,t)=>{let r=E?`${E}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},B=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)=>{if(window.localStorage.getItem(C))return;let r=window.location,o=r?.origin??null,n=t||o;if(console.log("proxyBaseUrl:",E),console.log("serverRootPath:",e),!n)return console.log("Updated proxyBaseUrl:",E=E??null);e.length>0&&!n.endsWith(e)&&"/"!=e&&(n+=e),console.log("Updated proxyBaseUrl:",E=n)})(t.server_root_path,t.proxy_base_url),t},A=async()=>{let e=E?`${E}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},z=async()=>{let e=E?`${E}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},L=async()=>{try{let e=E?`${E}/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}},H=async e=>{try{let t=E?`${E}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to reload model cost map:",e),e}},D=async(e,t)=>{try{let r=E?`${E}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await o.json();return console.log(`Schedule model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},V=async e=>{try{let t=E?`${E}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await r.json();return console.log(`Cancel model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},W=async e=>{try{let t=E?`${E}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let o=await r.json();return console.log("Model cost map source info:",o),o}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},G=async e=>{try{let t=E?`${E}/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:{[P]:`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 o=await r.json();return console.log("Model cost map reload status:",o),o}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},U=async(e,r)=>{try{let o=E?`${E}/model/new`:"/model/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),t.default.destroy(),v.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=E?`${E}/model/delete`:"/model/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=E?`${E}/budget/delete`:"/budget/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/new`:"/budget/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},X=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=E?`${E}/budget/update`:"/budget/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Y=async(e,t)=>{try{let r=E?`${E}/invitation/new`:"/invitation/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},Z=async e=>{try{let t=E?`${E}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Q=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)),m))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=E?`${E}/key/service-account/generate`:"/key/service-account/generate",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ee=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)),m))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 o=E?`${E}/key/generate`:"/key/generate",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t,r,o,n,a)=>{let i=E?`${E}/key/generate`:"/key/generate",l={agent_id:t,key_alias:r,models:o.length>0?o:[]};a&&(l.team_id=a),n&&Object.keys(n).length>0&&(l.metadata=n);let s=await fetch(i,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw F(await s.text()),Error("Failed to create key for agent");return s.json()},er=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 o=E?`${E}/user/new`:"/user/new",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},eo=async(e,t)=>{try{let r=E?`${E}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},en=async(e,t)=>{try{let r=E?`${E}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete user(s):",e),e}},ea=async(e,t)=>{try{let r=E?`${E}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},ei=async(e,t=null,r=null,o=null,n=null,a=null,i=null,l=null,s=null,c=null,u=null)=>{try{let d=E?`${E}/user/list`:"/user/list";console.log("in userListCall");let f=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");f.append("user_ids",e)}r&&f.append("page",r.toString()),o&&f.append("page_size",o.toString()),n&&f.append("user_email",n),a&&f.append("role",a),i&&f.append("team",i),l&&f.append("sso_user_ids",l),s&&f.append("sort_by",s),c&&f.append("sort_order",c),u&&u.length>0&&f.append("organization_ids",u.join(","));let p=f.toString();p&&(d+=`?${p}`);let m=await fetch(d,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!m.ok){let e=await m.json(),t=oF(e);throw F(t),Error(t)}let h=await m.json();return console.log("/user/list API Response:",h),h}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t)=>{try{let r=E?`${E}/v2/user/info`:"/v2/user/info";t&&(r+=`?user_id=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch user info v2:",e),e}},es=async(e,t,r,o=!1,n,a,i=!1)=>{console.log(`userInfoCall: ${t}, ${r}, ${o}, ${n}, ${a}, ${i}`);try{let l;if(o){l=E?`${E}/user/list`:"/user/list";let e=new URLSearchParams;null!=n&&e.append("page",n.toString()),null!=a&&e.append("page_size",a.toString()),l+=`?${e.toString()}`}else l=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ec=async(e,t)=>{try{let r=E?`${E}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eu=async(e,t,r=null,o=null,n=null,a=1,i=10,l=null,s=null)=>{try{let a=E?`${E}/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()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ed=async(e,t,r=null,o=null,n=null)=>{try{let a=E?`${E}/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()),o&&i.append("team_id",o.toString()),n&&i.append("team_alias",n.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(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}},ef=async e=>{try{let t=E?`${E}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("/team/available_teams API Response:",o),o}catch(e){throw e}},ep=async(e,t=null,r=null)=>{try{let o=E?`${E}/organization/list`:"/organization/list",n=new URLSearchParams;t&&n.append("org_id",t.toString()),r&&n.append("org_alias",r.toString());let a=n.toString();a&&(o+=`?${a}`);let i=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{let r=E?`${E}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eh=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=E?`${E}/organization/new`:"/organization/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eg=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=E?`${E}/organization/update`:"/organization/update",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ev=async(e,t)=>{try{let r=E?`${E}/organization/delete`:"/organization/delete",o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!o.ok){let e=await o.text();throw F(e),Error(`Error deleting organization: ${e}`)}return await o.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},ey=async(e,t)=>{try{let r=E?`${E}/utils/transform_request`:"/utils/transform_request",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eb=async({accessToken:e,endpoint:t,startTime:r,endTime:o,page:n=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=E?`${E}${i}`:i,(s=new URLSearchParams).append("start_date",y(r)),s.append("end_date",y(o)),s.append("page_size","1000"),s.append("page",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=oF(e);throw F(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},ew=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{user_id:n}}),e$=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{tags:n}}),eC=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{team_ids:n,exclude_team_ids:"litellm-dashboard"}}),ex=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{organization_ids:n}}),eE=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{end_user_ids:n}}),eS=async(e,t,r,o=1,n=null)=>eb({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:o,extraQueryParams:{agent_ids:n}}),ek=async e=>{try{let t=E?`${E}/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=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ej=async(e,t,r,o)=>{let n=E?`${E}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:o})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},eO=async(e,t,r)=>{try{let o=E?`${E}/key/${t}/regenerate`:`/key/${t}/regenerate`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},eT=!1,eF=null,e_=async(e,t,r,o=1,n=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,o,n,a,i,l,s,c);let u=E?`${E}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",o.toString()),d.append("size",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${eT}`,eT||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),v.default.info(e),eT=!0,eF&&clearTimeout(eF),eF=setTimeout(()=>{eT=!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}},eI=async(e,t)=>{try{let r=E?`${E}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("modelInfoV1Call:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eP=async()=>{let e=E?`${E}/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}`),[])},eN=async()=>{let e=E?`${E}/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}`),[])},eR=async()=>{let e=E?`${E}/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}`),[])},eM=async e=>{try{let t=E?`${E}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("modelHubCall:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},eB=async e=>{try{let t=E?`${E}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("getAllowedIPs:",o),o.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eA=async(e,t)=>{try{let r=E?`${E}/add/allowed_ip`:"/add/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("addAllowedIP:",n),n}catch(e){throw console.error("Failed to add allowed IP:",e),e}},ez=async(e,t)=>{try{let r=E?`${E}/delete/allowed_ip`:"/delete/allowed_ip",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("deleteAllowedIP:",n),n}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eL=async(e,t)=>{try{let r=E?`${E}/model_hub/update_useful_links`:"/model_hub/update_useful_links",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create key:",e),e}},eH=async(e,t,r,o=!1,n=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",P);try{let t=E?`${E}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===o&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),n&&r.append("team_id",n.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eD=async e=>{try{let t=E?`${E}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eV=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/tags`:"/global/spend/tags";t&&r&&(n=`${n}?start_date=${t}&end_date=${r}`),o&&(n+=`&tags=${o.join(",")}`),console.log("in tagsSpendLogsCall:",n);let a=await fetch(`${n}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eG=async e=>{try{let t=E?`${E}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to fetch end users:",e),e}},eU=async(e,t)=>{try{let r=E?`${E}/user/filter/ui`:"/user/filter/ui",o=new URLSearchParams;t.get("user_email")&&o.append("user_email",t.get("user_email")),t.get("user_id")&&o.append("user_id",t.get("user_id")),t.get("team_id")&&o.append("team_id",t.get("team_id"));let n=o.toString(),a=n?`${r}?${n}`:r,i=await fetch(a,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:o=1,page_size:n=50,params:a={}})=>{try{let i=E?`${E}/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",o.toString()),l.append("page_size",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=oF(e);throw F(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=E?`${E}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=E?`${E}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,o)=>{try{let n=E?`${E}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:o}):JSON.stringify({startTime:r,endTime:o});let i={method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(n,i);if(!l.ok){let e=await l.json(),t=oF(e);throw F(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,o)=>{try{let n=E?`${E}/global/spend/provider`:"/global/spend/provider";r&&o&&(n+=`?start_date=${r}&end_date=${o}`),t&&(n+=`&api_key=${t}`);let a={method:"GET",headers:{[P]:`Bearer ${e}`}},i=await fetch(n,a);if(!i.ok){let e=await i.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity`:"/global/activity";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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 o=E?`${E}/global/activity/model`:"/global/activity/model";t&&r&&(o+=`?start_date=${t}&end_date=${r}`);let n={method:"GET",headers:{[P]:`Bearer ${e}`}},a=await fetch(o,n);if(!a.ok){let e=await a.json(),t=oF(e);throw F(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=>{try{let t=E?`${E}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e2=async(e,t)=>{try{let r=E?`${E}/v2/key/info`:"/v2/key/info",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!o.ok){let e=await o.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw F(e),Error("Network response was not ok")}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e4=async(e,t,r,o)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let n=E?`${E}/health/test_connection`:"/health/test_connection",a=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:o})}),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}},e6=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=E?`${E}/key/info`:"/key/info";r=`${r}?key=${t}`;let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",o),!o.ok){let e=await o.text();F(e),v.default.fromBackend("Failed to fetch key info - "+e)}let n=await o.json();return console.log("data",n),n}catch(e){throw console.error("Failed to fetch key info:",e),e}},e3=async(e,t,r,o,n,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=E?`${E}/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()),o&&p.append("key_alias",o),a&&p.append("key_hash",a),n&&p.append("user_id",n.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=oF(e);throw F(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}},e7=async(e,t=1,r=50,o,n)=>{try{let a=new URLSearchParams(Object.entries({page:String(t),size:String(r),...o?{search:o}:{},...n?{team_id:n}:{}})),i=E?`${E}/key/aliases`:"/key/aliases";i=`${i}?${a}`;let l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}let s=await l.json();return console.log("/key/aliases API Response:",s),s}catch(e){throw console.error("Failed to fetch key aliases:",e),e}},e5=async(e,t,r,o=null)=>{try{let n=E?`${E}/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"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),o&&a.append("user_id",o);let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},e9=async e=>{try{let t=E?`${E}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("response from user/available_role",o),o}catch(e){throw e}},e8=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=E?`${E}/team/new`:"/team/new",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},te=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=E?`${E}/credentials`:"/credentials",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=E?`${E}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("/credentials API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tr=async(e,t,r)=>{try{let o=E?`${E}/credentials`:"/credentials";t?o+=`/by_name/${t}`:r&&(o+=`/by_model/${r}`),console.log("in credentialListCall");let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},to=async(e,t)=>{try{let r=E?`${E}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log(n),n}catch(e){throw console.error("Failed to delete key:",e),e}},tn=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 o=E?`${E}/credentials/${t}`:`/credentials/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},ta=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=E?`${E}/key/update`:"/key/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let n=await o.json();return console.log("Update key Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=E?`${E}/team/update`:"/team/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),console.error("Error response from the server:",e),v.default.fromBackend("Failed to update team settings: "+e),Error(e)}let n=await o.json();return console.log("Update Team Response:",n),n}catch(e){throw console.error("Failed to update team:",e),e}},tl=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let o=E?`${E}/model/${r}/update`:`/model/${r}/update`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await n.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},ts=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_add`:"/team/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!n.ok){let e=await n.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",o=Error(r);throw o.raw=t,o}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t,r,o,n)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:o});let a=E?`${E}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};n?i.all_users=!0:i.members=r,null!=o&&(i.max_budget_in_team=o);let l=await fetch(a,{method:"POST",headers:{[P]:`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",o=Error(r);throw o.raw=t,o}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}},tu=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 o=E?`${E}/team/member_update`:"/team/member_update",n={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(n.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(n.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(n.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(n.rpm_limit=r.rpm_limit),console.log("Final request body:",n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(n)});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",o=Error(r);throw o.raw=t,o}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},td=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/team/member_delete`:"/team/member_delete",n=await fetch(o,{method:"POST",headers:{[P]:`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(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let o=E?`${E}/organization/member_add`:"/organization/member_add",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!n.ok){let e=await n.text();throw F(e),console.error("Error response from the server:",e),Error(e)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let o=E?`${E}/organization/member_delete`:"/organization/member_delete",n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},tm=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let o=E?`${E}/organization/member_update`:"/organization/member_update",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let o=E?`${E}/user/update`:"/user/update",n={...t};null!==r&&(n.user_role=r),n=JSON.stringify(n);let a=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!a.ok){let e=await a.json(),t=oF(e);throw F(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}},tg=async(e,t,r,o=!1)=>{try{let n;console.log("Form Values in userUpdateUserCall:",t);let a=E?`${E}/user/bulk_update`:"/user/bulk_update";if(o)n=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let o of r)e.push({user_id:o,...t});n=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:n});if(!i.ok){let e=await i.json(),t=oF(e);throw F(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}},tv=async(e,t)=>{try{let r=E?`${E}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}return await o.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},ty=async e=>{try{let t=E?`${E}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tb=async(e,t,r)=>{try{let t=E?`${E}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tw=async e=>{try{let t=E?`${E}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t$=async e=>{try{let t=E?`${E}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tC=async e=>{try{let t=E?`${E}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tx=async(e,t)=>{try{let r=E?`${E}/cache/settings/test`:"/cache/settings/test",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tE=async(e,t)=>{try{let r=E?`${E}/cache/settings`:"/cache/settings",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tS=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tk=async(e,t)=>{try{let r=E?`${E}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tj=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tO=async(e,t,r)=>{try{let o=E?`${E}/config/field/update`:"/config/field/update",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return v.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tT=async(e,t)=>{try{let r=E?`${E}/config/field/delete`:"/config/field/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return v.default.success("Field reset on proxy"),n}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async(e,t)=>{try{let r=E?`${E}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async(e,t)=>{try{let r=E?`${E}/config/update`:"/config/update",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tI=async(e,t)=>{try{let r=E?`${E}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tP=async e=>{try{let t=E?`${E}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tN=async e=>{try{let t=E?`${E}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tR=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",E);let t=E?`${E}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async e=>{try{let t=E?`${E}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(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}},tB=async e=>{try{let t=E?`${E}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tA=async(e,t)=>{try{let r=E?`${E}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tz=async(e,t,r)=>{try{let o=E?`${E}/v1/responses`:"/v1/responses",n=await fetch(o,{method:"POST",headers:{[P]:`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=n.headers.get("x-litellm-semantic-filter"),i=n.headers.get("x-litellm-semantic-filter-tools");if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return{data:await n.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},tL=async e=>{try{let t=E?`${E}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`v2 guardrails/list returned ${r.status}`);return await r.json()}catch(t){console.log("v2/guardrails/list failed, falling back to v1:",t);try{let t=E?`${E}/guardrails/list`:"/guardrails/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}}},tH=async(e,t)=>{let r=E?`${E}/guardrails/submissions`:"/guardrails/submissions",o=new URLSearchParams;t?.status&&o.set("status",t.status),t?.team_id&&o.set("team_id",t.team_id),t?.team_guardrail!==void 0&&o.set("team_guardrail",String(t.team_guardrail)),t?.search&&o.set("search",t.search);let n=o.toString()?`${r}?${o.toString()}`:r,a=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=oF(await a.json().catch(()=>({})));throw F(e),Error(e)}return a.json()},tD=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/approve`:`/guardrails/submissions/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oF(await o.json().catch(()=>({})));throw F(e),Error(e)}return o.json()},tV=async(e,t)=>{let r=E?`${E}/guardrails/submissions/${encodeURIComponent(t)}/reject`:`/guardrails/submissions/${encodeURIComponent(t)}/reject`,o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=oF(await o.json().catch(()=>({})));throw F(e),Error(e)}return o.json()},tW=async(e,t,r)=>{try{let o=E?`${E}/guardrails/usage/overview`:"/guardrails/usage/overview",n=new URLSearchParams;t&&n.append("start_date",t),r&&n.append("end_date",r),n.toString()&&(o+=`?${n.toString()}`);let a=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(oF(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},tG=async(e,t,r,o)=>{try{let n=E?`${E}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),o&&a.append("end_date",o),a.toString()&&(n+=`?${a.toString()}`);let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(oF(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},tU=async(e,t)=>{try{let r=E?`${E}/guardrails/usage/logs`:"/guardrails/usage/logs",o=new URLSearchParams;t.guardrailId&&o.append("guardrail_id",t.guardrailId),t.policyId&&o.append("policy_id",t.policyId),null!=t.page&&o.append("page",String(t.page)),null!=t.pageSize&&o.append("page_size",String(t.pageSize)),t.action&&o.append("action",t.action),t.startDate&&o.append("start_date",t.startDate),t.endDate&&o.append("end_date",t.endDate),o.toString()&&(r+=`?${o.toString()}`);let n=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json();throw Error(oF(e))}return n.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},tq=async e=>{try{let t=E?`${E}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},tJ=async(e,t,r)=>{try{let o=E?`${E}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",n=await fetch(o,{method:"POST",signal:r,headers:{[P]:`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(!n.ok){let e=await n.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 F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},tK=async(e,t)=>{try{let r=E?`${E}/policy/info/${t}`:`/policy/info/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},tX=async e=>{try{let t=E?`${E}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},tY=async(e,t,r,o,n)=>{try{let a=E?`${E}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};o&&(i.model=o),n&&(i.competitors=n);let l=await fetch(a,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},tZ=async(e,t,r,o)=>{try{let n=E?`${E}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:o})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},tQ=async(e,t,r)=>{try{let o=E?`${E}/policy/templates/test`:"/policy/templates/test",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},t0=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:o};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=oF(await d.json());throw F(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?n(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},t1=async(e,t,r,o,n,a,i,l,s)=>{let c=E?`${E}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=oF(await u.json());throw F(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?o(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?n():"error"===t.type&&a?.(t.message)}catch{}}},t2=async(e,t)=>{try{let r=E?`${E}/policies`:"/policies",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy:",e),e}},t4=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}`:`/policies/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy:",e),e}},t6=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},t3=async(e,t,r)=>{try{let o=encodeURIComponent(t),n=E?`${E}/policies/name/${o}/versions`:`/policies/name/${o}/versions`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=oF(e);throw F(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},t7=async(e,t,r)=>{try{let o=E?`${E}/policies/${t}/status`:`/policies/${t}/status`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},t5=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},t9=async(e,t)=>{try{let r=E?`${E}/policies/${t}`:`/policies/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},t8=async e=>{try{let t=E?`${E}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},re=async(e,t)=>{try{let r=E?`${E}/policies/attachments`:"/policies/attachments",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rt=async(e,t)=>{try{let r=E?`${E}/policies/attachments/${t}`:`/policies/attachments/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rr=async(e,t,r)=>{try{let o=E?`${E}/policies/test-pipeline`:"/policies/test-pipeline",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},ro=async(e,t)=>{try{let r=E?`${E}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rn=async(e,t)=>{try{let r=E?`${E}/policies/resolve`:"/policies/resolve",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},ra=async(e,t)=>{try{let r=E?`${E}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ri=async(e,t)=>{try{let r=E?`${E}/prompts/list`:"/prompts/list";t&&(r+=`?environment=${encodeURIComponent(t)}`);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rl=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}/info`:`/prompts/${t}/info`;r&&(o+=`?environment=${encodeURIComponent(r)}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rs=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}/versions`:`/prompts/${t}/versions`;r&&(o+=`?environment=${encodeURIComponent(r)}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw 404!==n.status&&F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},rc=async(e,t)=>{try{let r=E?`${E}/prompts`:"/prompts",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},ru=async(e,t,r)=>{try{let o=E?`${E}/prompts/${t}`:`/prompts/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rd=async(e,t)=>{try{let r=E?`${E}/prompts/${t}`:`/prompts/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rf=async(e,t)=>{try{let r=new FormData;r.append("file",t);let o=E?`${E}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`},body:r});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rp=async(e,t)=>{try{let r=E?`${E}/v1/agents`:"/v1/agents",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Create agent response:",n),n}catch(e){throw console.error("Failed to create agent:",e),e}},rm=async(e,t)=>{try{let r=E?`${E}/guardrails`:"/guardrails",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Create guardrail response:",n),n}catch(e){throw console.error("Failed to create guardrail:",e),e}},rh=async(e,t,r)=>{try{let o=E?`${E}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",o);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rg=async e=>{try{let t=E?`${E}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched SSO settings:",o),o}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rv=async(e,t)=>{try{let r=E?`${E}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Updated internal user settings:",n),v.default.success("Internal user settings updated successfully"),n}catch(e){throw console.error("Failed to update internal user settings:",e),e}},ry=async e=>{try{let t=E?`${E}/v1/mcp/openapi-registry`:"/v1/mcp/openapi-registry",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json();throw Error(oF(e))}return await r.json()}catch(e){throw console.error("Failed to fetch OpenAPI registry:",e),e}},rb=async e=>{try{let t=E?`${E}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rw=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server";if(t){let e=new URLSearchParams;e.append("team_id",t),r=`${r}?${e.toString()}`}console.log("Fetching MCP servers from:",r);let o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},r$=async(e,t)=>{try{let r=E?`${E}/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 o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Fetched MCP server health:",n),n}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rC=async e=>{try{let t=E?`${E}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched MCP access groups:",o),o.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rx=async e=>{try{let t=E?`${E}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rE=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},rS=async(e,t)=>{try{let r=E?`${E}/v1/mcp/server`:"/v1/mcp/server",o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rk=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rj=async(e,t)=>{try{let r=(E?`${E}`:"")+"/v1/mcp/server/register",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to register MCP server:",e),e}},rO=async e=>{try{let t=(E?`${E}`:"")+"/v1/mcp/server/submissions",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return r.json()}catch(e){throw console.error("Failed to fetch MCP submissions:",e),e}},rT=async(e,t)=>{try{let r=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/approve`,o=await fetch(r,{method:"PUT",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to approve MCP server:",e),e}},rF=async(e,t,r)=>{try{let o=(E?`${E}`:"")+`/v1/mcp/server/${encodeURIComponent(t)}/reject`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({review_notes:r??null})});if(!n.ok){let e=await n.json().catch(()=>({})),t=oF(e);throw F(t),Error(t)}return n.json()}catch(e){throw console.error("Failed to reject MCP server:",e),e}},r_=async e=>{try{let t=E?`${E}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched search tools:",o),o}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rI=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=E?`${E}/search_tools`:"/search_tools",o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Created search tool:",n),n}catch(e){throw console.error("Failed to create search tool:",e),e}},rP=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let o=E?`${E}/search_tools/${t}`:`/search_tools/${t}`,n=await fetch(o,{method:"PUT",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rN=async(e,t)=>{try{let r=(E?`${E}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let o=await fetch(r,{method:O,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Deleted search tool:",n),n}catch(e){throw console.error("Failed to delete search tool:",e),e}},rR=async e=>{try{let t=E?`${E}/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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched available search providers:",o),o}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rM=async(e,t)=>{try{let r=E?`${E}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let o=await fetch(r,{method:j,headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Test connection response:",n),n}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rB=async(e,t,r)=>{try{let o=E?`${E}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",o);let n={[P]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(o,{method:"GET",headers:n}),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}}},rA=async(e,t,r,o,n)=>{try{let a=E?`${E}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",o,"for server:",t);let i={[P]:`Bearer ${e}`,"Content-Type":"application/json",...n?.customHeaders||{}},l={server_id:t,name:r,arguments:o};n?.guardrails&&n.guardrails.length>0&&(l.litellm_metadata={guardrails:n.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 o=JSON.parse(r);o.detail?"string"==typeof o.detail?e=o.detail:"object"==typeof o.detail&&(e=o.detail.message||o.detail.error||"An error occurred",t=o.detail):e=o.message||o.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let o=Error(e);throw o.status=s.status,o.statusText=s.statusText,o.details=t,F(e),o}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}},rz=async(e,t)=>{try{let r=E?`${E}/tag/new`:"/tag/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error creating tag:",e),e}},rL=async(e,t)=>{try{let r=E?`${E}/tag/update`:"/tag/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error updating tag:",e),e}},rH=async(e,t)=>{try{let r=E?`${E}/tag/info`:"/tag/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!o.ok){let e=await o.text();return await F(e),{}}return await o.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rD=async e=>{try{let t=E?`${E}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await F(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rV=async(e,t)=>{try{let r=E?`${E}/tag/delete`:"/tag/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!o.ok){let e=await o.text();await F(e);return}return await o.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rW=async e=>{try{let t=E?`${E}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched default team settings:",o),o}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},rG=async(e,t)=>{try{let r=E?`${E}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}let n=await o.json();return console.log("Updated default team settings:",n),n}catch(e){throw console.error("Failed to update default team settings:",e),e}},rU=async(e,t)=>{try{let r=E?`${E}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,o=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json(),t=oF(e);return console.error("Available permissions fetch failed:",t),{all_available_permissions:[],team_member_permissions:[]}}return await o.json()}catch(e){throw console.error("Failed to get team permissions:",e),e}},rq=async(e,t,r)=>{try{let o=E?`${E}/team/permissions_update`:"/team/permissions_update",n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},rJ=async(e,t)=>{try{let r=E?`${E}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},rK=async(e,t)=>{try{let r=E?`${E}/vector_store/new`:"/vector_store/new",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to create vector store")}return await o.json()}catch(e){throw console.error("Error creating vector store:",e),e}},rX=async(e,t=1,r=100)=>{try{let t=E?`${E}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[P]:`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}},rY=async(e,t)=>{try{let r=E?`${E}/vector_store/delete`:"/vector_store/delete",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to delete vector store")}return await o.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},rZ=async(e,t)=>{try{let r=E?`${E}/vector_store/info`:"/vector_store/info",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to get vector store info")}return await o.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},rQ=async(e,t)=>{try{let r=E?`${E}/vector_store/update`:"/vector_store/update",o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[P]:`Bearer ${e}`},body:JSON.stringify(t)});if(!o.ok){let e=await o.json();throw Error(e.detail||"Failed to update vector store")}return await o.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r0=async(e,t,r,o,n,a,i)=>{try{let l=E?`${E}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...o&&{vector_store_id:o},...i&&i}}};(n||a)&&(c.ingest_options.litellm_vector_store_params={},n&&(c.ingest_options.litellm_vector_store_params.vector_store_name=n),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:{[P]:`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}},r1=async e=>{try{let t=E?`${E}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get email event settings")}let o=await r.json();return console.log("Email event settings response:",o),o}catch(e){throw console.error("Failed to get email event settings:",e),e}},r2=async(e,t)=>{try{let r=E?`${E}/email/event_settings`:"/email/event_settings",o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to update email event settings")}let n=await o.json();return console.log("Update email event settings response:",n),n}catch(e){throw console.error("Failed to update email event settings:",e),e}},r4=async e=>{try{let t=E?`${E}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to reset email event settings")}let o=await r.json();return console.log("Reset email event settings response:",o),o}catch(e){throw console.error("Failed to reset email event settings:",e),e}},r6=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Delete agent response:",n),n}catch(e){throw console.error("Failed to delete agent:",e),e}},r3=async(e,t)=>{try{let r=E?`${E}/v1/agents/make_public`:"/v1/agents/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r7=async(e,t)=>{try{let r=E?`${E}/v1/mcp/make_public`:"/v1/mcp/make_public",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Make agents public response:",n),n}catch(e){throw console.error("Failed to make agents public:",e),e}},r5=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error(e)}let n=await o.json();return console.log("Delete guardrail response:",n),n}catch(e){throw console.error("Failed to delete guardrail:",e),e}},r9=async e=>{try{let t=E?`${E}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get guardrail UI settings")}let o=await r.json();return console.log("Guardrail UI settings response:",o),o}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},r8=async e=>{try{let t=E?`${E}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw F(e),Error("Failed to get guardrail provider specific parameters")}let o=await r.json();return console.log("Guardrail provider specific params response:",o),o}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},oe=async(e,t)=>{try{let r=encodeURIComponent(t),o=E?`${E}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${o}`);let n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw console.error(`Failed to get category YAML. Status: ${n.status}, Error:`,e),F(e),Error(`Failed to get category YAML: ${n.status} ${e}`)}let a=await n.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},ot=async e=>{try{let t=E?`${E}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[P]:`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),F(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}},or=async(e,t=!1)=>{try{let r=t?"?health_check=true":"",o=E?`${E}/v1/agents${r}`:`/v1/agents${r}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to get agents list")}let a=await n.json();return console.log("Agents list response:",a),{agents:a}}catch(e){throw console.error("Failed to get agents list:",e),e}},oo=async(e,t)=>{try{let r=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to get agent info")}let n=await o.json();return console.log("Agent info response:",n),n}catch(e){throw console.error("Failed to get agent info:",e),e}},on=async(e,t)=>{try{let r=E?`${E}/guardrails/${t}/info`:`/guardrails/${t}/info`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to get guardrail info")}let n=await o.json();return console.log("Guardrail info response:",n),n}catch(e){throw console.error("Failed to get guardrail info:",e),e}},oa=async(e,t,r)=>{try{let o=E?`${E}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to patch agent")}let a=await n.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},oi=async(e,t,r)=>{try{let o=E?`${E}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.text();throw F(e),Error("Failed to update guardrail")}let a=await n.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ol=async(e,t,r,o,n)=>{try{let a=E?`${E}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};o&&(i.language=o),n&&n.length>0&&(i.entities=n);let l=await fetch(a,{method:"POST",headers:{[P]:`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 F(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}},os=async(e,t)=>{try{let r=E?`${E}/guardrails/test_custom_code`:"/guardrails/test_custom_code",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.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 F(e),Error(t)}let n=await o.json();return console.log("Test custom code guardrail response:",n),n}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},oc=async(e,t)=>{try{let r=E?`${E}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!o.ok){let e=await o.text();throw F(e),Error("Failed to validate blocked words file")}let n=await o.json();return console.log("Validate blocked words file response:",n),n}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},ou=async e=>{try{let t=E?`${E}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}let o=await r.json();return console.log("Fetched SSO configuration:",o),o}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},od=async(e,t)=>{try{let r=E?`${E}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let o=await fetch(r,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:oF(e);F(r);let n=Error(r);throw e?.detail!==void 0&&(n.detail=e.detail),n.rawError=e,n}let n=await o.json();return console.log("Updated SSO configuration:",n),n}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},of=async({accessToken:e,page:t=1,page_size:r=50,params:o={}})=>{try{let n=E?`${E}/audit`:"/audit",a=new URLSearchParams;for(let[e,n]of(a.append("page",t.toString()),a.append("page_size",r.toString()),Object.entries(o)))null!=n&&""!==n&&a.append(e,String(n));n+=`?${a.toString()}`;let i=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=oF(e);throw F(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},op=async e=>{try{let t=E?`${E}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw F(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},om=async e=>{try{let t=E?`${E}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw F(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},oh=async(e,t,r)=>{try{let o=E?`${E}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json(),t=oF(e);throw F(t),Error(t)}let a=await n.json();return v.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},og=async(e,t)=>{try{let r=E?`${E}/config/callback/delete`:"/config/callback/delete",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!o.ok){let e=await o.json(),t=oF(e);throw F(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},ov=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let o=E?`${E}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",n={"Content-Type":"application/json"};e&&(n["x-litellm-api-key"]=e),r?n.Authorization=`Bearer ${r}`:e&&(n[P]=`Bearer ${e}`);let a=await fetch(o,{method:"POST",headers:n,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}},oy=async(e,t)=>{let r=E?`${E}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await o.json();if(!o.ok)throw Error(oF(n)||n?.error||"Failed to cache MCP server");return n},ob=async(e,t,r)=>{let o=S(),n=encodeURIComponent(t.trim()),a=`${o}/v1/mcp/server/oauth/${n}/register`,i=await fetch(a,{method:"POST",headers:{[P]:`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(oF(l)||l?.detail||"Failed to register OAuth client");return l},ow=({serverId:e,clientId:t,redirectUri:r,state:o,codeChallenge:n,scope:a})=>{let i=S(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:o,response_type:"code",code_challenge:n,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()}`},o$=async({serverId:e,code:t,clientId:r,clientSecret:o,codeVerifier:n,redirectUri:a})=>{let i=S(),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),o&&o.trim().length>0&&c.set("client_secret",o),c.set("code_verifier",n),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(oF(d)||d?.detail||"OAuth token exchange failed");return d},oC=async(e,t,r)=>{try{let o=`${S()}/v1/vector_stores/${t}/search`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!n.ok){let e=await n.text();return await F(e),null}return await n.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},ox=async(e,t,r,o)=>{try{let n=`${S()}/v1/search/${t}`,a=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:o||5})});if(!a.ok){let e=await a.text();return await F(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},oE=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},oS=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},ok=async(e,t,r,o)=>{try{let n,a,i,l=E?`${E}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(n=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${n}-${a}-${i}`)),o&&o.length>0?o.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:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=oF(e);throw F(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},oj=async e=>{try{let t=E?`${E}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=oF(e);throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},oO=async(e,t,r,o)=>{try{let n=E?`${E}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`};a.append("start_date",i(t)),a.append("end_date",i(r)),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(n+=`?${l}`);let s=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=oF(e);throw F(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},oT=async(e,t=1,r=50,o)=>{try{let n=E?`${E}/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()),o&&o.length>0&&o.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(n+=`?${i}`);let l=await fetch(n,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=oF(e);throw F(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},oF=e=>{let t=e?.detail,r=Array.isArray(t)?t.map(e=>e?.msg||JSON.stringify(e)).join("; "):"string"==typeof t?t:void 0;return e?.error&&(e.error.message||("string"==typeof e.error?e.error:void 0))||e?.message||r||JSON.stringify(e)},o_=async(e,t,r)=>{let o=S(),n=r?"/v3/login":"/v2/login",a=o?`${o}${n}`:n,i=JSON.stringify({username:e,password:t}),l=await fetch(a,{method:"POST",body:i,credentials:"include",headers:{"Content-Type":"application/json"}});if(!l.ok)throw Error(oF(await l.json()));let s=await l.json();if(r&&s.code){let e=o?`${o}/v3/login/exchange`:"/v3/login/exchange",t=await fetch(e,{method:"POST",body:JSON.stringify({code:s.code}),credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error(oF(await t.json()));let r=await t.json();return r.token&&(document.cookie=`token=${r.token}; path=/; SameSite=Lax`),r}return s.token&&(document.cookie=`token=${s.token}; path=/; SameSite=Lax`),s},oI=async(e,t)=>{let r=t||S(),o=await fetch(`${r}/v3/login/exchange`,{method:"POST",body:JSON.stringify({code:e}),headers:{"Content-Type":"application/json"}});if(!o.ok)throw Error(oF(await o.json()));let n=await o.json();return n.token&&(document.cookie=`token=${n.token}; path=/; SameSite=Lax`),n.token},oP=async()=>{let e=S(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(oF(await r.json()));return await r.json()},oN=async(e,t)=>{let r=S(),o=r?`${r}/update/ui_settings`:"/update/ui_settings",n=await fetch(o,{method:"PATCH",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(oF(await n.json()));return await n.json()},oR=async()=>{try{let e=S(),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=oF(JSON.parse(e));throw F(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},oM=async(e,t=!1)=>{try{let r=S(),o=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},oB=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},oA=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins`:"/claude-code/plugins",n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},oz=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},oL=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},oH=async(e,t)=>{try{let r=S(),o=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,n=await fetch(o,{method:"DELETE",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text(),t=oF(JSON.parse(e));throw F(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},oD=async(e,t)=>{let r=E?`${E}/compliance/eu-ai-act`:"/compliance/eu-ai-act",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oV=async(e,t)=>{let r=E?`${E}/compliance/gdpr`:"/compliance/gdpr",o=await fetch(r,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(await o.text());return o.json()},oW=async e=>{let t=E?`${E}/v1/tool/policy/options`:"/v1/tool/policy/options",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return r.json()},oG=async e=>{let t=E?`${E}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},oU=async(e,t,r)=>{let o=encodeURIComponent(t),n=E?`${E}/v1/tool/${o}/logs`:`/v1/tool/${o}/logs`,a=new URLSearchParams;null!=r.page&&a.append("page",String(r.page)),null!=r.pageSize&&a.append("page_size",String(r.pageSize)),r.startDate&&a.append("start_date",r.startDate),r.endDate&&a.append("end_date",r.endDate);let i=a.toString()?`${n}?${a.toString()}`:n,l=await fetch(i,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok)throw Error(oF(await l.json().catch(()=>({}))));return l.json()},oq=async(e,t)=>{let r=encodeURIComponent(t),o=E?`${E}/v1/tool/${r}/detail`:`/v1/tool/${r}/detail`,n=await fetch(o,{method:"GET",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok)throw Error(await n.text());return n.json()},oJ=async(e,t,r,o)=>{let n=E?`${E}/v1/tool/policy`:"/v1/tool/policy",a={tool_name:t};null!=r.input_policy&&(a.input_policy=r.input_policy),null!=r.output_policy&&(a.output_policy=r.output_policy),o?.team_id!=null&&(a.team_id=o.team_id||void 0),o?.key_hash!=null&&(a.key_hash=o.key_hash||void 0),o?.key_alias!=null&&(a.key_alias=o.key_alias||void 0);let i=await fetch(n,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw Error(await i.text());return i.json()},oK=async(e,t,r)=>{let o=encodeURIComponent(t),n=new URLSearchParams;null!=r.team_id&&""!==r.team_id&&n.set("team_id",r.team_id),null!=r.key_hash&&""!==r.key_hash&&n.set("key_hash",r.key_hash);let a=n.toString(),i=E?`${E}/v1/tool/${o}/overrides${a?`?${a}`:""}`:`/v1/tool/${o}/overrides${a?`?${a}`:""}`,l=await fetch(i,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!l.ok)throw Error(await l.text());return l.json()},oX=async(e,t,r)=>{let o=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,n=await fetch(o,{method:"POST",headers:{[P]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok){let e=await n.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to store OAuth credential")}return n.json()},oY=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential`:`/v1/mcp/server/${t}/oauth-user-credential`,o=await fetch(r,{method:"DELETE",headers:{[P]:`Bearer ${e}`}});if(!o.ok){let e=await o.json().catch(()=>({})),t=e?.detail;throw Error((Array.isArray(t)?t.map(e=>e&&"object"==typeof e?e.msg??JSON.stringify(e):String(e)).join("; "):"string"==typeof t?t:t&&"string"==typeof t.error?t.error:void 0)||"Failed to revoke OAuth credential")}return o.json()},oZ=async(e,t)=>{let r=E?`${E}/v1/mcp/server/${t}/oauth-user-credential/status`:`/v1/mcp/server/${t}/oauth-user-credential/status`,o=await fetch(r,{method:"GET",headers:{[P]:`Bearer ${e}`}});return o.ok?o.json():{server_id:t,has_credential:!1,is_expired:!1}},oQ=async e=>{let t=E?`${E}/v1/mcp/user-credentials`:"/v1/mcp/user-credentials",r=await fetch(t,{method:"GET",headers:{[P]:`Bearer ${e}`}});return r.ok?r.json():[]}}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/53a707a5829899ed.js b/litellm/proxy/_experimental/out/_next/static/chunks/7834a5efb7b5f959.js similarity index 64% rename from litellm/proxy/_experimental/out/_next/static/chunks/53a707a5829899ed.js rename to litellm/proxy/_experimental/out/_next/static/chunks/7834a5efb7b5f959.js index 3ab1ba2b42b..d2973e1ddb7 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/53a707a5829899ed.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/7834a5efb7b5f959.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94629,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,a],94629)},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),l=e.i(343794),i=e.i(242064),r=e.i(763731),n=e.i(174428);let s=80*Math.PI,o=e=>{let{dotClassName:t,style:i,hasCircleCls:r}=e;return a.createElement("circle",{className:(0,l.default)(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:40,cx:50,cy:50,strokeWidth:20,style:i})},d=({percent:e,prefixCls:t})=>{let i=`${t}-dot`,r=`${i}-holder`,d=`${r}-hidden`,[c,m]=a.useState(!1);(0,n.default)(()=>{0!==e&&m(!0)},[0!==e]);let u=Math.max(Math.min(e,100),0);if(!c)return null;let h={strokeDashoffset:`${s/4}`,strokeDasharray:`${s*u/100} ${s*(100-u)/100}`};return a.createElement("span",{className:(0,l.default)(r,`${i}-progress`,u<=0&&d)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u},a.createElement(o,{dotClassName:i,hasCircleCls:!0}),a.createElement(o,{dotClassName:i,style:h})))};function c(e){let{prefixCls:t,percent:i=0}=e,r=`${t}-dot`,n=`${r}-holder`,s=`${n}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,l.default)(n,i>0&&s)},a.createElement("span",{className:(0,l.default)(r,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(d,{prefixCls:t,percent:i}))}function m(e){var t;let{prefixCls:i,indicator:n,percent:s}=e,o=`${i}-dot`;return n&&a.isValidElement(n)?(0,r.cloneElement)(n,{className:(0,l.default)(null==(t=n.props)?void 0:t.className,o),percent:s}):a.createElement(c,{prefixCls:i,percent:s})}e.i(296059);var u=e.i(694758),h=e.i(183293),g=e.i(246422),f=e.i(838378);let p=new u.Keyframes("antSpinMove",{to:{opacity:1}}),x=new u.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),b=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=e;return{[t]:Object.assign(Object.assign({},(0,h.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:a(a(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:a(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:p,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:x,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),v=[[30,.05],[70,.03],[96,.01]];var y=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(a[l[i]]=e[l[i]]);return a};let w=e=>{var r;let{prefixCls:n,spinning:s=!0,delay:o=0,className:d,rootClassName:c,size:u="default",tip:h,wrapperClassName:g,style:f,children:p,fullscreen:x=!1,indicator:w,percent:j}=e,S=y(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:k,direction:C,className:N,style:T,indicator:E}=(0,i.useComponentConfig)("spin"),$=k("spin",n),[_,z,M]=b($),[O,D]=a.useState(()=>s&&(!s||!o||!!Number.isNaN(Number(o)))),L=function(e,t){let[l,i]=a.useState(0),r=a.useRef(null),n="auto"===t;return a.useEffect(()=>(n&&e&&(i(0),r.current=setInterval(()=>{i(e=>{let t=100-e;for(let a=0;a{r.current&&(clearInterval(r.current),r.current=null)}),[n,e]),n?l:t}(O,j);a.useEffect(()=>{if(s){let e=function(e,t,a){var l,i=a||{},r=i.noTrailing,n=void 0!==r&&r,s=i.noLeading,o=void 0!==s&&s,d=i.debounceMode,c=void 0===d?void 0:d,m=!1,u=0;function h(){l&&clearTimeout(l)}function g(){for(var a=arguments.length,i=Array(a),r=0;re?o?(u=Date.now(),n||(l=setTimeout(c?f:g,e))):g():!0!==n&&(l=setTimeout(c?f:g,void 0===c?e-d:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;h(),m=!(void 0!==t&&t)},g}(o,()=>{D(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}D(!1)},[o,s]);let I=a.useMemo(()=>void 0!==p&&!x,[p,x]),B=(0,l.default)($,N,{[`${$}-sm`]:"small"===u,[`${$}-lg`]:"large"===u,[`${$}-spinning`]:O,[`${$}-show-text`]:!!h,[`${$}-rtl`]:"rtl"===C},d,!x&&c,z,M),R=(0,l.default)(`${$}-container`,{[`${$}-blur`]:O}),A=null!=(r=null!=w?w:E)?r:t,F=Object.assign(Object.assign({},T),f),H=a.createElement("div",Object.assign({},S,{style:F,className:B,"aria-live":"polite","aria-busy":O}),a.createElement(m,{prefixCls:$,indicator:A,percent:L}),h&&(I||x)?a.createElement("div",{className:`${$}-text`},h):null);return _(I?a.createElement("div",Object.assign({},S,{className:(0,l.default)(`${$}-nested-loading`,g,z,M)}),O&&a.createElement("div",{key:"loading"},H),a.createElement("div",{className:R,key:"container"},p)):x?a.createElement("div",{className:(0,l.default)(`${$}-fullscreen`,{[`${$}-fullscreen-show`]:O},c,z,M)},H):H)};w.setDefaultIndicator=e=>{t=e},e.s(["default",0,w],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},269200,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("Table"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement("div",{className:(0,l.tremorTwMerge)(i("root"),"overflow-auto",s)},a.default.createElement("table",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),n))});r.displayName="Table",e.s(["Table",()=>r],269200)},427612,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableHead"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("thead",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",s)},o),n))});r.displayName="TableHead",e.s(["TableHead",()=>r],427612)},64848,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableHeaderCell"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("th",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",s)},o),n))});r.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>r],64848)},942232,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableBody"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("tbody",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",s)},o),n))});r.displayName="TableBody",e.s(["TableBody",()=>r],942232)},496020,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableRow"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("tr",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("row"),s)},o),n))});r.displayName="TableRow",e.s(["TableRow",()=>r],496020)},977572,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableCell"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("td",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("root"),"align-middle whitespace-nowrap text-left p-4",s)},o),n))});r.displayName="TableCell",e.s(["TableCell",()=>r],977572)},389083,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(829087),i=e.i(480731),r=e.i(95779),n=e.i(444755),s=e.i(673706);let o={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},d={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},c=(0,s.makeClassName)("Badge"),m=a.default.forwardRef((e,m)=>{let{color:u,icon:h,size:g=i.Sizes.SM,tooltip:f,className:p,children:x}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),v=h||null,{tooltipProps:y,getReferenceProps:w}=(0,l.useTooltip)();return a.default.createElement("span",Object.assign({ref:(0,s.mergeRefs)([m,y.refs.setReference]),className:(0,n.tremorTwMerge)(c("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",u?(0,n.tremorTwMerge)((0,s.getColorClassNames)(u,r.colorPalette.background).bgColor,(0,s.getColorClassNames)(u,r.colorPalette.iconText).textColor,(0,s.getColorClassNames)(u,r.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,n.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),o[g].paddingX,o[g].paddingY,o[g].fontSize,p)},w,b),a.default.createElement(l.default,Object.assign({text:f},y)),v?a.default.createElement(v,{className:(0,n.tremorTwMerge)(c("icon"),"shrink-0 -ml-1 mr-1.5",d[g].height,d[g].width)}):null,a.default.createElement("span",{className:(0,n.tremorTwMerge)(c("text"),"whitespace-nowrap")},x))});m.displayName="Badge",e.s(["Badge",()=>m],389083)},68155,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,a],68155)},360820,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,a],360820)},871943,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,a],871943)},530212,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,a],530212)},969550,e=>{"use strict";var t=e.i(843476),a=e.i(271645);let l=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var i=e.i(464571),r=e.i(311451),n=e.i(199133),s=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:d,initialValues:c={},buttonLabel:m="Filters"})=>{let[u,h]=(0,a.useState)(!1),[g,f]=(0,a.useState)(c),[p,x]=(0,a.useState)({}),[b,v]=(0,a.useState)({}),[y,w]=(0,a.useState)({}),[j,S]=(0,a.useState)({}),k=(0,a.useCallback)((0,s.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let a=await t.searchFn(e);x(e=>({...e,[t.name]:a}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),C=(0,a.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){v(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(a=>({...a,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[j]);(0,a.useEffect)(()=>{u&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&C(e)})},[u,e,C,j]);let N=(e,t)=>{let a={...g,[e]:t};f(a),o(a)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(i.Button,{icon:(0,t.jsx)(l,{className:"h-4 w-4"}),onClick:()=>h(!u),className:"flex items-center gap-2",children:m}),(0,t.jsx)(i.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),f(t),d()},children:"Reset Filters"})]}),u&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(a=>{let l,i=e.find(e=>e.label===a||e.name===a);return i?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:i.label||i.name}),i.isSearchable?(0,t.jsx)(n.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${i.label||i.name}...`,value:g[i.name]||void 0,onChange:e=>N(i.name,e),onOpenChange:e=>{e&&i.isSearchable&&!j[i.name]&&C(i)},onSearch:e=>{w(t=>({...t,[i.name]:e})),i.searchFn&&k(e,i)},filterOption:!1,loading:b[i.name],options:p[i.name]||[],allowClear:!0,notFoundContent:b[i.name]?"Loading...":"No results found"}):i.options?(0,t.jsx)(n.Select,{className:"w-full",placeholder:`Select ${i.label||i.name}...`,value:g[i.name]||void 0,onChange:e=>N(i.name,e),allowClear:!0,children:i.options.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))}):i.customComponent?(l=i.customComponent,(0,t.jsx)(l,{value:g[i.name]||void 0,onChange:e=>N(i.name,e??""),placeholder:`Select ${i.label||i.name}...`})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${i.label||i.name}...`,value:g[i.name]||"",onChange:e=>N(i.name,e.target.value),allowClear:!0})]},i.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let a=(e,t,a,l)=>{for(let i of e){let e=i?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=i?.organization_id??i?.org_id;r&&"string"==typeof r&&a.add(r.trim());let n=i?.user_id;if(n&&"string"==typeof n){let e=i?.user?.user_email||n;l.set(n,e)}}},l=async(e,l)=>{if(!e||!l)return{keyAliases:[],organizationIds:[],userIds:[]};try{let i=new Set,r=new Set,n=new Map,s=await (0,t.keyListCall)(e,null,l,null,null,null,1,100,null,null,"user",null),o=s?.keys||[],d=s?.total_pages??1;a(o,i,r,n);let c=Math.min(d,10)-1;if(c>0){let s=Array.from({length:c},(a,i)=>(0,t.keyListCall)(e,null,l,null,null,null,i+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(s)))"fulfilled"===e.status&&a(e.value?.keys||[],i,r,n)}return{keyAliases:Array.from(i).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(n.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},i=async(e,a)=>{if(!e)return[];try{let l=[],i=1,r=!0;for(;r;){let n=await (0,t.teamListCall)(e,a||null,null);l=[...l,...n],i{if(!e)return[];try{let a=[],l=1,i=!0;for(;i;){let r=await (0,t.organizationListCall)(e);a=[...a,...r],l{"use strict";var t=e.i(764205);let a=async(e,a,l,i,r)=>{let n;n="Admin"!=l&&"Admin Viewer"!=l?await (0,t.teamListCall)(e,i?.organization_id||null,a):await (0,t.teamListCall)(e,i?.organization_id||null),console.log(`givenTeams: ${n}`),r(n)};e.s(["fetchTeams",0,a])},747871,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(269200),i=e.i(942232),r=e.i(977572),n=e.i(427612),s=e.i(64848),o=e.i(496020),d=e.i(304967),c=e.i(994388),m=e.i(599724),u=e.i(389083),h=e.i(764205),g=e.i(727749);e.s(["default",0,({accessToken:e,userID:f})=>{let[p,x]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(e&&f)try{let t=await (0,h.availableTeamListCall)(e);x(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,f]);let b=async t=>{if(e&&f)try{await (0,h.teamMemberAddCall)(e,t,{user_id:f,role:"user"}),g.default.success("Successfully joined team"),x(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),g.default.fromBackend("Failed to join team")}};return(0,t.jsx)(d.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(l.Table,{children:[(0,t.jsx)(n.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(s.TableHeaderCell,{children:"Description"}),(0,t.jsx)(s.TableHeaderCell,{children:"Members"}),(0,t.jsx)(s.TableHeaderCell,{children:"Models"}),(0,t.jsx)(s.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(i.TableBody,{children:[p.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(r.TableCell,{children:(0,t.jsx)(m.Text,{children:e.team_alias})}),(0,t.jsx)(r.TableCell,{children:(0,t.jsx)(m.Text,{children:e.description||"No description available"})}),(0,t.jsx)(r.TableCell,{children:(0,t.jsxs)(m.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(r.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,a)=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(m.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},a)):(0,t.jsx)(u.Badge,{size:"xs",color:"red",children:(0,t.jsx)(m.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(r.TableCell,{children:(0,t.jsx)(c.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===p.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(r.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(m.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])},468133,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(175712),i=e.i(464571),r=e.i(28651),n=e.i(898586),s=e.i(482725),o=e.i(199133),d=e.i(262218),c=e.i(621192),m=e.i(178654),u=e.i(751904),h=e.i(987432),g=e.i(764205),f=e.i(860585),p=e.i(355619),x=e.i(727749),b=e.i(162386);let{Title:v,Text:y}=n.Typography,w=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],j=({label:e,description:a,isEditing:l,viewContent:i,editContent:r})=>(0,t.jsxs)(c.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(m.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:a})]}),(0,t.jsx)(m.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:l?r:i})})]}),S=()=>(0,t.jsx)(y,{className:"text-gray-400 italic",children:"Not set"}),k=(e,a)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(d.Tag,{color:"blue",children:a?a(e):e},e))}):(0,t.jsx)(S,{}),C={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[n,c]=(0,a.useState)(!0),[m,N]=(0,a.useState)(C),[T,E]=(0,a.useState)(!1),[$,_]=(0,a.useState)(C),[z,M]=(0,a.useState)(!1),[O,D]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{if(!e)return c(!1);try{let t=await (0,g.getDefaultTeamSettings)(e),a={...C,...t.values||{}};N(a),_(a)}catch(e){console.error("Error fetching team SSO settings:",e),D(!0),x.default.fromBackend("Failed to fetch team settings")}finally{c(!1)}})()},[e]);let L=async()=>{if(e){M(!0);try{let t=await (0,g.updateDefaultTeamSettings)(e,$),a={...C,...t.settings||{}};N(a),_(a),E(!1),x.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.default.fromBackend("Failed to update team settings")}finally{M(!1)}}},I=(e,t)=>{_(a=>({...a,[e]:t}))};return n?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(s.Spin,{size:"large"})}):O?(0,t.jsx)(l.Card,{children:(0,t.jsx)(y,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(l.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(y,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:T?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(i.Button,{onClick:()=>{E(!1),_(m)},disabled:z,children:"Cancel"}),(0,t.jsx)(i.Button,{type:"primary",onClick:L,loading:z,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(i.Button,{onClick:()=>E(!0),icon:(0,t.jsx)(u.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(j,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:T,viewContent:null!=m.max_budget?(0,t.jsxs)(y,{children:["$",Number(m.max_budget).toLocaleString()]}):(0,t.jsx)(S,{}),editContent:(0,t.jsx)(r.InputNumber,{className:"w-full",style:{maxWidth:320},value:$.max_budget,onChange:e=>I("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(j,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:T,viewContent:m.budget_duration?(0,t.jsx)(y,{children:(0,f.getBudgetDurationLabel)(m.budget_duration)}):(0,t.jsx)(S,{}),editContent:(0,t.jsx)(f.default,{value:$.budget_duration||null,onChange:e=>I("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(j,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:T,viewContent:null!=m.tpm_limit?(0,t.jsx)(y,{children:m.tpm_limit.toLocaleString()}):(0,t.jsx)(S,{}),editContent:(0,t.jsx)(r.InputNumber,{className:"w-full",style:{maxWidth:320},value:$.tpm_limit,onChange:e=>I("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(j,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:T,viewContent:null!=m.rpm_limit?(0,t.jsx)(y,{children:m.rpm_limit.toLocaleString()}):(0,t.jsx)(S,{}),editContent:(0,t.jsx)(r.InputNumber,{className:"w-full",style:{maxWidth:320},value:$.rpm_limit,onChange:e=>I("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(j,{label:"Models",description:"Default list of models that new teams can access.",isEditing:T,viewContent:k(m.models,p.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:$.models||[],onChange:e=>I("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(j,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:T,viewContent:k(m.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:$.team_member_permissions||[],onChange:e=>I("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:a,onClose:l})=>(0,t.jsx)(d.Tag,{color:"blue",closable:a,onClose:l,className:"mr-1 mt-1 mb-1",children:e}),children:w.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94629,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,a],94629)},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),l=e.i(343794),i=e.i(242064),r=e.i(763731),n=e.i(174428);let s=80*Math.PI,o=e=>{let{dotClassName:t,style:i,hasCircleCls:r}=e;return a.createElement("circle",{className:(0,l.default)(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:40,cx:50,cy:50,strokeWidth:20,style:i})},d=({percent:e,prefixCls:t})=>{let i=`${t}-dot`,r=`${i}-holder`,d=`${r}-hidden`,[c,m]=a.useState(!1);(0,n.default)(()=>{0!==e&&m(!0)},[0!==e]);let u=Math.max(Math.min(e,100),0);if(!c)return null;let h={strokeDashoffset:`${s/4}`,strokeDasharray:`${s*u/100} ${s*(100-u)/100}`};return a.createElement("span",{className:(0,l.default)(r,`${i}-progress`,u<=0&&d)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u},a.createElement(o,{dotClassName:i,hasCircleCls:!0}),a.createElement(o,{dotClassName:i,style:h})))};function c(e){let{prefixCls:t,percent:i=0}=e,r=`${t}-dot`,n=`${r}-holder`,s=`${n}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,l.default)(n,i>0&&s)},a.createElement("span",{className:(0,l.default)(r,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(d,{prefixCls:t,percent:i}))}function m(e){var t;let{prefixCls:i,indicator:n,percent:s}=e,o=`${i}-dot`;return n&&a.isValidElement(n)?(0,r.cloneElement)(n,{className:(0,l.default)(null==(t=n.props)?void 0:t.className,o),percent:s}):a.createElement(c,{prefixCls:i,percent:s})}e.i(296059);var u=e.i(694758),h=e.i(183293),g=e.i(246422),f=e.i(838378);let p=new u.Keyframes("antSpinMove",{to:{opacity:1}}),x=new u.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),b=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=e;return{[t]:Object.assign(Object.assign({},(0,h.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:a(a(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:a(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:p,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:x,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),v=[[30,.05],[70,.03],[96,.01]];var y=function(e,t){var a={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(a[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,l=Object.getOwnPropertySymbols(e);it.indexOf(l[i])&&Object.prototype.propertyIsEnumerable.call(e,l[i])&&(a[l[i]]=e[l[i]]);return a};let w=e=>{var r;let{prefixCls:n,spinning:s=!0,delay:o=0,className:d,rootClassName:c,size:u="default",tip:h,wrapperClassName:g,style:f,children:p,fullscreen:x=!1,indicator:w,percent:j}=e,S=y(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:k,direction:C,className:N,style:T,indicator:E}=(0,i.useComponentConfig)("spin"),$=k("spin",n),[_,z,M]=b($),[O,D]=a.useState(()=>s&&(!s||!o||!!Number.isNaN(Number(o)))),L=function(e,t){let[l,i]=a.useState(0),r=a.useRef(null),n="auto"===t;return a.useEffect(()=>(n&&e&&(i(0),r.current=setInterval(()=>{i(e=>{let t=100-e;for(let a=0;a{r.current&&(clearInterval(r.current),r.current=null)}),[n,e]),n?l:t}(O,j);a.useEffect(()=>{if(s){let e=function(e,t,a){var l,i=a||{},r=i.noTrailing,n=void 0!==r&&r,s=i.noLeading,o=void 0!==s&&s,d=i.debounceMode,c=void 0===d?void 0:d,m=!1,u=0;function h(){l&&clearTimeout(l)}function g(){for(var a=arguments.length,i=Array(a),r=0;re?o?(u=Date.now(),n||(l=setTimeout(c?f:g,e))):g():!0!==n&&(l=setTimeout(c?f:g,void 0===c?e-d:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;h(),m=!(void 0!==t&&t)},g}(o,()=>{D(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}D(!1)},[o,s]);let I=a.useMemo(()=>void 0!==p&&!x,[p,x]),B=(0,l.default)($,N,{[`${$}-sm`]:"small"===u,[`${$}-lg`]:"large"===u,[`${$}-spinning`]:O,[`${$}-show-text`]:!!h,[`${$}-rtl`]:"rtl"===C},d,!x&&c,z,M),R=(0,l.default)(`${$}-container`,{[`${$}-blur`]:O}),A=null!=(r=null!=w?w:E)?r:t,F=Object.assign(Object.assign({},T),f),H=a.createElement("div",Object.assign({},S,{style:F,className:B,"aria-live":"polite","aria-busy":O}),a.createElement(m,{prefixCls:$,indicator:A,percent:L}),h&&(I||x)?a.createElement("div",{className:`${$}-text`},h):null);return _(I?a.createElement("div",Object.assign({},S,{className:(0,l.default)(`${$}-nested-loading`,g,z,M)}),O&&a.createElement("div",{key:"loading"},H),a.createElement("div",{className:R,key:"container"},p)):x?a.createElement("div",{className:(0,l.default)(`${$}-fullscreen`,{[`${$}-fullscreen-show`]:O},c,z,M)},H):H)};w.setDefaultIndicator=e=>{t=e},e.s(["default",0,w],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},269200,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("Table"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement("div",{className:(0,l.tremorTwMerge)(i("root"),"overflow-auto",s)},a.default.createElement("table",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},o),n))});r.displayName="Table",e.s(["Table",()=>r],269200)},427612,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableHead"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("thead",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",s)},o),n))});r.displayName="TableHead",e.s(["TableHead",()=>r],427612)},64848,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableHeaderCell"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("th",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",s)},o),n))});r.displayName="TableHeaderCell",e.s(["TableHeaderCell",()=>r],64848)},942232,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableBody"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("tbody",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",s)},o),n))});r.displayName="TableBody",e.s(["TableBody",()=>r],942232)},496020,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableRow"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("tr",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("row"),s)},o),n))});r.displayName="TableRow",e.s(["TableRow",()=>r],496020)},977572,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(444755);let i=(0,e.i(673706).makeClassName)("TableCell"),r=a.default.forwardRef((e,r)=>{let{children:n,className:s}=e,o=(0,t.__rest)(e,["children","className"]);return a.default.createElement(a.default.Fragment,null,a.default.createElement("td",Object.assign({ref:r,className:(0,l.tremorTwMerge)(i("root"),"align-middle whitespace-nowrap text-left p-4",s)},o),n))});r.displayName="TableCell",e.s(["TableCell",()=>r],977572)},389083,e=>{"use strict";var t=e.i(290571),a=e.i(271645),l=e.i(829087),i=e.i(480731),r=e.i(95779),n=e.i(444755),s=e.i(673706);let o={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},d={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},c=(0,s.makeClassName)("Badge"),m=a.default.forwardRef((e,m)=>{let{color:u,icon:h,size:g=i.Sizes.SM,tooltip:f,className:p,children:x}=e,b=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),v=h||null,{tooltipProps:y,getReferenceProps:w}=(0,l.useTooltip)();return a.default.createElement("span",Object.assign({ref:(0,s.mergeRefs)([m,y.refs.setReference]),className:(0,n.tremorTwMerge)(c("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",u?(0,n.tremorTwMerge)((0,s.getColorClassNames)(u,r.colorPalette.background).bgColor,(0,s.getColorClassNames)(u,r.colorPalette.iconText).textColor,(0,s.getColorClassNames)(u,r.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,n.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),o[g].paddingX,o[g].paddingY,o[g].fontSize,p)},w,b),a.default.createElement(l.default,Object.assign({text:f},y)),v?a.default.createElement(v,{className:(0,n.tremorTwMerge)(c("icon"),"shrink-0 -ml-1 mr-1.5",d[g].height,d[g].width)}):null,a.default.createElement("span",{className:(0,n.tremorTwMerge)(c("text"),"whitespace-nowrap")},x))});m.displayName="Badge",e.s(["Badge",()=>m],389083)},68155,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,a],68155)},360820,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,a],360820)},871943,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,a],871943)},530212,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,a],530212)},969550,e=>{"use strict";var t=e.i(843476),a=e.i(271645);let l=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var i=e.i(464571),r=e.i(311451),n=e.i(199133),s=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:d,initialValues:c={},buttonLabel:m="Filters"})=>{let[u,h]=(0,a.useState)(!1),[g,f]=(0,a.useState)(c),[p,x]=(0,a.useState)({}),[b,v]=(0,a.useState)({}),[y,w]=(0,a.useState)({}),[j,S]=(0,a.useState)({}),k=(0,a.useCallback)((0,s.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){v(e=>({...e,[t.name]:!0}));try{let a=await t.searchFn(e);x(e=>({...e,[t.name]:a}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{v(e=>({...e,[t.name]:!1}))}}},300),[]),C=(0,a.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!j[e.name]){v(t=>({...t,[e.name]:!0})),S(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(a=>({...a,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{v(t=>({...t,[e.name]:!1}))}}},[j]);(0,a.useEffect)(()=>{u&&e.forEach(e=>{e.isSearchable&&!j[e.name]&&C(e)})},[u,e,C,j]);let N=(e,t)=>{let a={...g,[e]:t};f(a),o(a)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(i.Button,{icon:(0,t.jsx)(l,{className:"h-4 w-4"}),onClick:()=>h(!u),className:"flex items-center gap-2",children:m}),(0,t.jsx)(i.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),f(t),d()},children:"Reset Filters"})]}),u&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(a=>{let l,i=e.find(e=>e.label===a||e.name===a);return i?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:i.label||i.name}),i.isSearchable?(0,t.jsx)(n.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${i.label||i.name}...`,value:g[i.name]||void 0,onChange:e=>N(i.name,e),onOpenChange:e=>{e&&i.isSearchable&&!j[i.name]&&C(i)},onSearch:e=>{w(t=>({...t,[i.name]:e})),i.searchFn&&k(e,i)},filterOption:!1,loading:b[i.name],options:p[i.name]||[],allowClear:!0,notFoundContent:b[i.name]?"Loading...":"No results found"}):i.options?(0,t.jsx)(n.Select,{className:"w-full",placeholder:`Select ${i.label||i.name}...`,value:g[i.name]||void 0,onChange:e=>N(i.name,e),allowClear:!0,children:i.options.map(e=>(0,t.jsx)(n.Select.Option,{value:e.value,children:e.label},e.value))}):i.customComponent?(l=i.customComponent,(0,t.jsx)(l,{value:g[i.name]||void 0,onChange:e=>N(i.name,e??""),placeholder:`Select ${i.label||i.name}...`,allFilters:g})):(0,t.jsx)(r.Input,{className:"w-full",placeholder:`Enter ${i.label||i.name}...`,value:g[i.name]||"",onChange:e=>N(i.name,e.target.value),allowClear:!0})]},i.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let a=(e,t,a,l)=>{for(let i of e){let e=i?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let r=i?.organization_id??i?.org_id;r&&"string"==typeof r&&a.add(r.trim());let n=i?.user_id;if(n&&"string"==typeof n){let e=i?.user?.user_email||n;l.set(n,e)}}},l=async(e,l)=>{if(!e||!l)return{keyAliases:[],organizationIds:[],userIds:[]};try{let i=new Set,r=new Set,n=new Map,s=await (0,t.keyListCall)(e,null,l,null,null,null,1,100,null,null,"user",null),o=s?.keys||[],d=s?.total_pages??1;a(o,i,r,n);let c=Math.min(d,10)-1;if(c>0){let s=Array.from({length:c},(a,i)=>(0,t.keyListCall)(e,null,l,null,null,null,i+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(s)))"fulfilled"===e.status&&a(e.value?.keys||[],i,r,n)}return{keyAliases:Array.from(i).sort(),organizationIds:Array.from(r).sort(),userIds:Array.from(n.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},i=async(e,a)=>{if(!e)return[];try{let l=[],i=1,r=!0;for(;r;){let n=await (0,t.teamListCall)(e,a||null,null);l=[...l,...n],i{if(!e)return[];try{let a=[],l=1,i=!0;for(;i;){let r=await (0,t.organizationListCall)(e);a=[...a,...r],l{"use strict";var t=e.i(764205);let a=async(e,a,l,i,r)=>{let n;n="Admin"!=l&&"Admin Viewer"!=l?await (0,t.teamListCall)(e,i?.organization_id||null,a):await (0,t.teamListCall)(e,i?.organization_id||null),console.log(`givenTeams: ${n}`),r(n)};e.s(["fetchTeams",0,a])},747871,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(269200),i=e.i(942232),r=e.i(977572),n=e.i(427612),s=e.i(64848),o=e.i(496020),d=e.i(304967),c=e.i(994388),m=e.i(599724),u=e.i(389083),h=e.i(764205),g=e.i(727749);e.s(["default",0,({accessToken:e,userID:f})=>{let[p,x]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(e&&f)try{let t=await (0,h.availableTeamListCall)(e);x(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,f]);let b=async t=>{if(e&&f)try{await (0,h.teamMemberAddCall)(e,t,{user_id:f,role:"user"}),g.default.success("Successfully joined team"),x(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),g.default.fromBackend("Failed to join team")}};return(0,t.jsx)(d.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(l.Table,{children:[(0,t.jsx)(n.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(s.TableHeaderCell,{children:"Description"}),(0,t.jsx)(s.TableHeaderCell,{children:"Members"}),(0,t.jsx)(s.TableHeaderCell,{children:"Models"}),(0,t.jsx)(s.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(i.TableBody,{children:[p.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(r.TableCell,{children:(0,t.jsx)(m.Text,{children:e.team_alias})}),(0,t.jsx)(r.TableCell,{children:(0,t.jsx)(m.Text,{children:e.description||"No description available"})}),(0,t.jsx)(r.TableCell,{children:(0,t.jsxs)(m.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(r.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,a)=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(m.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},a)):(0,t.jsx)(u.Badge,{size:"xs",color:"red",children:(0,t.jsx)(m.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(r.TableCell,{children:(0,t.jsx)(c.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===p.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(r.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(m.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])},468133,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(175712),i=e.i(464571),r=e.i(28651),n=e.i(898586),s=e.i(482725),o=e.i(199133),d=e.i(262218),c=e.i(621192),m=e.i(178654),u=e.i(751904),h=e.i(987432),g=e.i(764205),f=e.i(860585),p=e.i(355619),x=e.i(727749),b=e.i(162386);let{Title:v,Text:y}=n.Typography,w=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],j=({label:e,description:a,isEditing:l,viewContent:i,editContent:r})=>(0,t.jsxs)(c.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(m.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:a})]}),(0,t.jsx)(m.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:l?r:i})})]}),S=()=>(0,t.jsx)(y,{className:"text-gray-400 italic",children:"Not set"}),k=(e,a)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(d.Tag,{color:"blue",children:a?a(e):e},e))}):(0,t.jsx)(S,{}),C={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[n,c]=(0,a.useState)(!0),[m,N]=(0,a.useState)(C),[T,E]=(0,a.useState)(!1),[$,_]=(0,a.useState)(C),[z,M]=(0,a.useState)(!1),[O,D]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{if(!e)return c(!1);try{let t=await (0,g.getDefaultTeamSettings)(e),a={...C,...t.values||{}};N(a),_(a)}catch(e){console.error("Error fetching team SSO settings:",e),D(!0),x.default.fromBackend("Failed to fetch team settings")}finally{c(!1)}})()},[e]);let L=async()=>{if(e){M(!0);try{let t=await (0,g.updateDefaultTeamSettings)(e,$),a={...C,...t.settings||{}};N(a),_(a),E(!1),x.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.default.fromBackend("Failed to update team settings")}finally{M(!1)}}},I=(e,t)=>{_(a=>({...a,[e]:t}))};return n?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(s.Spin,{size:"large"})}):O?(0,t.jsx)(l.Card,{children:(0,t.jsx)(y,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(l.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(y,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:T?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(i.Button,{onClick:()=>{E(!1),_(m)},disabled:z,children:"Cancel"}),(0,t.jsx)(i.Button,{type:"primary",onClick:L,loading:z,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(i.Button,{onClick:()=>E(!0),icon:(0,t.jsx)(u.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(j,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:T,viewContent:null!=m.max_budget?(0,t.jsxs)(y,{children:["$",Number(m.max_budget).toLocaleString()]}):(0,t.jsx)(S,{}),editContent:(0,t.jsx)(r.InputNumber,{className:"w-full",style:{maxWidth:320},value:$.max_budget,onChange:e=>I("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(j,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:T,viewContent:m.budget_duration?(0,t.jsx)(y,{children:(0,f.getBudgetDurationLabel)(m.budget_duration)}):(0,t.jsx)(S,{}),editContent:(0,t.jsx)(f.default,{value:$.budget_duration||null,onChange:e=>I("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(j,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:T,viewContent:null!=m.tpm_limit?(0,t.jsx)(y,{children:m.tpm_limit.toLocaleString()}):(0,t.jsx)(S,{}),editContent:(0,t.jsx)(r.InputNumber,{className:"w-full",style:{maxWidth:320},value:$.tpm_limit,onChange:e=>I("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(j,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:T,viewContent:null!=m.rpm_limit?(0,t.jsx)(y,{children:m.rpm_limit.toLocaleString()}):(0,t.jsx)(S,{}),editContent:(0,t.jsx)(r.InputNumber,{className:"w-full",style:{maxWidth:320},value:$.rpm_limit,onChange:e=>I("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(j,{label:"Models",description:"Default list of models that new teams can access.",isEditing:T,viewContent:k(m.models,p.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:$.models||[],onChange:e=>I("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(j,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:T,viewContent:k(m.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:$.team_member_permissions||[],onChange:e=>I("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:a,onClose:l})=>(0,t.jsx)(d.Tag,{color:"blue",closable:a,onClose:l,className:"mr-1 mt-1 mb-1",children:e}),children:w.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/29f944b40b65da0a.js b/litellm/proxy/_experimental/out/_next/static/chunks/7afbccf8e83ba7e3.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/29f944b40b65da0a.js rename to litellm/proxy/_experimental/out/_next/static/chunks/7afbccf8e83ba7e3.js index fee3f36a9e2..7b257f3a639 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/29f944b40b65da0a.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/7afbccf8e83ba7e3.js @@ -390,7 +390,7 @@ audio_file = open("path/to/your/audio/file.mp3", "rb") response = client.audio.transcriptions.create( model="${E}", file=audio_file${n?`, - prompt="${n.replace(/"/g,'\\"')}"`:""} + prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} ) print(response.text) diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7f0381a4d6c37cf2.js b/litellm/proxy/_experimental/out/_next/static/chunks/7f0381a4d6c37cf2.js new file mode 100644 index 00000000000..7a1fcaef072 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/7f0381a4d6c37cf2.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(779241),i=e.i(599724),s=e.i(199133),a=e.i(983561),o=e.i(689020);e.s(["default",0,({accessToken:e,value:l,placeholder:c="Select a Model",onChange:d,disabled:u=!1,style:f,className:h,showLabel:p=!0,labelText:m="Select Model"})=>{let[g,y]=(0,r.useState)(l),[b,x]=(0,r.useState)(!1),[v,k]=(0,r.useState)([]),w=(0,r.useRef)(null);return(0,r.useEffect)(()=>{y(l)},[l]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,o.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&k(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[p&&(0,t.jsxs)(i.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.RobotOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{value:g,placeholder:c,onChange:e=>{"custom"===e?(x(!0),y(void 0)):(x(!1),y(e),d&&d(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...f},showSearch:!0,className:`rounded-md ${h||""}`,disabled:u}),b&&(0,t.jsx)(n.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{y(e),d&&d(e)},500)},disabled:u})]})}])},519756,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:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,n]of Object.entries(t))e in r&&(r[e]=n);return r}let n=(e,t=0,r=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let i={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",i);let s=e<0?"-":"",a=Math.abs(e),o=a,l="";return a>=1e6?(o=a/1e6,l="M"):a>=1e3&&(o=a/1e3,l="K"),`${s}${o.toLocaleString("en-US",i)}${l}`},i=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(e,r)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let i=document.execCommand("copy");if(document.body.removeChild(n),i)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,i,"formatNumberWithCommas",0,n,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=n(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},500727,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),n=e.i(764205),i=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,i.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,n.fetchMCPServers)(r,e),enabled:!!r})}],500727);var a=e.i(843476),o=e.i(271645),l=e.i(536916),c=e.i(599724),d=e.i(409797),u=e.i(246349),u=u;let f=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,h=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,p=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,m=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function g(e,t=""){let r=e.toLowerCase();if(m.test(r))return"read";if(f.test(r))return"delete";if(p.test(r))return"update";if(h.test(r))return"create";if(t){let e=t.toLowerCase();if(m.test(e))return"read";if(f.test(e))return"delete";if(p.test(e))return"update";if(h.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[g(r.name,r.description)].push(r);return t}let b={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,b,"classifyToolOp",()=>g,"groupToolsByCrud",()=>y],696609);let x=["read","create","update","delete","unknown"],v={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},k={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:n=!1,searchFilter:i=""})=>{let[s,f]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),h=(0,o.useMemo)(()=>y(e),[e]),p=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),m=e=>{if(n)return;let t=new Set(p);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,a.jsx)("div",{className:"space-y-3",children:x.map(e=>{let t,o=h[e];if(0===o.length)return null;if(i){let e=i.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let g=b[e],y=(t=h[e]).length>0&&t.every(e=>p.has(e.name)),x=(e=>{let t=h[e];if(0===t.length)return!1;let r=t.filter(e=>p.has(e.name)).length;return r>0&&r{f(t=>({...t,[e]:!t[e]}))},children:[_?(0,a.jsx)(u.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,a.jsx)(d.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:g.label}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${v[g.risk]}`,children:"high"===g.risk?"High Risk":"medium"===g.risk?"Medium Risk":"low"===g.risk?"Safe":"Unclassified"}),(0,a.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>p.has(e.name)).length,"/",o.length," allowed"]})]}),!n&&(0,a.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,a.jsx)(c.Text,{className:"text-xs text-gray-500",children:y?"All on":x?"Partial":"All off"}),(0,a.jsx)(l.Checkbox,{checked:y,indeterminate:x,onChange:t=>((e,t)=>{if(n)return;let i=new Set(p);for(let r of h[e])t?i.add(r.name):i.delete(r.name);r(Array.from(i))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!_&&(0,a.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:g.description}),!_&&(0,a.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!i||e.name.toLowerCase().includes(i.toLowerCase())||(e.description??"").toLowerCase().includes(i.toLowerCase())).map(e=>{let t,r=(t=e.name,p.has(t));return(0,a.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!n?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>m(e.name),children:[(0,a.jsx)(l.Checkbox,{checked:r,onChange:()=>m(e.name),disabled:n,onClick:e=>e.stopPropagation()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,a.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,a.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},743151,(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var i=o(e.r(271645)),s=o(e.r(844343)),a=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,a),n=i.default.Children.only(t);return i.default.cloneElement(n,c(c({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var n=e.r(743151).CopyToClipboard;n.CopyToClipboard=n,t.exports=n},59935,(e,t,r)=>{var n;let i;e.e,n=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},n=!r.document&&!!r.postMessage,i=r.IS_PAPA_WORKER||!1,s={},a=0,o={};function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=x(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,i)r.postMessage({results:s,workerId:o.WORKER_ID,finished:n});else if(k(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!n||!k(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){k(this._config.error)?this._config.error(e):i&&this._config.error&&r.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e,r,i=this._config.downloadRequestHeaders;for(r in i)t.setRequestHeader(r,i[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),l.call(this,e);var t,r,n="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function f(e){l.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(e){var t,r,n,i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,c=0,d=0,u=!1,f=!1,h=[],g={data:[],errors:[],meta:{}};function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(g&&n&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!y(e)})),v()){if(g)if(Array.isArray(g.data[0])){for(var t,r=0;v()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(s.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(o=e.header?i>=h.length?"__parsed_extra":h[i]:o,l=e.transform?e.transform(l,o):l);"__parsed_extra"===o?(n[o]=n[o]||[],n[o].push(l)):n[o]=l}return e.header&&(i>h.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+i,d+r):ie.preview?r.abort():(g.data=g.data[0],i(g,l))))}),this.parse=function(i,s,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(i,l)),n=!1,e.delimiter?k(e.delimiter)&&(e.delimiter=e.delimiter(i),g.meta.delimiter=e.delimiter):((l=((t,r,n,i,s)=>{var a,l,c,d;s=s||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var u=0;u=r.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode,l=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,u=d;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof t||-1=s)return F(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:f}),M++}}else if(n&&0===j.length&&o.substring(f,f+v)===n){if(-1===$)return F();f=$+x,$=o.indexOf(r,f),N=o.indexOf(t,f)}else if(-1!==N&&(N<$||-1===$))j.push(o.substring(f,N)),f=N+b,N=o.indexOf(t,f);else{if(-1===$)break;if(j.push(o.substring(f,$)),I($+x),w&&(L(),h))return F();if(s&&_.length>=s)return F(!0)}return A();function D(e){_.push(e),S=f}function P(e){return -1!==e&&(e=o.substring(M+1,e))&&""===e.trim()?e.length:0}function A(e){return g||(void 0===e&&(e=o.substring(f)),j.push(e),f=y,D(j),w&&L()),F()}function I(e){f=e,D(j),j=[],$=o.indexOf(r,f)}function F(n){if(e.header&&!m&&_.length&&!c){var i=_[0],s=Object.create(null),a=new Set(i);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,c);if("object"==typeof e[0])return h(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function h(e,t,r){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),n=e.i(371330),i=e.i(271645),s=e.i(394487),a=e.i(503269),o=e.i(214520),l=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),f=e.i(601893),h=e.i(140721),p=e.i(942803),m=e.i(233538),g=e.i(694421),y=e.i(700020),b=e.i(35889),x=e.i(998348),v=e.i(722678);let k=(0,i.createContext)(null);k.displayName="GroupContext";let w=i.Fragment,_=Object.assign((0,y.forwardRefWithAs)(function(e,t){var w;let _=(0,i.useId)(),C=(0,p.useProvidedId)(),j=(0,f.useDisabled)(),{id:S=C||`headlessui-switch-${_}`,disabled:E=j||!1,checked:O,defaultChecked:N,onChange:$,name:R,value:M,form:T,autoFocus:D=!1,...P}=e,A=(0,i.useContext)(k),[I,F]=(0,i.useState)(null),L=(0,i.useRef)(null),z=(0,u.useSyncRefs)(L,t,null===A?null:A.setSwitch,F),B=(0,o.useDefaultValue)(N),[W,q]=(0,a.useControllable)(O,$,null!=B&&B),U=(0,l.useDisposables)(),[H,K]=(0,i.useState)(!1),X=(0,c.useEvent)(()=>{K(!0),null==q||q(!W),U.nextFrame(()=>{K(!1)})}),Q=(0,c.useEvent)(e=>{if((0,m.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),V=(0,c.useEvent)(e=>{e.key===x.Keys.Space?(e.preventDefault(),X()):e.key===x.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),G=(0,c.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Y=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:D}),{isHovered:et,hoverProps:er}=(0,n.useHover)({isDisabled:E}),{pressed:en,pressProps:ei}=(0,s.useActivePress)({disabled:E}),es=(0,i.useMemo)(()=>({checked:W,disabled:E,hover:et,focus:Z,active:en,autofocus:D,changing:H}),[W,et,Z,en,E,H,D]),ea=(0,y.mergeProps)({id:S,ref:z,role:"switch",type:(0,d.useResolveButtonType)(e,I),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":W,"aria-labelledby":J,"aria-describedby":Y,disabled:E||void 0,autoFocus:D,onClick:Q,onKeyUp:V,onKeyPress:G},ee,er,ei),eo=(0,i.useCallback)(()=>{if(void 0!==B)return null==q?void 0:q(B)},[q,B]),el=(0,y.useRender)();return i.default.createElement(i.default.Fragment,null,null!=R&&i.default.createElement(h.FormFields,{disabled:E,data:{[R]:M||"on"},overrides:{type:"checkbox",checked:W},form:T,onReset:eo}),el({ourProps:ea,theirProps:P,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[s,a]=(0,v.useLabels)(),[o,l]=(0,b.useDescriptions)(),c=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),d=(0,y.useRender)();return i.default.createElement(l,{name:"Switch.Description",value:o},i.default.createElement(a,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.default.createElement(k.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var C=e.i(888288),j=e.i(95779),S=e.i(444755),E=e.i(673706),O=e.i(829087);let N=(0,E.makeClassName)("Switch"),$=i.default.forwardRef((e,r)=>{let{checked:n,defaultChecked:s=!1,onChange:a,color:o,name:l,error:c,errorMessage:d,disabled:u,required:f,tooltip:h,id:p}=e,m=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:o?(0,E.getColorClassNames)(o,j.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:o?(0,E.getColorClassNames)(o,j.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[y,b]=(0,C.default)(s,n),[x,v]=(0,i.useState)(!1),{tooltipProps:k,getReferenceProps:w}=(0,O.useTooltip)(300);return i.default.createElement("div",{className:"flex flex-row items-center justify-start"},i.default.createElement(O.default,Object.assign({text:h},k)),i.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,k.refs.setReference]),className:(0,S.tremorTwMerge)(N("root"),"flex flex-row relative h-5")},m,w),i.default.createElement("input",{type:"checkbox",className:(0,S.tremorTwMerge)(N("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:f,checked:y,onChange:e=>{e.preventDefault()}}),i.default.createElement(_,{checked:y,onChange:e=>{b(e),null==a||a(e)},disabled:u,className:(0,S.tremorTwMerge)(N("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:p},i.default.createElement("span",{className:(0,S.tremorTwMerge)(N("sr-only"),"sr-only")},"Switch ",y?"on":"off"),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(N("background"),y?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(N("round"),y?(0,S.tremorTwMerge)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",x?(0,S.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&d?i.default.createElement("p",{className:(0,S.tremorTwMerge)(N("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});$.displayName="Switch",e.s(["Switch",()=>$],793130)},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let n={ttl:3600,lowest_latency_buffer:0},i=({routingStrategyArgs:e})=>{let i={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||n).map(([e,n])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof n?JSON.stringify(n,null,2):n?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:n})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,i])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:n[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:n[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==i||"null"===i?"":"object"==typeof i?JSON.stringify(i,null,2):i?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var a=e.i(199133);let o=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:n,routerFieldsMetadata:i,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:i.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(a.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(a.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),n[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:n[e]})]})},e))})})]});var l=e.i(793130);let c=({enabled:e,routerFieldsMetadata:r,onToggle:n})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(l.Switch,{checked:e,onChange:n,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:n,availableRoutingStrategies:a,routingStrategyDescriptions:l})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),a.length>0&&(0,t.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:a,routingStrategyDescriptions:l,routerFieldsMetadata:n,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:n,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(i,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:n})]})],158392);var d=e.i(994388),u=e.i(653496),f=e.i(107233),h=e.i(271645),p=e.i(888259),m=e.i(592968),g=e.i(361653),g=g;let y=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var b=e.i(37727);function x({group:e,onChange:r,availableModels:n,maxFallbacks:i}){let s=n.filter(t=>t!==e.primaryModel),o=e.fallbackModels.length{let n=[...e.fallbackModels];n.includes(t)&&(n=n.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:n})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:n.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(g.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(y,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",i," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${i} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let n=t.slice(0,i);r({...e,fallbackModels:n})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,n)=>{let i=e.fallbackModels.includes(r.value),s=i?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(m.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${i} used)`:`Maximum ${i} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((n,i)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:i+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:n})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==i),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(b.X,{className:"w-4 h-4"})})]},`${n}-${i}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:n,maxFallbacks:i=10,maxGroups:s=5}){let[a,o]=(0,h.useState)(e.length>0?e[0].id:"1");(0,h.useEffect)(()=>{e.length>0?e.some(e=>e.id===a)||o(e[0].id):o("1")},[e]);let l=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),o(t)},c=t=>{r(e.map(e=>e.id===t.id?t:e))},m=e.map((r,s)=>{let a=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:a,closable:e.length>1,children:(0,t.jsx)(x,{group:r,onChange:c,availableModels:n,maxFallbacks:i})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(d.Button,{variant:"primary",onClick:l,icon:()=>(0,t.jsx)(f.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:a,onChange:o,onEdit:(t,n)=>{"add"===n?l():"remove"===n&&e.length>1&&(t=>{if(1===e.length)return p.default.warning("At least one group is required");let n=e.filter(e=>e.id!==t);r(n),a===t&&n.length>0&&o(n[n.length-1].id)})(t)},items:m,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(199133),i=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:a,accessToken:o,placeholder:l="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[f,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,i.vectorStoreListCall)(o);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{h(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(n.Select,{mode:"multiple",placeholder:l,onChange:e,value:s,loading:f,className:a,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),n=e.i(201072),i=e.i(121229),s=e.i(726289),a=e.i(864517),o=e.i(343794),l=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),f=e.i(703923),h={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),n=!1;e.current.forEach(function(e){if(e){n=!0;var i=e.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(i.transitionDuration="0s, 0s")}}),n&&(r.current=Date.now())}),e.current},m=e.i(410160),g=e.i(392221),y=e.i(654310),b=0,x=(0,y.default)();let v=function(e){var r=t.useState(),n=(0,g.default)(r,2),i=n[0],s=n[1];return t.useEffect(function(){var e;s("rc_progress_".concat((x?(e=b,b+=1):e="TEST_OR_SSR",e)))},[]),e||i};var k=function(e){var r=e.bg,n=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function w(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),i="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(i)})}var _=t.forwardRef(function(e,r){var n=e.prefixCls,i=e.color,s=e.gradientId,a=e.radius,o=e.style,l=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,f=e.gapDegree,h=i&&"object"===(0,m.default)(i),p=u/2,g=t.createElement("circle",{className:"".concat(n,"-circle-path"),r:a,cx:p,cy:p,stroke:h?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==l),style:o,ref:r});if(!h)return g;var y="".concat(s,"-conic"),b=w(i,(360-f)/360),x=w(i,1),v="conic-gradient(from ".concat(f?"".concat(180+f/2,"deg"):"0deg",", ").concat(b.join(", "),")"),_="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(x.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:y},g),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(y,")")},t.createElement(k,{bg:_},t.createElement(k,{bg:v}))))}),C=function(e,t,r,n,i,s,a,o,l,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-n)/100*t;return"round"===l&&100!==n&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof o?o:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(i+r/100*360*((360-s)/360)+(0===s?0:({bottom:0,top:180,left:90,right:-90})[a]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},j=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function S(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let E=function(e){var r,n,i,s,a=(0,u.default)((0,u.default)({},h),e),l=a.id,c=a.prefixCls,g=a.steps,y=a.strokeWidth,b=a.trailWidth,x=a.gapDegree,k=void 0===x?0:x,w=a.gapPosition,E=a.trailColor,O=a.strokeLinecap,N=a.style,$=a.className,R=a.strokeColor,M=a.percent,T=(0,f.default)(a,j),D=v(l),P="".concat(D,"-gradient"),A=50-y/2,I=2*Math.PI*A,F=k>0?90+k/2:-90,L=(360-k)/360*I,z="object"===(0,m.default)(g)?g:{count:g,gap:2},B=z.count,W=z.gap,q=S(M),U=S(R),H=U.find(function(e){return e&&"object"===(0,m.default)(e)}),K=H&&"object"===(0,m.default)(H)?"butt":O,X=C(I,L,0,100,F,k,w,E,K,y),Q=p();return t.createElement("svg",(0,d.default)({className:(0,o.default)("".concat(c,"-circle"),$),viewBox:"0 0 ".concat(100," ").concat(100),style:N,id:l,role:"presentation"},T),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:A,cx:50,cy:50,stroke:E,strokeLinecap:K,strokeWidth:b||y,style:X}),B?(r=Math.round(B*(q[0]/100)),n=100/B,i=0,Array(B).fill(null).map(function(e,s){var a=s<=r-1?U[0]:E,o=a&&"object"===(0,m.default)(a)?"url(#".concat(P,")"):void 0,l=C(I,L,i,n,F,k,w,a,"butt",y,W);return i+=(L-l.strokeDashoffset+W)*100/L,t.createElement("circle",{key:s,className:"".concat(c,"-circle-path"),r:A,cx:50,cy:50,stroke:o,strokeWidth:y,opacity:1,style:l,ref:function(e){Q[s]=e}})})):(s=0,q.map(function(e,r){var n=U[r]||U[U.length-1],i=C(I,L,s,e,F,k,w,n,K,y);return s+=e,t.createElement(_,{key:r,color:n,ptg:e,radius:A,prefixCls:c,gradientId:P,style:i,strokeLinecap:K,strokeWidth:y,gapDegree:k,ref:function(e){Q[r]=e},size:100})}).reverse()))};var O=e.i(491816);e.i(765846);var N=e.i(896091);function $(e){return!e||e<0?0:e>100?100:e}function R({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let M=(e,t,r)=>{var n,i,s,a;let o=-1,l=-1;if("step"===t){let t=r.steps,n=r.strokeWidth;"string"==typeof e||void 0===e?(o="small"===e?2:14,l=null!=n?n:8):"number"==typeof e?[o,l]=[e,e]:[o=14,l=8]=Array.isArray(e)?e:[e.width,e.height],o*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?l=t||("small"===e?6:8):"number"==typeof e?[o,l]=[e,e]:[o=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[o,l]="small"===e?[60,60]:[120,120]:"number"==typeof e?[o,l]=[e,e]:Array.isArray(e)&&(o=null!=(i=null!=(n=e[0])?n:e[1])?i:120,l=null!=(a=null!=(s=e[0])?s:e[1])?a:120));return[o,l]},T=e=>{let{prefixCls:r,trailColor:n=null,strokeLinecap:i="round",gapPosition:s,gapDegree:a,width:l=120,type:c,children:d,success:u,size:f=l,steps:h}=e,[p,m]=M(f,"circle"),{strokeWidth:g}=e;void 0===g&&(g=Math.max(3/p*100,6));let y=t.useMemo(()=>a||0===a?a:"dashboard"===c?75:void 0,[a,c]),b=(({percent:e,success:t,successPercent:r})=>{let n=$(R({success:t,successPercent:r}));return[n,$($(e)-n)]})(e),x="[object Object]"===Object.prototype.toString.call(e.strokeColor),v=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||N.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),k=(0,o.default)(`${r}-inner`,{[`${r}-circle-gradient`]:x}),w=t.createElement(E,{steps:h,percent:h?b[1]:b,strokeWidth:g,trailWidth:g,strokeColor:h?v[1]:v,strokeLinecap:i,trailColor:n,prefixCls:r,gapDegree:y,gapPosition:s||"dashboard"===c&&"bottom"||void 0}),_=p<=20,C=t.createElement("div",{className:k,style:{width:p,height:m,fontSize:.15*p+6}},w,!_&&d);return _?t.createElement(O.default,{title:d},C):C};e.i(296059);var D=e.i(694758),P=e.i(915654),A=e.i(183293),I=e.i(246422),F=e.i(838378);let L="--progress-line-stroke-color",z="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new D.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},W=(0,I.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,F.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,A.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${L})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,P.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var q=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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let U=e=>{let{prefixCls:r,direction:n,percent:i,size:s,strokeWidth:a,strokeColor:l,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:f,success:h}=e,{align:p,type:m}=f,g=l&&"string"!=typeof l?((e,t)=>{let{from:r=N.presetPrimaryColors.blue,to:n=N.presetPrimaryColors.blue,direction:i="rtl"===t?"to left":"to right"}=e,s=q(e,["from","to","direction"]);if(0!==Object.keys(s).length){let e,t=(e=[],Object.keys(s).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:s[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${i}, ${t})`;return{background:r,[L]:r}}let a=`linear-gradient(${i}, ${r}, ${n})`;return{background:a,[L]:a}})(l,n):{[L]:l,background:l},y="square"===c||"butt"===c?0:void 0,[b,x]=M(null!=s?s:[-1,a||("small"===s?6:8)],"line",{strokeWidth:a}),v=Object.assign(Object.assign({width:`${$(i)}%`,height:x,borderRadius:y},g),{[z]:$(i)/100}),k=R(e),w={width:`${$(k)}%`,height:x,borderRadius:y,backgroundColor:null==h?void 0:h.strokeColor},_=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:y}},t.createElement("div",{className:(0,o.default)(`${r}-bg`,`${r}-bg-${m}`),style:v},"inner"===m&&d),void 0!==k&&t.createElement("div",{className:`${r}-success-bg`,style:w})),C="outer"===m&&"start"===p,j="outer"===m&&"end"===p;return"outer"===m&&"center"===p?t.createElement("div",{className:`${r}-layout-bottom`},_,d):t.createElement("div",{className:`${r}-outer`,style:{width:b<0?"100%":b}},C&&d,_,j&&d)},H=e=>{let{size:r,steps:n,rounding:i=Math.round,percent:s=0,strokeWidth:a=8,strokeColor:l,trailColor:c=null,prefixCls:d,children:u}=e,f=i(s/100*n),[h,p]=M(null!=r?r:["small"===r?2:14,a],"step",{steps:n,strokeWidth:a}),m=h/n,g=Array.from({length:n});for(let e=0;et.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let X=["normal","exception","active","success"],Q=t.forwardRef((e,d)=>{let u,{prefixCls:f,className:h,rootClassName:p,steps:m,strokeColor:g,percent:y=0,size:b="default",showInfo:x=!0,type:v="line",status:k,format:w,style:_,percentPosition:C={}}=e,j=K(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:S="end",type:E="outer"}=C,O=Array.isArray(g)?g[0]:g,N="string"==typeof g||Array.isArray(g)?g:void 0,D=t.useMemo(()=>{if(O){let e="string"==typeof O?O:Object.values(O)[0];return new r.FastColor(e).isLight()}return!1},[g]),P=t.useMemo(()=>{var t,r;let n=R(e);return Number.parseInt(void 0!==n?null==(t=null!=n?n:0)?void 0:t.toString():null==(r=null!=y?y:0)?void 0:r.toString(),10)},[y,e.success,e.successPercent]),A=t.useMemo(()=>!X.includes(k)&&P>=100?"success":k||"normal",[k,P]),{getPrefixCls:I,direction:F,progress:L}=t.useContext(c.ConfigContext),z=I("progress",f),[B,q,Q]=W(z),V="line"===v,G=V&&!m,J=t.useMemo(()=>{let r;if(!x)return null;let l=R(e),c=w||(e=>`${e}%`),d=V&&D&&"inner"===E;return"inner"===E||w||"exception"!==A&&"success"!==A?r=c($(y),$(l)):"exception"===A?r=V?t.createElement(s.default,null):t.createElement(a.default,null):"success"===A&&(r=V?t.createElement(n.default,null):t.createElement(i.default,null)),t.createElement("span",{className:(0,o.default)(`${z}-text`,{[`${z}-text-bright`]:d,[`${z}-text-${S}`]:G,[`${z}-text-${E}`]:G}),title:"string"==typeof r?r:void 0},r)},[x,y,P,A,v,z,w]);"line"===v?u=m?t.createElement(H,Object.assign({},e,{strokeColor:N,prefixCls:z,steps:"object"==typeof m?m.count:m}),J):t.createElement(U,Object.assign({},e,{strokeColor:O,prefixCls:z,direction:F,percentPosition:{align:S,type:E}}),J):("circle"===v||"dashboard"===v)&&(u=t.createElement(T,Object.assign({},e,{strokeColor:O,prefixCls:z,progressStatus:A}),J));let Y=(0,o.default)(z,`${z}-status-${A}`,{[`${z}-${"dashboard"===v&&"circle"||v}`]:"line"!==v,[`${z}-inline-circle`]:"circle"===v&&M(b,"circle")[0]<=20,[`${z}-line`]:G,[`${z}-line-align-${S}`]:G,[`${z}-line-position-${E}`]:G,[`${z}-steps`]:m,[`${z}-show-info`]:x,[`${z}-${b}`]:"string"==typeof b,[`${z}-rtl`]:"rtl"===F},null==L?void 0:L.className,h,p,q,Q);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==L?void 0:L.style),_),className:Y,role:"progressbar","aria-valuenow":P,"aria-valuemin":0,"aria-valuemax":100},(0,l.default)(j,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,Q],309821)},597440,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:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["default",0,s],597440)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/821dff643d2d89b9.js b/litellm/proxy/_experimental/out/_next/static/chunks/821dff643d2d89b9.js new file mode 100644 index 00000000000..96cc20ddcae --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/821dff643d2d89b9.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),p=e.i(72713),g=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:k}=s.Typography;function N({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:N,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(k,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(p.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),l=e.i(477386),r=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var i;let n=(i=e.callback_name,Object.entries(r.callback_map).find(([e,t])=>t===i)?.[0]||i),o=r.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=r.reverse_callback_map[e]||e,n=r.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),p=e.i(808613),g=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),k=e.i(237016),N=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=p.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),N.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),N.default.fromBackend(e),C(!1)}}},E=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:E,footer:_?[(0,n.jsx)(o.Button,{onClick:E,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:E,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(k.CopyToClipboard,{text:_,onCopy:()=>N.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(p.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(p.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(p.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(g.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(p.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),p=e.i(653824),g=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),k=e.i(784647),N=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),E=e.i(190702),B=e.i(891547),O=e.i(109799),P=e.i(921511),K=e.i(827252),z=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[p,g]=(0,N.useState)([]),[h,j]=(0,N.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,N.useState)([]),[v,k]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,N.useState)(e.organization_id||null),[A,M]=(0,N.useState)(e.auto_rotate||!1),[R,D]=(0,N.useState)(e.rotation_interval||""),[E,el]=(0,N.useState)(!e.expires),[er,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,N.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let ep=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,N.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,N.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}E&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(z.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(B.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:p.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{k((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:E,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:B,teams:O,onKeyDataUpdate:P,onDelete:K,backButtonText:z="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,er]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[ep,eg]=(0,N.useState)(B),[eh,ej]=(0,N.useState)(null),[e_,ey]=(0,N.useState)(!1),[eb,ef]=(0,N.useState)({}),[ev,ek]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{B&&eg(B)},[B]),(0,N.useEffect)(()=>{(async()=>{let e=ep?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;ek(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ek(!1)}})()},[U,ep?.metadata?.policies]),(0,N.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!ep)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:z}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ep.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...ep.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);eg(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,ep.token||ep.token_id),F.default.success("Key deleted successfully"),K&&K(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"")||$===ep.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(k.KeyInfoHeader,{data:{keyName:ep.key_alias||"Virtual Key",keyId:ep.token_id||ep.token,userId:ep.user_id||"",userEmail:ep.user_email||"",createdBy:ep.user_email||ep.user_id||"",createdAt:ep.created_at?ew(ep.created_at):"",lastUpdated:ep.updated_at?ew(ep.updated_at):"",lastActive:ep.last_active?ew(ep.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:z,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:ep,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ep?.key_alias||"-"},{label:"Key ID",value:ep?.token_id||ep?.token||"-",code:!0},{label:"Team ID",value:ep?.team_id||"-",code:!0},{label:"Spend",value:ep?.spend?`$${(0,i.formatNumberWithCommas)(ep.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:ep?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(ep.token||ep.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ep?.key_alias||ep?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(p.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ep.metadata?.guardrails)&&ep.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ep.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ep.metadata?.disable_global_guardrails&&!0===ep.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ep.metadata?.policies)&&ep.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ep.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:ep,onCancel:()=>Z(!1),onSubmit:eN,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.token_id||ep.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:ep.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:ep.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:ep.project_id?(V=J?.find(e=>e.project_id===ep.project_id),V?.project_alias?`${V.project_alias} (${ep.project_id})`:ep.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(ep.organization_id??ep.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(ep.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:ep.expires?ew(ep.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.metadata?.tags)&&ep.metadata.tags.length>0?ep.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.prompts)&&ep.metadata.prompts.length>0?ep.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.allowed_routes)&&ep.allowed_routes.length>0?ep.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.allowed_passthrough_routes)&&ep.metadata.allowed_passthrough_routes.length>0?ep.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:ep.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==ep.max_parallel_requests?ep.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",ep.metadata?.model_tpm_limit?JSON.stringify(ep.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",ep.metadata?.model_rpm_limit?JSON.stringify(ep.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(ep.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ad682fd0bc31a0da.js b/litellm/proxy/_experimental/out/_next/static/chunks/84c717b1ad096487.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/ad682fd0bc31a0da.js rename to litellm/proxy/_experimental/out/_next/static/chunks/84c717b1ad096487.js index fb0a68f4ec3..641fb73684e 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/ad682fd0bc31a0da.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/84c717b1ad096487.js @@ -390,7 +390,7 @@ audio_file = open("path/to/your/audio/file.mp3", "rb") response = client.audio.transcriptions.create( model="${I}", file=audio_file${o?`, - prompt="${o.replace(/"/g,'\\"')}"`:""} + prompt="${o.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} ) print(response.text) diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5c0ed5c66b49ddbe.js b/litellm/proxy/_experimental/out/_next/static/chunks/867f4c13fb446e41.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/5c0ed5c66b49ddbe.js rename to litellm/proxy/_experimental/out/_next/static/chunks/867f4c13fb446e41.js index 6ac2da1825f..26ced1ea6ea 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5c0ed5c66b49ddbe.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/867f4c13fb446e41.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,309426,e=>{"use strict";var t=e.i(290571),r=e.i(444755),n=e.i(673706),i=e.i(271645),s=e.i(46757);let a=(0,n.makeClassName)("Col"),o=i.default.forwardRef((e,n)=>{let o,l,c,d,{numColSpan:u=1,numColSpanSm:f,numColSpanMd:h,numColSpanLg:p,children:m,className:g}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),b=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.default.createElement("div",Object.assign({ref:n,className:(0,r.tremorTwMerge)(a("root"),(o=b(u,s.colSpan),l=b(f,s.colSpanSm),c=b(h,s.colSpanMd),d=b(p,s.colSpanLg),(0,r.tremorTwMerge)(o,l,c,d)),g)},y),m)});o.displayName="Col",e.s(["Col",()=>o],309426)},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(779241),i=e.i(599724),s=e.i(199133),a=e.i(983561),o=e.i(689020);e.s(["default",0,({accessToken:e,value:l,placeholder:c="Select a Model",onChange:d,disabled:u=!1,style:f,className:h,showLabel:p=!0,labelText:m="Select Model"})=>{let[g,y]=(0,r.useState)(l),[b,x]=(0,r.useState)(!1),[v,k]=(0,r.useState)([]),w=(0,r.useRef)(null);return(0,r.useEffect)(()=>{y(l)},[l]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,o.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&k(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[p&&(0,t.jsxs)(i.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.RobotOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{value:g,placeholder:c,onChange:e=>{"custom"===e?(x(!0),y(void 0)):(x(!1),y(e),d&&d(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...f},showSearch:!0,className:`rounded-md ${h||""}`,disabled:u}),b&&(0,t.jsx)(n.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{y(e),d&&d(e)},500)},disabled:u})]})}])},519756,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:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,n]of Object.entries(t))e in r&&(r[e]=n);return r}let n=(e,t=0,r=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let i={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",i);let s=e<0?"-":"",a=Math.abs(e),o=a,l="";return a>=1e6?(o=a/1e6,l="M"):a>=1e3&&(o=a/1e3,l="K"),`${s}${o.toLocaleString("en-US",i)}${l}`},i=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(e,r)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let i=document.execCommand("copy");if(document.body.removeChild(n),i)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,i,"formatNumberWithCommas",0,n,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=n(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},500727,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),n=e.i(764205),i=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,i.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,n.fetchMCPServers)(r,e),enabled:!!r})}],500727);var a=e.i(843476),o=e.i(271645),l=e.i(536916),c=e.i(599724),d=e.i(409797),u=e.i(246349),u=u;let f=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,h=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,p=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,m=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function g(e,t=""){let r=e.toLowerCase();if(m.test(r))return"read";if(f.test(r))return"delete";if(p.test(r))return"update";if(h.test(r))return"create";if(t){let e=t.toLowerCase();if(m.test(e))return"read";if(f.test(e))return"delete";if(p.test(e))return"update";if(h.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[g(r.name,r.description)].push(r);return t}let b={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,b,"classifyToolOp",()=>g,"groupToolsByCrud",()=>y],696609);let x=["read","create","update","delete","unknown"],v={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},k={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:n=!1,searchFilter:i=""})=>{let[s,f]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),h=(0,o.useMemo)(()=>y(e),[e]),p=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),m=e=>{if(n)return;let t=new Set(p);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,a.jsx)("div",{className:"space-y-3",children:x.map(e=>{let t,o=h[e];if(0===o.length)return null;if(i){let e=i.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let g=b[e],y=(t=h[e]).length>0&&t.every(e=>p.has(e.name)),x=(e=>{let t=h[e];if(0===t.length)return!1;let r=t.filter(e=>p.has(e.name)).length;return r>0&&r{f(t=>({...t,[e]:!t[e]}))},children:[_?(0,a.jsx)(u.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,a.jsx)(d.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:g.label}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${v[g.risk]}`,children:"high"===g.risk?"High Risk":"medium"===g.risk?"Medium Risk":"low"===g.risk?"Safe":"Unclassified"}),(0,a.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>p.has(e.name)).length,"/",o.length," allowed"]})]}),!n&&(0,a.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,a.jsx)(c.Text,{className:"text-xs text-gray-500",children:y?"All on":x?"Partial":"All off"}),(0,a.jsx)(l.Checkbox,{checked:y,indeterminate:x,onChange:t=>((e,t)=>{if(n)return;let i=new Set(p);for(let r of h[e])t?i.add(r.name):i.delete(r.name);r(Array.from(i))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!_&&(0,a.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:g.description}),!_&&(0,a.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!i||e.name.toLowerCase().includes(i.toLowerCase())||(e.description??"").toLowerCase().includes(i.toLowerCase())).map(e=>{let t,r=(t=e.name,p.has(t));return(0,a.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!n?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>m(e.name),children:[(0,a.jsx)(l.Checkbox,{checked:r,onChange:()=>m(e.name),disabled:n,onClick:e=>e.stopPropagation()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,a.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,a.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},743151,(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var i=o(e.r(271645)),s=o(e.r(844343)),a=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,a),n=i.default.Children.only(t);return i.default.cloneElement(n,c(c({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var n=e.r(743151).CopyToClipboard;n.CopyToClipboard=n,t.exports=n},59935,(e,t,r)=>{var n;let i;e.e,n=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},n=!r.document&&!!r.postMessage,i=r.IS_PAPA_WORKER||!1,s={},a=0,o={};function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=x(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,i)r.postMessage({results:s,workerId:o.WORKER_ID,finished:n});else if(k(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!n||!k(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){k(this._config.error)?this._config.error(e):i&&this._config.error&&r.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e,r,i=this._config.downloadRequestHeaders;for(r in i)t.setRequestHeader(r,i[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),l.call(this,e);var t,r,n="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function f(e){l.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(e){var t,r,n,i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,c=0,d=0,u=!1,f=!1,h=[],g={data:[],errors:[],meta:{}};function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(g&&n&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!y(e)})),v()){if(g)if(Array.isArray(g.data[0])){for(var t,r=0;v()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(s.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(o=e.header?i>=h.length?"__parsed_extra":h[i]:o,l=e.transform?e.transform(l,o):l);"__parsed_extra"===o?(n[o]=n[o]||[],n[o].push(l)):n[o]=l}return e.header&&(i>h.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+i,d+r):ie.preview?r.abort():(g.data=g.data[0],i(g,l))))}),this.parse=function(i,s,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(i,l)),n=!1,e.delimiter?k(e.delimiter)&&(e.delimiter=e.delimiter(i),g.meta.delimiter=e.delimiter):((l=((t,r,n,i,s)=>{var a,l,c,d;s=s||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var u=0;u=r.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode,l=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,u=d;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof t||-1=s)return L(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:f}),M++}}else if(n&&0===j.length&&o.substring(f,f+v)===n){if(-1===$)return L();f=$+x,$=o.indexOf(r,f),O=o.indexOf(t,f)}else if(-1!==O&&(O<$||-1===$))j.push(o.substring(f,O)),f=O+b,O=o.indexOf(t,f);else{if(-1===$)break;if(j.push(o.substring(f,$)),I($+x),w&&(F(),h))return L();if(s&&_.length>=s)return L(!0)}return A();function D(e){_.push(e),S=f}function P(e){return -1!==e&&(e=o.substring(M+1,e))&&""===e.trim()?e.length:0}function A(e){return g||(void 0===e&&(e=o.substring(f)),j.push(e),f=y,D(j),w&&F()),L()}function I(e){f=e,D(j),j=[],$=o.indexOf(r,f)}function L(n){if(e.header&&!m&&_.length&&!c){var i=_[0],s=Object.create(null),a=new Set(i);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,c);if("object"==typeof e[0])return h(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function h(e,t,r){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),n=e.i(371330),i=e.i(271645),s=e.i(394487),a=e.i(503269),o=e.i(214520),l=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),f=e.i(601893),h=e.i(140721),p=e.i(942803),m=e.i(233538),g=e.i(694421),y=e.i(700020),b=e.i(35889),x=e.i(998348),v=e.i(722678);let k=(0,i.createContext)(null);k.displayName="GroupContext";let w=i.Fragment,_=Object.assign((0,y.forwardRefWithAs)(function(e,t){var w;let _=(0,i.useId)(),C=(0,p.useProvidedId)(),j=(0,f.useDisabled)(),{id:S=C||`headlessui-switch-${_}`,disabled:E=j||!1,checked:N,defaultChecked:O,onChange:$,name:R,value:M,form:T,autoFocus:D=!1,...P}=e,A=(0,i.useContext)(k),[I,L]=(0,i.useState)(null),F=(0,i.useRef)(null),z=(0,u.useSyncRefs)(F,t,null===A?null:A.setSwitch,L),B=(0,o.useDefaultValue)(O),[W,q]=(0,a.useControllable)(N,$,null!=B&&B),U=(0,l.useDisposables)(),[H,K]=(0,i.useState)(!1),X=(0,c.useEvent)(()=>{K(!0),null==q||q(!W),U.nextFrame(()=>{K(!1)})}),Q=(0,c.useEvent)(e=>{if((0,m.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),V=(0,c.useEvent)(e=>{e.key===x.Keys.Space?(e.preventDefault(),X()):e.key===x.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),G=(0,c.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Y=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:D}),{isHovered:et,hoverProps:er}=(0,n.useHover)({isDisabled:E}),{pressed:en,pressProps:ei}=(0,s.useActivePress)({disabled:E}),es=(0,i.useMemo)(()=>({checked:W,disabled:E,hover:et,focus:Z,active:en,autofocus:D,changing:H}),[W,et,Z,en,E,H,D]),ea=(0,y.mergeProps)({id:S,ref:z,role:"switch",type:(0,d.useResolveButtonType)(e,I),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":W,"aria-labelledby":J,"aria-describedby":Y,disabled:E||void 0,autoFocus:D,onClick:Q,onKeyUp:V,onKeyPress:G},ee,er,ei),eo=(0,i.useCallback)(()=>{if(void 0!==B)return null==q?void 0:q(B)},[q,B]),el=(0,y.useRender)();return i.default.createElement(i.default.Fragment,null,null!=R&&i.default.createElement(h.FormFields,{disabled:E,data:{[R]:M||"on"},overrides:{type:"checkbox",checked:W},form:T,onReset:eo}),el({ourProps:ea,theirProps:P,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[s,a]=(0,v.useLabels)(),[o,l]=(0,b.useDescriptions)(),c=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),d=(0,y.useRender)();return i.default.createElement(l,{name:"Switch.Description",value:o},i.default.createElement(a,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.default.createElement(k.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var C=e.i(888288),j=e.i(95779),S=e.i(444755),E=e.i(673706),N=e.i(829087);let O=(0,E.makeClassName)("Switch"),$=i.default.forwardRef((e,r)=>{let{checked:n,defaultChecked:s=!1,onChange:a,color:o,name:l,error:c,errorMessage:d,disabled:u,required:f,tooltip:h,id:p}=e,m=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:o?(0,E.getColorClassNames)(o,j.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:o?(0,E.getColorClassNames)(o,j.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[y,b]=(0,C.default)(s,n),[x,v]=(0,i.useState)(!1),{tooltipProps:k,getReferenceProps:w}=(0,N.useTooltip)(300);return i.default.createElement("div",{className:"flex flex-row items-center justify-start"},i.default.createElement(N.default,Object.assign({text:h},k)),i.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,k.refs.setReference]),className:(0,S.tremorTwMerge)(O("root"),"flex flex-row relative h-5")},m,w),i.default.createElement("input",{type:"checkbox",className:(0,S.tremorTwMerge)(O("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:f,checked:y,onChange:e=>{e.preventDefault()}}),i.default.createElement(_,{checked:y,onChange:e=>{b(e),null==a||a(e)},disabled:u,className:(0,S.tremorTwMerge)(O("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:p},i.default.createElement("span",{className:(0,S.tremorTwMerge)(O("sr-only"),"sr-only")},"Switch ",y?"on":"off"),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(O("background"),y?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(O("round"),y?(0,S.tremorTwMerge)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",x?(0,S.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&d?i.default.createElement("p",{className:(0,S.tremorTwMerge)(O("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});$.displayName="Switch",e.s(["Switch",()=>$],793130)},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let n={ttl:3600,lowest_latency_buffer:0},i=({routingStrategyArgs:e})=>{let i={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||n).map(([e,n])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof n?JSON.stringify(n,null,2):n?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:n})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,i])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:n[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:n[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==i||"null"===i?"":"object"==typeof i?JSON.stringify(i,null,2):i?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var a=e.i(199133);let o=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:n,routerFieldsMetadata:i,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:i.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(a.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(a.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),n[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:n[e]})]})},e))})})]});var l=e.i(793130);let c=({enabled:e,routerFieldsMetadata:r,onToggle:n})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(l.Switch,{checked:e,onChange:n,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:n,availableRoutingStrategies:a,routingStrategyDescriptions:l})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),a.length>0&&(0,t.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:a,routingStrategyDescriptions:l,routerFieldsMetadata:n,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:n,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(i,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:n})]})],158392);var d=e.i(994388),u=e.i(653496),f=e.i(107233),h=e.i(271645),p=e.i(888259),m=e.i(592968),g=e.i(361653),g=g;let y=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var b=e.i(37727);function x({group:e,onChange:r,availableModels:n,maxFallbacks:i}){let s=n.filter(t=>t!==e.primaryModel),o=e.fallbackModels.length{let n=[...e.fallbackModels];n.includes(t)&&(n=n.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:n})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:n.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(g.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(y,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",i," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${i} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let n=t.slice(0,i);r({...e,fallbackModels:n})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,n)=>{let i=e.fallbackModels.includes(r.value),s=i?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(m.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${i} used)`:`Maximum ${i} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((n,i)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:i+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:n})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==i),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(b.X,{className:"w-4 h-4"})})]},`${n}-${i}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:n,maxFallbacks:i=10,maxGroups:s=5}){let[a,o]=(0,h.useState)(e.length>0?e[0].id:"1");(0,h.useEffect)(()=>{e.length>0?e.some(e=>e.id===a)||o(e[0].id):o("1")},[e]);let l=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),o(t)},c=t=>{r(e.map(e=>e.id===t.id?t:e))},m=e.map((r,s)=>{let a=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:a,closable:e.length>1,children:(0,t.jsx)(x,{group:r,onChange:c,availableModels:n,maxFallbacks:i})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(d.Button,{variant:"primary",onClick:l,icon:()=>(0,t.jsx)(f.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:a,onChange:o,onEdit:(t,n)=>{"add"===n?l():"remove"===n&&e.length>1&&(t=>{if(1===e.length)return p.default.warning("At least one group is required");let n=e.filter(e=>e.id!==t);r(n),a===t&&n.length>0&&o(n[n.length-1].id)})(t)},items:m,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(199133),i=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:a,accessToken:o,placeholder:l="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[f,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,i.vectorStoreListCall)(o);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{h(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(n.Select,{mode:"multiple",placeholder:l,onChange:e,value:s,loading:f,className:a,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),n=e.i(201072),i=e.i(121229),s=e.i(726289),a=e.i(864517),o=e.i(343794),l=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),f=e.i(703923),h={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),n=!1;e.current.forEach(function(e){if(e){n=!0;var i=e.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(i.transitionDuration="0s, 0s")}}),n&&(r.current=Date.now())}),e.current},m=e.i(410160),g=e.i(392221),y=e.i(654310),b=0,x=(0,y.default)();let v=function(e){var r=t.useState(),n=(0,g.default)(r,2),i=n[0],s=n[1];return t.useEffect(function(){var e;s("rc_progress_".concat((x?(e=b,b+=1):e="TEST_OR_SSR",e)))},[]),e||i};var k=function(e){var r=e.bg,n=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function w(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),i="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(i)})}var _=t.forwardRef(function(e,r){var n=e.prefixCls,i=e.color,s=e.gradientId,a=e.radius,o=e.style,l=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,f=e.gapDegree,h=i&&"object"===(0,m.default)(i),p=u/2,g=t.createElement("circle",{className:"".concat(n,"-circle-path"),r:a,cx:p,cy:p,stroke:h?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==l),style:o,ref:r});if(!h)return g;var y="".concat(s,"-conic"),b=w(i,(360-f)/360),x=w(i,1),v="conic-gradient(from ".concat(f?"".concat(180+f/2,"deg"):"0deg",", ").concat(b.join(", "),")"),_="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(x.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:y},g),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(y,")")},t.createElement(k,{bg:_},t.createElement(k,{bg:v}))))}),C=function(e,t,r,n,i,s,a,o,l,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-n)/100*t;return"round"===l&&100!==n&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof o?o:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(i+r/100*360*((360-s)/360)+(0===s?0:({bottom:0,top:180,left:90,right:-90})[a]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},j=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function S(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let E=function(e){var r,n,i,s,a=(0,u.default)((0,u.default)({},h),e),l=a.id,c=a.prefixCls,g=a.steps,y=a.strokeWidth,b=a.trailWidth,x=a.gapDegree,k=void 0===x?0:x,w=a.gapPosition,E=a.trailColor,N=a.strokeLinecap,O=a.style,$=a.className,R=a.strokeColor,M=a.percent,T=(0,f.default)(a,j),D=v(l),P="".concat(D,"-gradient"),A=50-y/2,I=2*Math.PI*A,L=k>0?90+k/2:-90,F=(360-k)/360*I,z="object"===(0,m.default)(g)?g:{count:g,gap:2},B=z.count,W=z.gap,q=S(M),U=S(R),H=U.find(function(e){return e&&"object"===(0,m.default)(e)}),K=H&&"object"===(0,m.default)(H)?"butt":N,X=C(I,F,0,100,L,k,w,E,K,y),Q=p();return t.createElement("svg",(0,d.default)({className:(0,o.default)("".concat(c,"-circle"),$),viewBox:"0 0 ".concat(100," ").concat(100),style:O,id:l,role:"presentation"},T),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:A,cx:50,cy:50,stroke:E,strokeLinecap:K,strokeWidth:b||y,style:X}),B?(r=Math.round(B*(q[0]/100)),n=100/B,i=0,Array(B).fill(null).map(function(e,s){var a=s<=r-1?U[0]:E,o=a&&"object"===(0,m.default)(a)?"url(#".concat(P,")"):void 0,l=C(I,F,i,n,L,k,w,a,"butt",y,W);return i+=(F-l.strokeDashoffset+W)*100/F,t.createElement("circle",{key:s,className:"".concat(c,"-circle-path"),r:A,cx:50,cy:50,stroke:o,strokeWidth:y,opacity:1,style:l,ref:function(e){Q[s]=e}})})):(s=0,q.map(function(e,r){var n=U[r]||U[U.length-1],i=C(I,F,s,e,L,k,w,n,K,y);return s+=e,t.createElement(_,{key:r,color:n,ptg:e,radius:A,prefixCls:c,gradientId:P,style:i,strokeLinecap:K,strokeWidth:y,gapDegree:k,ref:function(e){Q[r]=e},size:100})}).reverse()))};var N=e.i(491816);e.i(765846);var O=e.i(896091);function $(e){return!e||e<0?0:e>100?100:e}function R({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let M=(e,t,r)=>{var n,i,s,a;let o=-1,l=-1;if("step"===t){let t=r.steps,n=r.strokeWidth;"string"==typeof e||void 0===e?(o="small"===e?2:14,l=null!=n?n:8):"number"==typeof e?[o,l]=[e,e]:[o=14,l=8]=Array.isArray(e)?e:[e.width,e.height],o*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?l=t||("small"===e?6:8):"number"==typeof e?[o,l]=[e,e]:[o=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[o,l]="small"===e?[60,60]:[120,120]:"number"==typeof e?[o,l]=[e,e]:Array.isArray(e)&&(o=null!=(i=null!=(n=e[0])?n:e[1])?i:120,l=null!=(a=null!=(s=e[0])?s:e[1])?a:120));return[o,l]},T=e=>{let{prefixCls:r,trailColor:n=null,strokeLinecap:i="round",gapPosition:s,gapDegree:a,width:l=120,type:c,children:d,success:u,size:f=l,steps:h}=e,[p,m]=M(f,"circle"),{strokeWidth:g}=e;void 0===g&&(g=Math.max(3/p*100,6));let y=t.useMemo(()=>a||0===a?a:"dashboard"===c?75:void 0,[a,c]),b=(({percent:e,success:t,successPercent:r})=>{let n=$(R({success:t,successPercent:r}));return[n,$($(e)-n)]})(e),x="[object Object]"===Object.prototype.toString.call(e.strokeColor),v=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||O.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),k=(0,o.default)(`${r}-inner`,{[`${r}-circle-gradient`]:x}),w=t.createElement(E,{steps:h,percent:h?b[1]:b,strokeWidth:g,trailWidth:g,strokeColor:h?v[1]:v,strokeLinecap:i,trailColor:n,prefixCls:r,gapDegree:y,gapPosition:s||"dashboard"===c&&"bottom"||void 0}),_=p<=20,C=t.createElement("div",{className:k,style:{width:p,height:m,fontSize:.15*p+6}},w,!_&&d);return _?t.createElement(N.default,{title:d},C):C};e.i(296059);var D=e.i(694758),P=e.i(915654),A=e.i(183293),I=e.i(246422),L=e.i(838378);let F="--progress-line-stroke-color",z="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new D.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},W=(0,I.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,L.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,A.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${F})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,P.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var q=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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let U=e=>{let{prefixCls:r,direction:n,percent:i,size:s,strokeWidth:a,strokeColor:l,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:f,success:h}=e,{align:p,type:m}=f,g=l&&"string"!=typeof l?((e,t)=>{let{from:r=O.presetPrimaryColors.blue,to:n=O.presetPrimaryColors.blue,direction:i="rtl"===t?"to left":"to right"}=e,s=q(e,["from","to","direction"]);if(0!==Object.keys(s).length){let e,t=(e=[],Object.keys(s).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:s[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${i}, ${t})`;return{background:r,[F]:r}}let a=`linear-gradient(${i}, ${r}, ${n})`;return{background:a,[F]:a}})(l,n):{[F]:l,background:l},y="square"===c||"butt"===c?0:void 0,[b,x]=M(null!=s?s:[-1,a||("small"===s?6:8)],"line",{strokeWidth:a}),v=Object.assign(Object.assign({width:`${$(i)}%`,height:x,borderRadius:y},g),{[z]:$(i)/100}),k=R(e),w={width:`${$(k)}%`,height:x,borderRadius:y,backgroundColor:null==h?void 0:h.strokeColor},_=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:y}},t.createElement("div",{className:(0,o.default)(`${r}-bg`,`${r}-bg-${m}`),style:v},"inner"===m&&d),void 0!==k&&t.createElement("div",{className:`${r}-success-bg`,style:w})),C="outer"===m&&"start"===p,j="outer"===m&&"end"===p;return"outer"===m&&"center"===p?t.createElement("div",{className:`${r}-layout-bottom`},_,d):t.createElement("div",{className:`${r}-outer`,style:{width:b<0?"100%":b}},C&&d,_,j&&d)},H=e=>{let{size:r,steps:n,rounding:i=Math.round,percent:s=0,strokeWidth:a=8,strokeColor:l,trailColor:c=null,prefixCls:d,children:u}=e,f=i(s/100*n),[h,p]=M(null!=r?r:["small"===r?2:14,a],"step",{steps:n,strokeWidth:a}),m=h/n,g=Array.from({length:n});for(let e=0;et.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let X=["normal","exception","active","success"],Q=t.forwardRef((e,d)=>{let u,{prefixCls:f,className:h,rootClassName:p,steps:m,strokeColor:g,percent:y=0,size:b="default",showInfo:x=!0,type:v="line",status:k,format:w,style:_,percentPosition:C={}}=e,j=K(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:S="end",type:E="outer"}=C,N=Array.isArray(g)?g[0]:g,O="string"==typeof g||Array.isArray(g)?g:void 0,D=t.useMemo(()=>{if(N){let e="string"==typeof N?N:Object.values(N)[0];return new r.FastColor(e).isLight()}return!1},[g]),P=t.useMemo(()=>{var t,r;let n=R(e);return Number.parseInt(void 0!==n?null==(t=null!=n?n:0)?void 0:t.toString():null==(r=null!=y?y:0)?void 0:r.toString(),10)},[y,e.success,e.successPercent]),A=t.useMemo(()=>!X.includes(k)&&P>=100?"success":k||"normal",[k,P]),{getPrefixCls:I,direction:L,progress:F}=t.useContext(c.ConfigContext),z=I("progress",f),[B,q,Q]=W(z),V="line"===v,G=V&&!m,J=t.useMemo(()=>{let r;if(!x)return null;let l=R(e),c=w||(e=>`${e}%`),d=V&&D&&"inner"===E;return"inner"===E||w||"exception"!==A&&"success"!==A?r=c($(y),$(l)):"exception"===A?r=V?t.createElement(s.default,null):t.createElement(a.default,null):"success"===A&&(r=V?t.createElement(n.default,null):t.createElement(i.default,null)),t.createElement("span",{className:(0,o.default)(`${z}-text`,{[`${z}-text-bright`]:d,[`${z}-text-${S}`]:G,[`${z}-text-${E}`]:G}),title:"string"==typeof r?r:void 0},r)},[x,y,P,A,v,z,w]);"line"===v?u=m?t.createElement(H,Object.assign({},e,{strokeColor:O,prefixCls:z,steps:"object"==typeof m?m.count:m}),J):t.createElement(U,Object.assign({},e,{strokeColor:N,prefixCls:z,direction:L,percentPosition:{align:S,type:E}}),J):("circle"===v||"dashboard"===v)&&(u=t.createElement(T,Object.assign({},e,{strokeColor:N,prefixCls:z,progressStatus:A}),J));let Y=(0,o.default)(z,`${z}-status-${A}`,{[`${z}-${"dashboard"===v&&"circle"||v}`]:"line"!==v,[`${z}-inline-circle`]:"circle"===v&&M(b,"circle")[0]<=20,[`${z}-line`]:G,[`${z}-line-align-${S}`]:G,[`${z}-line-position-${E}`]:G,[`${z}-steps`]:m,[`${z}-show-info`]:x,[`${z}-${b}`]:"string"==typeof b,[`${z}-rtl`]:"rtl"===L},null==F?void 0:F.className,h,p,q,Q);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==F?void 0:F.style),_),className:Y,role:"progressbar","aria-valuenow":P,"aria-valuemin":0,"aria-valuemax":100},(0,l.default)(j,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,Q],309821)},597440,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:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["default",0,s],597440)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,309426,e=>{"use strict";var t=e.i(290571),r=e.i(444755),n=e.i(673706),i=e.i(271645),s=e.i(46757);let a=(0,n.makeClassName)("Col"),o=i.default.forwardRef((e,n)=>{let o,l,c,d,{numColSpan:u=1,numColSpanSm:f,numColSpanMd:h,numColSpanLg:p,children:m,className:g}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),b=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.default.createElement("div",Object.assign({ref:n,className:(0,r.tremorTwMerge)(a("root"),(o=b(u,s.colSpan),l=b(f,s.colSpanSm),c=b(h,s.colSpanMd),d=b(p,s.colSpanLg),(0,r.tremorTwMerge)(o,l,c,d)),g)},y),m)});o.displayName="Col",e.s(["Col",()=>o],309426)},988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(779241),i=e.i(599724),s=e.i(199133),a=e.i(983561),o=e.i(689020);e.s(["default",0,({accessToken:e,value:l,placeholder:c="Select a Model",onChange:d,disabled:u=!1,style:f,className:h,showLabel:p=!0,labelText:m="Select Model"})=>{let[g,y]=(0,r.useState)(l),[b,x]=(0,r.useState)(!1),[v,k]=(0,r.useState)([]),w=(0,r.useRef)(null);return(0,r.useEffect)(()=>{y(l)},[l]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,o.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&k(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[p&&(0,t.jsxs)(i.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.RobotOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{value:g,placeholder:c,onChange:e=>{"custom"===e?(x(!0),y(void 0)):(x(!1),y(e),d&&d(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...f},showSearch:!0,className:`rounded-md ${h||""}`,disabled:u}),b&&(0,t.jsx)(n.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{y(e),d&&d(e)},500)},disabled:u})]})}])},519756,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:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,n]of Object.entries(t))e in r&&(r[e]=n);return r}let n=(e,t=0,r=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let i={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",i);let s=e<0?"-":"",a=Math.abs(e),o=a,l="";return a>=1e6?(o=a/1e6,l="M"):a>=1e3&&(o=a/1e3,l="K"),`${s}${o.toLocaleString("en-US",i)}${l}`},i=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(e,r)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let i=document.execCommand("copy");if(document.body.removeChild(n),i)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,i,"formatNumberWithCommas",0,n,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=n(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},500727,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),n=e.i(764205),i=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,i.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,n.fetchMCPServers)(r,e),enabled:!!r})}],500727);var a=e.i(843476),o=e.i(271645),l=e.i(536916),c=e.i(599724),d=e.i(409797),u=e.i(246349),u=u;let f=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,h=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,p=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,m=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function g(e,t=""){let r=e.toLowerCase();if(m.test(r))return"read";if(f.test(r))return"delete";if(p.test(r))return"update";if(h.test(r))return"create";if(t){let e=t.toLowerCase();if(m.test(e))return"read";if(f.test(e))return"delete";if(p.test(e))return"update";if(h.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[g(r.name,r.description)].push(r);return t}let b={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,b,"classifyToolOp",()=>g,"groupToolsByCrud",()=>y],696609);let x=["read","create","update","delete","unknown"],v={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},k={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:n=!1,searchFilter:i=""})=>{let[s,f]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),h=(0,o.useMemo)(()=>y(e),[e]),p=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),m=e=>{if(n)return;let t=new Set(p);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,a.jsx)("div",{className:"space-y-3",children:x.map(e=>{let t,o=h[e];if(0===o.length)return null;if(i){let e=i.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let g=b[e],y=(t=h[e]).length>0&&t.every(e=>p.has(e.name)),x=(e=>{let t=h[e];if(0===t.length)return!1;let r=t.filter(e=>p.has(e.name)).length;return r>0&&r{f(t=>({...t,[e]:!t[e]}))},children:[_?(0,a.jsx)(u.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,a.jsx)(d.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:g.label}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${v[g.risk]}`,children:"high"===g.risk?"High Risk":"medium"===g.risk?"Medium Risk":"low"===g.risk?"Safe":"Unclassified"}),(0,a.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>p.has(e.name)).length,"/",o.length," allowed"]})]}),!n&&(0,a.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,a.jsx)(c.Text,{className:"text-xs text-gray-500",children:y?"All on":x?"Partial":"All off"}),(0,a.jsx)(l.Checkbox,{checked:y,indeterminate:x,onChange:t=>((e,t)=>{if(n)return;let i=new Set(p);for(let r of h[e])t?i.add(r.name):i.delete(r.name);r(Array.from(i))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!_&&(0,a.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:g.description}),!_&&(0,a.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!i||e.name.toLowerCase().includes(i.toLowerCase())||(e.description??"").toLowerCase().includes(i.toLowerCase())).map(e=>{let t,r=(t=e.name,p.has(t));return(0,a.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!n?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>m(e.name),children:[(0,a.jsx)(l.Checkbox,{checked:r,onChange:()=>m(e.name),disabled:n,onClick:e=>e.stopPropagation()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,a.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,a.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},743151,(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var i=o(e.r(271645)),s=o(e.r(844343)),a=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,a),n=i.default.Children.only(t);return i.default.cloneElement(n,c(c({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var n=e.r(743151).CopyToClipboard;n.CopyToClipboard=n,t.exports=n},59935,(e,t,r)=>{var n;let i;e.e,n=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},n=!r.document&&!!r.postMessage,i=r.IS_PAPA_WORKER||!1,s={},a=0,o={};function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=x(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,i)r.postMessage({results:s,workerId:o.WORKER_ID,finished:n});else if(k(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!n||!k(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){k(this._config.error)?this._config.error(e):i&&this._config.error&&r.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e,r,i=this._config.downloadRequestHeaders;for(r in i)t.setRequestHeader(r,i[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),l.call(this,e);var t,r,n="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function f(e){l.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(e){var t,r,n,i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,c=0,d=0,u=!1,f=!1,h=[],g={data:[],errors:[],meta:{}};function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(g&&n&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!y(e)})),v()){if(g)if(Array.isArray(g.data[0])){for(var t,r=0;v()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(s.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(o=e.header?i>=h.length?"__parsed_extra":h[i]:o,l=e.transform?e.transform(l,o):l);"__parsed_extra"===o?(n[o]=n[o]||[],n[o].push(l)):n[o]=l}return e.header&&(i>h.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+i,d+r):ie.preview?r.abort():(g.data=g.data[0],i(g,l))))}),this.parse=function(i,s,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(i,l)),n=!1,e.delimiter?k(e.delimiter)&&(e.delimiter=e.delimiter(i),g.meta.delimiter=e.delimiter):((l=((t,r,n,i,s)=>{var a,l,c,d;s=s||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var u=0;u=r.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode,l=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,u=d;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof t||-1=s)return L(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:f}),M++}}else if(n&&0===j.length&&o.substring(f,f+v)===n){if(-1===$)return L();f=$+x,$=o.indexOf(r,f),O=o.indexOf(t,f)}else if(-1!==O&&(O<$||-1===$))j.push(o.substring(f,O)),f=O+b,O=o.indexOf(t,f);else{if(-1===$)break;if(j.push(o.substring(f,$)),I($+x),w&&(F(),h))return L();if(s&&_.length>=s)return L(!0)}return A();function D(e){_.push(e),S=f}function P(e){return -1!==e&&(e=o.substring(M+1,e))&&""===e.trim()?e.length:0}function A(e){return g||(void 0===e&&(e=o.substring(f)),j.push(e),f=y,D(j),w&&F()),L()}function I(e){f=e,D(j),j=[],$=o.indexOf(r,f)}function L(n){if(e.header&&!m&&_.length&&!c){var i=_[0],s=Object.create(null),a=new Set(i);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,c);if("object"==typeof e[0])return h(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function h(e,t,r){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),n=e.i(371330),i=e.i(271645),s=e.i(394487),a=e.i(503269),o=e.i(214520),l=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),f=e.i(601893),h=e.i(140721),p=e.i(942803),m=e.i(233538),g=e.i(694421),y=e.i(700020),b=e.i(35889),x=e.i(998348),v=e.i(722678);let k=(0,i.createContext)(null);k.displayName="GroupContext";let w=i.Fragment,_=Object.assign((0,y.forwardRefWithAs)(function(e,t){var w;let _=(0,i.useId)(),C=(0,p.useProvidedId)(),j=(0,f.useDisabled)(),{id:S=C||`headlessui-switch-${_}`,disabled:E=j||!1,checked:N,defaultChecked:O,onChange:$,name:R,value:M,form:T,autoFocus:D=!1,...P}=e,A=(0,i.useContext)(k),[I,L]=(0,i.useState)(null),F=(0,i.useRef)(null),z=(0,u.useSyncRefs)(F,t,null===A?null:A.setSwitch,L),B=(0,o.useDefaultValue)(O),[W,q]=(0,a.useControllable)(N,$,null!=B&&B),U=(0,l.useDisposables)(),[H,K]=(0,i.useState)(!1),X=(0,c.useEvent)(()=>{K(!0),null==q||q(!W),U.nextFrame(()=>{K(!1)})}),Q=(0,c.useEvent)(e=>{if((0,m.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),V=(0,c.useEvent)(e=>{e.key===x.Keys.Space?(e.preventDefault(),X()):e.key===x.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),G=(0,c.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Y=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:D}),{isHovered:et,hoverProps:er}=(0,n.useHover)({isDisabled:E}),{pressed:en,pressProps:ei}=(0,s.useActivePress)({disabled:E}),es=(0,i.useMemo)(()=>({checked:W,disabled:E,hover:et,focus:Z,active:en,autofocus:D,changing:H}),[W,et,Z,en,E,H,D]),ea=(0,y.mergeProps)({id:S,ref:z,role:"switch",type:(0,d.useResolveButtonType)(e,I),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":W,"aria-labelledby":J,"aria-describedby":Y,disabled:E||void 0,autoFocus:D,onClick:Q,onKeyUp:V,onKeyPress:G},ee,er,ei),eo=(0,i.useCallback)(()=>{if(void 0!==B)return null==q?void 0:q(B)},[q,B]),el=(0,y.useRender)();return i.default.createElement(i.default.Fragment,null,null!=R&&i.default.createElement(h.FormFields,{disabled:E,data:{[R]:M||"on"},overrides:{type:"checkbox",checked:W},form:T,onReset:eo}),el({ourProps:ea,theirProps:P,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[s,a]=(0,v.useLabels)(),[o,l]=(0,b.useDescriptions)(),c=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),d=(0,y.useRender)();return i.default.createElement(l,{name:"Switch.Description",value:o},i.default.createElement(a,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.default.createElement(k.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var C=e.i(888288),j=e.i(95779),S=e.i(444755),E=e.i(673706),N=e.i(829087);let O=(0,E.makeClassName)("Switch"),$=i.default.forwardRef((e,r)=>{let{checked:n,defaultChecked:s=!1,onChange:a,color:o,name:l,error:c,errorMessage:d,disabled:u,required:f,tooltip:h,id:p}=e,m=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:o?(0,E.getColorClassNames)(o,j.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:o?(0,E.getColorClassNames)(o,j.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[y,b]=(0,C.default)(s,n),[x,v]=(0,i.useState)(!1),{tooltipProps:k,getReferenceProps:w}=(0,N.useTooltip)(300);return i.default.createElement("div",{className:"flex flex-row items-center justify-start"},i.default.createElement(N.default,Object.assign({text:h},k)),i.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,k.refs.setReference]),className:(0,S.tremorTwMerge)(O("root"),"flex flex-row relative h-5")},m,w),i.default.createElement("input",{type:"checkbox",className:(0,S.tremorTwMerge)(O("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:f,checked:y,onChange:e=>{e.preventDefault()}}),i.default.createElement(_,{checked:y,onChange:e=>{b(e),null==a||a(e)},disabled:u,className:(0,S.tremorTwMerge)(O("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:p},i.default.createElement("span",{className:(0,S.tremorTwMerge)(O("sr-only"),"sr-only")},"Switch ",y?"on":"off"),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(O("background"),y?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(O("round"),y?(0,S.tremorTwMerge)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",x?(0,S.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&d?i.default.createElement("p",{className:(0,S.tremorTwMerge)(O("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});$.displayName="Switch",e.s(["Switch",()=>$],793130)},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let n={ttl:3600,lowest_latency_buffer:0},i=({routingStrategyArgs:e})=>{let i={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||n).map(([e,n])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof n?JSON.stringify(n,null,2):n?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:n})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,i])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:n[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:n[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==i||"null"===i?"":"object"==typeof i?JSON.stringify(i,null,2):i?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var a=e.i(199133);let o=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:n,routerFieldsMetadata:i,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:i.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(a.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(a.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),n[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:n[e]})]})},e))})})]});var l=e.i(793130);let c=({enabled:e,routerFieldsMetadata:r,onToggle:n})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(l.Switch,{checked:e,onChange:n,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:n,availableRoutingStrategies:a,routingStrategyDescriptions:l})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),a.length>0&&(0,t.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:a,routingStrategyDescriptions:l,routerFieldsMetadata:n,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:n,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(i,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:n})]})],158392);var d=e.i(994388),u=e.i(653496),f=e.i(107233),h=e.i(271645),p=e.i(888259),m=e.i(592968),g=e.i(361653),g=g;let y=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var b=e.i(37727);function x({group:e,onChange:r,availableModels:n,maxFallbacks:i}){let s=n.filter(t=>t!==e.primaryModel),o=e.fallbackModels.length{let n=[...e.fallbackModels];n.includes(t)&&(n=n.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:n})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:n.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(g.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(y,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",i," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${i} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let n=t.slice(0,i);r({...e,fallbackModels:n})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,n)=>{let i=e.fallbackModels.includes(r.value),s=i?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(m.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${i} used)`:`Maximum ${i} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((n,i)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:i+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:n})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==i),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(b.X,{className:"w-4 h-4"})})]},`${n}-${i}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:n,maxFallbacks:i=10,maxGroups:s=5}){let[a,o]=(0,h.useState)(e.length>0?e[0].id:"1");(0,h.useEffect)(()=>{e.length>0?e.some(e=>e.id===a)||o(e[0].id):o("1")},[e]);let l=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),o(t)},c=t=>{r(e.map(e=>e.id===t.id?t:e))},m=e.map((r,s)=>{let a=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:a,closable:e.length>1,children:(0,t.jsx)(x,{group:r,onChange:c,availableModels:n,maxFallbacks:i})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(d.Button,{variant:"primary",onClick:l,icon:()=>(0,t.jsx)(f.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:a,onChange:o,onEdit:(t,n)=>{"add"===n?l():"remove"===n&&e.length>1&&(t=>{if(1===e.length)return p.default.warning("At least one group is required");let n=e.filter(e=>e.id!==t);r(n),a===t&&n.length>0&&o(n[n.length-1].id)})(t)},items:m,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(199133),i=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:a,accessToken:o,placeholder:l="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[f,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,i.vectorStoreListCall)(o);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{h(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(n.Select,{mode:"multiple",placeholder:l,onChange:e,value:s,loading:f,className:a,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),n=e.i(201072),i=e.i(121229),s=e.i(726289),a=e.i(864517),o=e.i(343794),l=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),f=e.i(703923),h={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),n=!1;e.current.forEach(function(e){if(e){n=!0;var i=e.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(i.transitionDuration="0s, 0s")}}),n&&(r.current=Date.now())}),e.current},m=e.i(410160),g=e.i(392221),y=e.i(654310),b=0,x=(0,y.default)();let v=function(e){var r=t.useState(),n=(0,g.default)(r,2),i=n[0],s=n[1];return t.useEffect(function(){var e;s("rc_progress_".concat((x?(e=b,b+=1):e="TEST_OR_SSR",e)))},[]),e||i};var k=function(e){var r=e.bg,n=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function w(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),i="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(i)})}var _=t.forwardRef(function(e,r){var n=e.prefixCls,i=e.color,s=e.gradientId,a=e.radius,o=e.style,l=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,f=e.gapDegree,h=i&&"object"===(0,m.default)(i),p=u/2,g=t.createElement("circle",{className:"".concat(n,"-circle-path"),r:a,cx:p,cy:p,stroke:h?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==l),style:o,ref:r});if(!h)return g;var y="".concat(s,"-conic"),b=w(i,(360-f)/360),x=w(i,1),v="conic-gradient(from ".concat(f?"".concat(180+f/2,"deg"):"0deg",", ").concat(b.join(", "),")"),_="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(x.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:y},g),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(y,")")},t.createElement(k,{bg:_},t.createElement(k,{bg:v}))))}),C=function(e,t,r,n,i,s,a,o,l,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-n)/100*t;return"round"===l&&100!==n&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof o?o:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(i+r/100*360*((360-s)/360)+(0===s?0:({bottom:0,top:180,left:90,right:-90})[a]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},j=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function S(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let E=function(e){var r,n,i,s,a=(0,u.default)((0,u.default)({},h),e),l=a.id,c=a.prefixCls,g=a.steps,y=a.strokeWidth,b=a.trailWidth,x=a.gapDegree,k=void 0===x?0:x,w=a.gapPosition,E=a.trailColor,N=a.strokeLinecap,O=a.style,$=a.className,R=a.strokeColor,M=a.percent,T=(0,f.default)(a,j),D=v(l),P="".concat(D,"-gradient"),A=50-y/2,I=2*Math.PI*A,L=k>0?90+k/2:-90,F=(360-k)/360*I,z="object"===(0,m.default)(g)?g:{count:g,gap:2},B=z.count,W=z.gap,q=S(M),U=S(R),H=U.find(function(e){return e&&"object"===(0,m.default)(e)}),K=H&&"object"===(0,m.default)(H)?"butt":N,X=C(I,F,0,100,L,k,w,E,K,y),Q=p();return t.createElement("svg",(0,d.default)({className:(0,o.default)("".concat(c,"-circle"),$),viewBox:"0 0 ".concat(100," ").concat(100),style:O,id:l,role:"presentation"},T),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:A,cx:50,cy:50,stroke:E,strokeLinecap:K,strokeWidth:b||y,style:X}),B?(r=Math.round(B*(q[0]/100)),n=100/B,i=0,Array(B).fill(null).map(function(e,s){var a=s<=r-1?U[0]:E,o=a&&"object"===(0,m.default)(a)?"url(#".concat(P,")"):void 0,l=C(I,F,i,n,L,k,w,a,"butt",y,W);return i+=(F-l.strokeDashoffset+W)*100/F,t.createElement("circle",{key:s,className:"".concat(c,"-circle-path"),r:A,cx:50,cy:50,stroke:o,strokeWidth:y,opacity:1,style:l,ref:function(e){Q[s]=e}})})):(s=0,q.map(function(e,r){var n=U[r]||U[U.length-1],i=C(I,F,s,e,L,k,w,n,K,y);return s+=e,t.createElement(_,{key:r,color:n,ptg:e,radius:A,prefixCls:c,gradientId:P,style:i,strokeLinecap:K,strokeWidth:y,gapDegree:k,ref:function(e){Q[r]=e},size:100})}).reverse()))};var N=e.i(491816);e.i(765846);var O=e.i(896091);function $(e){return!e||e<0?0:e>100?100:e}function R({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let M=(e,t,r)=>{var n,i,s,a;let o=-1,l=-1;if("step"===t){let t=r.steps,n=r.strokeWidth;"string"==typeof e||void 0===e?(o="small"===e?2:14,l=null!=n?n:8):"number"==typeof e?[o,l]=[e,e]:[o=14,l=8]=Array.isArray(e)?e:[e.width,e.height],o*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?l=t||("small"===e?6:8):"number"==typeof e?[o,l]=[e,e]:[o=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[o,l]="small"===e?[60,60]:[120,120]:"number"==typeof e?[o,l]=[e,e]:Array.isArray(e)&&(o=null!=(i=null!=(n=e[0])?n:e[1])?i:120,l=null!=(a=null!=(s=e[0])?s:e[1])?a:120));return[o,l]},T=e=>{let{prefixCls:r,trailColor:n=null,strokeLinecap:i="round",gapPosition:s,gapDegree:a,width:l=120,type:c,children:d,success:u,size:f=l,steps:h}=e,[p,m]=M(f,"circle"),{strokeWidth:g}=e;void 0===g&&(g=Math.max(3/p*100,6));let y=t.useMemo(()=>a||0===a?a:"dashboard"===c?75:void 0,[a,c]),b=(({percent:e,success:t,successPercent:r})=>{let n=$(R({success:t,successPercent:r}));return[n,$($(e)-n)]})(e),x="[object Object]"===Object.prototype.toString.call(e.strokeColor),v=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||O.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),k=(0,o.default)(`${r}-inner`,{[`${r}-circle-gradient`]:x}),w=t.createElement(E,{steps:h,percent:h?b[1]:b,strokeWidth:g,trailWidth:g,strokeColor:h?v[1]:v,strokeLinecap:i,trailColor:n,prefixCls:r,gapDegree:y,gapPosition:s||"dashboard"===c&&"bottom"||void 0}),_=p<=20,C=t.createElement("div",{className:k,style:{width:p,height:m,fontSize:.15*p+6}},w,!_&&d);return _?t.createElement(N.default,{title:d},C):C};e.i(296059);var D=e.i(694758),P=e.i(915654),A=e.i(183293),I=e.i(246422),L=e.i(838378);let F="--progress-line-stroke-color",z="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new D.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},W=(0,I.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,L.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,A.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${F})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,P.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var q=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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let U=e=>{let{prefixCls:r,direction:n,percent:i,size:s,strokeWidth:a,strokeColor:l,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:f,success:h}=e,{align:p,type:m}=f,g=l&&"string"!=typeof l?((e,t)=>{let{from:r=O.presetPrimaryColors.blue,to:n=O.presetPrimaryColors.blue,direction:i="rtl"===t?"to left":"to right"}=e,s=q(e,["from","to","direction"]);if(0!==Object.keys(s).length){let e,t=(e=[],Object.keys(s).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:s[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${i}, ${t})`;return{background:r,[F]:r}}let a=`linear-gradient(${i}, ${r}, ${n})`;return{background:a,[F]:a}})(l,n):{[F]:l,background:l},y="square"===c||"butt"===c?0:void 0,[b,x]=M(null!=s?s:[-1,a||("small"===s?6:8)],"line",{strokeWidth:a}),v=Object.assign(Object.assign({width:`${$(i)}%`,height:x,borderRadius:y},g),{[z]:$(i)/100}),k=R(e),w={width:`${$(k)}%`,height:x,borderRadius:y,backgroundColor:null==h?void 0:h.strokeColor},_=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:y}},t.createElement("div",{className:(0,o.default)(`${r}-bg`,`${r}-bg-${m}`),style:v},"inner"===m&&d),void 0!==k&&t.createElement("div",{className:`${r}-success-bg`,style:w})),C="outer"===m&&"start"===p,j="outer"===m&&"end"===p;return"outer"===m&&"center"===p?t.createElement("div",{className:`${r}-layout-bottom`},_,d):t.createElement("div",{className:`${r}-outer`,style:{width:b<0?"100%":b}},C&&d,_,j&&d)},H=e=>{let{size:r,steps:n,rounding:i=Math.round,percent:s=0,strokeWidth:a=8,strokeColor:l,trailColor:c=null,prefixCls:d,children:u}=e,f=i(s/100*n),[h,p]=M(null!=r?r:["small"===r?2:14,a],"step",{steps:n,strokeWidth:a}),m=h/n,g=Array.from({length:n});for(let e=0;et.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let X=["normal","exception","active","success"],Q=t.forwardRef((e,d)=>{let u,{prefixCls:f,className:h,rootClassName:p,steps:m,strokeColor:g,percent:y=0,size:b="default",showInfo:x=!0,type:v="line",status:k,format:w,style:_,percentPosition:C={}}=e,j=K(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:S="end",type:E="outer"}=C,N=Array.isArray(g)?g[0]:g,O="string"==typeof g||Array.isArray(g)?g:void 0,D=t.useMemo(()=>{if(N){let e="string"==typeof N?N:Object.values(N)[0];return new r.FastColor(e).isLight()}return!1},[g]),P=t.useMemo(()=>{var t,r;let n=R(e);return Number.parseInt(void 0!==n?null==(t=null!=n?n:0)?void 0:t.toString():null==(r=null!=y?y:0)?void 0:r.toString(),10)},[y,e.success,e.successPercent]),A=t.useMemo(()=>!X.includes(k)&&P>=100?"success":k||"normal",[k,P]),{getPrefixCls:I,direction:L,progress:F}=t.useContext(c.ConfigContext),z=I("progress",f),[B,q,Q]=W(z),V="line"===v,G=V&&!m,J=t.useMemo(()=>{let r;if(!x)return null;let l=R(e),c=w||(e=>`${e}%`),d=V&&D&&"inner"===E;return"inner"===E||w||"exception"!==A&&"success"!==A?r=c($(y),$(l)):"exception"===A?r=V?t.createElement(s.default,null):t.createElement(a.default,null):"success"===A&&(r=V?t.createElement(n.default,null):t.createElement(i.default,null)),t.createElement("span",{className:(0,o.default)(`${z}-text`,{[`${z}-text-bright`]:d,[`${z}-text-${S}`]:G,[`${z}-text-${E}`]:G}),title:"string"==typeof r?r:void 0},r)},[x,y,P,A,v,z,w]);"line"===v?u=m?t.createElement(H,Object.assign({},e,{strokeColor:O,prefixCls:z,steps:"object"==typeof m?m.count:m}),J):t.createElement(U,Object.assign({},e,{strokeColor:N,prefixCls:z,direction:L,percentPosition:{align:S,type:E}}),J):("circle"===v||"dashboard"===v)&&(u=t.createElement(T,Object.assign({},e,{strokeColor:N,prefixCls:z,progressStatus:A}),J));let Y=(0,o.default)(z,`${z}-status-${A}`,{[`${z}-${"dashboard"===v&&"circle"||v}`]:"line"!==v,[`${z}-inline-circle`]:"circle"===v&&M(b,"circle")[0]<=20,[`${z}-line`]:G,[`${z}-line-align-${S}`]:G,[`${z}-line-position-${E}`]:G,[`${z}-steps`]:m,[`${z}-show-info`]:x,[`${z}-${b}`]:"string"==typeof b,[`${z}-rtl`]:"rtl"===L},null==F?void 0:F.className,h,p,q,Q);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==F?void 0:F.style),_),className:Y,role:"progressbar","aria-valuenow":P,"aria-valuemin":0,"aria-valuemax":100},(0,l.default)(j,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,Q],309821)},597440,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:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["default",0,s],597440)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9d3522e82d255059.js b/litellm/proxy/_experimental/out/_next/static/chunks/8a00371921c281d5.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/9d3522e82d255059.js rename to litellm/proxy/_experimental/out/_next/static/chunks/8a00371921c281d5.js index 6f125c79d46..8119d979e2f 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/9d3522e82d255059.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/8a00371921c281d5.js @@ -397,7 +397,7 @@ audio_file = open("path/to/your/audio/file.mp3", "rb") response = client.audio.transcriptions.create( model="${y}", file=audio_file${n?`, - prompt="${n.replace(/"/g,'\\"')}"`:""} + prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} ) print(response.text) diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8a76c69fc7bff9fe.js b/litellm/proxy/_experimental/out/_next/static/chunks/8bbdbfcebe75b16a.js similarity index 57% rename from litellm/proxy/_experimental/out/_next/static/chunks/8a76c69fc7bff9fe.js rename to litellm/proxy/_experimental/out/_next/static/chunks/8bbdbfcebe75b16a.js index ac2697d93f1..f45c8440230 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/8a76c69fc7bff9fe.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/8bbdbfcebe75b16a.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},916925,e=>{"use strict";var t,r=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let a={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},n="../ui/assets/logos/",i={"A2A Agent":`${n}a2a_agent.png`,Ai21:`${n}ai21.svg`,"Ai21 Chat":`${n}ai21.svg`,"AI/ML API":`${n}aiml_api.svg`,"Aiohttp Openai":`${n}openai_small.svg`,Anthropic:`${n}anthropic.svg`,"Anthropic Text":`${n}anthropic.svg`,AssemblyAI:`${n}assemblyai_small.png`,Azure:`${n}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${n}microsoft_azure.svg`,"Azure Text":`${n}microsoft_azure.svg`,Baseten:`${n}baseten.svg`,"Amazon Bedrock":`${n}bedrock.svg`,"Amazon Bedrock Mantle":`${n}bedrock.svg`,"AWS SageMaker":`${n}bedrock.svg`,Cerebras:`${n}cerebras.svg`,Cloudflare:`${n}cloudflare.svg`,Codestral:`${n}mistral.svg`,Cohere:`${n}cohere.svg`,"Cohere Chat":`${n}cohere.svg`,Cometapi:`${n}cometapi.svg`,Cursor:`${n}cursor.svg`,"Databricks (Qwen API)":`${n}databricks.svg`,Dashscope:`${n}dashscope.svg`,Deepseek:`${n}deepseek.svg`,Deepgram:`${n}deepgram.png`,DeepInfra:`${n}deepinfra.png`,ElevenLabs:`${n}elevenlabs.png`,"Fal AI":`${n}fal_ai.jpg`,"Featherless Ai":`${n}featherless.svg`,"Fireworks AI":`${n}fireworks.svg`,Friendliai:`${n}friendli.svg`,"Github Copilot":`${n}github_copilot.svg`,"Google AI Studio":`${n}google.svg`,GradientAI:`${n}gradientai.svg`,Groq:`${n}groq.svg`,vllm:`${n}vllm.png`,Huggingface:`${n}huggingface.svg`,Hyperbolic:`${n}hyperbolic.svg`,Infinity:`${n}infinity.png`,"Jina AI":`${n}jina.png`,"Lambda Ai":`${n}lambda.svg`,"Lm Studio":`${n}lmstudio.svg`,"Meta Llama":`${n}meta_llama.svg`,MiniMax:`${n}minimax.svg`,"Mistral AI":`${n}mistral.svg`,Moonshot:`${n}moonshot.svg`,Morph:`${n}morph.svg`,Nebius:`${n}nebius.svg`,Novita:`${n}novita.svg`,"Nvidia Nim":`${n}nvidia_nim.svg`,Ollama:`${n}ollama.svg`,"Ollama Chat":`${n}ollama.svg`,Oobabooga:`${n}openai_small.svg`,OpenAI:`${n}openai_small.svg`,"Openai Like":`${n}openai_small.svg`,"OpenAI Text Completion":`${n}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${n}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${n}openai_small.svg`,Openrouter:`${n}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${n}oracle.svg`,Perplexity:`${n}perplexity-ai.svg`,Recraft:`${n}recraft.svg`,Replicate:`${n}replicate.svg`,RunwayML:`${n}runwayml.png`,Sagemaker:`${n}bedrock.svg`,Sambanova:`${n}sambanova.svg`,"SAP Generative AI Hub":`${n}sap.png`,Snowflake:`${n}snowflake.svg`,"Text-Completion-Codestral":`${n}mistral.svg`,TogetherAI:`${n}togetherai.svg`,Topaz:`${n}topaz.svg`,Triton:`${n}nvidia_triton.png`,V0:`${n}v0.svg`,"Vercel Ai Gateway":`${n}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${n}google.svg`,"Vertex Ai Beta":`${n}google.svg`,Vllm:`${n}vllm.png`,VolcEngine:`${n}volcengine.png`,"Voyage AI":`${n}voyage.webp`,Watsonx:`${n}watsonx.svg`,"Watsonx Text":`${n}watsonx.svg`,xAI:`${n}xai.svg`,Xinference:`${n}xinference.svg`};e.s(["Providers",()=>r,"getPlaceholder",0,e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=r[t];return{logo:i[n],displayName:n}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let r=a[e];console.log(`Provider mapped to: ${r}`);let n=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider;(a===r||"string"==typeof a&&a.includes(r))&&n.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&n.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&n.push(e)}))),n},"providerLogoMap",0,i,"provider_map",0,a])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},94629,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,678745,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},798496,e=>{"use strict";var t=e.i(843476),r=e.i(152990),a=e.i(682830),n=e.i(271645),i=e.i(269200),l=e.i(427612),o=e.i(64848),s=e.i(942232),c=e.i(496020),u=e.i(977572),d=e.i(94629),m=e.i(360820),p=e.i(871943);function f({data:e=[],columns:f,isLoading:h=!1,defaultSorting:g=[],pagination:v,onPaginationChange:y,enablePagination:b=!1,onRowClick:x}){let[w,C]=n.default.useState(g),[A]=n.default.useState("onChange"),[S,_]=n.default.useState({}),[O,E]=n.default.useState({}),I=(0,r.useReactTable)({data:e,columns:f,state:{sorting:w,columnSizing:S,columnVisibility:O,...b&&v?{pagination:v}:{}},columnResizeMode:A,onSortingChange:C,onColumnSizingChange:_,onColumnVisibilityChange:E,...b&&y?{onPaginationChange:y}:{},getCoreRowModel:(0,a.getCoreRowModel)(),getSortedRowModel:(0,a.getSortedRowModel)(),...b?{getPaginationRowModel:(0,a.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:I.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(l.TableHead,{children:I.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(o.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,r.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(m.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(s.TableBody,{children:h?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:f.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):I.getRowModel().rows.length>0?I.getRowModel().rows.map(e=>(0,t.jsx)(c.TableRow,{onClick:()=>x?.(e.original),className:x?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,r.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:f.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>f])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(914949),n=e.i(404948);let i=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,i],836938);var l=e.i(613541),o=e.i(763731),s=e.i(242064),c=e.i(491816);e.i(793154);var u=e.i(880476),d=e.i(183293),m=e.i(717356),p=e.i(320560),f=e.i(307358),h=e.i(246422),g=e.i(838378),v=e.i(617933);let y=(0,h.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,a=(0,g.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:a,fontWeightStrong:n,innerPadding:i,boxShadowSecondary:l,colorTextHeading:o,borderRadiusLG:s,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:m,popoverBg:f,titleBorderBottom:h,innerContentPadding:g,titlePadding:v}=e;return[{[t]:Object.assign(Object.assign({},(0,d.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:s,boxShadow:l,padding:i},[`${t}-title`]:{minWidth:a,marginBottom:u,color:o,fontWeight:n,borderBottom:h,padding:v},[`${t}-inner-content`]:{color:r,padding:g}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:v.PresetColors.map(r=>{let a=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:a,padding:n,wireframe:i,zIndexPopupBase:l,borderRadiusLG:o,marginXS:s,lineType:c,colorSplit:u,paddingSM:d}=e,m=r-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:l+30},(0,f.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:o,limitVerticalRadius:!0})),{innerPadding:12*!i,titleMarginBottom:i?0:s,titlePadding:i?`${m/2}px ${n}px ${m/2-t}px`:0,titleBorderBottom:i?`${t}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${n}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var b=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let x=({title:e,content:r,prefixCls:a})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),r&&t.createElement("div",{className:`${a}-inner-content`},r)):null,w=e=>{let{hashId:a,prefixCls:n,className:l,style:o,placement:s="top",title:c,content:d,children:m}=e,p=i(c),f=i(d),h=(0,r.default)(a,n,`${n}-pure`,`${n}-placement-${s}`,l);return t.createElement("div",{className:h,style:o},t.createElement("div",{className:`${n}-arrow`}),t.createElement(u.Popup,Object.assign({},e,{className:a,prefixCls:n}),m||t.createElement(x,{prefixCls:n,title:p,content:f})))},C=e=>{let{prefixCls:a,className:n}=e,i=b(e,["prefixCls","className"]),{getPrefixCls:l}=t.useContext(s.ConfigContext),o=l("popover",a),[c,u,d]=y(o);return c(t.createElement(w,Object.assign({},i,{prefixCls:o,hashId:u,className:(0,r.default)(n,d)})))};e.s(["Overlay",0,x,"default",0,C],310730);var A=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let S=t.forwardRef((e,u)=>{var d,m;let{prefixCls:p,title:f,content:h,overlayClassName:g,placement:v="top",trigger:b="hover",children:w,mouseEnterDelay:C=.1,mouseLeaveDelay:S=.1,onOpenChange:_,overlayStyle:O={},styles:E,classNames:I}=e,T=A(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:R,className:N,style:j,classNames:M,styles:k}=(0,s.useComponentConfig)("popover"),$=R("popover",p),[L,P,z]=y($),D=R(),F=(0,r.default)(g,P,z,N,M.root,null==I?void 0:I.root),V=(0,r.default)(M.body,null==I?void 0:I.body),[B,H]=(0,a.default)(!1,{value:null!=(d=e.open)?d:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),G=(e,t)=>{H(e,!0),null==_||_(e,t)},U=i(f),W=i(h);return L(t.createElement(c.default,Object.assign({placement:v,trigger:b,mouseEnterDelay:C,mouseLeaveDelay:S},T,{prefixCls:$,classNames:{root:F,body:V},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},k.root),j),O),null==E?void 0:E.root),body:Object.assign(Object.assign({},k.body),null==E?void 0:E.body)},ref:u,open:B,onOpenChange:e=>{G(e)},overlay:U||W?t.createElement(x,{prefixCls:$,title:U,content:W}):null,transitionName:(0,l.getTransitionName)(D,"zoom-big",T.transitionName),"data-popover-inject":!0}),(0,o.cloneElement)(w,{onKeyDown:e=>{var r,a;(0,t.isValidElement)(w)&&(null==(a=null==w?void 0:(r=w.props).onKeyDown)||a.call(r,e)),e.keyCode===n.default.ESC&&G(!1,e)}})))});S._InternalPanelDoNotUseOrYouWillBeFired=C,e.s(["default",0,S],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},516015,(e,t,r)=>{},898547,(e,t,r)=>{var a=e.i(247167);e.r(516015);var n=e.r(271645),i=n&&"object"==typeof n&&"default"in n?n:{default:n},l=void 0!==a.default&&a.default.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,r=t.name,a=void 0===r?"stylesheet":r,n=t.optimizeForSpeed,i=void 0===n?l:n;c(o(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",c("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var s="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=s?s.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;ttypeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(a){l||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var a=this._tags[e];c(a,"old rule at index `"+e+"` not found"),a.textContent=t}return e},r.deleteRule=function(e){if("u"typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"u">>0},d={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),a=e+r;return d[a]||(d[a]="jsx-"+u(e+"-"+r)),d[a]}function p(e,t){"u"typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),a=r.styleId,n=r.rules;if(a in this._instancesCounts){this._instancesCounts[a]+=1;return}var i=n.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[a]=i,this._instancesCounts[a]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var a=this._fromServer&&this._fromServer[r];a?(a.parentNode.removeChild(a),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],a=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:a}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,a=e.id;if(r){var n=m(a,r);return{styleId:n,rules:Array.isArray(t)?t.map(function(e){return p(n,e)}):[p(n,t)]}}return{styleId:m(a),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),h=n.createContext(null);function g(){return new f}function v(){return n.useContext(h)}h.displayName="StyleSheetContext";var y=i.default.useInsertionEffect||i.default.useLayoutEffect,b="u">typeof window?g():void 0;function x(e){var t=b||v();return t&&("u"{t.exports=e.r(898547).style},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(562901),a=e.i(343794),n=e.i(914949),i=e.i(529681),l=e.i(242064),o=e.i(829672),s=e.i(285781),c=e.i(836938),u=e.i(920228),d=e.i(62405),m=e.i(408850),p=e.i(87414),f=e.i(310730);let h=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:r,antCls:a,zIndexPopup:n,colorText:i,colorWarning:l,marginXXS:o,marginXS:s,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:n,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:s,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${r}`]:{color:l,fontSize:c,lineHeight:1,marginInlineEnd:s},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:o,color:i}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:s}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var g=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let v=e=>{let{prefixCls:a,okButtonProps:n,cancelButtonProps:i,title:o,description:f,cancelText:h,okText:g,okType:v="primary",icon:y=t.createElement(r.default,null),showCancel:b=!0,close:x,onConfirm:w,onCancel:C,onPopupClick:A}=e,{getPrefixCls:S}=t.useContext(l.ConfigContext),[_]=(0,m.useLocale)("Popconfirm",p.default.Popconfirm),O=(0,c.getRenderPropValue)(o),E=(0,c.getRenderPropValue)(f);return t.createElement("div",{className:`${a}-inner-content`,onClick:A},t.createElement("div",{className:`${a}-message`},y&&t.createElement("span",{className:`${a}-message-icon`},y),t.createElement("div",{className:`${a}-message-text`},O&&t.createElement("div",{className:`${a}-title`},O),E&&t.createElement("div",{className:`${a}-description`},E))),t.createElement("div",{className:`${a}-buttons`},b&&t.createElement(u.default,Object.assign({onClick:C,size:"small"},i),h||(null==_?void 0:_.cancelText)),t.createElement(s.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,d.convertLegacyProps)(v)),n),actionFn:w,close:x,prefixCls:S("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},g||(null==_?void 0:_.okText))))};var y=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let b=t.forwardRef((e,s)=>{var c,u;let{prefixCls:d,placement:m="top",trigger:p="click",okType:f="primary",icon:g=t.createElement(r.default,null),children:b,overlayClassName:x,onOpenChange:w,onVisibleChange:C,overlayStyle:A,styles:S,classNames:_}=e,O=y(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:I,style:T,classNames:R,styles:N}=(0,l.useComponentConfig)("popconfirm"),[j,M]=(0,n.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(u=e.defaultOpen)?u:e.defaultVisible}),k=(e,t)=>{M(e,!0),null==C||C(e),null==w||w(e,t)},$=E("popconfirm",d),L=(0,a.default)($,I,x,R.root,null==_?void 0:_.root),P=(0,a.default)(R.body,null==_?void 0:_.body),[z]=h($);return z(t.createElement(o.default,Object.assign({},(0,i.default)(O,["title"]),{trigger:p,placement:m,onOpenChange:(t,r)=>{let{disabled:a=!1}=e;a||k(t,r)},open:j,ref:s,classNames:{root:L,body:P},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},N.root),T),A),null==S?void 0:S.root),body:Object.assign(Object.assign({},N.body),null==S?void 0:S.body)},content:t.createElement(v,Object.assign({okType:f,icon:g},e,{prefixCls:$,close:e=>{k(!1,e)},onConfirm:t=>{var r;return null==(r=e.onConfirm)?void 0:r.call(void 0,t)},onCancel:t=>{var r;k(!1,t),null==(r=e.onCancel)||r.call(void 0,t)}})),"data-popover-inject":!0}),b))});b._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:r,placement:n,className:i,style:o}=e,s=g(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("popconfirm",r),[d]=h(u);return d(t.createElement(f.default,{placement:n,className:(0,a.default)(u,i),style:o,content:t.createElement(v,Object.assign({prefixCls:u},s))}))},e.s(["Popconfirm",0,b],883552)},368670,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["StopOutlined",0,i],724154)},475647,286536,77705,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["PlusCircleOutlined",0,i],475647);var l=e.i(475254);let o=(0,l.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>o],286536);let s=(0,l.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>s],77705)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["SaveOutlined",0,i],987432)},178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},621192,e=>{"use strict";let t=e.i(264042).Row;e.s(["Row",0,t],621192)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["ReloadOutlined",0,i],91979)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["MinusCircleOutlined",0,i],564897)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var n=e.i(464571),i=e.i(311451),l=e.i(199133),o=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:s,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[m,p]=(0,r.useState)(!1),[f,h]=(0,r.useState)(u),[g,v]=(0,r.useState)({}),[y,b]=(0,r.useState)({}),[x,w]=(0,r.useState)({}),[C,A]=(0,r.useState)({}),S=(0,r.useCallback)((0,o.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){b(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);v(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),v(e=>({...e,[t.name]:[]}))}finally{b(e=>({...e,[t.name]:!1}))}}},300),[]),_=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!C[e.name]){b(t=>({...t,[e.name]:!0})),A(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");v(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),v(t=>({...t,[e.name]:[]}))}finally{b(t=>({...t,[e.name]:!1}))}}},[C]);(0,r.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!C[e.name]&&_(e)})},[m,e,_,C]);let O=(e,t)=>{let r={...f,[e]:t};h(r),s(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(n.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>p(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(n.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),h(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,n=e.find(e=>e.label===r||e.name===r);return n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:n.label||n.name}),n.isSearchable?(0,t.jsx)(l.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>O(n.name,e),onOpenChange:e=>{e&&n.isSearchable&&!C[n.name]&&_(n)},onSearch:e=>{w(t=>({...t,[n.name]:e})),n.searchFn&&S(e,n)},filterOption:!1,loading:y[n.name],options:g[n.name]||[],allowClear:!0,notFoundContent:y[n.name]?"Loading...":"No results found"}):n.options?(0,t.jsx)(l.Select,{className:"w-full",placeholder:`Select ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>O(n.name,e),allowClear:!0,children:n.options.map(e=>(0,t.jsx)(l.Select.Option,{value:e.value,children:e.label},e.value))}):n.customComponent?(a=n.customComponent,(0,t.jsx)(a,{value:f[n.name]||void 0,onChange:e=>O(n.name,e??""),placeholder:`Select ${n.label||n.name}...`})):(0,t.jsx)(i.Input,{className:"w-full",placeholder:`Enter ${n.label||n.name}...`,value:f[n.name]||"",onChange:e=>O(n.name,e.target.value),allowClear:!0})]},n.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let n of e){let e=n?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let i=n?.organization_id??n?.org_id;i&&"string"==typeof i&&r.add(i.trim());let l=n?.user_id;if(l&&"string"==typeof l){let e=n?.user?.user_email||l;a.set(l,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let n=new Set,i=new Set,l=new Map,o=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),s=o?.keys||[],c=o?.total_pages??1;r(s,n,i,l);let u=Math.min(c,10)-1;if(u>0){let o=Array.from({length:u},(r,n)=>(0,t.keyListCall)(e,null,a,null,null,null,n+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(o)))"fulfilled"===e.status&&r(e.value?.keys||[],n,i,l)}return{keyAliases:Array.from(n).sort(),organizationIds:Array.from(i).sort(),userIds:Array.from(l.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},n=async(e,r)=>{if(!e)return[];try{let a=[],n=1,i=!0;for(;i;){let l=await (0,t.teamListCall)(e,r||null,null);a=[...a,...l],n{if(!e)return[];try{let r=[],a=1,n=!0;for(;n;){let i=await (0,t.organizationListCall)(e);r=[...r,...i],a{"use strict";var t,r,a=e.i(843476),n=e.i(464571),i=e.i(326373),l=e.i(94629),o=e.i(360820),s=e.i(871943),c=e.i(271645);let u=c.forwardRef(function(e,t){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,u],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let r=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(o.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(s.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(u,{className:"h-4 w-4"})}];return(0,a.jsx)(i.Dropdown,{menu:{items:r,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(n.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(o.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(s.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(l.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var d=e.i(266027),m=e.i(954616),p=e.i(243652),f=e.i(135214),h=e.i(764205),g=((t={}).GENERAL_SETTINGS="general_settings",t),v=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let y=async(e,t)=>{try{let r=h.proxyBaseUrl?`${h.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,h.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,h.deriveErrorMessage)(e);throw(0,h.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},b=(0,p.createQueryKeys)("proxyConfig"),x=async(e,t)=>{try{let r=h.proxyBaseUrl?`${h.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,h.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,h.deriveErrorMessage)(e);throw(0,h.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>g,"GeneralSettingsFieldName",()=>v,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,f.default)();return(0,m.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await x(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,f.default)();return(0,d.useQuery)({queryKey:b.list({filters:{configType:e}}),queryFn:async()=>await y(t,e),enabled:!!t})}],153472)},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let a=e=>{var a=(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"},a),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),a=e.i(271645);let n=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))};e.s(["default",()=>n],446428);var i=e.i(746725),l=e.i(914189),o=e.i(553521),s=e.i(835696),c=e.i(941444),u=e.i(178677),d=e.i(294316),m=e.i(83733),p=e.i(233137),f=e.i(732607),h=e.i(397701),g=e.i(700020);function v(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:A)!==a.Fragment||1===a.default.Children.count(e.children)}let y=(0,a.createContext)(null);y.displayName="TransitionContext";var b=((t=b||{}).Visible="visible",t.Hidden="hidden",t);let x=(0,a.createContext)(null);function w(e){return"children"in e?w(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function C(e,t){let r=(0,c.useLatestValue)(e),n=(0,a.useRef)([]),s=(0,o.useIsMounted)(),u=(0,i.useDisposables)(),d=(0,l.useEvent)((e,t=g.RenderStrategy.Hidden)=>{let a=n.current.findIndex(({el:t})=>t===e);-1!==a&&((0,h.match)(t,{[g.RenderStrategy.Unmount](){n.current.splice(a,1)},[g.RenderStrategy.Hidden](){n.current[a].state="hidden"}}),u.microTask(()=>{var e;!w(n)&&s.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,l.useEvent)(e=>{let t=n.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>d(e,g.RenderStrategy.Unmount)}),p=(0,a.useRef)([]),f=(0,a.useRef)(Promise.resolve()),v=(0,a.useRef)({enter:[],leave:[]}),y=(0,l.useEvent)((e,r,a)=>{p.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter(([t])=>t!==e)),null==t||t.chains.current[r].push([e,new Promise(e=>{p.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(v.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?f.current=f.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(r)):a(r)}),b=(0,l.useEvent)((e,t,r)=>{Promise.all(v.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=p.current.shift())||e()}).then(()=>r(t))});return(0,a.useMemo)(()=>({children:n,register:m,unregister:d,onStart:y,onStop:b,wait:f,chains:v}),[m,d,n,y,b,v,f])}x.displayName="NestingContext";let A=a.Fragment,S=g.RenderFeatures.RenderStrategy,_=(0,g.forwardRefWithAs)(function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,c=(0,a.useRef)(null),m=v(e),f=(0,d.useSyncRefs)(...m?[c,t]:null===t?[]:[t]);(0,u.useServerHandoffComplete)();let h=(0,p.useOpenClosed)();if(void 0===r&&null!==h&&(r=(h&p.State.Open)===p.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[b,A]=(0,a.useState)(r?"visible":"hidden"),_=C(()=>{r||A("hidden")}),[E,I]=(0,a.useState)(!0),T=(0,a.useRef)([r]);(0,s.useIsoMorphicEffect)(()=>{!1!==E&&T.current[T.current.length-1]!==r&&(T.current.push(r),I(!1))},[T,r]);let R=(0,a.useMemo)(()=>({show:r,appear:n,initial:E}),[r,n,E]);(0,s.useIsoMorphicEffect)(()=>{r?A("visible"):w(_)||null===c.current||A("hidden")},[r,_]);let N={unmount:i},j=(0,l.useEvent)(()=>{var t;E&&I(!1),null==(t=e.beforeEnter)||t.call(e)}),M=(0,l.useEvent)(()=>{var t;E&&I(!1),null==(t=e.beforeLeave)||t.call(e)}),k=(0,g.useRender)();return a.default.createElement(x.Provider,{value:_},a.default.createElement(y.Provider,{value:R},k({ourProps:{...N,as:a.Fragment,children:a.default.createElement(O,{ref:f,...N,...o,beforeEnter:j,beforeLeave:M})},theirProps:{},defaultTag:a.Fragment,features:S,visible:"visible"===b,name:"Transition"})))}),O=(0,g.forwardRefWithAs)(function(e,t){var r,n;let{transition:i=!0,beforeEnter:o,afterEnter:c,beforeLeave:b,afterLeave:_,enter:O,enterFrom:E,enterTo:I,entered:T,leave:R,leaveFrom:N,leaveTo:j,...M}=e,[k,$]=(0,a.useState)(null),L=(0,a.useRef)(null),P=v(e),z=(0,d.useSyncRefs)(...P?[L,t,$]:null===t?[]:[t]),D=null==(r=M.unmount)||r?g.RenderStrategy.Unmount:g.RenderStrategy.Hidden,{show:F,appear:V,initial:B}=function(){let e=(0,a.useContext)(y);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[H,G]=(0,a.useState)(F?"visible":"hidden"),U=function(){let e=(0,a.useContext)(x);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:W,unregister:K}=U;(0,s.useIsoMorphicEffect)(()=>W(L),[W,L]),(0,s.useIsoMorphicEffect)(()=>{if(D===g.RenderStrategy.Hidden&&L.current)return F&&"visible"!==H?void G("visible"):(0,h.match)(H,{hidden:()=>K(L),visible:()=>W(L)})},[H,L,W,K,F,D]);let q=(0,u.useServerHandoffComplete)();(0,s.useIsoMorphicEffect)(()=>{if(P&&q&&"visible"===H&&null===L.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[L,H,q,P]);let X=B&&!V,Y=V&&F&&B,Z=(0,a.useRef)(!1),Q=C(()=>{Z.current||(G("hidden"),K(L))},U),J=(0,l.useEvent)(e=>{Z.current=!0,Q.onStart(L,e?"enter":"leave",e=>{"enter"===e?null==o||o():"leave"===e&&(null==b||b())})}),ee=(0,l.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Q.onStop(L,t,e=>{"enter"===e?null==c||c():"leave"===e&&(null==_||_())}),"leave"!==t||w(Q)||(G("hidden"),K(L))});(0,a.useEffect)(()=>{P&&i||(J(F),ee(F))},[F,P,i]);let et=!(!i||!P||!q||X),[,er]=(0,m.useTransition)(et,k,F,{start:J,end:ee}),ea=(0,g.compact)({ref:z,className:(null==(n=(0,f.classNames)(M.className,Y&&O,Y&&E,er.enter&&O,er.enter&&er.closed&&E,er.enter&&!er.closed&&I,er.leave&&R,er.leave&&!er.closed&&N,er.leave&&er.closed&&j,!er.transition&&F&&T))?void 0:n.trim())||void 0,...(0,m.transitionDataAttributes)(er)}),en=0;"visible"===H&&(en|=p.State.Open),"hidden"===H&&(en|=p.State.Closed),er.enter&&(en|=p.State.Opening),er.leave&&(en|=p.State.Closing);let ei=(0,g.useRender)();return a.default.createElement(x.Provider,{value:Q},a.default.createElement(p.OpenClosedProvider,{value:en},ei({ourProps:ea,theirProps:M,defaultTag:A,features:S,visible:"visible"===H,name:"Transition.Child"})))}),E=(0,g.forwardRefWithAs)(function(e,t){let r=null!==(0,a.useContext)(y),n=null!==(0,p.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!r&&n?a.default.createElement(_,{ref:t,...e}):a.default.createElement(O,{ref:t,...e}))}),I=Object.assign(_,{Child:E,Root:_});e.s(["Transition",()=>I],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),a=e.i(271645),n=e.i(446428),i=e.i(444755),l=e.i(673706),o=e.i(103471),s=e.i(495470),c=e.i(854056),u=e.i(888288);let d=(0,l.makeClassName)("Select"),m=a.default.forwardRef((e,l)=>{let{defaultValue:m="",value:p,onValueChange:f,placeholder:h="Select...",disabled:g=!1,icon:v,enableClear:y=!1,required:b,children:x,name:w,error:C=!1,errorMessage:A,className:S,id:_}=e,O=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),E=(0,a.useRef)(null),I=a.Children.toArray(x),[T,R]=(0,u.default)(m,p),N=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(x).filter(a.isValidElement);return(0,o.constructValueToNameMapping)(e)},[x]);return a.default.createElement("div",{className:(0,i.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",S)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:b,className:(0,i.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:T,onChange:e=>{e.preventDefault()},name:w,disabled:g,id:_,onFocus:()=>{let e=E.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},h),I.map(e=>{let t=e.props.value,r=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},r)})),a.default.createElement(s.Listbox,Object.assign({as:"div",ref:l,defaultValue:T,value:T,onChange:e=>{null==f||f(e),R(e)},disabled:g,id:_},O),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(s.ListboxButton,{ref:E,className:(0,i.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,o.getSelectButtonColors)((0,o.hasValue)(e),g,C))},v&&a.default.createElement("span",{className:(0,i.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(v,{className:(0,i.tremorTwMerge)(d("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=N.get(e))?t:h),a.default.createElement("span",{className:(0,i.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(r.default,{className:(0,i.tremorTwMerge)(d("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),y&&T?a.default.createElement("button",{type:"button",className:(0,i.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),R(""),null==f||f("")}},a.default.createElement(n.default,{className:(0,i.tremorTwMerge)(d("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(c.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(s.ListboxOptions,{anchor:"bottom start",className:(0,i.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},x)))})),C&&A?a.default.createElement("p",{className:(0,i.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},A):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},502275,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,r],502275)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:n="w-4 h-4"})=>{let[i,l]=(0,r.useState)(!1),{logo:o}=(0,a.getProviderLogoAndName)(e);return i||!o?(0,t.jsx)("div",{className:`${n} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:o,alt:`${e} logo`,className:n,onError:()=>l(!0)})}])},37091,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),n=e.i(673706),i=e.i(271645);let l=i.default.forwardRef((e,l)=>{let{color:o,children:s,className:c}=e,u=(0,t.__rest)(e,["color","children","className"]);return i.default.createElement("p",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o?(0,n.getColorClassNames)(o,r.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},u),s)});l.displayName="Subtitle",e.s(["Subtitle",()=>l],37091)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,n]=(0,t.useState)([]),{accessToken:i,userId:l,userRole:o}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{n(await (0,a.fetchTeams)(i,l,o,null))})()},[i,l,o]),{teams:e,setTeams:n}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let n=t(e);return isNaN(a)?r(e,NaN):(a&&n.setDate(n.getDate()+a),n)}function n(e,a){let n=t(e);if(isNaN(a))return r(e,NaN);if(!a)return n;let i=n.getDate(),l=r(e,n.getTime());return(l.setMonth(n.getMonth()+a+1,0),i>=l.getDate())?l:(n.setFullYear(l.getFullYear(),l.getMonth(),i),n)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>n],497245)},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),n=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:l,accessToken:o,disabled:s})=>{let[c,u]=(0,r.useState)([]),[d,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,n.getGuardrailsList)(o);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:s,placeholder:s?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:l,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),n=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${a})${e.description?` — ${e.description}`:""}`,value:"production"===a?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:l,className:o,accessToken:s,disabled:c,onPoliciesLoaded:u})=>{let[d,m]=(0,r.useState)([]),[p,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){f(!0);try{let e=await (0,n.getPoliciesList)(s);e.policies&&(m(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[s,u]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:l,loading:p,className:o,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["ClockCircleOutlined",0,i],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["ArrowLeftOutlined",0,i],447566)},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),n=e.i(915823),i=e.i(619273),l=class extends n.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#i()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#n(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},o=e.i(912598);function s(e,r){let n=(0,o.useQueryClient)(r),[s]=t.useState(()=>new l(n,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let c=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(a.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=t.useCallback((e,t)=>{s.mutate(e,t).catch(i.noop)},[s]);if(c.error&&(0,i.shouldThrowError)(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>s],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),n=e.i(908286),i=e.i(242064),l=e.i(246422),o=e.i(838378);let s=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let a,n,i;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&s.includes(a)})),(n={},u.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n)),(i={},c.forEach(r=>{i[`${e}-justify-${r}`]=t.justify===r}),i)))},m=(0,l.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,n=(0,o.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(n),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(n),(e=>{let{componentCls:t}=e,r={};return s.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(n),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(n),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(n)]},()=>({}),{resetStyle:!1});var p=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let f=t.default.forwardRef((e,l)=>{let{prefixCls:o,rootClassName:s,className:c,style:u,flex:f,gap:h,vertical:g=!1,component:v="div",children:y}=e,b=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:x,direction:w,getPrefixCls:C}=t.default.useContext(i.ConfigContext),A=C("flex",o),[S,_,O]=m(A),E=null!=g?g:null==x?void 0:x.vertical,I=(0,r.default)(c,s,null==x?void 0:x.className,A,_,O,d(A,e),{[`${A}-rtl`]:"rtl"===w,[`${A}-gap-${h}`]:(0,n.isPresetSize)(h),[`${A}-vertical`]:E}),T=Object.assign(Object.assign({},null==x?void 0:x.style),u);return f&&(T.flex=f),h&&!(0,n.isPresetSize)(h)&&(T.gap=h),S(t.default.createElement(v,Object.assign({ref:l,className:I,style:T},(0,a.default)(b,["justify","wrap","align"])),y))});e.s(["Flex",0,f],525720)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),n=e.i(682830),i=e.i(269200),l=e.i(427612),o=e.i(64848),s=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:m,renderSubComponent:p,renderChildRows:f,getRowCanExpand:h,isLoading:g=!1,loadingMessage:v="🚅 Loading logs...",noDataMessage:y="No logs found",enableSorting:b=!1}){let x=!!(p||f)&&!!h,[w,C]=(0,r.useState)([]),A=(0,a.useReactTable)({data:e,columns:d,...b&&{state:{sorting:w},onSortingChange:C,enableSortingRemoval:!1},...x&&{getRowCanExpand:h},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,n.getCoreRowModel)(),...b&&{getSortedRowModel:(0,n.getSortedRowModel)()},...x&&{getExpandedRowModel:(0,n.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(l.TableHead,{children:A.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=b&&e.column.getCanSort(),n=e.column.getIsSorted();return(0,t.jsx)(o.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===n?"↑":"desc"===n?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(s.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:v})})})}):A.getRowModel().rows.length>0?A.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),x&&e.getIsExpanded()&&f&&f({row:e}),x&&e.getIsExpanded()&&p&&!f&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:p({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})})})]})})}e.s(["DataTable",()=>d])},664307,e=>{"use strict";var t=e.i(843476),r=e.i(135214),a=e.i(214541),n=e.i(271645),i=e.i(161059);e.s(["default",0,()=>{let{token:e,premiumUser:l}=(0,r.default)(),[o,s]=(0,n.useState)([]),{teams:c}=(0,a.default)();return(0,t.jsx)(i.default,{token:e,modelData:{data:[]},keys:o,setModelData:()=>{},premiumUser:l,teams:c})}])},601236,e=>{e.v(e=>Promise.resolve().then(()=>e(764205)))}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},916925,e=>{"use strict";var t,r=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let a={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},n="../ui/assets/logos/",i={"A2A Agent":`${n}a2a_agent.png`,Ai21:`${n}ai21.svg`,"Ai21 Chat":`${n}ai21.svg`,"AI/ML API":`${n}aiml_api.svg`,"Aiohttp Openai":`${n}openai_small.svg`,Anthropic:`${n}anthropic.svg`,"Anthropic Text":`${n}anthropic.svg`,AssemblyAI:`${n}assemblyai_small.png`,Azure:`${n}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${n}microsoft_azure.svg`,"Azure Text":`${n}microsoft_azure.svg`,Baseten:`${n}baseten.svg`,"Amazon Bedrock":`${n}bedrock.svg`,"Amazon Bedrock Mantle":`${n}bedrock.svg`,"AWS SageMaker":`${n}bedrock.svg`,Cerebras:`${n}cerebras.svg`,Cloudflare:`${n}cloudflare.svg`,Codestral:`${n}mistral.svg`,Cohere:`${n}cohere.svg`,"Cohere Chat":`${n}cohere.svg`,Cometapi:`${n}cometapi.svg`,Cursor:`${n}cursor.svg`,"Databricks (Qwen API)":`${n}databricks.svg`,Dashscope:`${n}dashscope.svg`,Deepseek:`${n}deepseek.svg`,Deepgram:`${n}deepgram.png`,DeepInfra:`${n}deepinfra.png`,ElevenLabs:`${n}elevenlabs.png`,"Fal AI":`${n}fal_ai.jpg`,"Featherless Ai":`${n}featherless.svg`,"Fireworks AI":`${n}fireworks.svg`,Friendliai:`${n}friendli.svg`,"Github Copilot":`${n}github_copilot.svg`,"Google AI Studio":`${n}google.svg`,GradientAI:`${n}gradientai.svg`,Groq:`${n}groq.svg`,vllm:`${n}vllm.png`,Huggingface:`${n}huggingface.svg`,Hyperbolic:`${n}hyperbolic.svg`,Infinity:`${n}infinity.png`,"Jina AI":`${n}jina.png`,"Lambda Ai":`${n}lambda.svg`,"Lm Studio":`${n}lmstudio.svg`,"Meta Llama":`${n}meta_llama.svg`,MiniMax:`${n}minimax.svg`,"Mistral AI":`${n}mistral.svg`,Moonshot:`${n}moonshot.svg`,Morph:`${n}morph.svg`,Nebius:`${n}nebius.svg`,Novita:`${n}novita.svg`,"Nvidia Nim":`${n}nvidia_nim.svg`,Ollama:`${n}ollama.svg`,"Ollama Chat":`${n}ollama.svg`,Oobabooga:`${n}openai_small.svg`,OpenAI:`${n}openai_small.svg`,"Openai Like":`${n}openai_small.svg`,"OpenAI Text Completion":`${n}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${n}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${n}openai_small.svg`,Openrouter:`${n}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${n}oracle.svg`,Perplexity:`${n}perplexity-ai.svg`,Recraft:`${n}recraft.svg`,Replicate:`${n}replicate.svg`,RunwayML:`${n}runwayml.png`,Sagemaker:`${n}bedrock.svg`,Sambanova:`${n}sambanova.svg`,"SAP Generative AI Hub":`${n}sap.png`,Snowflake:`${n}snowflake.svg`,"Text-Completion-Codestral":`${n}mistral.svg`,TogetherAI:`${n}togetherai.svg`,Topaz:`${n}topaz.svg`,Triton:`${n}nvidia_triton.png`,V0:`${n}v0.svg`,"Vercel Ai Gateway":`${n}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${n}google.svg`,"Vertex Ai Beta":`${n}google.svg`,Vllm:`${n}vllm.png`,VolcEngine:`${n}volcengine.png`,"Voyage AI":`${n}voyage.webp`,Watsonx:`${n}watsonx.svg`,"Watsonx Text":`${n}watsonx.svg`,xAI:`${n}xai.svg`,Xinference:`${n}xinference.svg`};e.s(["Providers",()=>r,"getPlaceholder",0,e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=r[t];return{logo:i[n],displayName:n}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let r=a[e];console.log(`Provider mapped to: ${r}`);let n=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider;(a===r||"string"==typeof a&&a.includes(r))&&n.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&n.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&n.push(e)}))),n},"providerLogoMap",0,i,"provider_map",0,a])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},94629,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,r],94629)},991124,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["default",()=>t])},678784,678745,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],678745),e.s(["CheckIcon",()=>t],678784)},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},798496,e=>{"use strict";var t=e.i(843476),r=e.i(152990),a=e.i(682830),n=e.i(271645),i=e.i(269200),l=e.i(427612),o=e.i(64848),s=e.i(942232),c=e.i(496020),u=e.i(977572),d=e.i(94629),m=e.i(360820),p=e.i(871943);function f({data:e=[],columns:f,isLoading:h=!1,defaultSorting:g=[],pagination:v,onPaginationChange:y,enablePagination:b=!1,onRowClick:x}){let[w,C]=n.default.useState(g),[A]=n.default.useState("onChange"),[S,_]=n.default.useState({}),[O,E]=n.default.useState({}),I=(0,r.useReactTable)({data:e,columns:f,state:{sorting:w,columnSizing:S,columnVisibility:O,...b&&v?{pagination:v}:{}},columnResizeMode:A,onSortingChange:C,onColumnSizingChange:_,onColumnVisibilityChange:E,...b&&y?{onPaginationChange:y}:{},getCoreRowModel:(0,a.getCoreRowModel)(),getSortedRowModel:(0,a.getSortedRowModel)(),...b?{getPaginationRowModel:(0,a.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:I.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(l.TableHead,{children:I.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(o.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,r.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(m.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(d.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(s.TableBody,{children:h?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:f.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):I.getRowModel().rows.length>0?I.getRowModel().rows.map(e=>(0,t.jsx)(c.TableRow,{onClick:()=>x?.(e.original),className:x?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,r.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:f.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>f])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(914949),n=e.i(404948);let i=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,i],836938);var l=e.i(613541),o=e.i(763731),s=e.i(242064),c=e.i(491816);e.i(793154);var u=e.i(880476),d=e.i(183293),m=e.i(717356),p=e.i(320560),f=e.i(307358),h=e.i(246422),g=e.i(838378),v=e.i(617933);let y=(0,h.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,a=(0,g.mergeToken)(e,{popoverBg:t,popoverColor:r});return[(e=>{let{componentCls:t,popoverColor:r,titleMinWidth:a,fontWeightStrong:n,innerPadding:i,boxShadowSecondary:l,colorTextHeading:o,borderRadiusLG:s,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:m,popoverBg:f,titleBorderBottom:h,innerContentPadding:g,titlePadding:v}=e;return[{[t]:Object.assign(Object.assign({},(0,d.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:s,boxShadow:l,padding:i},[`${t}-title`]:{minWidth:a,marginBottom:u,color:o,fontWeight:n,borderBottom:h,padding:v},[`${t}-inner-content`]:{color:r,padding:g}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(a),(e=>{let{componentCls:t}=e;return{[t]:v.PresetColors.map(r=>{let a=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{backgroundColor:a},[`${t}-arrow`]:{background:"transparent"}}}})}})(a),(0,m.initZoomMotion)(a,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:a,padding:n,wireframe:i,zIndexPopupBase:l,borderRadiusLG:o,marginXS:s,lineType:c,colorSplit:u,paddingSM:d}=e,m=r-a;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:l+30},(0,f.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:o,limitVerticalRadius:!0})),{innerPadding:12*!i,titleMarginBottom:i?0:s,titlePadding:i?`${m/2}px ${n}px ${m/2-t}px`:0,titleBorderBottom:i?`${t}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${n}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var b=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let x=({title:e,content:r,prefixCls:a})=>e||r?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${a}-title`},e),r&&t.createElement("div",{className:`${a}-inner-content`},r)):null,w=e=>{let{hashId:a,prefixCls:n,className:l,style:o,placement:s="top",title:c,content:d,children:m}=e,p=i(c),f=i(d),h=(0,r.default)(a,n,`${n}-pure`,`${n}-placement-${s}`,l);return t.createElement("div",{className:h,style:o},t.createElement("div",{className:`${n}-arrow`}),t.createElement(u.Popup,Object.assign({},e,{className:a,prefixCls:n}),m||t.createElement(x,{prefixCls:n,title:p,content:f})))},C=e=>{let{prefixCls:a,className:n}=e,i=b(e,["prefixCls","className"]),{getPrefixCls:l}=t.useContext(s.ConfigContext),o=l("popover",a),[c,u,d]=y(o);return c(t.createElement(w,Object.assign({},i,{prefixCls:o,hashId:u,className:(0,r.default)(n,d)})))};e.s(["Overlay",0,x,"default",0,C],310730);var A=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let S=t.forwardRef((e,u)=>{var d,m;let{prefixCls:p,title:f,content:h,overlayClassName:g,placement:v="top",trigger:b="hover",children:w,mouseEnterDelay:C=.1,mouseLeaveDelay:S=.1,onOpenChange:_,overlayStyle:O={},styles:E,classNames:I}=e,T=A(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:R,className:N,style:j,classNames:M,styles:k}=(0,s.useComponentConfig)("popover"),$=R("popover",p),[L,P,z]=y($),F=R(),D=(0,r.default)(g,P,z,N,M.root,null==I?void 0:I.root),V=(0,r.default)(M.body,null==I?void 0:I.body),[B,H]=(0,a.default)(!1,{value:null!=(d=e.open)?d:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),G=(e,t)=>{H(e,!0),null==_||_(e,t)},U=i(f),W=i(h);return L(t.createElement(c.default,Object.assign({placement:v,trigger:b,mouseEnterDelay:C,mouseLeaveDelay:S},T,{prefixCls:$,classNames:{root:D,body:V},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},k.root),j),O),null==E?void 0:E.root),body:Object.assign(Object.assign({},k.body),null==E?void 0:E.body)},ref:u,open:B,onOpenChange:e=>{G(e)},overlay:U||W?t.createElement(x,{prefixCls:$,title:U,content:W}):null,transitionName:(0,l.getTransitionName)(F,"zoom-big",T.transitionName),"data-popover-inject":!0}),(0,o.cloneElement)(w,{onKeyDown:e=>{var r,a;(0,t.isValidElement)(w)&&(null==(a=null==w?void 0:(r=w.props).onKeyDown)||a.call(r,e)),e.keyCode===n.default.ESC&&G(!1,e)}})))});S._InternalPanelDoNotUseOrYouWillBeFired=C,e.s(["default",0,S],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},516015,(e,t,r)=>{},898547,(e,t,r)=>{var a=e.i(247167);e.r(516015);var n=e.r(271645),i=n&&"object"==typeof n&&"default"in n?n:{default:n},l=void 0!==a.default&&a.default.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,r=t.name,a=void 0===r?"stylesheet":r,n=t.optimizeForSpeed,i=void 0===n?l:n;c(o(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",c("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var s="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=s?s.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;ttypeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(a){l||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var a=this._tags[e];c(a,"old rule at index `"+e+"` not found"),a.textContent=t}return e},r.deleteRule=function(e){if("u"typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"u">>0},d={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),a=e+r;return d[a]||(d[a]="jsx-"+u(e+"-"+r)),d[a]}function p(e,t){"u"typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),a=r.styleId,n=r.rules;if(a in this._instancesCounts){this._instancesCounts[a]+=1;return}var i=n.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[a]=i,this._instancesCounts[a]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var a=this._fromServer&&this._fromServer[r];a?(a.parentNode.removeChild(a),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],a=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:a}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,a=e.id;if(r){var n=m(a,r);return{styleId:n,rules:Array.isArray(t)?t.map(function(e){return p(n,e)}):[p(n,t)]}}return{styleId:m(a),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),h=n.createContext(null);function g(){return new f}function v(){return n.useContext(h)}h.displayName="StyleSheetContext";var y=i.default.useInsertionEffect||i.default.useLayoutEffect,b="u">typeof window?g():void 0;function x(e){var t=b||v();return t&&("u"{t.exports=e.r(898547).style},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(562901),a=e.i(343794),n=e.i(914949),i=e.i(529681),l=e.i(242064),o=e.i(829672),s=e.i(285781),c=e.i(836938),u=e.i(920228),d=e.i(62405),m=e.i(408850),p=e.i(87414),f=e.i(310730);let h=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:r,antCls:a,zIndexPopup:n,colorText:i,colorWarning:l,marginXXS:o,marginXS:s,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:n,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:s,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${r}`]:{color:l,fontSize:c,lineHeight:1,marginInlineEnd:s},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:o,color:i}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:s}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var g=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let v=e=>{let{prefixCls:a,okButtonProps:n,cancelButtonProps:i,title:o,description:f,cancelText:h,okText:g,okType:v="primary",icon:y=t.createElement(r.default,null),showCancel:b=!0,close:x,onConfirm:w,onCancel:C,onPopupClick:A}=e,{getPrefixCls:S}=t.useContext(l.ConfigContext),[_]=(0,m.useLocale)("Popconfirm",p.default.Popconfirm),O=(0,c.getRenderPropValue)(o),E=(0,c.getRenderPropValue)(f);return t.createElement("div",{className:`${a}-inner-content`,onClick:A},t.createElement("div",{className:`${a}-message`},y&&t.createElement("span",{className:`${a}-message-icon`},y),t.createElement("div",{className:`${a}-message-text`},O&&t.createElement("div",{className:`${a}-title`},O),E&&t.createElement("div",{className:`${a}-description`},E))),t.createElement("div",{className:`${a}-buttons`},b&&t.createElement(u.default,Object.assign({onClick:C,size:"small"},i),h||(null==_?void 0:_.cancelText)),t.createElement(s.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,d.convertLegacyProps)(v)),n),actionFn:w,close:x,prefixCls:S("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},g||(null==_?void 0:_.okText))))};var y=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let b=t.forwardRef((e,s)=>{var c,u;let{prefixCls:d,placement:m="top",trigger:p="click",okType:f="primary",icon:g=t.createElement(r.default,null),children:b,overlayClassName:x,onOpenChange:w,onVisibleChange:C,overlayStyle:A,styles:S,classNames:_}=e,O=y(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:E,className:I,style:T,classNames:R,styles:N}=(0,l.useComponentConfig)("popconfirm"),[j,M]=(0,n.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(u=e.defaultOpen)?u:e.defaultVisible}),k=(e,t)=>{M(e,!0),null==C||C(e),null==w||w(e,t)},$=E("popconfirm",d),L=(0,a.default)($,I,x,R.root,null==_?void 0:_.root),P=(0,a.default)(R.body,null==_?void 0:_.body),[z]=h($);return z(t.createElement(o.default,Object.assign({},(0,i.default)(O,["title"]),{trigger:p,placement:m,onOpenChange:(t,r)=>{let{disabled:a=!1}=e;a||k(t,r)},open:j,ref:s,classNames:{root:L,body:P},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},N.root),T),A),null==S?void 0:S.root),body:Object.assign(Object.assign({},N.body),null==S?void 0:S.body)},content:t.createElement(v,Object.assign({okType:f,icon:g},e,{prefixCls:$,close:e=>{k(!1,e)},onConfirm:t=>{var r;return null==(r=e.onConfirm)?void 0:r.call(void 0,t)},onCancel:t=>{var r;k(!1,t),null==(r=e.onCancel)||r.call(void 0,t)}})),"data-popover-inject":!0}),b))});b._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:r,placement:n,className:i,style:o}=e,s=g(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(l.ConfigContext),u=c("popconfirm",r),[d]=h(u);return d(t.createElement(f.default,{placement:n,className:(0,a.default)(u,i),style:o,content:t.createElement(v,Object.assign({prefixCls:u},s))}))},e.s(["Popconfirm",0,b],883552)},368670,e=>{"use strict";var t=e.i(764205),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["StopOutlined",0,i],724154)},475647,286536,77705,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["PlusCircleOutlined",0,i],475647);var l=e.i(475254);let o=(0,l.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>o],286536);let s=(0,l.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>s],77705)},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["SaveOutlined",0,i],987432)},178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},621192,e=>{"use strict";let t=e.i(264042).Row;e.s(["Row",0,t],621192)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["ReloadOutlined",0,i],91979)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["MinusCircleOutlined",0,i],564897)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},969550,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var n=e.i(464571),i=e.i(311451),l=e.i(199133),o=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:s,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[m,p]=(0,r.useState)(!1),[f,h]=(0,r.useState)(u),[g,v]=(0,r.useState)({}),[y,b]=(0,r.useState)({}),[x,w]=(0,r.useState)({}),[C,A]=(0,r.useState)({}),S=(0,r.useCallback)((0,o.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){b(e=>({...e,[t.name]:!0}));try{let r=await t.searchFn(e);v(e=>({...e,[t.name]:r}))}catch(e){console.error("Error searching:",e),v(e=>({...e,[t.name]:[]}))}finally{b(e=>({...e,[t.name]:!1}))}}},300),[]),_=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!C[e.name]){b(t=>({...t,[e.name]:!0})),A(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");v(r=>({...r,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),v(t=>({...t,[e.name]:[]}))}finally{b(t=>({...t,[e.name]:!1}))}}},[C]);(0,r.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!C[e.name]&&_(e)})},[m,e,_,C]);let O=(e,t)=>{let r={...f,[e]:t};h(r),s(r)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(n.Button,{icon:(0,t.jsx)(a,{className:"h-4 w-4"}),onClick:()=>p(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(n.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),h(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(r=>{let a,n=e.find(e=>e.label===r||e.name===r);return n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:n.label||n.name}),n.isSearchable?(0,t.jsx)(l.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>O(n.name,e),onOpenChange:e=>{e&&n.isSearchable&&!C[n.name]&&_(n)},onSearch:e=>{w(t=>({...t,[n.name]:e})),n.searchFn&&S(e,n)},filterOption:!1,loading:y[n.name],options:g[n.name]||[],allowClear:!0,notFoundContent:y[n.name]?"Loading...":"No results found"}):n.options?(0,t.jsx)(l.Select,{className:"w-full",placeholder:`Select ${n.label||n.name}...`,value:f[n.name]||void 0,onChange:e=>O(n.name,e),allowClear:!0,children:n.options.map(e=>(0,t.jsx)(l.Select.Option,{value:e.value,children:e.label},e.value))}):n.customComponent?(a=n.customComponent,(0,t.jsx)(a,{value:f[n.name]||void 0,onChange:e=>O(n.name,e??""),placeholder:`Select ${n.label||n.name}...`,allFilters:f})):(0,t.jsx)(i.Input,{className:"w-full",placeholder:`Enter ${n.label||n.name}...`,value:f[n.name]||"",onChange:e=>O(n.name,e.target.value),allowClear:!0})]},n.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let r=(e,t,r,a)=>{for(let n of e){let e=n?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let i=n?.organization_id??n?.org_id;i&&"string"==typeof i&&r.add(i.trim());let l=n?.user_id;if(l&&"string"==typeof l){let e=n?.user?.user_email||l;a.set(l,e)}}},a=async(e,a)=>{if(!e||!a)return{keyAliases:[],organizationIds:[],userIds:[]};try{let n=new Set,i=new Set,l=new Map,o=await (0,t.keyListCall)(e,null,a,null,null,null,1,100,null,null,"user",null),s=o?.keys||[],c=o?.total_pages??1;r(s,n,i,l);let u=Math.min(c,10)-1;if(u>0){let o=Array.from({length:u},(r,n)=>(0,t.keyListCall)(e,null,a,null,null,null,n+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(o)))"fulfilled"===e.status&&r(e.value?.keys||[],n,i,l)}return{keyAliases:Array.from(n).sort(),organizationIds:Array.from(i).sort(),userIds:Array.from(l.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},n=async(e,r)=>{if(!e)return[];try{let a=[],n=1,i=!0;for(;i;){let l=await (0,t.teamListCall)(e,r||null,null);a=[...a,...l],n{if(!e)return[];try{let r=[],a=1,n=!0;for(;n;){let i=await (0,t.organizationListCall)(e);r=[...r,...i],a{"use strict";var t,r,a=e.i(843476),n=e.i(464571),i=e.i(326373),l=e.i(94629),o=e.i(360820),s=e.i(871943),c=e.i(271645);let u=c.forwardRef(function(e,t){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,u],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let r=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(o.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(s.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(u,{className:"h-4 w-4"})}];return(0,a.jsx)(i.Dropdown,{menu:{items:r,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(n.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(o.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(s.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(l.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var d=e.i(266027),m=e.i(954616),p=e.i(243652),f=e.i(135214),h=e.i(764205),g=((t={}).GENERAL_SETTINGS="general_settings",t),v=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let y=async(e,t)=>{try{let r=h.proxyBaseUrl?`${h.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,h.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,h.deriveErrorMessage)(e);throw(0,h.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},b=(0,p.createQueryKeys)("proxyConfig"),x=async(e,t)=>{try{let r=h.proxyBaseUrl?`${h.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,h.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,h.deriveErrorMessage)(e);throw(0,h.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>g,"GeneralSettingsFieldName",()=>v,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,f.default)();return(0,m.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await x(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,f.default)();return(0,d.useQuery)({queryKey:b.list({filters:{configType:e}}),queryFn:async()=>await y(t,e),enabled:!!t})}],153472)},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let a=e=>{var a=(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"},a),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))};e.s(["default",()=>a])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),a=e.i(271645);let n=e=>{var t=(0,r.__rest)(e,[]);return a.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),a.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 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))};e.s(["default",()=>n],446428);var i=e.i(746725),l=e.i(914189),o=e.i(553521),s=e.i(835696),c=e.i(941444),u=e.i(178677),d=e.i(294316),m=e.i(83733),p=e.i(233137),f=e.i(732607),h=e.i(397701),g=e.i(700020);function v(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:A)!==a.Fragment||1===a.default.Children.count(e.children)}let y=(0,a.createContext)(null);y.displayName="TransitionContext";var b=((t=b||{}).Visible="visible",t.Hidden="hidden",t);let x=(0,a.createContext)(null);function w(e){return"children"in e?w(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function C(e,t){let r=(0,c.useLatestValue)(e),n=(0,a.useRef)([]),s=(0,o.useIsMounted)(),u=(0,i.useDisposables)(),d=(0,l.useEvent)((e,t=g.RenderStrategy.Hidden)=>{let a=n.current.findIndex(({el:t})=>t===e);-1!==a&&((0,h.match)(t,{[g.RenderStrategy.Unmount](){n.current.splice(a,1)},[g.RenderStrategy.Hidden](){n.current[a].state="hidden"}}),u.microTask(()=>{var e;!w(n)&&s.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,l.useEvent)(e=>{let t=n.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>d(e,g.RenderStrategy.Unmount)}),p=(0,a.useRef)([]),f=(0,a.useRef)(Promise.resolve()),v=(0,a.useRef)({enter:[],leave:[]}),y=(0,l.useEvent)((e,r,a)=>{p.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter(([t])=>t!==e)),null==t||t.chains.current[r].push([e,new Promise(e=>{p.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(v.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?f.current=f.current.then(()=>null==t?void 0:t.wait.current).then(()=>a(r)):a(r)}),b=(0,l.useEvent)((e,t,r)=>{Promise.all(v.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=p.current.shift())||e()}).then(()=>r(t))});return(0,a.useMemo)(()=>({children:n,register:m,unregister:d,onStart:y,onStop:b,wait:f,chains:v}),[m,d,n,y,b,v,f])}x.displayName="NestingContext";let A=a.Fragment,S=g.RenderFeatures.RenderStrategy,_=(0,g.forwardRefWithAs)(function(e,t){let{show:r,appear:n=!1,unmount:i=!0,...o}=e,c=(0,a.useRef)(null),m=v(e),f=(0,d.useSyncRefs)(...m?[c,t]:null===t?[]:[t]);(0,u.useServerHandoffComplete)();let h=(0,p.useOpenClosed)();if(void 0===r&&null!==h&&(r=(h&p.State.Open)===p.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[b,A]=(0,a.useState)(r?"visible":"hidden"),_=C(()=>{r||A("hidden")}),[E,I]=(0,a.useState)(!0),T=(0,a.useRef)([r]);(0,s.useIsoMorphicEffect)(()=>{!1!==E&&T.current[T.current.length-1]!==r&&(T.current.push(r),I(!1))},[T,r]);let R=(0,a.useMemo)(()=>({show:r,appear:n,initial:E}),[r,n,E]);(0,s.useIsoMorphicEffect)(()=>{r?A("visible"):w(_)||null===c.current||A("hidden")},[r,_]);let N={unmount:i},j=(0,l.useEvent)(()=>{var t;E&&I(!1),null==(t=e.beforeEnter)||t.call(e)}),M=(0,l.useEvent)(()=>{var t;E&&I(!1),null==(t=e.beforeLeave)||t.call(e)}),k=(0,g.useRender)();return a.default.createElement(x.Provider,{value:_},a.default.createElement(y.Provider,{value:R},k({ourProps:{...N,as:a.Fragment,children:a.default.createElement(O,{ref:f,...N,...o,beforeEnter:j,beforeLeave:M})},theirProps:{},defaultTag:a.Fragment,features:S,visible:"visible"===b,name:"Transition"})))}),O=(0,g.forwardRefWithAs)(function(e,t){var r,n;let{transition:i=!0,beforeEnter:o,afterEnter:c,beforeLeave:b,afterLeave:_,enter:O,enterFrom:E,enterTo:I,entered:T,leave:R,leaveFrom:N,leaveTo:j,...M}=e,[k,$]=(0,a.useState)(null),L=(0,a.useRef)(null),P=v(e),z=(0,d.useSyncRefs)(...P?[L,t,$]:null===t?[]:[t]),F=null==(r=M.unmount)||r?g.RenderStrategy.Unmount:g.RenderStrategy.Hidden,{show:D,appear:V,initial:B}=function(){let e=(0,a.useContext)(y);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[H,G]=(0,a.useState)(D?"visible":"hidden"),U=function(){let e=(0,a.useContext)(x);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:W,unregister:K}=U;(0,s.useIsoMorphicEffect)(()=>W(L),[W,L]),(0,s.useIsoMorphicEffect)(()=>{if(F===g.RenderStrategy.Hidden&&L.current)return D&&"visible"!==H?void G("visible"):(0,h.match)(H,{hidden:()=>K(L),visible:()=>W(L)})},[H,L,W,K,D,F]);let q=(0,u.useServerHandoffComplete)();(0,s.useIsoMorphicEffect)(()=>{if(P&&q&&"visible"===H&&null===L.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[L,H,q,P]);let X=B&&!V,Y=V&&D&&B,Z=(0,a.useRef)(!1),Q=C(()=>{Z.current||(G("hidden"),K(L))},U),J=(0,l.useEvent)(e=>{Z.current=!0,Q.onStart(L,e?"enter":"leave",e=>{"enter"===e?null==o||o():"leave"===e&&(null==b||b())})}),ee=(0,l.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Q.onStop(L,t,e=>{"enter"===e?null==c||c():"leave"===e&&(null==_||_())}),"leave"!==t||w(Q)||(G("hidden"),K(L))});(0,a.useEffect)(()=>{P&&i||(J(D),ee(D))},[D,P,i]);let et=!(!i||!P||!q||X),[,er]=(0,m.useTransition)(et,k,D,{start:J,end:ee}),ea=(0,g.compact)({ref:z,className:(null==(n=(0,f.classNames)(M.className,Y&&O,Y&&E,er.enter&&O,er.enter&&er.closed&&E,er.enter&&!er.closed&&I,er.leave&&R,er.leave&&!er.closed&&N,er.leave&&er.closed&&j,!er.transition&&D&&T))?void 0:n.trim())||void 0,...(0,m.transitionDataAttributes)(er)}),en=0;"visible"===H&&(en|=p.State.Open),"hidden"===H&&(en|=p.State.Closed),er.enter&&(en|=p.State.Opening),er.leave&&(en|=p.State.Closing);let ei=(0,g.useRender)();return a.default.createElement(x.Provider,{value:Q},a.default.createElement(p.OpenClosedProvider,{value:en},ei({ourProps:ea,theirProps:M,defaultTag:A,features:S,visible:"visible"===H,name:"Transition.Child"})))}),E=(0,g.forwardRefWithAs)(function(e,t){let r=null!==(0,a.useContext)(y),n=null!==(0,p.useOpenClosed)();return a.default.createElement(a.default.Fragment,null,!r&&n?a.default.createElement(_,{ref:t,...e}):a.default.createElement(O,{ref:t,...e}))}),I=Object.assign(_,{Child:E,Root:_});e.s(["Transition",()=>I],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),a=e.i(271645),n=e.i(446428),i=e.i(444755),l=e.i(673706),o=e.i(103471),s=e.i(495470),c=e.i(854056),u=e.i(888288);let d=(0,l.makeClassName)("Select"),m=a.default.forwardRef((e,l)=>{let{defaultValue:m="",value:p,onValueChange:f,placeholder:h="Select...",disabled:g=!1,icon:v,enableClear:y=!1,required:b,children:x,name:w,error:C=!1,errorMessage:A,className:S,id:_}=e,O=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),E=(0,a.useRef)(null),I=a.Children.toArray(x),[T,R]=(0,u.default)(m,p),N=(0,a.useMemo)(()=>{let e=a.default.Children.toArray(x).filter(a.isValidElement);return(0,o.constructValueToNameMapping)(e)},[x]);return a.default.createElement("div",{className:(0,i.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",S)},a.default.createElement("div",{className:"relative"},a.default.createElement("select",{title:"select-hidden",required:b,className:(0,i.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:T,onChange:e=>{e.preventDefault()},name:w,disabled:g,id:_,onFocus:()=>{let e=E.current;e&&e.focus()}},a.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},h),I.map(e=>{let t=e.props.value,r=e.props.children;return a.default.createElement("option",{className:"hidden",key:t,value:t},r)})),a.default.createElement(s.Listbox,Object.assign({as:"div",ref:l,defaultValue:T,value:T,onChange:e=>{null==f||f(e),R(e)},disabled:g,id:_},O),({value:e})=>{var t;return a.default.createElement(a.default.Fragment,null,a.default.createElement(s.ListboxButton,{ref:E,className:(0,i.tremorTwMerge)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,o.getSelectButtonColors)((0,o.hasValue)(e),g,C))},v&&a.default.createElement("span",{className:(0,i.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.default.createElement(v,{className:(0,i.tremorTwMerge)(d("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=N.get(e))?t:h),a.default.createElement("span",{className:(0,i.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},a.default.createElement(r.default,{className:(0,i.tremorTwMerge)(d("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),y&&T?a.default.createElement("button",{type:"button",className:(0,i.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),R(""),null==f||f("")}},a.default.createElement(n.default,{className:(0,i.tremorTwMerge)(d("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.default.createElement(c.Transition,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.default.createElement(s.ListboxOptions,{anchor:"bottom start",className:(0,i.tremorTwMerge)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},x)))})),C&&A?a.default.createElement("p",{className:(0,i.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},A):null)});m.displayName="Select",e.s(["Select",()=>m],206929)},502275,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["InformationCircleIcon",0,r],502275)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:n="w-4 h-4"})=>{let[i,l]=(0,r.useState)(!1),{logo:o}=(0,a.getProviderLogoAndName)(e);return i||!o?(0,t.jsx)("div",{className:`${n} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:o,alt:`${e} logo`,className:n,onError:()=>l(!0)})}])},37091,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),n=e.i(673706),i=e.i(271645);let l=i.default.forwardRef((e,l)=>{let{color:o,children:s,className:c}=e,u=(0,t.__rest)(e,["color","children","className"]);return i.default.createElement("p",Object.assign({ref:l,className:(0,a.tremorTwMerge)(o?(0,n.getColorClassNames)(o,r.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},u),s)});l.displayName="Subtitle",e.s(["Subtitle",()=>l],37091)},214541,e=>{"use strict";var t=e.i(271645),r=e.i(135214),a=e.i(270345);e.s(["default",0,()=>{let[e,n]=(0,t.useState)([]),{accessToken:i,userId:l,userRole:o}=(0,r.default)();return(0,t.useEffect)(()=>{(async()=>{n(await (0,a.fetchTeams)(i,l,o,null))})()},[i,l,o]),{teams:e,setTeams:n}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function a(e,a){let n=t(e);return isNaN(a)?r(e,NaN):(a&&n.setDate(n.getDate()+a),n)}function n(e,a){let n=t(e);if(isNaN(a))return r(e,NaN);if(!a)return n;let i=n.getDate(),l=r(e,n.getTime());return(l.setMonth(n.getMonth()+a+1,0),i>=l.getDate())?l:(n.setFullYear(l.getFullYear(),l.getMonth(),i),n)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>r],96226),e.s(["addDays",()=>a],439189),e.s(["addMonths",()=>n],497245)},891547,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),n=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:l,accessToken:o,disabled:s})=>{let[c,u]=(0,r.useState)([]),[d,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){m(!0);try{let e=await (0,n.getGuardrailsList)(o);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:s,placeholder:s?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:l,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),n=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let r=e.version_number??1,a=e.version_status??"draft";return{label:`${e.policy_name} — v${r} (${a})${e.description?` — ${e.description}`:""}`,value:"production"===a?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:l,className:o,accessToken:s,disabled:c,onPoliciesLoaded:u})=>{let[d,m]=(0,r.useState)([]),[p,f]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(s){f(!0);try{let e=await (0,n.getPoliciesList)(s);e.policies&&(m(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[s,u]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:l,loading:p,className:o,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["ClockCircleOutlined",0,i],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var n=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(n.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["ArrowLeftOutlined",0,i],447566)},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),n=e.i(915823),i=e.i(619273),l=class extends n.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#n(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#i()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#n(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},o=e.i(912598);function s(e,r){let n=(0,o.useQueryClient)(r),[s]=t.useState(()=>new l(n,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let c=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(a.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=t.useCallback((e,t)=>{s.mutate(e,t).catch(i.noop)},[s]);if(c.error&&(0,i.shouldThrowError)(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>s],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),n=e.i(908286),i=e.i(242064),l=e.i(246422),o=e.i(838378);let s=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let a,n,i;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&s.includes(a)})),(n={},u.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n)),(i={},c.forEach(r=>{i[`${e}-justify-${r}`]=t.justify===r}),i)))},m=(0,l.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,n=(0,o.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(n),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(n),(e=>{let{componentCls:t}=e,r={};return s.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(n),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(n),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(n)]},()=>({}),{resetStyle:!1});var p=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);nt.indexOf(a[n])&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};let f=t.default.forwardRef((e,l)=>{let{prefixCls:o,rootClassName:s,className:c,style:u,flex:f,gap:h,vertical:g=!1,component:v="div",children:y}=e,b=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:x,direction:w,getPrefixCls:C}=t.default.useContext(i.ConfigContext),A=C("flex",o),[S,_,O]=m(A),E=null!=g?g:null==x?void 0:x.vertical,I=(0,r.default)(c,s,null==x?void 0:x.className,A,_,O,d(A,e),{[`${A}-rtl`]:"rtl"===w,[`${A}-gap-${h}`]:(0,n.isPresetSize)(h),[`${A}-vertical`]:E}),T=Object.assign(Object.assign({},null==x?void 0:x.style),u);return f&&(T.flex=f),h&&!(0,n.isPresetSize)(h)&&(T.gap=h),S(t.default.createElement(v,Object.assign({ref:l,className:I,style:T},(0,a.default)(b,["justify","wrap","align"])),y))});e.s(["Flex",0,f],525720)},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),n=e.i(682830),i=e.i(269200),l=e.i(427612),o=e.i(64848),s=e.i(942232),c=e.i(496020),u=e.i(977572);function d({data:e=[],columns:d,onRowClick:m,renderSubComponent:p,renderChildRows:f,getRowCanExpand:h,isLoading:g=!1,loadingMessage:v="🚅 Loading logs...",noDataMessage:y="No logs found",enableSorting:b=!1}){let x=!!(p||f)&&!!h,[w,C]=(0,r.useState)([]),A=(0,a.useReactTable)({data:e,columns:d,...b&&{state:{sorting:w},onSortingChange:C,enableSortingRemoval:!1},...x&&{getRowCanExpand:h},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,n.getCoreRowModel)(),...b&&{getSortedRowModel:(0,n.getSortedRowModel)()},...x&&{getExpandedRowModel:(0,n.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(l.TableHead,{children:A.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let r=b&&e.column.getCanSort(),n=e.column.getIsSorted();return(0,t.jsx)(o.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===n?"↑":"desc"===n?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(s.TableBody,{children:g?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:v})})})}):A.getRowModel().rows.length>0?A.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(u.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),x&&e.getIsExpanded()&&f&&f({row:e}),x&&e.getIsExpanded()&&p&&!f&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:p({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(u.TableCell,{colSpan:d.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:y})})})})})]})})}e.s(["DataTable",()=>d])},664307,e=>{"use strict";var t=e.i(843476),r=e.i(135214),a=e.i(214541),n=e.i(271645),i=e.i(161059);e.s(["default",0,()=>{let{token:e,premiumUser:l}=(0,r.default)(),[o,s]=(0,n.useState)([]),{teams:c}=(0,a.default)();return(0,t.jsx)(i.default,{token:e,modelData:{data:[]},keys:o,setModelData:()=>{},premiumUser:l,teams:c})}])},601236,e=>{e.v(e=>Promise.resolve().then(()=>e(764205)))}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8c13023d89b01566.js b/litellm/proxy/_experimental/out/_next/static/chunks/8c13023d89b01566.js deleted file mode 100644 index 46487704830..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/8c13023d89b01566.js +++ /dev/null @@ -1,167 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,608856,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),r=e.i(209428),l=e.i(392221),n=e.i(951160),s=e.i(174428),o=t.createContext(null),i=t.createContext({}),c=e.i(211577),d=e.i(931067),m=e.i(361275),p=e.i(404948),u=e.i(244009),x=e.i(703923),h=e.i(611935),f=["prefixCls","className","containerRef"];let g=function(e){var r=e.prefixCls,l=e.className,n=e.containerRef,s=(0,x.default)(e,f),o=t.useContext(i).panel,c=(0,h.useComposeRef)(o,n);return t.createElement("div",(0,d.default)({className:(0,a.default)("".concat(r,"-content"),l),role:"dialog",ref:c},(0,u.default)(e,{aria:!0}),{"aria-modal":"true"},s))};var v=e.i(883110);function y(e){return"string"==typeof e&&String(Number(e))===e?((0,v.default)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}e.i(654310);var b={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"},j=t.forwardRef(function(e,n){var s,i,x,h=e.prefixCls,f=e.open,v=e.placement,j=e.inline,N=e.push,w=e.forceRender,$=e.autoFocus,C=e.keyboard,k=e.classNames,S=e.rootClassName,T=e.rootStyle,_=e.zIndex,O=e.className,E=e.id,P=e.style,I=e.motion,B=e.width,z=e.height,M=e.children,D=e.mask,R=e.maskClosable,L=e.maskMotion,A=e.maskClassName,H=e.maskStyle,F=e.afterOpenChange,V=e.onClose,U=e.onMouseEnter,W=e.onMouseOver,J=e.onMouseLeave,K=e.onClick,q=e.onKeyDown,X=e.onKeyUp,G=e.styles,Y=e.drawerRender,Z=t.useRef(),Q=t.useRef(),ee=t.useRef();t.useImperativeHandle(n,function(){return Z.current}),t.useEffect(function(){if(f&&$){var e;null==(e=Z.current)||e.focus({preventScroll:!0})}},[f]);var et=t.useState(!1),ea=(0,l.default)(et,2),er=ea[0],el=ea[1],en=t.useContext(o),es=null!=(s=null!=(i=null==(x="boolean"==typeof N?N?{}:{distance:0}:N||{})?void 0:x.distance)?i:null==en?void 0:en.pushDistance)?s:180,eo=t.useMemo(function(){return{pushDistance:es,push:function(){el(!0)},pull:function(){el(!1)}}},[es]);t.useEffect(function(){var e,t;f?null==en||null==(e=en.push)||e.call(en):null==en||null==(t=en.pull)||t.call(en)},[f]),t.useEffect(function(){return function(){var e;null==en||null==(e=en.pull)||e.call(en)}},[]);var ei=t.createElement(m.default,(0,d.default)({key:"mask"},L,{visible:D&&f}),function(e,l){var n=e.className,s=e.style;return t.createElement("div",{className:(0,a.default)("".concat(h,"-mask"),n,null==k?void 0:k.mask,A),style:(0,r.default)((0,r.default)((0,r.default)({},s),H),null==G?void 0:G.mask),onClick:R&&f?V:void 0,ref:l})}),ec="function"==typeof I?I(v):I,ed={};if(er&&es)switch(v){case"top":ed.transform="translateY(".concat(es,"px)");break;case"bottom":ed.transform="translateY(".concat(-es,"px)");break;case"left":ed.transform="translateX(".concat(es,"px)");break;default:ed.transform="translateX(".concat(-es,"px)")}"left"===v||"right"===v?ed.width=y(B):ed.height=y(z);var em={onMouseEnter:U,onMouseOver:W,onMouseLeave:J,onClick:K,onKeyDown:q,onKeyUp:X},ep=t.createElement(m.default,(0,d.default)({key:"panel"},ec,{visible:f,forceRender:w,onVisibleChanged:function(e){null==F||F(e)},removeOnLeave:!1,leavedClassName:"".concat(h,"-content-wrapper-hidden")}),function(l,n){var s=l.className,o=l.style,i=t.createElement(g,(0,d.default)({id:E,containerRef:n,prefixCls:h,className:(0,a.default)(O,null==k?void 0:k.content),style:(0,r.default)((0,r.default)({},P),null==G?void 0:G.content)},(0,u.default)(e,{aria:!0}),em),M);return t.createElement("div",(0,d.default)({className:(0,a.default)("".concat(h,"-content-wrapper"),null==k?void 0:k.wrapper,s),style:(0,r.default)((0,r.default)((0,r.default)({},ed),o),null==G?void 0:G.wrapper)},(0,u.default)(e,{data:!0})),Y?Y(i):i)}),eu=(0,r.default)({},T);return _&&(eu.zIndex=_),t.createElement(o.Provider,{value:eo},t.createElement("div",{className:(0,a.default)(h,"".concat(h,"-").concat(v),S,(0,c.default)((0,c.default)({},"".concat(h,"-open"),f),"".concat(h,"-inline"),j)),style:eu,tabIndex:-1,ref:Z,onKeyDown:function(e){var t,a,r=e.keyCode,l=e.shiftKey;switch(r){case p.default.TAB:r===p.default.TAB&&(l||document.activeElement!==ee.current?l&&document.activeElement===Q.current&&(null==(a=ee.current)||a.focus({preventScroll:!0})):null==(t=Q.current)||t.focus({preventScroll:!0}));break;case p.default.ESC:V&&C&&(e.stopPropagation(),V(e))}}},ei,t.createElement("div",{tabIndex:0,ref:Q,style:b,"aria-hidden":"true","data-sentinel":"start"}),ep,t.createElement("div",{tabIndex:0,ref:ee,style:b,"aria-hidden":"true","data-sentinel":"end"})))});let N=function(e){var a=e.open,o=e.prefixCls,c=e.placement,d=e.autoFocus,m=e.keyboard,p=e.width,u=e.mask,x=void 0===u||u,h=e.maskClosable,f=e.getContainer,g=e.forceRender,v=e.afterOpenChange,y=e.destroyOnClose,b=e.onMouseEnter,N=e.onMouseOver,w=e.onMouseLeave,$=e.onClick,C=e.onKeyDown,k=e.onKeyUp,S=e.panelRef,T=t.useState(!1),_=(0,l.default)(T,2),O=_[0],E=_[1],P=t.useState(!1),I=(0,l.default)(P,2),B=I[0],z=I[1];(0,s.default)(function(){z(!0)},[]);var M=!!B&&void 0!==a&&a,D=t.useRef(),R=t.useRef();(0,s.default)(function(){M&&(R.current=document.activeElement)},[M]);var L=t.useMemo(function(){return{panel:S}},[S]);if(!g&&!O&&!M&&y)return null;var A=(0,r.default)((0,r.default)({},e),{},{open:M,prefixCls:void 0===o?"rc-drawer":o,placement:void 0===c?"right":c,autoFocus:void 0===d||d,keyboard:void 0===m||m,width:void 0===p?378:p,mask:x,maskClosable:void 0===h||h,inline:!1===f,afterOpenChange:function(e){var t,a;E(e),null==v||v(e),e||!R.current||null!=(t=D.current)&&t.contains(R.current)||null==(a=R.current)||a.focus({preventScroll:!0})},ref:D},{onMouseEnter:b,onMouseOver:N,onMouseLeave:w,onClick:$,onKeyDown:C,onKeyUp:k});return t.createElement(i.Provider,{value:L},t.createElement(n.default,{open:M||g||O,autoDestroy:!1,getContainer:f,autoLock:x&&(M||O)},t.createElement(j,A)))};var w=e.i(981444),$=e.i(617206),C=e.i(122767),k=e.i(613541),S=e.i(340010),T=e.i(242064),_=e.i(922611),O=e.i(563113),E=e.i(185793);let P=e=>{var r,l,n,s;let o,{prefixCls:i,ariaId:c,title:d,footer:m,extra:p,closable:u,loading:x,onClose:h,headerStyle:f,bodyStyle:g,footerStyle:v,children:y,classNames:b,styles:j}=e,N=(0,T.useComponentConfig)("drawer");o=!1===u?void 0:void 0===u||!0===u?"start":(null==u?void 0:u.placement)==="end"?"end":"start";let w=t.useCallback(e=>t.createElement("button",{type:"button",onClick:h,className:(0,a.default)(`${i}-close`,{[`${i}-close-${o}`]:"end"===o})},e),[h,i,o]),[$,C]=(0,O.useClosable)((0,O.pickClosable)(e),(0,O.pickClosable)(N),{closable:!0,closeIconRender:w});return t.createElement(t.Fragment,null,d||$?t.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null==(n=N.styles)?void 0:n.header),f),null==j?void 0:j.header),className:(0,a.default)(`${i}-header`,{[`${i}-header-close-only`]:$&&!d&&!p},null==(s=N.classNames)?void 0:s.header,null==b?void 0:b.header)},t.createElement("div",{className:`${i}-header-title`},"start"===o&&C,d&&t.createElement("div",{className:`${i}-title`,id:c},d)),p&&t.createElement("div",{className:`${i}-extra`},p),"end"===o&&C):null,t.createElement("div",{className:(0,a.default)(`${i}-body`,null==b?void 0:b.body,null==(r=N.classNames)?void 0:r.body),style:Object.assign(Object.assign(Object.assign({},null==(l=N.styles)?void 0:l.body),g),null==j?void 0:j.body)},x?t.createElement(E.default,{active:!0,title:!1,paragraph:{rows:5},className:`${i}-body-skeleton`}):y),(()=>{var e,r;if(!m)return null;let l=`${i}-footer`;return t.createElement("div",{className:(0,a.default)(l,null==(e=N.classNames)?void 0:e.footer,null==b?void 0:b.footer),style:Object.assign(Object.assign(Object.assign({},null==(r=N.styles)?void 0:r.footer),v),null==j?void 0:j.footer)},m)})())};e.i(296059);var I=e.i(915654),B=e.i(183293),z=e.i(246422),M=e.i(838378);let D=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),R=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},D({opacity:e},{opacity:1})),L=(0,z.genStyleHooks)("Drawer",e=>{let t=(0,M.mergeToken)(e,{});return[(e=>{let{borderRadiusSM:t,componentCls:a,zIndexPopup:r,colorBgMask:l,colorBgElevated:n,motionDurationSlow:s,motionDurationMid:o,paddingXS:i,padding:c,paddingLG:d,fontSizeLG:m,lineHeightLG:p,lineWidth:u,lineType:x,colorSplit:h,marginXS:f,colorIcon:g,colorIconHover:v,colorBgTextHover:y,colorBgTextActive:b,colorText:j,fontWeightStrong:N,footerPaddingBlock:w,footerPaddingInline:$,calc:C}=e,k=`${a}-content-wrapper`;return{[a]:{position:"fixed",inset:0,zIndex:r,pointerEvents:"none",color:j,"&-pure":{position:"relative",background:n,display:"flex",flexDirection:"column",[`&${a}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${a}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${a}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${a}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${a}-mask`]:{position:"absolute",inset:0,zIndex:r,background:l,pointerEvents:"auto"},[k]:{position:"absolute",zIndex:r,maxWidth:"100vw",transition:`all ${s}`,"&-hidden":{display:"none"}},[`&-left > ${k}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${k}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${k}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${k}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${a}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:n,pointerEvents:"auto"},[`${a}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,I.unit)(c)} ${(0,I.unit)(d)}`,fontSize:m,lineHeight:p,borderBottom:`${(0,I.unit)(u)} ${x} ${h}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${a}-extra`]:{flex:"none"},[`${a}-close`]:Object.assign({display:"inline-flex",width:C(m).add(i).equal(),height:C(m).add(i).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:g,fontWeight:N,fontSize:m,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${o}`,textRendering:"auto",[`&${a}-close-end`]:{marginInlineStart:f},[`&:not(${a}-close-end)`]:{marginInlineEnd:f},"&:hover":{color:v,backgroundColor:y,textDecoration:"none"},"&:active":{backgroundColor:b}},(0,B.genFocusStyle)(e)),[`${a}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:m,lineHeight:p},[`${a}-body`]:{flex:1,minWidth:0,minHeight:0,padding:d,overflow:"auto",[`${a}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${a}-footer`]:{flexShrink:0,padding:`${(0,I.unit)(w)} ${(0,I.unit)($)}`,borderTop:`${(0,I.unit)(u)} ${x} ${h}`},"&-rtl":{direction:"rtl"}}}})(t),(e=>{let{componentCls:t,motionDurationSlow:a}=e;return{[t]:{[`${t}-mask-motion`]:R(0,a),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((e,t)=>{let r;return Object.assign(Object.assign({},e),{[`&-${t}`]:[R(.7,a),D({transform:(r="100%",({left:`translateX(-${r})`,right:`translateX(${r})`,top:`translateY(-${r})`,bottom:`translateY(${r})`})[t])},{transform:"none"})]})},{})}}})(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}));var A=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,r=Object.getOwnPropertySymbols(e);lt.indexOf(r[l])&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(a[r[l]]=e[r[l]]);return a};let H={distance:180},F=e=>{let{rootClassName:r,width:l,height:n,size:s="default",mask:o=!0,push:i=H,open:c,afterOpenChange:d,onClose:m,prefixCls:p,getContainer:u,panelRef:x=null,style:f,className:g,"aria-labelledby":v,visible:y,afterVisibleChange:b,maskStyle:j,drawerStyle:O,contentWrapperStyle:E,destroyOnClose:I,destroyOnHidden:B}=e,z=A(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),M=(0,w.default)(),D=z.title?M:void 0,{getPopupContainer:R,getPrefixCls:F,direction:V,className:U,style:W,classNames:J,styles:K}=(0,T.useComponentConfig)("drawer"),q=F("drawer",p),[X,G,Y]=L(q),Z=void 0===u&&R?()=>R(document.body):u,Q=(0,a.default)({"no-mask":!o,[`${q}-rtl`]:"rtl"===V},r,G,Y),ee=t.useMemo(()=>null!=l?l:"large"===s?736:378,[l,s]),et=t.useMemo(()=>null!=n?n:"large"===s?736:378,[n,s]),ea={motionName:(0,k.getTransitionName)(q,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},er=(0,_.usePanelRef)(),el=(0,h.composeRef)(x,er),[en,es]=(0,C.useZIndex)("Drawer",z.zIndex),{classNames:eo={},styles:ei={}}=z;return X(t.createElement($.default,{form:!0,space:!0},t.createElement(S.default.Provider,{value:es},t.createElement(N,Object.assign({prefixCls:q,onClose:m,maskMotion:ea,motion:e=>({motionName:(0,k.getTransitionName)(q,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},z,{classNames:{mask:(0,a.default)(eo.mask,J.mask),content:(0,a.default)(eo.content,J.content),wrapper:(0,a.default)(eo.wrapper,J.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},ei.mask),j),K.mask),content:Object.assign(Object.assign(Object.assign({},ei.content),O),K.content),wrapper:Object.assign(Object.assign(Object.assign({},ei.wrapper),E),K.wrapper)},open:null!=c?c:y,mask:o,push:i,width:ee,height:et,style:Object.assign(Object.assign({},W),f),className:(0,a.default)(U,g),rootClassName:Q,getContainer:Z,afterOpenChange:null!=d?d:b,panelRef:el,zIndex:en,"aria-labelledby":null!=v?v:D,destroyOnClose:null!=B?B:I}),t.createElement(P,Object.assign({prefixCls:q},z,{ariaId:D,onClose:m}))))))};F._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:r,style:l,className:n,placement:s="right"}=e,o=A(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=t.useContext(T.ConfigContext),c=i("drawer",r),[d,m,p]=L(c),u=(0,a.default)(c,`${c}-pure`,`${c}-${s}`,m,p,n);return d(t.createElement("div",{className:u,style:l},t.createElement(P,Object.assign({prefixCls:c},o))))},e.s(["Drawer",0,F],608856)},573421,e=>{"use strict";e.i(247167);var t=e.i(8211),a=e.i(271645),r=e.i(343794),l=e.i(887719),n=e.i(908206),s=e.i(242064),o=e.i(721132),i=e.i(517455),c=e.i(264042),d=e.i(150073),m=e.i(165370),p=e.i(244451);let u=a.default.createContext({});u.Consumer;var x=e.i(763731),h=e.i(211576),f=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,r=Object.getOwnPropertySymbols(e);lt.indexOf(r[l])&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(a[r[l]]=e[r[l]]);return a};let g=a.default.forwardRef((e,t)=>{let l,{prefixCls:n,children:o,actions:i,extra:c,styles:d,className:m,classNames:p,colStyle:g}=e,v=f(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:y,itemLayout:b}=(0,a.useContext)(u),{getPrefixCls:j,list:N}=(0,a.useContext)(s.ConfigContext),w=e=>{var t,a;return(0,r.default)(null==(a=null==(t=null==N?void 0:N.item)?void 0:t.classNames)?void 0:a[e],null==p?void 0:p[e])},$=e=>{var t,a;return Object.assign(Object.assign({},null==(a=null==(t=null==N?void 0:N.item)?void 0:t.styles)?void 0:a[e]),null==d?void 0:d[e])},C=j("list",n),k=i&&i.length>0&&a.default.createElement("ul",{className:(0,r.default)(`${C}-item-action`,w("actions")),key:"actions",style:$("actions")},i.map((e,t)=>a.default.createElement("li",{key:`${C}-item-action-${t}`},e,t!==i.length-1&&a.default.createElement("em",{className:`${C}-item-action-split`})))),S=a.default.createElement(y?"div":"li",Object.assign({},v,y?{}:{ref:t},{className:(0,r.default)(`${C}-item`,{[`${C}-item-no-flex`]:!("vertical"===b?!!c:(l=!1,a.Children.forEach(o,e=>{"string"==typeof e&&(l=!0)}),!(l&&a.Children.count(o)>1)))},m)}),"vertical"===b&&c?[a.default.createElement("div",{className:`${C}-item-main`,key:"content"},o,k),a.default.createElement("div",{className:(0,r.default)(`${C}-item-extra`,w("extra")),key:"extra",style:$("extra")},c)]:[o,k,(0,x.cloneElement)(c,{key:"extra"})]);return y?a.default.createElement(h.Col,{ref:t,flex:1,style:g},S):S});g.Meta=e=>{var{prefixCls:t,className:l,avatar:n,title:o,description:i}=e,c=f(e,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:d}=(0,a.useContext)(s.ConfigContext),m=d("list",t),p=(0,r.default)(`${m}-item-meta`,l),u=a.default.createElement("div",{className:`${m}-item-meta-content`},o&&a.default.createElement("h4",{className:`${m}-item-meta-title`},o),i&&a.default.createElement("div",{className:`${m}-item-meta-description`},i));return a.default.createElement("div",Object.assign({},c,{className:p}),n&&a.default.createElement("div",{className:`${m}-item-meta-avatar`},n),(o||i)&&u)},e.i(296059);var v=e.i(915654),y=e.i(183293),b=e.i(246422),j=e.i(838378);let N=(0,b.genStyleHooks)("List",e=>{let t=(0,j.mergeToken)(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[(e=>{let{componentCls:t,antCls:a,controlHeight:r,minHeight:l,paddingSM:n,marginLG:s,padding:o,itemPadding:i,colorPrimary:c,itemPaddingSM:d,itemPaddingLG:m,paddingXS:p,margin:u,colorText:x,colorTextDescription:h,motionDurationSlow:f,lineWidth:g,headerBg:b,footerBg:j,emptyTextPadding:N,metaMarginBottom:w,avatarMarginRight:$,titleMarginBottom:C,descriptionFontSize:k}=e;return{[t]:Object.assign(Object.assign({},(0,y.resetComponent)(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:b},[`${t}-footer`]:{background:j},[`${t}-header, ${t}-footer`]:{paddingBlock:n},[`${t}-pagination`]:{marginBlockStart:s,[`${a}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:l,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:i,color:x,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:$},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:x},[`${t}-item-meta-title`]:{margin:`0 0 ${(0,v.unit)(e.marginXXS)} 0`,color:x,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:x,transition:`all ${f}`,"&:hover":{color:c}}},[`${t}-item-meta-description`]:{color:h,fontSize:k,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${(0,v.unit)(p)}`,color:h,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:g,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${(0,v.unit)(o)} 0`,color:h,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:N,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${a}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:u,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:s},[`${t}-item-meta`]:{marginBlockEnd:w,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:x,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:o,marginInlineStart:"auto","> li":{padding:`0 ${(0,v.unit)(o)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${a}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:m},[`${t}-sm ${t}-item`]:{padding:d},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}})(t),(e=>{let{listBorderedCls:t,componentCls:a,paddingLG:r,margin:l,itemPaddingSM:n,itemPaddingLG:s,marginLG:o,borderRadiusLG:i}=e,c=(0,v.unit)(e.calc(i).sub(e.lineWidth).equal());return{[t]:{border:`${(0,v.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:i,[`${a}-header`]:{borderRadius:`${c} ${c} 0 0`},[`${a}-footer`]:{borderRadius:`0 0 ${c} ${c}`},[`${a}-header,${a}-footer,${a}-item`]:{paddingInline:r},[`${a}-pagination`]:{margin:`${(0,v.unit)(l)} ${(0,v.unit)(o)}`}},[`${t}${a}-sm`]:{[`${a}-item,${a}-header,${a}-footer`]:{padding:n}},[`${t}${a}-lg`]:{[`${a}-item,${a}-header,${a}-footer`]:{padding:s}}}})(t),(e=>{let{componentCls:t,screenSM:a,screenMD:r,marginLG:l,marginSM:n,margin:s}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:l}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:l}}}},[`@media screen and (max-width: ${a}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:n}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${(0,v.unit)(s)}`}}}}}})(t)]},e=>({contentWidth:220,itemPadding:`${(0,v.unit)(e.paddingContentVertical)} 0`,itemPaddingSM:`${(0,v.unit)(e.paddingContentVerticalSM)} ${(0,v.unit)(e.paddingContentHorizontal)}`,itemPaddingLG:`${(0,v.unit)(e.paddingContentVerticalLG)} ${(0,v.unit)(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}));var w=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,r=Object.getOwnPropertySymbols(e);lt.indexOf(r[l])&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(a[r[l]]=e[r[l]]);return a};let $=a.forwardRef(function(e,x){let{pagination:h=!1,prefixCls:f,bordered:g=!1,split:v=!0,className:y,rootClassName:b,style:j,children:$,itemLayout:C,loadMore:k,grid:S,dataSource:T=[],size:_,header:O,footer:E,loading:P=!1,rowKey:I,renderItem:B,locale:z}=e,M=w(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),D=h&&"object"==typeof h?h:{},[R,L]=a.useState(D.defaultCurrent||1),[A,H]=a.useState(D.defaultPageSize||10),{getPrefixCls:F,direction:V,className:U,style:W}=(0,s.useComponentConfig)("list"),{renderEmpty:J}=a.useContext(s.ConfigContext),K=e=>(t,a)=>{var r;L(t),H(a),h&&(null==(r=null==h?void 0:h[e])||r.call(h,t,a))},q=K("onChange"),X=K("onShowSizeChange"),G=!!(k||h||E),Y=F("list",f),[Z,Q,ee]=N(Y),et=P;"boolean"==typeof et&&(et={spinning:et});let ea=!!(null==et?void 0:et.spinning),er=(0,i.default)(_),el="";switch(er){case"large":el="lg";break;case"small":el="sm"}let en=(0,r.default)(Y,{[`${Y}-vertical`]:"vertical"===C,[`${Y}-${el}`]:el,[`${Y}-split`]:v,[`${Y}-bordered`]:g,[`${Y}-loading`]:ea,[`${Y}-grid`]:!!S,[`${Y}-something-after-last-item`]:G,[`${Y}-rtl`]:"rtl"===V},U,y,b,Q,ee),es=(0,l.default)({current:1,total:0,position:"bottom"},{total:T.length,current:R,pageSize:A},h||{}),eo=Math.ceil(es.total/es.pageSize);es.current=Math.min(es.current,eo);let ei=h&&a.createElement("div",{className:(0,r.default)(`${Y}-pagination`)},a.createElement(m.default,Object.assign({align:"end"},es,{onChange:q,onShowSizeChange:X}))),ec=(0,t.default)(T);h&&T.length>(es.current-1)*es.pageSize&&(ec=(0,t.default)(T).splice((es.current-1)*es.pageSize,es.pageSize));let ed=Object.keys(S||{}).some(e=>["xs","sm","md","lg","xl","xxl"].includes(e)),em=(0,d.default)(ed),ep=a.useMemo(()=>{for(let e=0;e{if(!S)return;let e=ep&&S[ep]?S[ep]:S.column;if(e)return{width:`${100/e}%`,maxWidth:`${100/e}%`}},[JSON.stringify(S),ep]),ex=ea&&a.createElement("div",{style:{minHeight:53}});if(ec.length>0){let e=ec.map((e,t)=>{let r;return B?((r="function"==typeof I?I(e):I?e[I]:e.key)||(r=`list-item-${t}`),a.createElement(a.Fragment,{key:r},B(e,t))):null});ex=S?a.createElement(c.Row,{gutter:S.gutter},a.Children.map(e,e=>a.createElement("div",{key:null==e?void 0:e.key,style:eu},e))):a.createElement("ul",{className:`${Y}-items`},e)}else $||ea||(ex=a.createElement("div",{className:`${Y}-empty-text`},(null==z?void 0:z.emptyText)||(null==J?void 0:J("List"))||a.createElement(o.default,{componentName:"List"})));let eh=es.position,ef=a.useMemo(()=>({grid:S,itemLayout:C}),[JSON.stringify(S),C]);return Z(a.createElement(u.Provider,{value:ef},a.createElement("div",Object.assign({ref:x,style:Object.assign(Object.assign({},W),j),className:en},M),("top"===eh||"both"===eh)&&ei,O&&a.createElement("div",{className:`${Y}-header`},O),a.createElement(p.default,Object.assign({},et),ex,$),E&&a.createElement("div",{className:`${Y}-footer`},E),k||("bottom"===eh||"both"===eh)&&ei)))});$.Item=g,e.s(["List",0,$],573421)},837007,e=>{"use strict";var t=e.i(603908);e.s(["PlusIcon",()=>t.default])},903446,e=>{"use strict";let t=(0,e.i(475254).default)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",()=>t])},132104,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};var l=e.i(9583),n=a.forwardRef(function(e,n){return a.createElement(l.default,(0,t.default)({},e,{ref:n,icon:r}))});e.s(["ArrowUpOutlined",0,n],132104)},447593,989022,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},l=e.i(9583),n=a.forwardRef(function(e,n){return a.createElement(l.default,(0,t.default)({},e,{ref:n,icon:r}))});e.s(["ClearOutlined",0,n],447593);var s=e.i(843476),o=e.i(592968),i=e.i(637235);let c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z"}}]},name:"number",theme:"outlined"};var d=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:c}))});let m={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"};var p=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:m}))}),u=e.i(872934),x=e.i(812618),h=e.i(366308),f=e.i(458505);e.s(["default",0,({timeToFirstToken:e,totalLatency:t,usage:a,toolName:r})=>e||t||a?(0,s.jsxs)("div",{className:"response-metrics mt-2 pt-2 border-t border-gray-100 text-xs text-gray-500 flex flex-wrap gap-3",children:[void 0!==e&&(0,s.jsx)(o.Tooltip,{title:"Time to first token",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(i.ClockCircleOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["TTFT: ",(e/1e3).toFixed(2),"s"]})]})}),void 0!==t&&(0,s.jsx)(o.Tooltip,{title:"Total latency",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(i.ClockCircleOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Total Latency: ",(t/1e3).toFixed(2),"s"]})]})}),a?.promptTokens!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Prompt tokens",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(p,{className:"mr-1"}),(0,s.jsxs)("span",{children:["In: ",a.promptTokens]})]})}),a?.completionTokens!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Completion tokens",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(u.ExportOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Out: ",a.completionTokens]})]})}),a?.reasoningTokens!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Reasoning tokens",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(x.BulbOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Reasoning: ",a.reasoningTokens]})]})}),a?.totalTokens!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Total tokens",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(d,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Total: ",a.totalTokens]})]})}),a?.cost!==void 0&&(0,s.jsx)(o.Tooltip,{title:"Cost",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(f.DollarOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["$",a.cost.toFixed(6)]})]})}),r&&(0,s.jsx)(o.Tooltip,{title:"Tool used",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(h.ToolOutlined,{className:"mr-1"}),(0,s.jsxs)("span",{children:["Tool: ",r]})]})})]}):null],989022)},440987,e=>{"use strict";var t=e.i(903446);e.s(["SettingsIcon",()=>t.default])},191403,180127,516430,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(994388),l=e.i(212931),n=e.i(764205),s=e.i(269200),o=e.i(942232),i=e.i(977572),c=e.i(427612),d=e.i(64848),m=e.i(496020),p=e.i(94629),u=e.i(360820),x=e.i(871943),h=e.i(68155),f=e.i(592968),g=e.i(166406),v=e.i(152990),y=e.i(682830),b=e.i(916925);let j=e=>{let t=new Set,a=/\{\{(\w+)\}\}/g;if(e.messages.forEach(e=>{let r;for(;null!==(r=a.exec(e.content));)t.add(r[1])}),e.developerMessage){let r;for(;null!==(r=a.exec(e.developerMessage));)t.add(r[1])}return Array.from(t)},N=e=>{let t=j(e),a=`--- -model: ${e.model} -`;return void 0!==e.config.temperature&&(a+=`temperature: ${e.config.temperature} -`),void 0!==e.config.max_tokens&&(a+=`max_tokens: ${e.config.max_tokens} -`),void 0!==e.config.top_p&&(a+=`top_p: ${e.config.top_p} -`),a+=`input: - schema: -`,t.forEach(e=>{a+=` ${e}: string -`}),a+=`output: - format: text -`,e.tools&&e.tools.length>0&&(a+=`tools: -`,e.tools.forEach(e=>{let t=JSON.parse(e.json);a+=` - ${JSON.stringify(t)} -`})),a+=`--- - -`,e.developerMessage&&""!==e.developerMessage.trim()&&(a+=`Developer: ${e.developerMessage.trim()} - -`),e.messages.forEach(e=>{let t=e.role.charAt(0).toUpperCase()+e.role.slice(1);a+=`${t}: ${e.content} - -`}),a.trim()},w=e=>{let t=Number(e);return Number.isFinite(t)?t:void 0},$=e=>{let t=e?.prompt_spec?.litellm_params?.dotprompt_content||"";if(!t)throw Error("No dotprompt_content found in API response");let a=t.split("---");if(a.length<3)throw Error("Invalid dotprompt format");let r=a[1],l=a.slice(2).join("---").trim(),n=(e=>{let t={config:{},tools:[]},a=e.split("\n");for(let e of(t.tools=(e=>{let t=[],a=!1;for(let r of e){let e=r.trim();if(!a){("tools:"===e||e.startsWith("tools:"))&&(a=!0);continue}if(r.length>0&&!/^\s/.test(r)&&"-"!==e&&!e.startsWith("-"))break;let l=e.match(/^-+\s*(.+)$/);if(!l)continue;let n=l[1].trim();if(n)try{let e=JSON.parse(n);t.push({name:e?.function?.name||"Unnamed Tool",description:e?.function?.description||"",json:JSON.stringify(e,null,2)})}catch{}}return t})(a),a)){let a=e.trim();if(!a||a.startsWith("input:")||a.startsWith("output:")||a.startsWith("schema:")||a.startsWith("format:")||a.startsWith("tools:")||a.startsWith("-"))continue;let r=a.indexOf(":");if(r<=0)continue;let l=a.substring(0,r).trim(),n=a.substring(r+1).trim();if("model"===l){t.model=n;continue}"temperature"===l&&(t.config.temperature=w(n)),"max_tokens"===l&&(t.config.max_tokens=w(n)),"top_p"===l&&(t.config.top_p=w(n))}return t})(r),s=(e=>{let t=/^(System|Developer|User|Assistant):(?:\s(.*)|\s*)$/,a=[],r="",l=null,n=[],s=()=>{if(!l)return;let e=n.join("\n").trim();"developer"===l?e&&(r=r?`${r} - -${e}`:e):e?a.push({role:l,content:e}):a.push({role:l,content:""})};for(let a of e.split("\n")){let e=a.match(t);if(e){s(),l=e[1].toLowerCase(),n=[e[2]??""];continue}l&&n.push(a)}return s(),{developerMessage:r,messages:a}})(l),o=e?.prompt_spec?.prompt_id||"Unnamed Prompt";return{name:C(o)||o,model:n.model||"gpt-4o",config:n.config,tools:n.tools,developerMessage:s.developerMessage,messages:s.messages.length>0?s.messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}]}},C=e=>e?e.replace(/[._-]v\d+$/,""):"",k=e=>e?.prompt_id||"",S=e=>{try{let t=e.litellm_params;if(t?.dotprompt_content){let e=t.dotprompt_content.match(/model:\s*([^\n]+)/);if(e)return e[1].trim()}if(t?.prompt_data?.model)return t.prompt_data.model;if(t?.model)return t.model;return null}catch(e){return console.error("Error extracting model:",e),null}},T=({promptsList:e,isLoading:l,onPromptClick:j,onDeleteClick:N,accessToken:w,isAdmin:$})=>{let[C,k]=(0,a.useState)([{id:"created_at",desc:!0}]),[T,_]=(0,a.useState)(new Map);(0,a.useEffect)(()=>{(async()=>{if(w)try{let e=await (0,n.modelHubCall)(w);if(e?.data){let t=new Map;e.data.forEach(e=>{t.set(e.model_group,e)}),_(t)}}catch(e){console.error("Error fetching model hub data:",e)}})()},[w]);let O=e=>e?new Date(e).toLocaleString():"-",E=[{header:"Prompt ID",accessorKey:"prompt_id",cell:e=>{let a=String(e.getValue()||""),l=a.length>25?`${a.slice(0,25)}...`:a;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f.Tooltip,{title:a,children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[220px] justify-start",onClick:()=>e.getValue()&&j?.(e.getValue()),children:l})}),(0,t.jsx)(f.Tooltip,{title:"Copy prompt ID",children:(0,t.jsx)(g.CopyOutlined,{onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText(a)},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Model",accessorKey:"model",cell:({row:e})=>{let a=S(e.original);if(!a)return(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let r=((e,t)=>{if(!e)return null;let a=t.get(e);return a&&a.providers&&a.providers.length>0?a.providers[0]:null})(a,T),{logo:l}=(0,b.getProviderLogoAndName)(r||"");return(0,t.jsx)(f.Tooltip,{title:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:r&&l?(0,t.jsx)("img",{src:l,alt:`${r} logo`,className:"w-4 h-4",onError:e=>{let t=e.currentTarget,a=t.parentElement;if(a&&a.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r?.charAt(0)||"-",a.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}):(0,t.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})]})})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{let a=e.original;return(0,t.jsx)(f.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:O(a.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:({row:e})=>{let a=e.original;return(0,t.jsx)(f.Tooltip,{title:a.updated_at,children:(0,t.jsx)("span",{className:"text-xs",children:O(a.updated_at)})})}},{header:"Type",accessorKey:"prompt_info.prompt_type",cell:({row:e})=>{let a=e.original;return(0,t.jsx)(f.Tooltip,{title:a.prompt_info.prompt_type,children:(0,t.jsx)("span",{className:"text-xs",children:a.prompt_info.prompt_type})})}},...$?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let a=e.original,l=a.prompt_id||"Unknown Prompt";return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(f.Tooltip,{title:"Delete prompt",children:(0,t.jsx)(r.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),N?.(a.prompt_id,l)},icon:h.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],P=(0,v.useReactTable)({data:e,columns:E,state:{sorting:C},onSortingChange:k,getCoreRowModel:(0,y.getCoreRowModel)(),getSortedRowModel:(0,y.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(s.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:P.getHeaderGroups().map(e=>(0,t.jsx)(m.TableRow,{children:e.headers.map(e=>(0,t.jsx)(d.TableHeaderCell,{className:"py-1 h-8",onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,v.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(u.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(x.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(p.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(o.TableBody,{children:l?(0,t.jsx)(m.TableRow,{children:(0,t.jsx)(i.TableCell,{colSpan:E.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e.length>0?P.getRowModel().rows.map(e=>(0,t.jsx)(m.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(i.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,v.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(m.TableRow,{children:(0,t.jsx)(i.TableCell,{colSpan:E.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No prompts found"})})})})})]})})})};var _=e.i(304967),O=e.i(629569),E=e.i(599724),P=e.i(350967),I=e.i(389083),B=e.i(197647),z=e.i(653824),M=e.i(881073),D=e.i(404206),R=e.i(723731),L=e.i(464571),A=e.i(530212),H=e.i(797672),F=e.i(500330),V=e.i(678784),U=e.i(118366),W=e.i(727749),J=e.i(199133),K=e.i(653496),q=e.i(245094),X=e.i(650056),G=e.i(219470);let Y=({promptId:e,model:n,promptVariables:s={},accessToken:o,version:i="1",proxySettings:c})=>{let[d,m]=(0,a.useState)(!1),[p,u]=(0,a.useState)("curl"),[x,h]=(0,a.useState)("basic"),[f,g]=(0,a.useState)(""),v=window.location.origin,y=c?.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?v=y:c?.PROXY_BASE_URL&&(v=c.PROXY_BASE_URL);let b=o||"sk-1234";return a.default.useEffect(()=>{d&&g((()=>{let t=Object.keys(s).length>0;if("curl"===p)if("basic"===x)return`curl -X POST '${v}/chat/completions' \\ - -H 'Content-Type: application/json' \\ - -H 'Authorization: Bearer ${b}' \\ - -d '{ - "model": "${n}", - "prompt_id": "${e}"${t?`, - "prompt_variables": ${JSON.stringify(s,null,6).replace(/\n/g,"\n ")}`:""} - }' | jq`;else if("messages"===x)return`curl -X POST '${v}/chat/completions' \\ - -H 'Content-Type: application/json' \\ - -H 'Authorization: Bearer ${b}' \\ - -d '{ - "model": "${n}", - "prompt_id": "${e}"${t?`, - "prompt_variables": ${JSON.stringify(s,null,6).replace(/\n/g,"\n ")}`:""}, - "messages": [ - { - "role": "user", - "content": "hi" - } - ] - }' | jq`;else return`curl -X POST '${v}/chat/completions' \\ - -H 'Content-Type: application/json' \\ - -H 'Authorization: Bearer ${b}' \\ - -d '{ - "model": "${n}", - "prompt_id": "${e}", - "prompt_version": ${i}, - "messages": [ - { - "role": "user", - "content": "Who are u" - } - ] - }' | jq`;if("python"===p){let a=`import openai - -client = openai.OpenAI( - api_key="${b}", - base_url="${v}" -) -`;return"basic"===x?`${a} -response = client.chat.completions.create( - model="${n}", - extra_body={ - "prompt_id": "${e}"${t?`, - "prompt_variables": ${JSON.stringify(s,null,8).replace(/\n/g,"\n ")}`:""} - } -) - -print(response)`:"messages"===x?`${a} -response = client.chat.completions.create( - model="${n}", - messages=[ - {"role": "user", "content": "hi"} - ], - extra_body={ - "prompt_id": "${e}"${t?`, - "prompt_variables": ${JSON.stringify(s,null,8).replace(/\n/g,"\n ")}`:""} - } -) - -print(response)`:`${a} -response = client.chat.completions.create( - model="${n}", - messages=[ - {"role": "user", "content": "Who are u"} - ], - extra_body={ - "prompt_id": "${e}", - "prompt_version": ${i} - } -) - -print(response)`}{let a=`import OpenAI from 'openai'; - -const client = new OpenAI({ - apiKey: "${b}", - baseURL: "${v}" -}); -`;return"basic"===x?`${a} -async function main() { - const response = await client.chat.completions.create({ - model: "${n}", - ${t?`prompt_id: "${e}", - prompt_variables: ${JSON.stringify(s,null,8).replace(/\n/g,"\n ")}`:`prompt_id: "${e}"`} - }); - - console.log(response); -} - -main();`:"messages"===x?`${a} -async function main() { - const response = await client.chat.completions.create({ - model: "${n}", - messages: [ - { role: "user", content: "hi" } - ], - ${t?`prompt_id: "${e}", - prompt_variables: ${JSON.stringify(s,null,8).replace(/\n/g,"\n ")}`:`prompt_id: "${e}"`} - }); - - console.log(response); -} - -main();`:`${a} -async function main() { - const response = await client.chat.completions.create({ - model: "${n}", - messages: [ - { role: "user", content: "Who are u" } - ], - prompt_id: "${e}", - prompt_version: ${i} - }); - - console.log(response); -} - -main();`}})())},[d,p,x,e,n,s]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"secondary",icon:q.CodeOutlined,onClick:()=>{m(!0)},children:"Get Code"}),(0,t.jsxs)(l.Modal,{title:"Generated Code",open:d,onCancel:()=>{m(!1)},footer:null,width:800,children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium block mb-1 text-gray-700",children:"Language"}),(0,t.jsx)(J.Select,{value:p,onChange:e=>u(e),style:{width:180},options:[{value:"curl",label:"cURL"},{value:"python",label:"Python (OpenAI SDK)"},{value:"javascript",label:"JavaScript (OpenAI SDK)"}]})]}),(0,t.jsx)(L.Button,{onClick:()=>{navigator.clipboard.writeText(f),W.default.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,t.jsx)(K.Tabs,{activeKey:x,onChange:h,items:[{label:"Basic",key:"basic"},{label:"With Messages",key:"messages"},{label:"With Version",key:"version"}]}),(0,t.jsx)(X.Prism,{language:"curl"===p?"bash":"python"===p?"python":"javascript",style:G.coy,wrapLines:!0,wrapLongLines:!0,className:"rounded-md mt-0",customStyle:{maxHeight:"60vh",overflowY:"auto",marginTop:0,borderTopLeftRadius:0,borderTopRightRadius:0},children:f})]})]})},Z=({promptId:e,onClose:s,accessToken:o,isAdmin:i,onDelete:c,onEdit:d})=>{let[m,p]=(0,a.useState)(null),[u,x]=(0,a.useState)(null),[f,g]=(0,a.useState)(null),[v,y]=(0,a.useState)(!0),[b,j]=(0,a.useState)({}),[N,w]=(0,a.useState)(!1),[$,C]=(0,a.useState)(!1),T=async()=>{try{if(y(!0),!o)return;let t=await (0,n.getPromptInfo)(o,e);p(t.prompt_spec),x(t.raw_prompt_template),g(t)}catch(e){W.default.fromBackend("Failed to load prompt information"),console.error("Error fetching prompt info:",e)}finally{y(!1)}};if((0,a.useEffect)(()=>{T()},[e,o]),v)return(0,t.jsx)("div",{className:"p-4",children:"Loading..."});if(!m)return(0,t.jsx)("div",{className:"p-4",children:"Prompt not found"});let J=e=>e?new Date(e).toLocaleString():"-",K=async(e,t)=>{await (0,F.copyToClipboard)(e)&&(j(e=>({...e,[t]:!0})),setTimeout(()=>{j(e=>({...e,[t]:!1}))},2e3))},q=async()=>{if(o&&m){C(!0);try{await (0,n.deletePromptCall)(o,G),W.default.success(`Prompt "${G}" deleted successfully`),c?.(),s()}catch(e){console.error("Error deleting prompt:",e),W.default.fromBackend("Failed to delete prompt")}finally{C(!1),w(!1)}}},X=m&&S(m)||"gpt-4o",G=k(m),Z=(e=>{let t;if(e?.version)return String(e.version);var a=(t=k(e),e?.litellm_params?.prompt_id||t);if(!a)return"1";let r=a.match(/[._-]v(\d+)$/);return r?r[1]:"1"})(m);return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Button,{icon:A.ArrowLeftIcon,variant:"light",onClick:s,className:"mb-4",children:"Back to Prompts"}),(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(O.Title,{children:"Prompt Details"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(E.Text,{className:"text-gray-500 font-mono",children:G}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:b["prompt-id"]?(0,t.jsx)(V.CheckIcon,{size:12}):(0,t.jsx)(U.CopyIcon,{size:12}),onClick:()=>K(G,"prompt-id"),className:`left-2 z-10 transition-all duration-200 ${b["prompt-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Y,{promptId:G,model:X,promptVariables:(e=>{let t;if(!e)return{};let a={},r=/\{\{(\w+)\}\}/g;for(;null!==(t=r.exec(e));){let e=t[1];a[e]||(a[e]=`example_${e}`)}return a})(u?.content),accessToken:o,version:Z}),(0,t.jsx)(r.Button,{icon:H.PencilIcon,variant:"primary",onClick:()=>d?.(f),className:"flex items-center",children:"Prompt Studio"}),i&&(0,t.jsx)(r.Button,{icon:h.TrashIcon,variant:"secondary",onClick:()=>{w(!0)},className:"flex items-center",children:"Delete Prompt"})]})]})]}),(0,t.jsxs)(z.TabGroup,{children:[(0,t.jsxs)(M.TabList,{className:"mb-4",children:[(0,t.jsx)(B.Tab,{children:"Overview"},"overview"),u?(0,t.jsx)(B.Tab,{children:"Prompt Template"},"prompt-template"):(0,t.jsx)(t.Fragment,{}),i?(0,t.jsx)(B.Tab,{children:"Details"},"details"):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(B.Tab,{children:"Raw JSON"},"raw-json")]}),(0,t.jsxs)(R.TabPanels,{children:[(0,t.jsxs)(D.TabPanel,{children:[(0,t.jsxs)(P.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(_.Card,{children:[(0,t.jsx)(E.Text,{children:"Prompt ID"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(O.Title,{className:"font-mono text-sm",children:G})})]}),(0,t.jsxs)(_.Card,{children:[(0,t.jsx)(E.Text,{children:"Version"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(O.Title,{children:Z}),(0,t.jsxs)(I.Badge,{color:"blue",className:"mt-1",children:["v",Z]})]})]}),(0,t.jsxs)(_.Card,{children:[(0,t.jsx)(E.Text,{children:"Prompt Type"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(O.Title,{children:m.prompt_info?.prompt_type||"-"}),(0,t.jsx)(I.Badge,{color:"blue",className:"mt-1",children:m.prompt_info?.prompt_type||"Unknown"})]})]}),(0,t.jsxs)(_.Card,{children:[(0,t.jsx)(E.Text,{children:"Created At"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)(O.Title,{children:J(m.created_at)}),(0,t.jsxs)(E.Text,{children:["Last Updated: ",J(m.updated_at)]})]})]})]}),m.litellm_params&&Object.keys(m.litellm_params).length>0&&(0,t.jsxs)(_.Card,{className:"mt-6",children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"LiteLLM Parameters"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(m.litellm_params,null,2)})})]})]}),u&&(0,t.jsx)(D.TabPanel,{children:(0,t.jsxs)(_.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(O.Title,{children:"Prompt Template"}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:b["prompt-content"]?(0,t.jsx)(V.CheckIcon,{size:16}):(0,t.jsx)(U.CopyIcon,{size:16}),onClick:()=>K(u.content,"prompt-content"),className:`transition-all duration-200 ${b["prompt-content"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:b["prompt-content"]?"Copied!":"Copy Content"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"Template ID"}),(0,t.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:u.litellm_prompt_id})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"Content"}),(0,t.jsx)("div",{className:"mt-2 p-4 bg-gray-50 rounded-md border overflow-auto max-h-96",children:(0,t.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:u.content})})]}),u.metadata&&Object.keys(u.metadata).length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"Template Metadata"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-64",children:JSON.stringify(u.metadata,null,2)})})]})]})]})}),i&&(0,t.jsx)(D.TabPanel,{children:(0,t.jsxs)(_.Card,{children:[(0,t.jsx)(O.Title,{className:"mb-4",children:"Prompt Details"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"Prompt ID"}),(0,t.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:G})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"Prompt Type"}),(0,t.jsx)("div",{children:m.prompt_info?.prompt_type||"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"Created At"}),(0,t.jsx)("div",{children:J(m.created_at)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)("div",{children:J(m.updated_at)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"LiteLLM Parameters"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-96",children:JSON.stringify(m.litellm_params,null,2)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(E.Text,{className:"font-medium",children:"Prompt Info"}),(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(m.prompt_info,null,2)})})]})]})]})}),(0,t.jsx)(D.TabPanel,{children:(0,t.jsxs)(_.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(O.Title,{children:"Raw API Response"}),(0,t.jsx)(L.Button,{type:"text",size:"small",icon:b["raw-json"]?(0,t.jsx)(V.CheckIcon,{size:16}):(0,t.jsx)(U.CopyIcon,{size:16}),onClick:()=>K(JSON.stringify(f,null,2),"raw-json"),className:`transition-all duration-200 ${b["raw-json"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`,children:b["raw-json"]?"Copied!":"Copy JSON"})]}),(0,t.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(f,null,2)})})]})})]})]}),(0,t.jsxs)(l.Modal,{title:"Delete Prompt",open:N,onOk:q,onCancel:()=>{w(!1)},confirmLoading:$,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",(0,t.jsx)("strong",{children:G}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})};var Q=e.i(808613),ee=e.i(515831),et=e.i(312361),ea=e.i(779241),er=e.i(519756);let{Option:el}=J.Select,en=({visible:e,onClose:r,accessToken:s,onSuccess:o})=>{let[i]=Q.Form.useForm(),[c,d]=(0,a.useState)(!1),[m,p]=(0,a.useState)([]),[u,x]=(0,a.useState)("dotprompt"),h=()=>{i.resetFields(),p([]),x("dotprompt"),r()},f=async()=>{try{let e=await i.validateFields();if(console.log("values: ",e),!s)return void W.default.fromBackend("Access token is required");if("dotprompt"===u&&0===m.length)return void W.default.fromBackend("Please upload a .prompt file");d(!0);let t={};if("dotprompt"===u&&m.length>0){let a=m[0].originFileObj;try{let r=await (0,n.convertPromptFileToJson)(s,a);console.log("Conversion result:",r),t={prompt_id:e.prompt_id,litellm_params:{prompt_integration:"dotprompt",prompt_id:r.prompt_id,prompt_data:r.json_data},prompt_info:{prompt_type:"db"}}}catch(e){console.error("Error converting prompt file:",e),W.default.fromBackend("Failed to convert prompt file to JSON"),d(!1);return}}try{await (0,n.createPromptCall)(s,t),W.default.success("Prompt created successfully!"),h(),o()}catch(e){console.error("Error creating prompt:",e),W.default.fromBackend("Failed to create prompt")}}catch(e){console.error("Form validation error:",e)}finally{d(!1)}};return(0,t.jsx)(l.Modal,{title:"Add New Prompt",open:e,onCancel:h,footer:[(0,t.jsx)(L.Button,{onClick:h,children:"Cancel"},"cancel"),(0,t.jsx)(L.Button,{loading:c,onClick:f,children:"Create Prompt"},"submit")],width:600,children:(0,t.jsxs)(Q.Form,{form:i,layout:"vertical",requiredMark:!1,children:[(0,t.jsx)(Q.Form.Item,{label:"Prompt ID",name:"prompt_id",rules:[{required:!0,message:"Please enter a prompt ID"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Prompt ID can only contain letters, numbers, underscores, and hyphens"}],children:(0,t.jsx)(ea.TextInput,{placeholder:"Enter unique prompt ID (e.g., my_prompt_id)"})}),(0,t.jsx)(Q.Form.Item,{label:"Prompt Integration",name:"prompt_integration",initialValue:"dotprompt",children:(0,t.jsx)(J.Select,{value:u,onChange:x,children:(0,t.jsx)(el,{value:"dotprompt",children:"dotprompt"})})}),"dotprompt"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(et.Divider,{}),(0,t.jsxs)(Q.Form.Item,{label:"Prompt File",extra:"Upload a .prompt file that follows the Dotprompt specification",children:[(0,t.jsx)(ee.Upload,{...{beforeUpload:e=>(e.name.endsWith(".prompt")||W.default.fromBackend("Please upload a .prompt file"),!1),fileList:m,onChange:({fileList:e})=>{p(e.slice(-1))},onRemove:()=>{p([])}},children:(0,t.jsx)(L.Button,{icon:(0,t.jsx)(er.UploadOutlined,{}),children:"Select .prompt File"})}),m.length>0&&(0,t.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",m[0].name]})]})]})]})})},es=`{ - "type": "function", - "function": { - "name": "get_current_weather", - "description": "Get the current weather in a given location", - "parameters": { - "type": "object", - "properties": { - "location": { - "type": "string", - "description": "The city and state, e.g. San Francisco, CA" - }, - "unit": { - "type": "string", - "enum": ["celsius", "fahrenheit"] - } - }, - "required": ["location"] - } - } -}`,eo=({visible:e,initialJson:r,onSave:n,onClose:s})=>{let[o,i]=(0,a.useState)(r||es),[c,d]=(0,a.useState)(null),m=()=>{d(null),s()};return(0,t.jsx)(l.Modal,{title:(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsx)("span",{className:"text-lg font-medium",children:"Add Tool"})}),open:e,onCancel:m,width:800,footer:[(0,t.jsx)(L.Button,{onClick:m,children:"Cancel"},"cancel"),(0,t.jsx)(L.Button,{type:"primary",onClick:()=>{try{JSON.parse(o),d(null),n(o)}catch(e){d("Invalid JSON format. Please check your syntax.")}},children:"Add"},"save")],children:(0,t.jsxs)("div",{className:"space-y-3",children:[c&&(0,t.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-red-600 text-sm",children:c}),(0,t.jsx)("textarea",{value:o,onChange:e=>i(e.target.value),className:"w-full min-h-[400px] px-4 py-3 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",placeholder:"Paste your tool JSON here..."})]})})};var ei=e.i(311451),ec=e.i(475254);let ed=(0,ec.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",()=>ed],180127),e.s(["ArrowLeftIcon",()=>ed],516430);let em=(0,ec.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),ep=(0,ec.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),eu=({promptName:e,onNameChange:a,onBack:l,onSave:n,isSaving:s,editMode:o=!1,onShowHistory:i,version:c,promptModel:d="gpt-4o",promptVariables:m={},accessToken:p,proxySettings:u})=>(0,t.jsxs)("div",{className:"bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(r.Button,{icon:ed,variant:"light",onClick:l,size:"xs",children:"Back"}),(0,t.jsx)(ei.Input,{value:e,onChange:e=>a(e.target.value),className:"text-base font-medium border-none shadow-none",style:{width:"200px"}}),c&&(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium",children:c}),(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Draft"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Unsaved changes"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(Y,{promptId:e,model:d,promptVariables:m,accessToken:p,version:c?.replace("v","")||"1",proxySettings:u}),o&&i&&(0,t.jsx)(r.Button,{icon:ep,variant:"secondary",onClick:i,children:"History"}),(0,t.jsx)(r.Button,{icon:em,onClick:n,loading:s,disabled:s,children:o?"Update":"Save"})]})]});var ex=e.i(440987),eh=e.i(992619);let ef=({model:e,temperature:r=1,maxTokens:l=1e3,accessToken:n,onModelChange:s,onTemperatureChange:o,onMaxTokensChange:i})=>{let[c,d]=(0,a.useState)(!1);return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-[300px]",children:(0,t.jsx)(eh.default,{accessToken:n||"",value:e,onChange:s,showLabel:!1})}),(0,t.jsxs)("button",{onClick:()=>d(!c),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,t.jsx)(ex.SettingsIcon,{size:16}),(0,t.jsx)("span",{children:"Parameters"})]}),c&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30",children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-96",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:"Model Parameters"}),(0,t.jsx)("button",{onClick:()=>d(!1),className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(E.Text,{className:"text-sm text-gray-700",children:"Temperature"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:0,max:2,step:.1,value:r,onChange:e=>o(parseFloat(e.target.value)||0),className:"w-20"})]})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(E.Text,{className:"text-sm text-gray-700",children:"Max Tokens"}),(0,t.jsx)(ei.Input,{type:"number",size:"small",min:1,max:32768,value:l,onChange:e=>i(parseInt(e.target.value)||1e3),className:"w-24"})]})})]})]})})]})};var eg=e.i(837007);let ev=(0,ec.default)("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),ey=({tools:e,onAddTool:a,onEditTool:r,onRemoveTool:l})=>(0,t.jsxs)(_.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)(E.Text,{className:"text-sm font-medium",children:"Tools"}),(0,t.jsxs)("button",{onClick:a,className:"text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(eg.PlusIcon,{size:14,className:"mr-1"}),"Add"]})]}),0===e.length?(0,t.jsx)(E.Text,{className:"text-gray-500 text-xs",children:"No tools added"}):(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 border border-gray-200 rounded",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"font-medium text-xs truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1 ml-2",children:[(0,t.jsx)("button",{onClick:()=>r(a),className:"text-xs text-blue-600 hover:text-blue-700",children:"Edit"}),(0,t.jsx)("button",{onClick:()=>l(a),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})})]})]},a))})]});var eb=e.i(282786),ej=e.i(262218),eN=e.i(751904);let{TextArea:ew}=ei.Input,e$=({value:e,onChange:r,placeholder:l,rows:n=4,className:s})=>{let[o,i]=(0,a.useState)(null),[c,d]=(0,a.useState)(""),m=()=>{c.trim()&&o&&(r(e.substring(0,o.start)+`{{${c}}}`+e.substring(o.end)),i(null),d(""))},p=(()=>{let t,a=/\{\{(\w+)\}\}/g,r=[];for(;null!==(t=a.exec(e));)r.push({name:t[1],start:t.index,end:t.index+t[0].length});return r})();return(0,t.jsxs)("div",{className:`variable-textarea-container ${s}`,children:[(0,t.jsx)("style",{children:` - .variable-highlight-text { - color: #f97316; - background-color: #fff7ed; - border-radius: 4px; - padding: 0 2px; - border: 1px solid #fed7aa; - font-family: monospace; - } - `}),(0,t.jsx)(ew,{value:e,onChange:e=>r(e.target.value),placeholder:l,rows:n,className:"font-sans"}),p.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),p.map((e,a)=>(0,t.jsx)(eb.Popover,{content:(0,t.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,t.jsx)(ei.Input,{size:"small",value:c,onChange:e=>d(e.target.value),onPressEnter:m,placeholder:"Variable name",autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,t.jsx)("button",{onClick:m,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,t.jsx)("button",{onClick:()=>{i(null),d("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:o?.start===e.start,onOpenChange:e=>{e||(i(null),d(""))},trigger:"click",children:(0,t.jsx)(ej.Tag,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,t.jsx)(eN.EditOutlined,{}),onClick:()=>{i({oldName:e.name,start:e.start,end:e.end}),d(e.name)},children:e.name})},`${e.start}-${a}`))]})]})},eC=({value:e,onChange:a})=>(0,t.jsxs)(_.Card,{className:"p-3",children:[(0,t.jsx)(E.Text,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,t.jsx)(E.Text,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,t.jsx)(e$,{value:e,onChange:a,rows:3,placeholder:"e.g., You are a helpful assistant..."})]}),ek=(0,ec.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),{Option:eS}=J.Select,eT=({messages:e,onAddMessage:r,onUpdateMessage:l,onRemoveMessage:n,onMoveMessage:s})=>{let[o,i]=(0,a.useState)(null),[c,d]=(0,a.useState)(null),m=()=>{i(null),d(null)};return(0,t.jsxs)(_.Card,{className:"p-3",children:[(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)(E.Text,{className:"text-sm font-medium",children:"Prompt messages"}),(0,t.jsxs)(E.Text,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.map((a,r)=>(0,t.jsxs)("div",{draggable:!0,onDragStart:()=>{i(r)},onDragOver:e=>{e.preventDefault(),d(r)},onDrop:e=>{e.preventDefault(),null!==o&&o!==r&&s(o,r),i(null),d(null)},onDragEnd:m,className:`border border-gray-300 rounded overflow-hidden bg-white transition-all ${o===r?"opacity-50":""} ${c===r&&o!==r?"border-blue-500 border-2":""}`,children:[(0,t.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,t.jsxs)(J.Select,{value:a.role,onChange:e=>l(r,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,t.jsx)(eS,{value:"user",children:"User"}),(0,t.jsx)(eS,{value:"assistant",children:"Assistant"}),(0,t.jsx)(eS,{value:"system",children:"System"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[e.length>1&&(0,t.jsx)("button",{onClick:()=>n(r),className:"text-gray-400 hover:text-red-500",children:(0,t.jsx)(ev,{size:14})}),(0,t.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,t.jsx)(ek,{size:16})})]})]}),(0,t.jsx)("div",{className:"p-2",children:(0,t.jsx)(e$,{value:a.content,onChange:e=>l(r,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},r))}),(0,t.jsxs)("button",{onClick:r,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,t.jsx)(eg.PlusIcon,{size:14,className:"mr-1"}),"Add message"]})]})};var e_=e.i(447593);let eO=({extractedVariables:e,variables:a,onVariableChange:r})=>0===e.length?null:(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,t.jsx)("div",{className:"space-y-2",children:e.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,t.jsx)(ei.Input,{value:a[e]||"",onChange:t=>r(e,t.target.value),placeholder:`Enter value for ${e}`,size:"small"})]},e))})]});var eE=e.i(56456),eP=e.i(482725),eI=e.i(983561);let eB=({hasVariables:e})=>(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(eI.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)("span",{className:"text-base",children:e?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]});var ez=e.i(771674),eM=e.i(918789),eD=e.i(989022);let eR=({message:e})=>(0,t.jsx)("div",{className:`mb-4 flex ${"user"===e.role?"justify-end":"justify-start"}`,children:(0,t.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,t.jsx)(ez.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(eI.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===e.role?(0,t.jsx)(eM.default,{components:{code({node:e,inline:a,className:r,children:l,...n}){let s=/language-(\w+)/.exec(r||"");return!a&&s?(0,t.jsx)(X.Prism,{style:G.coy,language:s[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...n,children:String(l).replace(/\n$/,"")}):(0,t.jsx)("code",{className:`${r} px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono`,style:{wordBreak:"break-word"},...n,children:l})},pre:({node:e,...a})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...a})},children:e.content}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.content}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&(0,t.jsx)(eD.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage})]})]})}),eL=({messages:e,isLoading:a,hasVariables:r,messagesEndRef:l})=>{let n=(0,t.jsx)(eE.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===e.length&&(0,t.jsx)(eB,{hasVariables:r}),e.map((e,a)=>(0,t.jsx)(eR,{message:e},a)),a&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(eP.Spin,{indicator:n})}),(0,t.jsx)("div",{ref:l,style:{height:"1px"}})]})},eA=({extractedVariables:e,variables:a})=>{let r=e.filter(e=>!a[e]||""===a[e].trim());return 0===r.length?null:(0,t.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,t.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",r.map(e=>`{{${e}}}`).join(", ")]})]})]})})};var eH=e.i(132104);let{TextArea:eF}=ei.Input,eV=({inputMessage:e,isLoading:a,isDisabled:l,onInputChange:n,onSend:s,onKeyDown:o,onCancel:i})=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,t.jsx)(eF,{value:e,onChange:e=>n(e.target.value),onKeyDown:o,placeholder:"Type your message... (Shift+Enter for new line)",disabled:a,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,t.jsx)(r.Button,{onClick:s,disabled:l,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,t.jsx)(eH.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),a&&(0,t.jsx)(r.Button,{onClick:i,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]}),eU=({prompt:e,accessToken:l})=>{let{isLoading:s,messages:o,inputMessage:i,variables:c,variablesFilled:d,extractedVariables:m,allVariablesFilled:p,messagesEndRef:u,setInputMessage:x,handleSendMessage:h,handleCancelRequest:f,handleClearConversation:g,handleKeyDown:v,handleVariableChange:y}=((e,t)=>{let[r,l]=(0,a.useState)(!1),[s,o]=(0,a.useState)([]),[i,c]=(0,a.useState)(""),[d,m]=(0,a.useState)({}),[p,u]=(0,a.useState)(!1),[x,h]=(0,a.useState)(null),f=(0,a.useRef)(null),g=j(e),v=g.every(e=>d[e]&&""!==d[e].trim());(0,a.useEffect)(()=>{f.current&&setTimeout(()=>{f.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[s]);let y=async()=>{let a;if(!t)return void W.default.fromBackend("Access token is required");if(g.length>0&&!v)return void W.default.fromBackend("Please fill in all template variables");if(!i.trim())return;!p&&g.length>0&&u(!0);let r={role:"user",content:i};o(e=>[...e,r]),c("");let m=new AbortController;h(m),l(!0);let x=Date.now();try{let r,l,c=N(e),p=(0,n.getProxyBaseUrl)(),u={dotprompt_content:c};0===s.length?u.prompt_variables=d:u.conversation_history=[...s.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch(`${p}/prompts/test`,{method:"POST",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(u),signal:m.signal});if(!h.ok){let e=await h.text();throw Error(`HTTP error! status: ${h.status}, ${e}`)}if(!h.body)throw Error("No response body");let f=h.body.getReader(),g=new TextDecoder,v="";for(o(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await f.read();if(e)break;for(let e of g.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{let e=JSON.parse(t);!r&&e.model&&(r=e.model),e.usage&&(l=e.usage);let n=e.choices?.[0]?.delta?.content;n&&(a||(a=Date.now()-x),v+=n,o(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:v,model:r,timeToFirstToken:a},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let y=Date.now()-x;o(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:y,usage:l},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),o(t=>{let a=t[t.length-1];return a&&"assistant"===a.role&&""===a.content?[...t.slice(0,-1),{role:"assistant",content:`Error: ${e.message}`}]:[...t,{role:"assistant",content:`Error: ${e.message}`}]}))}finally{l(!1),h(null)}};return{isLoading:r,messages:s,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:g,allVariablesFilled:v,messagesEndRef:f,setInputMessage:c,handleSendMessage:y,handleCancelRequest:()=>{x&&(x.abort(),h(null),l(!1),W.default.info("Request cancelled"))},handleClearConversation:()=>{o([]),u(!1),W.default.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),y())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}})(e,l);return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!d&&(0,t.jsx)(eO,{extractedVariables:m,variables:c,onVariableChange:y}),o.length>0&&(0,t.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,t.jsx)(r.Button,{onClick:g,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:e_.ClearOutlined,children:"Clear Chat"})}),(0,t.jsx)(eL,{messages:o,isLoading:s,hasVariables:m.length>0,messagesEndRef:u}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,t.jsx)(eA,{extractedVariables:m,variables:c}),(0,t.jsx)(eV,{inputMessage:i,isLoading:s,isDisabled:s||!i.trim()||m.length>0&&!p,onInputChange:x,onSend:h,onKeyDown:v,onCancel:f})]})]})},eW=({visible:e,promptName:a,isSaving:n,onNameChange:s,onPublish:o,onCancel:i})=>(0,t.jsx)(l.Modal,{title:"Publish Prompt",open:e,onCancel:i,footer:[(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:i,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:o,loading:n,children:"Publish"})]},"footer")],children:(0,t.jsxs)("div",{className:"py-4",children:[(0,t.jsx)(E.Text,{className:"mb-2",children:"Name"}),(0,t.jsx)(ei.Input,{value:a,onChange:e=>s(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,t.jsx)(E.Text,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})}),eJ=({prompt:e})=>{let a=N(e);return(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,t.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,t.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:a})})]})};var eK=e.i(608856),eq=e.i(573421),eX=e.i(981339);let{Text:eG}=e.i(898586).Typography,eY=({isOpen:e,onClose:r,accessToken:l,promptId:s,activeVersionId:o,onSelectVersion:i})=>{let[c,d]=(0,a.useState)([]),[m,p]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&l&&s&&u()},[e,l,s]);let u=async()=>{p(!0);try{let e=s.includes(".v")?s.split(".v")[0]:s,t=await (0,n.getPromptVersions)(l,e);d(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{p(!1)}},x=e=>{if(e.version)return`v${e.version}`;let t=e.litellm_params?.prompt_id||e.prompt_id;return t.includes(".v")?`v${t.split(".v")[1]}`:t.includes("_v")?`v${t.split("_v")[1]}`:"v1"};return(0,t.jsx)(eK.Drawer,{title:"Version History",placement:"right",onClose:r,open:e,width:400,mask:!1,maskClosable:!1,children:m?(0,t.jsx)(eX.Skeleton,{active:!0,paragraph:{rows:4}}):0===c.length?(0,t.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,t.jsx)(eq.List,{dataSource:c,renderItem:(e,a)=>{var r;let l=e.version||parseInt(x(e).replace("v","")),n=null;o&&(o.includes(".v")?n=parseInt(o.split(".v")[1]):o.includes("_v")&&(n=parseInt(o.split("_v")[1])));let s=n?l===n:0===a;return(0,t.jsxs)("div",{className:`mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ${s?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,onClick:()=>i?.(e),children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(ej.Tag,{className:"m-0",children:x(e)}),0===a&&(0,t.jsx)(ej.Tag,{color:"blue",className:"m-0",children:"Latest"})]}),s&&(0,t.jsx)(ej.Tag,{color:"green",className:"m-0",children:"Active"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(eG,{className:"text-sm text-gray-600 font-medium",children:(r=e.created_at)?new Date(r).toLocaleString():"-"}),(0,t.jsx)(eG,{type:"secondary",className:"text-xs",children:e.prompt_info?.prompt_type==="db"?"Saved to Database":"Config Prompt"})]})]},`${e.prompt_id}-v${e.version||l}`)}})})},eZ=({onClose:e,onSuccess:r,accessToken:l,initialPromptData:s})=>{let[o,i]=(0,a.useState)((()=>{if(s)try{return $(s)}catch(e){console.error("Error parsing existing prompt:",e),W.default.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}]}})()),[c,d]=(0,a.useState)(!!s),[m,p]=(0,a.useState)(!1),[u,x]=(0,a.useState)((()=>{if(!s?.prompt_spec)return;let e=s.prompt_spec.prompt_id,t=s.prompt_spec.version||s.prompt_spec.litellm_params?.prompt_id;return"number"==typeof t?`${e}.v${t}`:"string"==typeof t&&(t.includes(".v")||t.includes("_v"))?t:e})()),[h,f]=(0,a.useState)(!1),[g,v]=(0,a.useState)(!1),[y,b]=(0,a.useState)(null),[j,w]=(0,a.useState)(!1),[C,k]=(0,a.useState)("pretty"),S=e=>{void 0!==e?b(e):b(null),f(!0)},T=async()=>{if(!l)return void W.default.fromBackend("Access token is required");if(!o.name||""===o.name.trim())return void W.default.fromBackend("Please enter a valid prompt name");w(!0);try{let t=o.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),a=N(o),i={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:a},prompt_info:{prompt_type:"db"}};c&&s?.prompt_spec?.prompt_id?(await (0,n.updatePromptCall)(l,s.prompt_spec.prompt_id,i),W.default.success("Prompt updated successfully!")):(await (0,n.createPromptCall)(l,i),W.default.success("Prompt created successfully!")),r(),e()}catch(e){console.error("Error saving prompt:",e),W.default.fromBackend(c?"Failed to update prompt":"Failed to save prompt")}finally{w(!1),v(!1)}},_=u&&u.includes(".v")?`v${u.split(".v")[1]}`:null;return(0,t.jsxs)("div",{className:"flex h-full bg-white",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,t.jsx)(eu,{promptName:o.name,onNameChange:e=>i({...o,name:e}),onBack:e,onSave:()=>{o.name&&""!==o.name.trim()&&"New prompt"!==o.name?T():v(!0)},isSaving:j,editMode:c,onShowHistory:()=>p(!0),version:_,promptModel:o.model,promptVariables:(()=>{let e,t={},a=[o.developerMessage,...o.messages.map(e=>e.content)].join(" "),r=/\{\{(\w+)\}\}/g;for(;null!==(e=r.exec(a));){let a=e[1];t[a]||(t[a]=`example_${a}`)}return t})(),accessToken:l}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,t.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,t.jsx)(ef,{model:o.model,temperature:o.config.temperature,maxTokens:o.config.max_tokens,accessToken:l,onModelChange:e=>i({...o,model:e}),onTemperatureChange:e=>i({...o,config:{...o.config,temperature:e}}),onMaxTokensChange:e=>i({...o,config:{...o.config,max_tokens:e}})}),(0,t.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"pretty"===C?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("pretty"),children:"PRETTY"}),(0,t.jsx)("button",{className:`px-3 py-1 text-xs font-medium rounded-full transition-colors ${"dotprompt"===C?"bg-white text-gray-900 shadow-sm":"text-gray-600"}`,onClick:()=>k("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===C?(0,t.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,t.jsx)(ey,{tools:o.tools,onAddTool:()=>S(),onEditTool:S,onRemoveTool:e=>{i({...o,tools:o.tools.filter((t,a)=>a!==e)})}}),(0,t.jsx)(eC,{value:o.developerMessage,onChange:e=>i({...o,developerMessage:e})}),(0,t.jsx)(eT,{messages:o.messages,onAddMessage:()=>{i({...o,messages:[...o.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,a)=>{let r=[...o.messages];r[e][t]=a,i({...o,messages:r})},onRemoveMessage:e=>{o.messages.length>1&&i({...o,messages:o.messages.filter((t,a)=>a!==e)})},onMoveMessage:(e,t)=>{let a=[...o.messages],[r]=a.splice(e,1);a.splice(t,0,r),i({...o,messages:a})}})]}):(0,t.jsx)(eJ,{prompt:o})]}),(0,t.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,t.jsx)(eU,{prompt:o,accessToken:l})})]})]}),(0,t.jsx)(eW,{visible:g,promptName:o.name,isSaving:j,onNameChange:e=>i({...o,name:e}),onPublish:T,onCancel:()=>v(!1)}),h&&(0,t.jsx)(eo,{visible:h,initialJson:null!==y?o.tools[y].json:"",onSave:e=>{try{let t=JSON.parse(e),a={name:t.function?.name||"Unnamed Tool",description:t.function?.description||"",json:e};if(null!==y){let e=[...o.tools];e[y]=a,i({...o,tools:e})}else i({...o,tools:[...o.tools,a]});f(!1),b(null)}catch(e){W.default.fromBackend("Invalid JSON format")}},onClose:()=>{f(!1),b(null)}}),(0,t.jsx)(eY,{isOpen:m,onClose:()=>p(!1),accessToken:l,promptId:s?.prompt_spec?.prompt_id||o.name,activeVersionId:u,onSelectVersion:e=>{try{let t=$({prompt_spec:e});i(t);let a=e.version||1;x(`${e.prompt_id}.v${a}`)}catch(e){console.error("Error loading version:",e),W.default.fromBackend("Failed to load prompt version")}}})]})};var eQ=e.i(708347);e.s(["default",0,({accessToken:e,userRole:s})=>{let[o,i]=(0,a.useState)([]),[c,d]=(0,a.useState)(!1),[m,p]=(0,a.useState)(null),[u,x]=(0,a.useState)(!1),[h,f]=(0,a.useState)(!1),[g,v]=(0,a.useState)(null),[y,b]=(0,a.useState)(!1),[j,N]=(0,a.useState)(null),w=!!s&&(0,eQ.isAdminRole)(s),$=async()=>{if(e){d(!0);try{let t=await (0,n.getPromptsList)(e);console.log(`prompts: ${JSON.stringify(t)}`),i(t.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{d(!1)}}};(0,a.useEffect)(()=>{$()},[e]);let C=()=>{$(),f(!1),v(null),p(null)},k=async()=>{if(j&&e){b(!0);try{await (0,n.deletePromptCall)(e,j.id),W.default.success(`Prompt "${j.name}" deleted successfully`),$()}catch(e){console.error("Error deleting prompt:",e),W.default.fromBackend("Failed to delete prompt")}finally{b(!1),N(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[h?(0,t.jsx)(eZ,{onClose:()=>{f(!1),v(null)},onSuccess:C,accessToken:e,initialPromptData:g}):m?(0,t.jsx)(Z,{promptId:m,onClose:()=>p(null),accessToken:e,isAdmin:w,onDelete:$,onEdit:e=>{v(e),f(!0)}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{onClick:()=>{m&&p(null),v(null),f(!0)},disabled:!e,children:"+ Add New Prompt"}),(0,t.jsx)(r.Button,{onClick:()=>{m&&p(null),x(!0)},disabled:!e,variant:"secondary",children:"Upload .prompt File"})]})}),(0,t.jsx)(T,{promptsList:o,isLoading:c,onPromptClick:e=>{p(e)},onDeleteClick:(e,t)=>{N({id:e,name:t})},accessToken:e,isAdmin:w})]}),(0,t.jsx)(en,{visible:u,onClose:()=>{x(!1)},accessToken:e,onSuccess:C}),j&&(0,t.jsxs)(l.Modal,{title:"Delete Prompt",open:null!==j,onOk:k,onCancel:()=>{N(null)},confirmLoading:y,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete prompt: ",j.name," ?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],191403)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ada57dab6523afc4.js b/litellm/proxy/_experimental/out/_next/static/chunks/915b8c8ed28753ec.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/ada57dab6523afc4.js rename to litellm/proxy/_experimental/out/_next/static/chunks/915b8c8ed28753ec.js index a9b8db08146..08e67080a23 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/ada57dab6523afc4.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/915b8c8ed28753ec.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(779241),i=e.i(599724),s=e.i(199133),a=e.i(983561),o=e.i(689020);e.s(["default",0,({accessToken:e,value:l,placeholder:c="Select a Model",onChange:d,disabled:u=!1,style:f,className:h,showLabel:p=!0,labelText:m="Select Model"})=>{let[g,y]=(0,r.useState)(l),[b,x]=(0,r.useState)(!1),[v,k]=(0,r.useState)([]),w=(0,r.useRef)(null);return(0,r.useEffect)(()=>{y(l)},[l]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,o.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&k(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[p&&(0,t.jsxs)(i.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.RobotOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{value:g,placeholder:c,onChange:e=>{"custom"===e?(x(!0),y(void 0)):(x(!1),y(e),d&&d(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...f},showSearch:!0,className:`rounded-md ${h||""}`,disabled:u}),b&&(0,t.jsx)(n.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{y(e),d&&d(e)},500)},disabled:u})]})}])},519756,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:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,n]of Object.entries(t))e in r&&(r[e]=n);return r}let n=(e,t=0,r=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let i={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",i);let s=e<0?"-":"",a=Math.abs(e),o=a,l="";return a>=1e6?(o=a/1e6,l="M"):a>=1e3&&(o=a/1e3,l="K"),`${s}${o.toLocaleString("en-US",i)}${l}`},i=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(e,r)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let i=document.execCommand("copy");if(document.body.removeChild(n),i)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,i,"formatNumberWithCommas",0,n,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=n(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},500727,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),n=e.i(764205),i=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,i.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,n.fetchMCPServers)(r,e),enabled:!!r})}],500727);var a=e.i(843476),o=e.i(271645),l=e.i(536916),c=e.i(599724),d=e.i(409797),u=e.i(246349),u=u;let f=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,h=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,p=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,m=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function g(e,t=""){let r=e.toLowerCase();if(m.test(r))return"read";if(f.test(r))return"delete";if(p.test(r))return"update";if(h.test(r))return"create";if(t){let e=t.toLowerCase();if(m.test(e))return"read";if(f.test(e))return"delete";if(p.test(e))return"update";if(h.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[g(r.name,r.description)].push(r);return t}let b={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,b,"classifyToolOp",()=>g,"groupToolsByCrud",()=>y],696609);let x=["read","create","update","delete","unknown"],v={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},k={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:n=!1,searchFilter:i=""})=>{let[s,f]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),h=(0,o.useMemo)(()=>y(e),[e]),p=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),m=e=>{if(n)return;let t=new Set(p);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,a.jsx)("div",{className:"space-y-3",children:x.map(e=>{let t,o=h[e];if(0===o.length)return null;if(i){let e=i.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let g=b[e],y=(t=h[e]).length>0&&t.every(e=>p.has(e.name)),x=(e=>{let t=h[e];if(0===t.length)return!1;let r=t.filter(e=>p.has(e.name)).length;return r>0&&r{f(t=>({...t,[e]:!t[e]}))},children:[_?(0,a.jsx)(u.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,a.jsx)(d.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:g.label}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${v[g.risk]}`,children:"high"===g.risk?"High Risk":"medium"===g.risk?"Medium Risk":"low"===g.risk?"Safe":"Unclassified"}),(0,a.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>p.has(e.name)).length,"/",o.length," allowed"]})]}),!n&&(0,a.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,a.jsx)(c.Text,{className:"text-xs text-gray-500",children:y?"All on":x?"Partial":"All off"}),(0,a.jsx)(l.Checkbox,{checked:y,indeterminate:x,onChange:t=>((e,t)=>{if(n)return;let i=new Set(p);for(let r of h[e])t?i.add(r.name):i.delete(r.name);r(Array.from(i))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!_&&(0,a.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:g.description}),!_&&(0,a.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!i||e.name.toLowerCase().includes(i.toLowerCase())||(e.description??"").toLowerCase().includes(i.toLowerCase())).map(e=>{let t,r=(t=e.name,p.has(t));return(0,a.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!n?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>m(e.name),children:[(0,a.jsx)(l.Checkbox,{checked:r,onChange:()=>m(e.name),disabled:n,onClick:e=>e.stopPropagation()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,a.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,a.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},743151,(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var i=o(e.r(271645)),s=o(e.r(844343)),a=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,a),n=i.default.Children.only(t);return i.default.cloneElement(n,c(c({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var n=e.r(743151).CopyToClipboard;n.CopyToClipboard=n,t.exports=n},59935,(e,t,r)=>{var n;let i;e.e,n=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},n=!r.document&&!!r.postMessage,i=r.IS_PAPA_WORKER||!1,s={},a=0,o={};function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=x(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,i)r.postMessage({results:s,workerId:o.WORKER_ID,finished:n});else if(k(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!n||!k(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){k(this._config.error)?this._config.error(e):i&&this._config.error&&r.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e,r,i=this._config.downloadRequestHeaders;for(r in i)t.setRequestHeader(r,i[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),l.call(this,e);var t,r,n="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function f(e){l.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(e){var t,r,n,i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,c=0,d=0,u=!1,f=!1,h=[],g={data:[],errors:[],meta:{}};function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(g&&n&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!y(e)})),v()){if(g)if(Array.isArray(g.data[0])){for(var t,r=0;v()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(s.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(o=e.header?i>=h.length?"__parsed_extra":h[i]:o,l=e.transform?e.transform(l,o):l);"__parsed_extra"===o?(n[o]=n[o]||[],n[o].push(l)):n[o]=l}return e.header&&(i>h.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+i,d+r):ie.preview?r.abort():(g.data=g.data[0],i(g,l))))}),this.parse=function(i,s,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(i,l)),n=!1,e.delimiter?k(e.delimiter)&&(e.delimiter=e.delimiter(i),g.meta.delimiter=e.delimiter):((l=((t,r,n,i,s)=>{var a,l,c,d;s=s||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var u=0;u=r.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode,l=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,u=d;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof t||-1=s)return F(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:f}),M++}}else if(n&&0===j.length&&o.substring(f,f+v)===n){if(-1===$)return F();f=$+x,$=o.indexOf(r,f),N=o.indexOf(t,f)}else if(-1!==N&&(N<$||-1===$))j.push(o.substring(f,N)),f=N+b,N=o.indexOf(t,f);else{if(-1===$)break;if(j.push(o.substring(f,$)),I($+x),w&&(L(),h))return F();if(s&&_.length>=s)return F(!0)}return A();function D(e){_.push(e),S=f}function P(e){return -1!==e&&(e=o.substring(M+1,e))&&""===e.trim()?e.length:0}function A(e){return g||(void 0===e&&(e=o.substring(f)),j.push(e),f=y,D(j),w&&L()),F()}function I(e){f=e,D(j),j=[],$=o.indexOf(r,f)}function F(n){if(e.header&&!m&&_.length&&!c){var i=_[0],s=Object.create(null),a=new Set(i);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,c);if("object"==typeof e[0])return h(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function h(e,t,r){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),n=e.i(371330),i=e.i(271645),s=e.i(394487),a=e.i(503269),o=e.i(214520),l=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),f=e.i(601893),h=e.i(140721),p=e.i(942803),m=e.i(233538),g=e.i(694421),y=e.i(700020),b=e.i(35889),x=e.i(998348),v=e.i(722678);let k=(0,i.createContext)(null);k.displayName="GroupContext";let w=i.Fragment,_=Object.assign((0,y.forwardRefWithAs)(function(e,t){var w;let _=(0,i.useId)(),C=(0,p.useProvidedId)(),j=(0,f.useDisabled)(),{id:S=C||`headlessui-switch-${_}`,disabled:E=j||!1,checked:O,defaultChecked:N,onChange:$,name:R,value:M,form:T,autoFocus:D=!1,...P}=e,A=(0,i.useContext)(k),[I,F]=(0,i.useState)(null),L=(0,i.useRef)(null),z=(0,u.useSyncRefs)(L,t,null===A?null:A.setSwitch,F),B=(0,o.useDefaultValue)(N),[W,q]=(0,a.useControllable)(O,$,null!=B&&B),U=(0,l.useDisposables)(),[H,K]=(0,i.useState)(!1),X=(0,c.useEvent)(()=>{K(!0),null==q||q(!W),U.nextFrame(()=>{K(!1)})}),Q=(0,c.useEvent)(e=>{if((0,m.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),V=(0,c.useEvent)(e=>{e.key===x.Keys.Space?(e.preventDefault(),X()):e.key===x.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),G=(0,c.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Y=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:D}),{isHovered:et,hoverProps:er}=(0,n.useHover)({isDisabled:E}),{pressed:en,pressProps:ei}=(0,s.useActivePress)({disabled:E}),es=(0,i.useMemo)(()=>({checked:W,disabled:E,hover:et,focus:Z,active:en,autofocus:D,changing:H}),[W,et,Z,en,E,H,D]),ea=(0,y.mergeProps)({id:S,ref:z,role:"switch",type:(0,d.useResolveButtonType)(e,I),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":W,"aria-labelledby":J,"aria-describedby":Y,disabled:E||void 0,autoFocus:D,onClick:Q,onKeyUp:V,onKeyPress:G},ee,er,ei),eo=(0,i.useCallback)(()=>{if(void 0!==B)return null==q?void 0:q(B)},[q,B]),el=(0,y.useRender)();return i.default.createElement(i.default.Fragment,null,null!=R&&i.default.createElement(h.FormFields,{disabled:E,data:{[R]:M||"on"},overrides:{type:"checkbox",checked:W},form:T,onReset:eo}),el({ourProps:ea,theirProps:P,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[s,a]=(0,v.useLabels)(),[o,l]=(0,b.useDescriptions)(),c=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),d=(0,y.useRender)();return i.default.createElement(l,{name:"Switch.Description",value:o},i.default.createElement(a,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.default.createElement(k.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var C=e.i(888288),j=e.i(95779),S=e.i(444755),E=e.i(673706),O=e.i(829087);let N=(0,E.makeClassName)("Switch"),$=i.default.forwardRef((e,r)=>{let{checked:n,defaultChecked:s=!1,onChange:a,color:o,name:l,error:c,errorMessage:d,disabled:u,required:f,tooltip:h,id:p}=e,m=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:o?(0,E.getColorClassNames)(o,j.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:o?(0,E.getColorClassNames)(o,j.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[y,b]=(0,C.default)(s,n),[x,v]=(0,i.useState)(!1),{tooltipProps:k,getReferenceProps:w}=(0,O.useTooltip)(300);return i.default.createElement("div",{className:"flex flex-row items-center justify-start"},i.default.createElement(O.default,Object.assign({text:h},k)),i.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,k.refs.setReference]),className:(0,S.tremorTwMerge)(N("root"),"flex flex-row relative h-5")},m,w),i.default.createElement("input",{type:"checkbox",className:(0,S.tremorTwMerge)(N("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:f,checked:y,onChange:e=>{e.preventDefault()}}),i.default.createElement(_,{checked:y,onChange:e=>{b(e),null==a||a(e)},disabled:u,className:(0,S.tremorTwMerge)(N("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:p},i.default.createElement("span",{className:(0,S.tremorTwMerge)(N("sr-only"),"sr-only")},"Switch ",y?"on":"off"),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(N("background"),y?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(N("round"),y?(0,S.tremorTwMerge)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",x?(0,S.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&d?i.default.createElement("p",{className:(0,S.tremorTwMerge)(N("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});$.displayName="Switch",e.s(["Switch",()=>$],793130)},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let n={ttl:3600,lowest_latency_buffer:0},i=({routingStrategyArgs:e})=>{let i={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||n).map(([e,n])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof n?JSON.stringify(n,null,2):n?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:n})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,i])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:n[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:n[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==i||"null"===i?"":"object"==typeof i?JSON.stringify(i,null,2):i?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var a=e.i(199133);let o=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:n,routerFieldsMetadata:i,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:i.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(a.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(a.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),n[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:n[e]})]})},e))})})]});var l=e.i(793130);let c=({enabled:e,routerFieldsMetadata:r,onToggle:n})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(l.Switch,{checked:e,onChange:n,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:n,availableRoutingStrategies:a,routingStrategyDescriptions:l})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),a.length>0&&(0,t.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:a,routingStrategyDescriptions:l,routerFieldsMetadata:n,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:n,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(i,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:n})]})],158392);var d=e.i(994388),u=e.i(653496),f=e.i(107233),h=e.i(271645),p=e.i(888259),m=e.i(592968),g=e.i(361653),g=g;let y=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var b=e.i(37727);function x({group:e,onChange:r,availableModels:n,maxFallbacks:i}){let s=n.filter(t=>t!==e.primaryModel),o=e.fallbackModels.length{let n=[...e.fallbackModels];n.includes(t)&&(n=n.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:n})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:n.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(g.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(y,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",i," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${i} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let n=t.slice(0,i);r({...e,fallbackModels:n})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,n)=>{let i=e.fallbackModels.includes(r.value),s=i?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(m.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${i} used)`:`Maximum ${i} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((n,i)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:i+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:n})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==i),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(b.X,{className:"w-4 h-4"})})]},`${n}-${i}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:n,maxFallbacks:i=10,maxGroups:s=5}){let[a,o]=(0,h.useState)(e.length>0?e[0].id:"1");(0,h.useEffect)(()=>{e.length>0?e.some(e=>e.id===a)||o(e[0].id):o("1")},[e]);let l=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),o(t)},c=t=>{r(e.map(e=>e.id===t.id?t:e))},m=e.map((r,s)=>{let a=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:a,closable:e.length>1,children:(0,t.jsx)(x,{group:r,onChange:c,availableModels:n,maxFallbacks:i})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(d.Button,{variant:"primary",onClick:l,icon:()=>(0,t.jsx)(f.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:a,onChange:o,onEdit:(t,n)=>{"add"===n?l():"remove"===n&&e.length>1&&(t=>{if(1===e.length)return p.default.warning("At least one group is required");let n=e.filter(e=>e.id!==t);r(n),a===t&&n.length>0&&o(n[n.length-1].id)})(t)},items:m,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(199133),i=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:a,accessToken:o,placeholder:l="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[f,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,i.vectorStoreListCall)(o);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{h(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(n.Select,{mode:"multiple",placeholder:l,onChange:e,value:s,loading:f,className:a,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),n=e.i(201072),i=e.i(121229),s=e.i(726289),a=e.i(864517),o=e.i(343794),l=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),f=e.i(703923),h={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),n=!1;e.current.forEach(function(e){if(e){n=!0;var i=e.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(i.transitionDuration="0s, 0s")}}),n&&(r.current=Date.now())}),e.current},m=e.i(410160),g=e.i(392221),y=e.i(654310),b=0,x=(0,y.default)();let v=function(e){var r=t.useState(),n=(0,g.default)(r,2),i=n[0],s=n[1];return t.useEffect(function(){var e;s("rc_progress_".concat((x?(e=b,b+=1):e="TEST_OR_SSR",e)))},[]),e||i};var k=function(e){var r=e.bg,n=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function w(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),i="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(i)})}var _=t.forwardRef(function(e,r){var n=e.prefixCls,i=e.color,s=e.gradientId,a=e.radius,o=e.style,l=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,f=e.gapDegree,h=i&&"object"===(0,m.default)(i),p=u/2,g=t.createElement("circle",{className:"".concat(n,"-circle-path"),r:a,cx:p,cy:p,stroke:h?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==l),style:o,ref:r});if(!h)return g;var y="".concat(s,"-conic"),b=w(i,(360-f)/360),x=w(i,1),v="conic-gradient(from ".concat(f?"".concat(180+f/2,"deg"):"0deg",", ").concat(b.join(", "),")"),_="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(x.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:y},g),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(y,")")},t.createElement(k,{bg:_},t.createElement(k,{bg:v}))))}),C=function(e,t,r,n,i,s,a,o,l,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-n)/100*t;return"round"===l&&100!==n&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof o?o:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(i+r/100*360*((360-s)/360)+(0===s?0:({bottom:0,top:180,left:90,right:-90})[a]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},j=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function S(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let E=function(e){var r,n,i,s,a=(0,u.default)((0,u.default)({},h),e),l=a.id,c=a.prefixCls,g=a.steps,y=a.strokeWidth,b=a.trailWidth,x=a.gapDegree,k=void 0===x?0:x,w=a.gapPosition,E=a.trailColor,O=a.strokeLinecap,N=a.style,$=a.className,R=a.strokeColor,M=a.percent,T=(0,f.default)(a,j),D=v(l),P="".concat(D,"-gradient"),A=50-y/2,I=2*Math.PI*A,F=k>0?90+k/2:-90,L=(360-k)/360*I,z="object"===(0,m.default)(g)?g:{count:g,gap:2},B=z.count,W=z.gap,q=S(M),U=S(R),H=U.find(function(e){return e&&"object"===(0,m.default)(e)}),K=H&&"object"===(0,m.default)(H)?"butt":O,X=C(I,L,0,100,F,k,w,E,K,y),Q=p();return t.createElement("svg",(0,d.default)({className:(0,o.default)("".concat(c,"-circle"),$),viewBox:"0 0 ".concat(100," ").concat(100),style:N,id:l,role:"presentation"},T),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:A,cx:50,cy:50,stroke:E,strokeLinecap:K,strokeWidth:b||y,style:X}),B?(r=Math.round(B*(q[0]/100)),n=100/B,i=0,Array(B).fill(null).map(function(e,s){var a=s<=r-1?U[0]:E,o=a&&"object"===(0,m.default)(a)?"url(#".concat(P,")"):void 0,l=C(I,L,i,n,F,k,w,a,"butt",y,W);return i+=(L-l.strokeDashoffset+W)*100/L,t.createElement("circle",{key:s,className:"".concat(c,"-circle-path"),r:A,cx:50,cy:50,stroke:o,strokeWidth:y,opacity:1,style:l,ref:function(e){Q[s]=e}})})):(s=0,q.map(function(e,r){var n=U[r]||U[U.length-1],i=C(I,L,s,e,F,k,w,n,K,y);return s+=e,t.createElement(_,{key:r,color:n,ptg:e,radius:A,prefixCls:c,gradientId:P,style:i,strokeLinecap:K,strokeWidth:y,gapDegree:k,ref:function(e){Q[r]=e},size:100})}).reverse()))};var O=e.i(491816);e.i(765846);var N=e.i(896091);function $(e){return!e||e<0?0:e>100?100:e}function R({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let M=(e,t,r)=>{var n,i,s,a;let o=-1,l=-1;if("step"===t){let t=r.steps,n=r.strokeWidth;"string"==typeof e||void 0===e?(o="small"===e?2:14,l=null!=n?n:8):"number"==typeof e?[o,l]=[e,e]:[o=14,l=8]=Array.isArray(e)?e:[e.width,e.height],o*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?l=t||("small"===e?6:8):"number"==typeof e?[o,l]=[e,e]:[o=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[o,l]="small"===e?[60,60]:[120,120]:"number"==typeof e?[o,l]=[e,e]:Array.isArray(e)&&(o=null!=(i=null!=(n=e[0])?n:e[1])?i:120,l=null!=(a=null!=(s=e[0])?s:e[1])?a:120));return[o,l]},T=e=>{let{prefixCls:r,trailColor:n=null,strokeLinecap:i="round",gapPosition:s,gapDegree:a,width:l=120,type:c,children:d,success:u,size:f=l,steps:h}=e,[p,m]=M(f,"circle"),{strokeWidth:g}=e;void 0===g&&(g=Math.max(3/p*100,6));let y=t.useMemo(()=>a||0===a?a:"dashboard"===c?75:void 0,[a,c]),b=(({percent:e,success:t,successPercent:r})=>{let n=$(R({success:t,successPercent:r}));return[n,$($(e)-n)]})(e),x="[object Object]"===Object.prototype.toString.call(e.strokeColor),v=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||N.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),k=(0,o.default)(`${r}-inner`,{[`${r}-circle-gradient`]:x}),w=t.createElement(E,{steps:h,percent:h?b[1]:b,strokeWidth:g,trailWidth:g,strokeColor:h?v[1]:v,strokeLinecap:i,trailColor:n,prefixCls:r,gapDegree:y,gapPosition:s||"dashboard"===c&&"bottom"||void 0}),_=p<=20,C=t.createElement("div",{className:k,style:{width:p,height:m,fontSize:.15*p+6}},w,!_&&d);return _?t.createElement(O.default,{title:d},C):C};e.i(296059);var D=e.i(694758),P=e.i(915654),A=e.i(183293),I=e.i(246422),F=e.i(838378);let L="--progress-line-stroke-color",z="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new D.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},W=(0,I.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,F.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,A.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${L})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,P.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var q=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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let U=e=>{let{prefixCls:r,direction:n,percent:i,size:s,strokeWidth:a,strokeColor:l,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:f,success:h}=e,{align:p,type:m}=f,g=l&&"string"!=typeof l?((e,t)=>{let{from:r=N.presetPrimaryColors.blue,to:n=N.presetPrimaryColors.blue,direction:i="rtl"===t?"to left":"to right"}=e,s=q(e,["from","to","direction"]);if(0!==Object.keys(s).length){let e,t=(e=[],Object.keys(s).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:s[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${i}, ${t})`;return{background:r,[L]:r}}let a=`linear-gradient(${i}, ${r}, ${n})`;return{background:a,[L]:a}})(l,n):{[L]:l,background:l},y="square"===c||"butt"===c?0:void 0,[b,x]=M(null!=s?s:[-1,a||("small"===s?6:8)],"line",{strokeWidth:a}),v=Object.assign(Object.assign({width:`${$(i)}%`,height:x,borderRadius:y},g),{[z]:$(i)/100}),k=R(e),w={width:`${$(k)}%`,height:x,borderRadius:y,backgroundColor:null==h?void 0:h.strokeColor},_=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:y}},t.createElement("div",{className:(0,o.default)(`${r}-bg`,`${r}-bg-${m}`),style:v},"inner"===m&&d),void 0!==k&&t.createElement("div",{className:`${r}-success-bg`,style:w})),C="outer"===m&&"start"===p,j="outer"===m&&"end"===p;return"outer"===m&&"center"===p?t.createElement("div",{className:`${r}-layout-bottom`},_,d):t.createElement("div",{className:`${r}-outer`,style:{width:b<0?"100%":b}},C&&d,_,j&&d)},H=e=>{let{size:r,steps:n,rounding:i=Math.round,percent:s=0,strokeWidth:a=8,strokeColor:l,trailColor:c=null,prefixCls:d,children:u}=e,f=i(s/100*n),[h,p]=M(null!=r?r:["small"===r?2:14,a],"step",{steps:n,strokeWidth:a}),m=h/n,g=Array.from({length:n});for(let e=0;et.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let X=["normal","exception","active","success"],Q=t.forwardRef((e,d)=>{let u,{prefixCls:f,className:h,rootClassName:p,steps:m,strokeColor:g,percent:y=0,size:b="default",showInfo:x=!0,type:v="line",status:k,format:w,style:_,percentPosition:C={}}=e,j=K(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:S="end",type:E="outer"}=C,O=Array.isArray(g)?g[0]:g,N="string"==typeof g||Array.isArray(g)?g:void 0,D=t.useMemo(()=>{if(O){let e="string"==typeof O?O:Object.values(O)[0];return new r.FastColor(e).isLight()}return!1},[g]),P=t.useMemo(()=>{var t,r;let n=R(e);return Number.parseInt(void 0!==n?null==(t=null!=n?n:0)?void 0:t.toString():null==(r=null!=y?y:0)?void 0:r.toString(),10)},[y,e.success,e.successPercent]),A=t.useMemo(()=>!X.includes(k)&&P>=100?"success":k||"normal",[k,P]),{getPrefixCls:I,direction:F,progress:L}=t.useContext(c.ConfigContext),z=I("progress",f),[B,q,Q]=W(z),V="line"===v,G=V&&!m,J=t.useMemo(()=>{let r;if(!x)return null;let l=R(e),c=w||(e=>`${e}%`),d=V&&D&&"inner"===E;return"inner"===E||w||"exception"!==A&&"success"!==A?r=c($(y),$(l)):"exception"===A?r=V?t.createElement(s.default,null):t.createElement(a.default,null):"success"===A&&(r=V?t.createElement(n.default,null):t.createElement(i.default,null)),t.createElement("span",{className:(0,o.default)(`${z}-text`,{[`${z}-text-bright`]:d,[`${z}-text-${S}`]:G,[`${z}-text-${E}`]:G}),title:"string"==typeof r?r:void 0},r)},[x,y,P,A,v,z,w]);"line"===v?u=m?t.createElement(H,Object.assign({},e,{strokeColor:N,prefixCls:z,steps:"object"==typeof m?m.count:m}),J):t.createElement(U,Object.assign({},e,{strokeColor:O,prefixCls:z,direction:F,percentPosition:{align:S,type:E}}),J):("circle"===v||"dashboard"===v)&&(u=t.createElement(T,Object.assign({},e,{strokeColor:O,prefixCls:z,progressStatus:A}),J));let Y=(0,o.default)(z,`${z}-status-${A}`,{[`${z}-${"dashboard"===v&&"circle"||v}`]:"line"!==v,[`${z}-inline-circle`]:"circle"===v&&M(b,"circle")[0]<=20,[`${z}-line`]:G,[`${z}-line-align-${S}`]:G,[`${z}-line-position-${E}`]:G,[`${z}-steps`]:m,[`${z}-show-info`]:x,[`${z}-${b}`]:"string"==typeof b,[`${z}-rtl`]:"rtl"===F},null==L?void 0:L.className,h,p,q,Q);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==L?void 0:L.style),_),className:Y,role:"progressbar","aria-valuenow":P,"aria-valuemin":0,"aria-valuemax":100},(0,l.default)(j,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,Q],309821)},597440,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:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["default",0,s],597440)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,988297,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});e.s(["PlusIcon",0,r],988297)},797672,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});e.s(["PencilIcon",0,r],797672)},992619,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(779241),i=e.i(599724),s=e.i(199133),a=e.i(983561),o=e.i(689020);e.s(["default",0,({accessToken:e,value:l,placeholder:c="Select a Model",onChange:d,disabled:u=!1,style:f,className:h,showLabel:p=!0,labelText:m="Select Model"})=>{let[g,y]=(0,r.useState)(l),[b,x]=(0,r.useState)(!1),[v,k]=(0,r.useState)([]),w=(0,r.useRef)(null);return(0,r.useEffect)(()=>{y(l)},[l]),(0,r.useEffect)(()=>{e&&(async()=>{try{let t=await (0,o.fetchAvailableModels)(e);console.log("Fetched models for selector:",t),t.length>0&&k(t)}catch(e){console.error("Error fetching model info:",e)}})()},[e]),(0,t.jsxs)("div",{children:[p&&(0,t.jsxs)(i.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(a.RobotOutlined,{className:"mr-2"})," ",m]}),(0,t.jsx)(s.Select,{value:g,placeholder:c,onChange:e=>{"custom"===e?(x(!0),y(void 0)):(x(!1),y(e),d&&d(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...f},showSearch:!0,className:`rounded-md ${h||""}`,disabled:u}),b&&(0,t.jsx)(n.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{y(e),d&&d(e)},500)},disabled:u})]})}])},519756,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:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["UploadOutlined",0,s],519756)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,n]of Object.entries(t))e in r&&(r[e]=n);return r}let n=(e,t=0,r=!1,n=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!n)return"-";let i={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",i);let s=e<0?"-":"",a=Math.abs(e),o=a,l="";return a>=1e6?(o=a/1e6,l="M"):a>=1e3&&(o=a/1e3,l="K"),`${s}${o.toLocaleString("en-US",i)}${l}`},i=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return s(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),s(e,r)}},s=(e,r)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let i=document.execCommand("copy");if(document.body.removeChild(n),i)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,i,"formatNumberWithCommas",0,n,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=n(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},91739,e=>{"use strict";var t=e.i(544195);e.s(["Radio",()=>t.default])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},500727,696609,531516,e=>{"use strict";var t=e.i(266027),r=e.i(243652),n=e.i(764205),i=e.i(135214);let s=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,i.default)();return(0,t.useQuery)({queryKey:s.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,n.fetchMCPServers)(r,e),enabled:!!r})}],500727);var a=e.i(843476),o=e.i(271645),l=e.i(536916),c=e.i(599724),d=e.i(409797),u=e.i(246349),u=u;let f=/\b(delete|remove|destroy|purge|drop|erase|unlink)\b/i,h=/\b(create|add|insert|new|post|submit|register|make|generate|write|upload)\b/i,p=/\b(update|edit|modify|change|patch|put|set|rename|move|transform)\b/i,m=/\b(get|read|list|fetch|search|find|query|retrieve|show|view|check|describe|info)\b/i;function g(e,t=""){let r=e.toLowerCase();if(m.test(r))return"read";if(f.test(r))return"delete";if(p.test(r))return"update";if(h.test(r))return"create";if(t){let e=t.toLowerCase();if(m.test(e))return"read";if(f.test(e))return"delete";if(p.test(e))return"update";if(h.test(e))return"create"}return"unknown"}function y(e){let t={read:[],create:[],update:[],delete:[],unknown:[]};for(let r of e)t[g(r.name,r.description)].push(r);return t}let b={read:{label:"Read",description:"Safe operations — fetch, list, search. No side effects.",risk:"low"},create:{label:"Create",description:"Add new resources — insert, upload, register.",risk:"medium"},update:{label:"Update",description:"Modify existing resources — edit, patch, rename.",risk:"medium"},delete:{label:"Delete",description:"Destructive operations — remove, purge, destroy.",risk:"high"},unknown:{label:"Other",description:"Operations that could not be automatically classified.",risk:"unknown"}};e.s(["CRUD_GROUP_META",0,b,"classifyToolOp",()=>g,"groupToolsByCrud",()=>y],696609);let x=["read","create","update","delete","unknown"],v={low:"bg-green-100 text-green-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-red-100 text-red-800 font-semibold",unknown:"bg-gray-100 text-gray-700"},k={read:"border-green-200",create:"border-blue-200",update:"border-yellow-200",delete:"border-red-300",unknown:"border-gray-200"},w={read:"bg-green-50",create:"bg-blue-50",update:"bg-yellow-50",delete:"bg-red-50",unknown:"bg-gray-50"};e.s(["default",0,({tools:e,value:t,onChange:r,readOnly:n=!1,searchFilter:i=""})=>{let[s,f]=(0,o.useState)({read:!1,create:!1,update:!1,delete:!1,unknown:!0}),h=(0,o.useMemo)(()=>y(e),[e]),p=(0,o.useMemo)(()=>new Set(void 0===t?e.map(e=>e.name):t),[t,e]),m=e=>{if(n)return;let t=new Set(p);t.has(e)?t.delete(e):t.add(e),r(Array.from(t))};return 0===e.length?null:(0,a.jsx)("div",{className:"space-y-3",children:x.map(e=>{let t,o=h[e];if(0===o.length)return null;if(i){let e=i.toLowerCase();if(!o.some(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)))return null}let g=b[e],y=(t=h[e]).length>0&&t.every(e=>p.has(e.name)),x=(e=>{let t=h[e];if(0===t.length)return!1;let r=t.filter(e=>p.has(e.name)).length;return r>0&&r{f(t=>({...t,[e]:!t[e]}))},children:[_?(0,a.jsx)(u.default,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}):(0,a.jsx)(d.ChevronDownIcon,{className:"w-4 h-4 text-gray-500 flex-shrink-0"}),(0,a.jsx)("span",{className:"font-semibold text-gray-900 text-sm",children:g.label}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-full ${v[g.risk]}`,children:"high"===g.risk?"High Risk":"medium"===g.risk?"Medium Risk":"low"===g.risk?"Safe":"Unclassified"}),(0,a.jsxs)("span",{className:"text-xs text-gray-500 ml-1",children:[o.filter(e=>p.has(e.name)).length,"/",o.length," allowed"]})]}),!n&&(0,a.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,a.jsx)(c.Text,{className:"text-xs text-gray-500",children:y?"All on":x?"Partial":"All off"}),(0,a.jsx)(l.Checkbox,{checked:y,indeterminate:x,onChange:t=>((e,t)=>{if(n)return;let i=new Set(p);for(let r of h[e])t?i.add(r.name):i.delete(r.name);r(Array.from(i))})(e,t.target.checked),onClick:e=>e.stopPropagation()})]})]}),!_&&(0,a.jsx)("div",{className:"px-4 pt-2 pb-1 text-xs text-gray-500 bg-white border-b border-gray-100",children:g.description}),!_&&(0,a.jsx)("div",{className:"bg-white divide-y divide-gray-50",children:o.filter(e=>!i||e.name.toLowerCase().includes(i.toLowerCase())||(e.description??"").toLowerCase().includes(i.toLowerCase())).map(e=>{let t,r=(t=e.name,p.has(t));return(0,a.jsxs)("div",{className:`flex items-start gap-3 px-4 py-2.5 transition-colors hover:bg-gray-50 ${!n?"cursor-pointer":""} ${r?"":"opacity-60"}`,onClick:()=>m(e.name),children:[(0,a.jsx)(l.Checkbox,{checked:r,onChange:()=>m(e.name),disabled:n,onClick:e=>e.stopPropagation()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)(c.Text,{className:"font-medium text-gray-900 text-sm",children:e.name}),e.description&&(0,a.jsx)(c.Text,{className:"text-xs text-gray-500 mt-0.5 leading-snug",children:e.description})]}),(0,a.jsx)("span",{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${r?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:r?"on":"off"})]},e.name)})})]},e)})})}],531516)},743151,(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.CopyToClipboard=void 0;var i=o(e.r(271645)),s=o(e.r(844343)),a=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,a),n=i.default.Children.only(t);return i.default.cloneElement(n,c(c({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"use strict";var n=e.r(743151).CopyToClipboard;n.CopyToClipboard=n,t.exports=n},59935,(e,t,r)=>{var n;let i;e.e,n=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},n=!r.document&&!!r.postMessage,i=r.IS_PAPA_WORKER||!1,s={},a=0,o={};function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=x(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0=this._config.preview,i)r.postMessage({results:s,workerId:o.WORKER_ID,finished:n});else if(k(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!n||!k(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){k(this._config.error)?this._config.error(e):i&&this._config.error&&r.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e,r,i=this._config.downloadRequestHeaders;for(r in i)t.setRequestHeader(r,i[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),l.call(this,e);var t,r,n="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function u(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function f(e){l.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(e){var t,r,n,i,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,c=0,d=0,u=!1,f=!1,h=[],g={data:[],errors:[],meta:{}};function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(g&&n&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(g.data=g.data.filter(function(e){return!y(e)})),v()){if(g)if(Array.isArray(g.data[0])){for(var t,r=0;v()&&r(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(s.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):a.test(r)?new Date(r):""===r?null:r):r)(o=e.header?i>=h.length?"__parsed_extra":h[i]:o,l=e.transform?e.transform(l,o):l);"__parsed_extra"===o?(n[o]=n[o]||[],n[o].push(l)):n[o]=l}return e.header&&(i>h.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+i,d+r):ie.preview?r.abort():(g.data=g.data[0],i(g,l))))}),this.parse=function(i,s,a){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(i,l)),n=!1,e.delimiter?k(e.delimiter)&&(e.delimiter=e.delimiter(i),g.meta.delimiter=e.delimiter):((l=((t,r,n,i,s)=>{var a,l,c,d;s=s||[","," ","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var u=0;u=r.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode,l=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,u=d;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof t||-1=s)return F(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:f}),M++}}else if(n&&0===j.length&&o.substring(f,f+v)===n){if(-1===$)return F();f=$+x,$=o.indexOf(r,f),N=o.indexOf(t,f)}else if(-1!==N&&(N<$||-1===$))j.push(o.substring(f,N)),f=N+b,N=o.indexOf(t,f);else{if(-1===$)break;if(j.push(o.substring(f,$)),I($+x),w&&(L(),h))return F();if(s&&_.length>=s)return F(!0)}return A();function D(e){_.push(e),S=f}function P(e){return -1!==e&&(e=o.substring(M+1,e))&&""===e.trim()?e.length:0}function A(e){return g||(void 0===e&&(e=o.substring(f)),j.push(e),f=y,D(j),w&&L()),F()}function I(e){f=e,D(j),j=[],$=o.indexOf(r,f)}function F(n){if(e.header&&!m&&_.length&&!c){var i=_[0],s=Object.create(null),a=new Set(i);let t=!1;for(let r=0;r{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),t.escapeFormulae instanceof RegExp?u=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(u=/^[=+\-@\t\r].*$/)}})(),RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return h(null,e,c);if("object"==typeof e[0])return h(d||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),h(e.fields||[],e.data||[],c);throw Error("Unable to serialize unrecognized input");function h(e,t,r){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0{for(var r=0;r{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",()=>t])},841947,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["default",()=>t])},603908,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",()=>t])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(429427),n=e.i(371330),i=e.i(271645),s=e.i(394487),a=e.i(503269),o=e.i(214520),l=e.i(746725),c=e.i(914189),d=e.i(144279),u=e.i(294316),f=e.i(601893),h=e.i(140721),p=e.i(942803),m=e.i(233538),g=e.i(694421),y=e.i(700020),b=e.i(35889),x=e.i(998348),v=e.i(722678);let k=(0,i.createContext)(null);k.displayName="GroupContext";let w=i.Fragment,_=Object.assign((0,y.forwardRefWithAs)(function(e,t){var w;let _=(0,i.useId)(),C=(0,p.useProvidedId)(),j=(0,f.useDisabled)(),{id:S=C||`headlessui-switch-${_}`,disabled:E=j||!1,checked:O,defaultChecked:N,onChange:$,name:R,value:M,form:T,autoFocus:D=!1,...P}=e,A=(0,i.useContext)(k),[I,F]=(0,i.useState)(null),L=(0,i.useRef)(null),z=(0,u.useSyncRefs)(L,t,null===A?null:A.setSwitch,F),B=(0,o.useDefaultValue)(N),[W,q]=(0,a.useControllable)(O,$,null!=B&&B),U=(0,l.useDisposables)(),[H,K]=(0,i.useState)(!1),X=(0,c.useEvent)(()=>{K(!0),null==q||q(!W),U.nextFrame(()=>{K(!1)})}),Q=(0,c.useEvent)(e=>{if((0,m.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),V=(0,c.useEvent)(e=>{e.key===x.Keys.Space?(e.preventDefault(),X()):e.key===x.Keys.Enter&&(0,g.attemptSubmit)(e.currentTarget)}),G=(0,c.useEvent)(e=>e.preventDefault()),J=(0,v.useLabelledBy)(),Y=(0,b.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:D}),{isHovered:et,hoverProps:er}=(0,n.useHover)({isDisabled:E}),{pressed:en,pressProps:ei}=(0,s.useActivePress)({disabled:E}),es=(0,i.useMemo)(()=>({checked:W,disabled:E,hover:et,focus:Z,active:en,autofocus:D,changing:H}),[W,et,Z,en,E,H,D]),ea=(0,y.mergeProps)({id:S,ref:z,role:"switch",type:(0,d.useResolveButtonType)(e,I),tabIndex:-1===e.tabIndex?0:null!=(w=e.tabIndex)?w:0,"aria-checked":W,"aria-labelledby":J,"aria-describedby":Y,disabled:E||void 0,autoFocus:D,onClick:Q,onKeyUp:V,onKeyPress:G},ee,er,ei),eo=(0,i.useCallback)(()=>{if(void 0!==B)return null==q?void 0:q(B)},[q,B]),el=(0,y.useRender)();return i.default.createElement(i.default.Fragment,null,null!=R&&i.default.createElement(h.FormFields,{disabled:E,data:{[R]:M||"on"},overrides:{type:"checkbox",checked:W},form:T,onReset:eo}),el({ourProps:ea,theirProps:P,slot:es,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[s,a]=(0,v.useLabels)(),[o,l]=(0,b.useDescriptions)(),c=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),d=(0,y.useRender)();return i.default.createElement(l,{name:"Switch.Description",value:o},i.default.createElement(a,{name:"Switch.Label",value:s,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.default.createElement(k.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:w,name:"Switch.Group"}))))},Label:v.Label,Description:b.Description});var C=e.i(888288),j=e.i(95779),S=e.i(444755),E=e.i(673706),O=e.i(829087);let N=(0,E.makeClassName)("Switch"),$=i.default.forwardRef((e,r)=>{let{checked:n,defaultChecked:s=!1,onChange:a,color:o,name:l,error:c,errorMessage:d,disabled:u,required:f,tooltip:h,id:p}=e,m=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:o?(0,E.getColorClassNames)(o,j.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:o?(0,E.getColorClassNames)(o,j.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[y,b]=(0,C.default)(s,n),[x,v]=(0,i.useState)(!1),{tooltipProps:k,getReferenceProps:w}=(0,O.useTooltip)(300);return i.default.createElement("div",{className:"flex flex-row items-center justify-start"},i.default.createElement(O.default,Object.assign({text:h},k)),i.default.createElement("div",Object.assign({ref:(0,E.mergeRefs)([r,k.refs.setReference]),className:(0,S.tremorTwMerge)(N("root"),"flex flex-row relative h-5")},m,w),i.default.createElement("input",{type:"checkbox",className:(0,S.tremorTwMerge)(N("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:f,checked:y,onChange:e=>{e.preventDefault()}}),i.default.createElement(_,{checked:y,onChange:e=>{b(e),null==a||a(e)},disabled:u,className:(0,S.tremorTwMerge)(N("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:p},i.default.createElement("span",{className:(0,S.tremorTwMerge)(N("sr-only"),"sr-only")},"Switch ",y?"on":"off"),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(N("background"),y?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(N("round"),y?(0,S.tremorTwMerge)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",x?(0,S.tremorTwMerge)("ring-2",g.ringColor):"")}))),c&&d?i.default.createElement("p",{className:(0,S.tremorTwMerge)(N("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});$.displayName="Switch",e.s(["Switch",()=>$],793130)},158392,419470,e=>{"use strict";var t=e.i(843476),r=e.i(779241);let n={ttl:3600,lowest_latency_buffer:0},i=({routingStrategyArgs:e})=>{let i={ttl:"Sliding window to look back over when calculating the average latency of a deployment. Default - 1 hour (in seconds).",lowest_latency_buffer:"Shuffle between deployments within this % of the lowest latency. Default - 0 (i.e. always pick lowest latency)."};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Latency-Based Configuration"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Fine-tune latency-based routing behavior"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e||n).map(([e,n])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:e.replace(/_/g," ")}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i[e]||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:"object"==typeof n?JSON.stringify(n,null,2):n?.toString(),className:"font-mono text-sm w-full"})]})},e))})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"})]})},s=({routerSettings:e,routerFieldsMetadata:n})=>(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Reliability & Retries"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure retry logic and failure handling"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3",children:Object.entries(e).filter(([e,t])=>"fallbacks"!=e&&"context_window_fallbacks"!=e&&"routing_strategy_args"!=e&&"routing_strategy"!=e&&"enable_tag_filtering"!=e).map(([e,i])=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:n[e]?.ui_field_name||e}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:n[e]?.field_description||""}),(0,t.jsx)(r.TextInput,{name:e,defaultValue:null==i||"null"===i?"":"object"==typeof i?JSON.stringify(i,null,2):i?.toString()||"",placeholder:"—",className:"font-mono text-sm w-full"})]})},e))})]});var a=e.i(199133);let o=({selectedStrategy:e,availableStrategies:r,routingStrategyDescriptions:n,routerFieldsMetadata:i,onStrategyChange:s})=>(0,t.jsxs)("div",{className:"space-y-2 max-w-3xl",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:i.routing_strategy?.ui_field_name||"Routing Strategy"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5 mb-2",children:i.routing_strategy?.field_description||""})]}),(0,t.jsx)("div",{className:"routing-strategy-select max-w-3xl",children:(0,t.jsx)(a.Select,{value:e,onChange:s,style:{width:"100%"},size:"large",children:r.map(e=>(0,t.jsx)(a.Select.Option,{value:e,label:e,children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5 py-1",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e}),n[e]&&(0,t.jsx)("span",{className:"text-xs text-gray-500 font-normal",children:n[e]})]})},e))})})]});var l=e.i(793130);let c=({enabled:e,routerFieldsMetadata:r,onToggle:n})=>(0,t.jsx)("div",{className:"space-y-3 max-w-3xl",children:(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:r.enable_tag_filtering?.ui_field_name||"Enable Tag Filtering"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:[r.enable_tag_filtering?.field_description||"",r.enable_tag_filtering?.link&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("a",{href:r.enable_tag_filtering.link,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Learn more"})]})]})]}),(0,t.jsx)(l.Switch,{checked:e,onChange:n,className:"ml-4"})]})});e.s(["default",0,({value:e,onChange:r,routerFieldsMetadata:n,availableRoutingStrategies:a,routingStrategyDescriptions:l})=>(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Routing Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure how requests are routed to deployments"})]}),a.length>0&&(0,t.jsx)(o,{selectedStrategy:e.selectedStrategy||e.routerSettings.routing_strategy||null,availableStrategies:a,routingStrategyDescriptions:l,routerFieldsMetadata:n,onStrategyChange:t=>{r({...e,selectedStrategy:t})}}),(0,t.jsx)(c,{enabled:e.enableTagFiltering,routerFieldsMetadata:n,onToggle:t=>{r({...e,enableTagFiltering:t})}})]}),(0,t.jsx)("div",{className:"border-t border-gray-200"}),"latency-based-routing"===e.selectedStrategy&&(0,t.jsx)(i,{routingStrategyArgs:e.routerSettings.routing_strategy_args}),(0,t.jsx)(s,{routerSettings:e.routerSettings,routerFieldsMetadata:n})]})],158392);var d=e.i(994388),u=e.i(653496),f=e.i(107233),h=e.i(271645),p=e.i(888259),m=e.i(592968),g=e.i(361653),g=g;let y=(0,e.i(475254).default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var b=e.i(37727);function x({group:e,onChange:r,availableModels:n,maxFallbacks:i}){let s=n.filter(t=>t!==e.primaryModel),o=e.fallbackModels.length{let n=[...e.fallbackModels];n.includes(t)&&(n=n.filter(e=>e!==t)),r({...e,primaryModel:t,fallbackModels:n})},showSearch:!0,getPopupContainer:e=>e.parentElement||document.body,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:n.map(e=>({label:e,value:e}))}),!e.primaryModel&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-amber-600 text-xs bg-amber-50 p-2 rounded",children:[(0,t.jsx)(g.default,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Select a model to begin configuring fallbacks"})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-4 z-10",children:(0,t.jsxs)("div",{className:"bg-indigo-50 text-indigo-500 px-4 py-1 rounded-full text-xs font-bold border border-indigo-100 flex items-center gap-2 shadow-sm",children:[(0,t.jsx)(y,{className:"w-4 h-4"}),"IF FAILS, TRY..."]})}),(0,t.jsxs)("div",{className:`transition-opacity duration-300 ${!e.primaryModel?"opacity-50 pointer-events-none":"opacity-100"}`,children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-gray-700 mb-2",children:["Fallback Chain ",(0,t.jsx)("span",{className:"text-red-500",children:"*"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500 font-normal ml-2",children:["(Max ",i," fallbacks at a time)"]})]}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-xl p-4 border border-gray-200",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",size:"large",placeholder:o?"Select fallback models to add...":`Maximum ${i} fallbacks reached`,value:e.fallbackModels,onChange:t=>{let n=t.slice(0,i);r({...e,fallbackModels:n})},disabled:!e.primaryModel,getPopupContainer:e=>e.parentElement||document.body,options:s.map(e=>({label:e,value:e})),optionRender:(r,n)=>{let i=e.fallbackModels.includes(r.value),s=i?e.fallbackModels.indexOf(r.value)+1:null;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i&&null!==s&&(0,t.jsx)("span",{className:"flex items-center justify-center w-5 h-5 rounded bg-indigo-100 text-indigo-600 text-xs font-bold",children:s}),(0,t.jsx)("span",{children:r.label})]})},maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(m.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})}),showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 ml-1",children:o?`Search and select multiple models. Selected models will appear below in order. (${e.fallbackModels.length}/${i} used)`:`Maximum ${i} fallbacks reached. Remove some to add more.`})]}),(0,t.jsx)("div",{className:"space-y-2 min-h-[100px]",children:0===e.fallbackModels.length?(0,t.jsxs)("div",{className:"h-32 border-2 border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)("span",{className:"text-sm",children:"No fallback models selected"}),(0,t.jsx)("span",{className:"text-xs mt-1",children:"Add models from the dropdown above"})]}):e.fallbackModels.map((n,i)=>(0,t.jsxs)("div",{className:"group flex items-center justify-between p-3 bg-white rounded-lg border border-gray-200 hover:border-indigo-300 hover:shadow-sm transition-all",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-gray-100 text-gray-400 group-hover:text-indigo-500 group-hover:bg-indigo-50",children:(0,t.jsx)("span",{className:"text-xs font-bold",children:i+1})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"font-medium text-gray-800",children:n})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t;return t=e.fallbackModels.filter((e,t)=>t!==i),void r({...e,fallbackModels:t})},className:"opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 p-1",children:(0,t.jsx)(b.X,{className:"w-4 h-4"})})]},`${n}-${i}`))})]})]})]})}function v({groups:e,onGroupsChange:r,availableModels:n,maxFallbacks:i=10,maxGroups:s=5}){let[a,o]=(0,h.useState)(e.length>0?e[0].id:"1");(0,h.useEffect)(()=>{e.length>0?e.some(e=>e.id===a)||o(e[0].id):o("1")},[e]);let l=()=>{if(e.length>=s)return;let t=Date.now().toString();r([...e,{id:t,primaryModel:null,fallbackModels:[]}]),o(t)},c=t=>{r(e.map(e=>e.id===t.id?t:e))},m=e.map((r,s)=>{let a=r.primaryModel?r.primaryModel:`Group ${s+1}`;return{key:r.id,label:a,closable:e.length>1,children:(0,t.jsx)(x,{group:r,onChange:c,availableModels:n,maxFallbacks:i})}});return 0===e.length?(0,t.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg border border-dashed border-gray-300",children:[(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"No fallback groups configured"}),(0,t.jsx)(d.Button,{variant:"primary",onClick:l,icon:()=>(0,t.jsx)(f.Plus,{className:"w-4 h-4"}),children:"Create First Group"})]}):(0,t.jsx)(u.Tabs,{type:"editable-card",activeKey:a,onChange:o,onEdit:(t,n)=>{"add"===n?l():"remove"===n&&e.length>1&&(t=>{if(1===e.length)return p.default.warning("At least one group is required");let n=e.filter(e=>e.id!==t);r(n),a===t&&n.length>0&&o(n[n.length-1].id)})(t)},items:m,className:"fallback-tabs",tabBarStyle:{marginBottom:0},hideAdd:e.length>=s})}e.s(["FallbackSelectionForm",()=>v],419470)},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(199133),i=e.i(764205);e.s(["default",0,({onChange:e,value:s,className:a,accessToken:o,placeholder:l="Select vector stores",disabled:c=!1})=>{let[d,u]=(0,r.useState)([]),[f,h]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,i.vectorStoreListCall)(o);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{h(!1)}}})()},[o]),(0,t.jsx)("div",{children:(0,t.jsx)(n.Select,{mode:"multiple",placeholder:l,onChange:e,value:s,loading:f,className:a,allowClear:!0,options:d.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},689020,e=>{"use strict";var t=e.i(764205);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(console.log("model_info:",r),r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},955135,e=>{"use strict";var t=e.i(597440);e.s(["DeleteOutlined",()=>t.default])},309821,e=>{"use strict";e.i(247167);var t=e.i(271645);e.i(262370);var r=e.i(135551),n=e.i(201072),i=e.i(121229),s=e.i(726289),a=e.i(864517),o=e.i(343794),l=e.i(529681),c=e.i(242064),d=e.i(931067),u=e.i(209428),f=e.i(703923),h={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var e=(0,t.useRef)([]),r=(0,t.useRef)(null);return(0,t.useEffect)(function(){var t=Date.now(),n=!1;e.current.forEach(function(e){if(e){n=!0;var i=e.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&t-r.current<100&&(i.transitionDuration="0s, 0s")}}),n&&(r.current=Date.now())}),e.current},m=e.i(410160),g=e.i(392221),y=e.i(654310),b=0,x=(0,y.default)();let v=function(e){var r=t.useState(),n=(0,g.default)(r,2),i=n[0],s=n[1];return t.useEffect(function(){var e;s("rc_progress_".concat((x?(e=b,b+=1):e="TEST_OR_SSR",e)))},[]),e||i};var k=function(e){var r=e.bg,n=e.children;return t.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function w(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),i="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(i)})}var _=t.forwardRef(function(e,r){var n=e.prefixCls,i=e.color,s=e.gradientId,a=e.radius,o=e.style,l=e.ptg,c=e.strokeLinecap,d=e.strokeWidth,u=e.size,f=e.gapDegree,h=i&&"object"===(0,m.default)(i),p=u/2,g=t.createElement("circle",{className:"".concat(n,"-circle-path"),r:a,cx:p,cy:p,stroke:h?"#FFF":void 0,strokeLinecap:c,strokeWidth:d,opacity:+(0!==l),style:o,ref:r});if(!h)return g;var y="".concat(s,"-conic"),b=w(i,(360-f)/360),x=w(i,1),v="conic-gradient(from ".concat(f?"".concat(180+f/2,"deg"):"0deg",", ").concat(b.join(", "),")"),_="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(x.join(", "),")");return t.createElement(t.Fragment,null,t.createElement("mask",{id:y},g),t.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(y,")")},t.createElement(k,{bg:_},t.createElement(k,{bg:v}))))}),C=function(e,t,r,n,i,s,a,o,l,c){var d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,u=(100-n)/100*t;return"round"===l&&100!==n&&(u+=c/2)>=t&&(u=t-.01),{stroke:"string"==typeof o?o:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:u+d,transform:"rotate(".concat(i+r/100*360*((360-s)/360)+(0===s?0:({bottom:0,top:180,left:90,right:-90})[a]),"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},j=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function S(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}let E=function(e){var r,n,i,s,a=(0,u.default)((0,u.default)({},h),e),l=a.id,c=a.prefixCls,g=a.steps,y=a.strokeWidth,b=a.trailWidth,x=a.gapDegree,k=void 0===x?0:x,w=a.gapPosition,E=a.trailColor,O=a.strokeLinecap,N=a.style,$=a.className,R=a.strokeColor,M=a.percent,T=(0,f.default)(a,j),D=v(l),P="".concat(D,"-gradient"),A=50-y/2,I=2*Math.PI*A,F=k>0?90+k/2:-90,L=(360-k)/360*I,z="object"===(0,m.default)(g)?g:{count:g,gap:2},B=z.count,W=z.gap,q=S(M),U=S(R),H=U.find(function(e){return e&&"object"===(0,m.default)(e)}),K=H&&"object"===(0,m.default)(H)?"butt":O,X=C(I,L,0,100,F,k,w,E,K,y),Q=p();return t.createElement("svg",(0,d.default)({className:(0,o.default)("".concat(c,"-circle"),$),viewBox:"0 0 ".concat(100," ").concat(100),style:N,id:l,role:"presentation"},T),!B&&t.createElement("circle",{className:"".concat(c,"-circle-trail"),r:A,cx:50,cy:50,stroke:E,strokeLinecap:K,strokeWidth:b||y,style:X}),B?(r=Math.round(B*(q[0]/100)),n=100/B,i=0,Array(B).fill(null).map(function(e,s){var a=s<=r-1?U[0]:E,o=a&&"object"===(0,m.default)(a)?"url(#".concat(P,")"):void 0,l=C(I,L,i,n,F,k,w,a,"butt",y,W);return i+=(L-l.strokeDashoffset+W)*100/L,t.createElement("circle",{key:s,className:"".concat(c,"-circle-path"),r:A,cx:50,cy:50,stroke:o,strokeWidth:y,opacity:1,style:l,ref:function(e){Q[s]=e}})})):(s=0,q.map(function(e,r){var n=U[r]||U[U.length-1],i=C(I,L,s,e,F,k,w,n,K,y);return s+=e,t.createElement(_,{key:r,color:n,ptg:e,radius:A,prefixCls:c,gradientId:P,style:i,strokeLinecap:K,strokeWidth:y,gapDegree:k,ref:function(e){Q[r]=e},size:100})}).reverse()))};var O=e.i(491816);e.i(765846);var N=e.i(896091);function $(e){return!e||e<0?0:e>100?100:e}function R({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}let M=(e,t,r)=>{var n,i,s,a;let o=-1,l=-1;if("step"===t){let t=r.steps,n=r.strokeWidth;"string"==typeof e||void 0===e?(o="small"===e?2:14,l=null!=n?n:8):"number"==typeof e?[o,l]=[e,e]:[o=14,l=8]=Array.isArray(e)?e:[e.width,e.height],o*=t}else if("line"===t){let t=null==r?void 0:r.strokeWidth;"string"==typeof e||void 0===e?l=t||("small"===e?6:8):"number"==typeof e?[o,l]=[e,e]:[o=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else("circle"===t||"dashboard"===t)&&("string"==typeof e||void 0===e?[o,l]="small"===e?[60,60]:[120,120]:"number"==typeof e?[o,l]=[e,e]:Array.isArray(e)&&(o=null!=(i=null!=(n=e[0])?n:e[1])?i:120,l=null!=(a=null!=(s=e[0])?s:e[1])?a:120));return[o,l]},T=e=>{let{prefixCls:r,trailColor:n=null,strokeLinecap:i="round",gapPosition:s,gapDegree:a,width:l=120,type:c,children:d,success:u,size:f=l,steps:h}=e,[p,m]=M(f,"circle"),{strokeWidth:g}=e;void 0===g&&(g=Math.max(3/p*100,6));let y=t.useMemo(()=>a||0===a?a:"dashboard"===c?75:void 0,[a,c]),b=(({percent:e,success:t,successPercent:r})=>{let n=$(R({success:t,successPercent:r}));return[n,$($(e)-n)]})(e),x="[object Object]"===Object.prototype.toString.call(e.strokeColor),v=(({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||N.presetPrimaryColors.green,t||null]})({success:u,strokeColor:e.strokeColor}),k=(0,o.default)(`${r}-inner`,{[`${r}-circle-gradient`]:x}),w=t.createElement(E,{steps:h,percent:h?b[1]:b,strokeWidth:g,trailWidth:g,strokeColor:h?v[1]:v,strokeLinecap:i,trailColor:n,prefixCls:r,gapDegree:y,gapPosition:s||"dashboard"===c&&"bottom"||void 0}),_=p<=20,C=t.createElement("div",{className:k,style:{width:p,height:m,fontSize:.15*p+6}},w,!_&&d);return _?t.createElement(O.default,{title:d},C):C};e.i(296059);var D=e.i(694758),P=e.i(915654),A=e.i(183293),I=e.i(246422),F=e.i(838378);let L="--progress-line-stroke-color",z="--progress-percent",B=e=>{let t=e?"100%":"-100%";return new D.Keyframes(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},W=(0,I.genStyleHooks)("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=(0,F.mergeToken)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},(0,A.resetComponent)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${L})`]},height:"100%",width:`calc(1 / var(${z}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,P.unit)(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:B(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:B(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}})(r),(e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}})(r)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}));var q=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 i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let U=e=>{let{prefixCls:r,direction:n,percent:i,size:s,strokeWidth:a,strokeColor:l,strokeLinecap:c="round",children:d,trailColor:u=null,percentPosition:f,success:h}=e,{align:p,type:m}=f,g=l&&"string"!=typeof l?((e,t)=>{let{from:r=N.presetPrimaryColors.blue,to:n=N.presetPrimaryColors.blue,direction:i="rtl"===t?"to left":"to right"}=e,s=q(e,["from","to","direction"]);if(0!==Object.keys(s).length){let e,t=(e=[],Object.keys(s).forEach(t=>{let r=Number.parseFloat(t.replace(/%/g,""));Number.isNaN(r)||e.push({key:r,value:s[t]})}),(e=e.sort((e,t)=>e.key-t.key)).map(({key:e,value:t})=>`${t} ${e}%`).join(", ")),r=`linear-gradient(${i}, ${t})`;return{background:r,[L]:r}}let a=`linear-gradient(${i}, ${r}, ${n})`;return{background:a,[L]:a}})(l,n):{[L]:l,background:l},y="square"===c||"butt"===c?0:void 0,[b,x]=M(null!=s?s:[-1,a||("small"===s?6:8)],"line",{strokeWidth:a}),v=Object.assign(Object.assign({width:`${$(i)}%`,height:x,borderRadius:y},g),{[z]:$(i)/100}),k=R(e),w={width:`${$(k)}%`,height:x,borderRadius:y,backgroundColor:null==h?void 0:h.strokeColor},_=t.createElement("div",{className:`${r}-inner`,style:{backgroundColor:u||void 0,borderRadius:y}},t.createElement("div",{className:(0,o.default)(`${r}-bg`,`${r}-bg-${m}`),style:v},"inner"===m&&d),void 0!==k&&t.createElement("div",{className:`${r}-success-bg`,style:w})),C="outer"===m&&"start"===p,j="outer"===m&&"end"===p;return"outer"===m&&"center"===p?t.createElement("div",{className:`${r}-layout-bottom`},_,d):t.createElement("div",{className:`${r}-outer`,style:{width:b<0?"100%":b}},C&&d,_,j&&d)},H=e=>{let{size:r,steps:n,rounding:i=Math.round,percent:s=0,strokeWidth:a=8,strokeColor:l,trailColor:c=null,prefixCls:d,children:u}=e,f=i(s/100*n),[h,p]=M(null!=r?r:["small"===r?2:14,a],"step",{steps:n,strokeWidth:a}),m=h/n,g=Array.from({length:n});for(let e=0;et.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let X=["normal","exception","active","success"],Q=t.forwardRef((e,d)=>{let u,{prefixCls:f,className:h,rootClassName:p,steps:m,strokeColor:g,percent:y=0,size:b="default",showInfo:x=!0,type:v="line",status:k,format:w,style:_,percentPosition:C={}}=e,j=K(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:S="end",type:E="outer"}=C,O=Array.isArray(g)?g[0]:g,N="string"==typeof g||Array.isArray(g)?g:void 0,D=t.useMemo(()=>{if(O){let e="string"==typeof O?O:Object.values(O)[0];return new r.FastColor(e).isLight()}return!1},[g]),P=t.useMemo(()=>{var t,r;let n=R(e);return Number.parseInt(void 0!==n?null==(t=null!=n?n:0)?void 0:t.toString():null==(r=null!=y?y:0)?void 0:r.toString(),10)},[y,e.success,e.successPercent]),A=t.useMemo(()=>!X.includes(k)&&P>=100?"success":k||"normal",[k,P]),{getPrefixCls:I,direction:F,progress:L}=t.useContext(c.ConfigContext),z=I("progress",f),[B,q,Q]=W(z),V="line"===v,G=V&&!m,J=t.useMemo(()=>{let r;if(!x)return null;let l=R(e),c=w||(e=>`${e}%`),d=V&&D&&"inner"===E;return"inner"===E||w||"exception"!==A&&"success"!==A?r=c($(y),$(l)):"exception"===A?r=V?t.createElement(s.default,null):t.createElement(a.default,null):"success"===A&&(r=V?t.createElement(n.default,null):t.createElement(i.default,null)),t.createElement("span",{className:(0,o.default)(`${z}-text`,{[`${z}-text-bright`]:d,[`${z}-text-${S}`]:G,[`${z}-text-${E}`]:G}),title:"string"==typeof r?r:void 0},r)},[x,y,P,A,v,z,w]);"line"===v?u=m?t.createElement(H,Object.assign({},e,{strokeColor:N,prefixCls:z,steps:"object"==typeof m?m.count:m}),J):t.createElement(U,Object.assign({},e,{strokeColor:O,prefixCls:z,direction:F,percentPosition:{align:S,type:E}}),J):("circle"===v||"dashboard"===v)&&(u=t.createElement(T,Object.assign({},e,{strokeColor:O,prefixCls:z,progressStatus:A}),J));let Y=(0,o.default)(z,`${z}-status-${A}`,{[`${z}-${"dashboard"===v&&"circle"||v}`]:"line"!==v,[`${z}-inline-circle`]:"circle"===v&&M(b,"circle")[0]<=20,[`${z}-line`]:G,[`${z}-line-align-${S}`]:G,[`${z}-line-position-${E}`]:G,[`${z}-steps`]:m,[`${z}-show-info`]:x,[`${z}-${b}`]:"string"==typeof b,[`${z}-rtl`]:"rtl"===F},null==L?void 0:L.className,h,p,q,Q);return B(t.createElement("div",Object.assign({ref:d,style:Object.assign(Object.assign({},null==L?void 0:L.style),_),className:Y,role:"progressbar","aria-valuenow":P,"aria-valuemin":0,"aria-valuemax":100},(0,l.default)(j,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),u))});e.s(["default",0,Q],309821)},597440,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:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var i=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(i.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["default",0,s],597440)},107233,37727,e=>{"use strict";var t=e.i(603908);e.s(["Plus",()=>t.default],107233);var r=e.i(841947);e.s(["X",()=>r.default],37727)},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",()=>t])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9606513e20bc3d4f.js b/litellm/proxy/_experimental/out/_next/static/chunks/9606513e20bc3d4f.js deleted file mode 100644 index 9313e9aa01d..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/9606513e20bc3d4f.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,214541,e=>{"use strict";var t=e.i(271645),a=e.i(135214),s=e.i(270345);e.s(["default",0,()=>{let[e,r]=(0,t.useState)([]),{accessToken:l,userId:i,userRole:n}=(0,a.default)();return(0,t.useEffect)(()=>{(async()=>{r(await (0,s.fetchTeams)(l,i,n,null))})()},[l,i,n]),{teams:e,setTeams:r}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function a(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function s(e,s){let r=t(e);return isNaN(s)?a(e,NaN):(s&&r.setDate(r.getDate()+s),r)}function r(e,s){let r=t(e);if(isNaN(s))return a(e,NaN);if(!s)return r;let l=r.getDate(),i=a(e,r.getTime());return(i.setMonth(r.getMonth()+s+1,0),l>=i.getDate())?i:(r.setFullYear(i.getFullYear(),i.getMonth(),l),r)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>a],96226),e.s(["addDays",()=>s],439189),e.s(["addMonths",()=>r],497245)},891547,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,disabled:o})=>{let[d,c]=(0,a.useState)([]),[m,u]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){u(!0);try{let e=await (0,r.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),c(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{u(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:m,className:i,allowClear:!0,options:d.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${s})${e.description?` — ${e.description}`:""}`,value:"production"===s?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:i,className:n,accessToken:o,disabled:d,onPoliciesLoaded:c})=>{let[m,u]=(0,a.useState)([]),[p,h]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,r.getPoliciesList)(o);e.policies&&(u(e.policies),c?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{h(!1)}}})()},[o,c]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:d,placeholder:d?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:p,className:n,allowClear:!0,options:l(m),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ClockCircleOutlined",0,l],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ArrowLeftOutlined",0,l],447566)},954616,e=>{"use strict";var t=e.i(271645),a=e.i(114272),s=e.i(540143),r=e.i(915823),l=e.i(619273),i=class extends r.Subscribable{#e;#t=void 0;#a;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#r(),this.#l()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#r(){let e=this.#a?.state??(0,a.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#l(e){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,a,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,a,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,a){let r=(0,n.useQueryClient)(a),[o]=t.useState(()=>new i(r,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let d=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(d.error&&(0,l.shouldThrowError)(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>o],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(529681),r=e.i(908286),l=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],d=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],c=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],m=function(e,t){let s,r,l;return(0,a.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(r={},c.forEach(a=>{r[`${e}-align-${a}`]=t.align===a}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r)),(l={},d.forEach(a=>{l[`${e}-justify-${a}`]=t.justify===a}),l)))},u=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:a,paddingLG:s}=e,r=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:a,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(r),(e=>{let{componentCls:t}=e,a={};return o.forEach(e=>{a[`${t}-wrap-${e}`]={flexWrap:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return c.forEach(e=>{a[`${t}-align-${e}`]={alignItems:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return d.forEach(e=>{a[`${t}-justify-${e}`]={justifyContent:e}}),a})(r)]},()=>({}),{resetStyle:!1});var p=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let h=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:d,style:c,flex:h,gap:g,vertical:x=!1,component:f="div",children:y}=e,j=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:b,direction:_,getPrefixCls:v}=t.default.useContext(l.ConfigContext),w=v("flex",n),[N,k,T]=u(w),S=null!=x?x:null==b?void 0:b.vertical,C=(0,a.default)(d,o,null==b?void 0:b.className,w,k,T,m(w,e),{[`${w}-rtl`]:"rtl"===_,[`${w}-gap-${g}`]:(0,r.isPresetSize)(g),[`${w}-vertical`]:S}),I=Object.assign(Object.assign({},null==b?void 0:b.style),c);return h&&(I.flex=h),g&&!(0,r.isPresetSize)(g)&&(I.gap=g),N(t.default.createElement(f,Object.assign({ref:i,className:C,style:I},(0,s.default)(j,["justify","wrap","align"])),y))});e.s(["Flex",0,h],525720)},948401,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["MailOutlined",0,l],948401)},502547,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,a],502547)},250980,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,a],250980)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["UserOutlined",0,l],771674)},292639,e=>{"use strict";var t=e.i(764205),a=e.i(266027);let s=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,a.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},384767,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(271645),r=e.i(389083);let l=s.forwardRef(function(e,t){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});var i=e.i(764205);let n=function({vectorStores:e,accessToken:n}){let[o,d]=(0,s.useState)([]);return(0,s.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(n);e.data&&d(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[n,e.length]),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,t.jsx)(r.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((e,a)=>{let s;return(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:(s=o.find(t=>t.vector_store_id===e))?`${s.vector_store_name||s.vector_store_id} (${s.vector_store_id})`:e},a)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=s.forwardRef(function(e,t){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});var d=e.i(871943),c=e.i(502547),m=e.i(592968);let u=function({mcpServers:l,mcpAccessGroups:n=[],mcpToolPermissions:u={},accessToken:p}){let[h,g]=(0,s.useState)([]),[x,f]=(0,s.useState)([]),[y,j]=(0,s.useState)(new Set);(0,s.useEffect)(()=>{(async()=>{if(p&&l.length>0)try{let e=await (0,i.fetchMCPServers)(p);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[p,l.length]),(0,s.useEffect)(()=>{(async()=>{if(p&&n.length>0)try{let t=await e.A(601236).then(e=>e.fetchMCPAccessGroups(p));f(Array.isArray(t)?t:t.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[p,n.length]);let b=[...l.map(e=>({type:"server",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],_=b.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(r.Badge,{color:"blue",size:"xs",children:_})]}),_>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:b.map((e,a)=>{let s="server"===e.type?u[e.value]:void 0,r=s&&s.length>0,l=y.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return r&&(t=e.value,void j(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a}))},className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ${r?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,t.jsx)(m.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${a})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),r&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:s.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===s.length?"tool":"tools"}),l?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),r&&l&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:s.map((e,a)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},a))})})]},a)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},p=s.forwardRef(function(e,t){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))}),h=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,d]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,i.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],u=c.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(r.Badge,{color:"purple",size:"xs",children:u})]}),u>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.map((e,a)=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,t.jsx)(m.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=o.find(t=>t.agent_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${a})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},a))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(p,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})};e.s(["default",0,function({objectPermission:e,variant:s="card",className:r="",accessToken:l}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},m=e?.agents||[],p=e?.agent_access_groups||[],g=(0,t.jsxs)("div",{className:"card"===s?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(u,{mcpServers:o,mcpAccessGroups:d,mcpToolPermissions:c,accessToken:l}),(0,t.jsx)(h,{agents:m,agentAccessGroups:p,accessToken:l})]});return"card"===s?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${r}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),g]}):(0,t.jsxs)("div",{className:`${r}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),g]})}],384767)},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SyncOutlined",0,l],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ThunderboltOutlined",0,l],962944)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(389083),r=e.i(810757),l=e.i(477386),i=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:n=[],variant:o="card",className:d=""}){let c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var n;let o=(n=e.callback_name,Object.entries(i.callback_map).find(([e,t])=>t===n)?.[0]||n),d=i.callbackInfo[o]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:o,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-blue-800",children:o}),(0,t.jsxs)(a.Text,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(s.Badge,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}})(e.callback_type),size:"sm",children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(s.Badge,{color:"red",size:"xs",children:n.length})]}),n.length>0?(0,t.jsx)("div",{className:"space-y-3",children:n.map((e,r)=>{let n=i.reverse_callback_map[e]||e,o=i.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-red-800",children:n}),(0,t.jsx)(a.Text,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(s.Badge,{color:"red",size:"sm",children:"Disabled"})]},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===o?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${d}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${d}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),c]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:r=[],onDisabledCallbacksChange:l})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:l})])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["CalendarOutlined",0,l],72713)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SafetyCertificateOutlined",0,l],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(r.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function r({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>r])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),r=e.i(592968),l=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),p=e.i(948401),h=e.i(72713),g=e.i(637235),x=e.i(962944),f=e.i(534172),y=e.i(3750),j=e.i(304911);let{Text:b}=s.Typography;function _({label:e,value:a,icon:s,truncate:r=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(j.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:r,style:r?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:w}=s.Typography;function N({data:e,onBack:s,onCreateNew:j,onRegenerate:b,onDelete:N,onResetSpend:k,canModifyKey:T=!0,backButtonText:S="Back to Keys",regenerateDisabled:C=!1,regenerateTooltip:I}){return(0,t.jsxs)("div",{children:[j&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:j,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(w,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),T&&(0,t.jsxs)(l.Space,{children:[(0,t.jsx)(r.Tooltip,{title:I||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:C,children:"Regenerate Key"})})}),k&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(y.TransactionOutlined,{}),onClick:k,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(_,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(p.MailOutlined,{})}),(0,t.jsx)(_,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(_,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(h.CalendarOutlined,{})}),(0,t.jsx)(_,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(f.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(_,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(_,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(x.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var k=e.i(599724),T=e.i(389083),S=e.i(278587),C=e.i(271645);let I=C.forwardRef(function(e,t){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:r,nextRotationAt:l,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(k.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(k.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||r||l)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(k.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(k.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(r||l)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(k.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(k.Text,{className:"text-sm text-gray-600",children:o(l||r||"")})]})]}),e&&!s&&!r&&!l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(k.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!r&&!l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(k.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(k.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(k.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(k.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),r=e.i(135214),l=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),r=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,l=await fetch(r,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return l.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,r.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:l.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),p=e.i(629569),h=e.i(808613),g=e.i(28651),x=e.i(212931),f=e.i(439189),y=e.i(497245),j=e.i(96226),b=e.i(435684);function _(e,t){let{years:a=0,months:s=0,weeks:r=0,days:l=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,y.addMonths)(d,s+12*a):d,m=l||r?(0,f.addDays)(c,l+7*r):c;return(0,j.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),w=e.i(237016),N=e.i(727749);function k({selectedToken:e,visible:t,onClose:a,onKeyUpdate:l}){let{accessToken:i}=(0,r.default)(),[f]=h.Form.useForm(),[y,j]=(0,v.useState)(null),[b,k]=(0,v.useState)(null),[T,S]=(0,v.useState)(null),[C,I]=(0,v.useState)(!1),[A,M]=(0,v.useState)(!1),[F,O]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(f.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),O(i),M(e.key_name===i))},[t,e,f,i]),(0,v.useEffect)(()=>{t||(j(null),I(!1),M(!1),O(null),f.resetFields())},[t,f]);let E=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=_(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=_(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=_(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(E(b.duration)):S(null)},[b?.duration]);let L=async()=>{if(e&&F){I(!0);try{let t=await f.validateFields(),a=await (0,s.regenerateKeyCall)(F,e.token||e.token_id,t);j(a.key),N.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let r={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?E(t.duration):e.expires,...a};console.log("Updated key data with new token:",r),l&&l(r),I(!1)}catch(e){console.error("Error regenerating key:",e),N.default.fromBackend(e),I(!1)}}},R=()=>{j(null),I(!1),M(!1),O(null),f.resetFields(),a()};return(0,n.jsx)(x.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:R,footer:y?[(0,n.jsx)(o.Button,{onClick:R,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:R,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:L,disabled:C,children:C?"Regenerating...":"Regenerate"},"regenerate")],children:y?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(p.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:y})}),(0,n.jsx)(w.CopyToClipboard,{text:y,onCopy:()=>N.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(h.Form,{form:f,layout:"vertical",onValuesChange:e=>{"duration"in e&&k(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(h.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(h.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(g.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(h.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(h.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(h.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),T&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",T]}),(0,n.jsx)(h.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>k],690284)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),r=e.i(292639),l=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),p=e.i(197647),h=e.i(653824),g=e.i(881073),x=e.i(404206),f=e.i(723731),y=e.i(599724),j=e.i(629569),b=e.i(808613),_=e.i(212931),v=e.i(262218),w=e.i(784647),N=e.i(271645),k=e.i(708347),T=e.i(557662),S=e.i(505022),C=e.i(127952),I=e.i(721929),A=e.i(643449),M=e.i(727749),F=e.i(764205),O=e.i(65932),E=e.i(384767),L=e.i(690284),R=e.i(190702),P=e.i(891547),D=e.i(109799),$=e.i(921511),B=e.i(827252),z=e.i(779241),K=e.i(311451),V=e.i(199133),U=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function er({keyData:e,onCancel:a,onSubmit:l,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&k.rolesWithWriteAccess.includes(d),[p]=b.Form.useForm(),[h,g]=(0,N.useState)([]),[x,f]=(0,N.useState)({}),y=i?.find(t=>t.team_id===e.team_id),[j,_]=(0,N.useState)([]),[v,w]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,T.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,C]=(0,N.useState)(e.organization_id||null),[A,O]=(0,N.useState)(e.auto_rotate||!1),[E,L]=(0,N.useState)(e.rotation_interval||""),[R,er]=(0,N.useState)(!e.expires),[el,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,D.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,r.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ep=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,F.modelAvailableCall)(n,o,d)).data.map(e=>e.id);_(e)}else if(y?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,y.team_id);_(Array.from(new Set([...y.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,F.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,y,e.team_id]),(0,N.useEffect)(()=>{p.setFieldValue("disabled_callbacks",v)},[p,v]);let eh=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:eh(e.budget_duration),metadata:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,I.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,T.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{p.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:eh(e.budget_duration),metadata:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,I.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,T.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,p]),(0,N.useEffect)(()=>{p.setFieldValue("auto_rotate",A)},[A,p]),(0,N.useEffect)(()=>{E&&p.setFieldValue("rotation_interval",E)},[E,p]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,F.tagListCall)(n);f(e)}catch(e){M.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let ex=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}R&&(e.duration=null),await l(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:p,onFinish:ex,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(z.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",r="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],l=r.includes("management_routes")||r.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(V.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:l,value:l?[]:i,onChange:e=>a("models",e),children:[j.length>0&&(0,t.jsx)(V.Select.Option,{value:"all-team-models",children:"All Team Models"}),j.map(e=>(0,t.jsx)(V.Select.Option,{value:e,children:e},e))]}),l&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let r=e("allowed_routes")||"",l=(s="string"==typeof r&&""!==r.trim()?r.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(V.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:l,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(V.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(V.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(V.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(K.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(V.Select,{placeholder:"n/a",children:[(0,t.jsx)(V.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(V.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(V.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(K.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(K.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(P.default,{onChange:e=>{p.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)(U.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)($.default,{onChange:e=>{p.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(V.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(x).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(V.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:h.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>p.setFieldValue("allowed_passthrough_routes",e),value:p.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>p.setFieldValue("vector_stores",e),value:p.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>p.setFieldValue("mcp_servers_and_groups",e),value:p.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(K.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:p.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:p.getFieldValue("mcp_tool_permissions")||{},onChange:e=>p.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>p.setFieldValue("agents_and_groups",e),value:p.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{C(e||null),p.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(V.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(C(t.organization_id),p.setFieldValue("organization_id",t.organization_id)):e||(C(null),p.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(V.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(K.Input,{value:ep??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:p.getFieldValue("logging_settings"),onChange:e=>p.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{w((0,T.mapInternalToDisplayNames)(e)),p.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(K.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:p,autoRotationEnabled:A,onAutoRotationChange:O,rotationInterval:E,onRotationIntervalChange:L,neverExpire:R,onNeverExpireChange:er}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(K.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:el,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:el,children:"Save Changes"})]})})]})}function el({onClose:e,keyData:P,teams:D,onKeyDataUpdate:$,onDelete:B,backButtonText:z="Back to Keys"}){let K,{accessToken:V,userId:U,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&k.rolesWithWriteAccess.includes(G),{teams:q}=(0,l.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,r.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,el]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ep}=(0,O.useResetKeySpend)(),[eh,eg]=(0,N.useState)(P),[ex,ef]=(0,N.useState)(null),[ey,ej]=(0,N.useState)(!1),[eb,e_]=(0,N.useState)({}),[ev,ew]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{P&&eg(P)},[P]),(0,N.useEffect)(()=>{(async()=>{let e=eh?.metadata?.policies;if(!V||!e||!Array.isArray(e)||0===e.length)return;ew(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,F.getPolicyInfoWithGuardrails)(V,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),e_(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ew(!1)}})()},[V,eh?.metadata?.policies]),(0,N.useEffect)(()=>{if(ey){let e=setTimeout(()=>{ej(!1)},5e3);return()=>clearTimeout(e)}},[ey]),!eh)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:z}),(0,t.jsx)(y.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!V)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...eh.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...eh.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,T.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),M.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,T.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,F.keyUpdateCall)(V,e);eg(e=>e?{...e,...a}:void 0),$&&$(a),M.default.success("Key updated successfully"),Z(!1)}catch(e){M.default.fromBackend((0,R.parseErrorMessage)(e)),console.error("Error updating key:",e)}},ek=async()=>{try{if(el(!0),!V)return;await (0,F.keyDeleteCall)(V,eh.token||eh.token_id),M.default.success("Key deleted successfully"),B&&B(),e()}catch(e){console.error("Error deleting the key:",e),M.default.fromBackend(e)}finally{el(!1),ea(!1),en("")}},eT=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,k.isProxyAdminRole)(G||"")||q&&(0,k.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eh.team_id)[0]?.members_with_roles,U||"")||U===eh.user_id&&"Internal Viewer"!==G,eC=(0,k.isProxyAdminRole)(G||"")||q&&(0,k.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eh.team_id)[0]?.members_with_roles,U||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(w.KeyInfoHeader,{data:{keyName:eh.key_alias||"Virtual Key",keyId:eh.token_id||eh.token,userId:eh.user_id||"",userEmail:eh.user_email||"",createdBy:eh.user_email||eh.user_id||"",createdAt:eh.created_at?eT(eh.created_at):"",lastUpdated:eh.updated_at?eT(eh.updated_at):"",lastActive:eh.last_active?eT(eh.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eC?()=>em(!0):void 0,canModifyKey:eS,backButtonText:z,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(L.RegenerateKeyModal,{selectedToken:eh,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ef(new Date),ej(!0),$&&$({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(C.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:eh?.key_alias||"-"},{label:"Key ID",value:eh?.token_id||eh?.token||"-",code:!0},{label:"Team ID",value:eh?.team_id||"-",code:!0},{label:"Spend",value:eh?.spend?`$${(0,i.formatNumberWithCommas)(eh.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:ek,confirmLoading:es,requiredConfirmation:eh?.key_alias}),(0,t.jsxs)(_.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(eh.token||eh.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),$&&$({spend:0}),M.default.success("Key spend reset to $0"),em(!1)},onError:e=>{M.default.fromBackend((0,R.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ep,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:eh?.key_alias||eh?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(eh.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(h.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(p.Tab,{children:"Overview"}),(0,t.jsx)(p.Tab,{children:"Settings"})]}),(0,t.jsxs)(f.TabPanels,{children:[(0,t.jsx)(x.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(j.Title,{children:["$",(0,i.formatNumberWithCommas)(eh.spend,4)]}),(0,t.jsxs)(y.Text,{children:["of"," ",null!==eh.max_budget?`$${(0,i.formatNumberWithCommas)(eh.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Text,{children:["TPM: ",null!==eh.tpm_limit?eh.tpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["RPM: ",null!==eh.rpm_limit?eh.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:eh.models&&eh.models.length>0?eh.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(y.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(E.default,{objectPermission:eh.object_permission,variant:"inline",accessToken:V})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(eh.metadata?.guardrails)&&eh.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eh.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(y.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof eh.metadata?.disable_global_guardrails&&!0===eh.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(eh.metadata?.policies)&&eh.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:eh.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(y.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(y.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(y.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,I.extractLoggingSettings)(eh.metadata),disabledCallbacks:Array.isArray(eh.metadata?.litellm_disabled_callbacks)?(0,T.mapInternalToDisplayNames)(eh.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:eh.auto_rotate,rotationInterval:eh.rotation_interval,lastRotationAt:eh.last_rotation_at,keyRotationAt:eh.key_rotation_at,nextRotationAt:eh.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(x.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(er,{keyData:eh,onCancel:()=>Z(!1),onSubmit:eN,teams:D,accessToken:V,userID:U,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(y.Text,{className:"font-mono",children:eh.token_id||eh.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(y.Text,{children:eh.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(y.Text,{className:"font-mono",children:eh.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(y.Text,{children:eh.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(y.Text,{children:eh.project_id?(K=J?.find(e=>e.project_id===eh.project_id),K?.project_alias?`${K.project_alias} (${eh.project_id})`:eh.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(y.Text,{children:(eh.organization_id??eh.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(y.Text,{children:eT(eh.created_at)})]}),ex&&(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Text,{children:eT(ex)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(y.Text,{children:eh.expires?eT(eh.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:eh.auto_rotate,rotationInterval:eh.rotation_interval,lastRotationAt:eh.last_rotation_at,keyRotationAt:eh.key_rotation_at,nextRotationAt:eh.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(y.Text,{children:["$",(0,i.formatNumberWithCommas)(eh.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(y.Text,{children:null!==eh.max_budget?`$${(0,i.formatNumberWithCommas)(eh.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eh.metadata?.tags)&&eh.metadata.tags.length>0?eh.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(y.Text,{children:Array.isArray(eh.metadata?.prompts)&&eh.metadata.prompts.length>0?eh.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eh.allowed_routes)&&eh.allowed_routes.length>0?eh.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(y.Text,{children:Array.isArray(eh.metadata?.allowed_passthrough_routes)&&eh.metadata.allowed_passthrough_routes.length>0?eh.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(y.Text,{children:eh.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eh.models&&eh.models.length>0?eh.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(y.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(y.Text,{children:["TPM: ",null!==eh.tpm_limit?eh.tpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["RPM: ",null!==eh.rpm_limit?eh.rpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Max Parallel Requests:"," ",null!==eh.max_parallel_requests?eh.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Model TPM Limits:"," ",eh.metadata?.model_tpm_limit?JSON.stringify(eh.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Model RPM Limits:"," ",eh.metadata?.model_rpm_limit?JSON.stringify(eh.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(eh.metadata))})]}),(0,t.jsx)(E.default,{objectPermission:eh.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:V}),(0,t.jsx)(A.default,{loggingConfigs:(0,I.extractLoggingSettings)(eh.metadata),disabledCallbacks:Array.isArray(eh.metadata?.litellm_disabled_callbacks)?(0,T.mapInternalToDisplayNames)(eh.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>el],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/99d715502d5069f4.js b/litellm/proxy/_experimental/out/_next/static/chunks/995220c77ab93732.js similarity index 86% rename from litellm/proxy/_experimental/out/_next/static/chunks/99d715502d5069f4.js rename to litellm/proxy/_experimental/out/_next/static/chunks/995220c77ab93732.js index dcc83471f06..083e4d8c118 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/99d715502d5069f4.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/995220c77ab93732.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,275144,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(764205);let o=(0,r.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:a})=>{let[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(null);return(0,r.useEffect)(()=>{(async()=>{try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.ok){let e=await r.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,r.useEffect)(()=>{if(s){let e=document.querySelectorAll("link[rel*='icon']");if(e.length>0)e.forEach(e=>{e.href=s});else{let e=document.createElement("link");e.rel="icon",e.href=s,document.head.appendChild(e)}}},[s]),(0,t.jsx)(o.Provider,{value:{logoUrl:i,setLogoUrl:l,faviconUrl:s,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,r.useContext)(o);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},100486,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:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",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(["CrownOutlined",0,a],100486)},295320,283713,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:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",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(["CloudServerOutlined",0,a],295320);var i=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,n=e?.workers??[],[o,a]=(0,r.useState)(()=>localStorage.getItem(s));(0,r.useEffect)(()=>{if(!o||0===n.length)return;let e=n.find(e=>e.worker_id===o);e&&(0,i.switchToWorkerUrl)(e.url)},[o,n]);let c=n.find(e=>e.worker_id===o)??null,u=(0,r.useCallback)(e=>{let t=n.find(t=>t.worker_id===e);t&&(a(e),localStorage.setItem(s,e),(0,i.switchToWorkerUrl)(t.url))},[n]);return{isControlPlane:t,workers:n,selectedWorkerId:o,selectedWorker:c,selectWorker:u,disconnectFromWorker:(0,r.useCallback)(()=>{a(null),localStorage.removeItem(s),(0,i.switchToWorkerUrl)(null)},[])}}],283713)},44121,186515,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:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",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(["MenuFoldOutlined",0,a],44121);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["MenuUnfoldOutlined",0,l],186515)},998183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return s},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(151836)._(e.r(998183)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",l=e.hash||"",s=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),s&&"object"==typeof s&&(s=String(a.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),o&&"/"!==o[0]&&(o="/"+o)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),o=o.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${o}${u}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},718967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return x},NormalizeError:function(){return y},PageNotFoundError:function(){return w},SP:function(){return g},ST:function(){return p},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return f},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return j}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,p=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class y extends Error{}class w extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},573668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(718967),o=e.r(652817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},284508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},522016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return v},useLinkStatus:function(){return w}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(151836),i=e.r(843476),l=a._(e.r(271645)),s=e.r(195057),c=e.r(8372),u=e.r(818581),d=e.r(718967),f=e.r(405550);e.r(233525);let h=e.r(91949),m=e.r(573668),g=e.r(509396);function p(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}function v(t){var r;let n,o,a,[s,v]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),w=(0,l.useRef)(null),{href:x,as:b,children:j,prefetch:S=null,passHref:E,replace:_,shallow:L,scroll:C,onClick:k,onMouseEnter:T,onTouchStart:P,legacyBehavior:O=!1,onNavigate:I,ref:N,unstable_dynamicOnHover:B,...z}=t;n=j,O&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let R=l.default.useContext(c.AppRouterContext),U=!1!==S,M=!1!==S?null===(r=S)||"auto"===r?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,{href:A,as:D}=l.default.useMemo(()=>{let e=p(x);return{href:e,as:b?p(b):e}},[x,b]);if(O){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(n)}let $=O?o&&"object"==typeof o&&o.ref:N,F=l.default.useCallback(e=>(null!==R&&(w.current=(0,h.mountLinkInstance)(e,A,R,M,U,v)),()=>{w.current&&((0,h.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,h.unmountPrefetchableInstance)(e)}),[U,A,R,M,v]),H={ref:(0,u.useMergedRef)(F,$),onClick(t){O||"function"!=typeof k||k(t),O&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!R||t.defaultPrevented||function(t,r,n,o,a,i,s){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(699781);l.default.startTransition(()=>{d(n||r,a?"replace":"push",i??!0,o.current)})}}(t,A,D,w,_,C,I)},onMouseEnter(e){O||"function"!=typeof T||T(e),O&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),R&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===B)},onTouchStart:function(e){O||"function"!=typeof P||P(e),O&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),R&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===B)}};return(0,d.isAbsoluteUrl)(D)?H.href=D:O&&!E&&("a"!==o.type||"href"in o.props)||(H.href=(0,f.addBasePath)(D)),a=O?l.default.cloneElement(o,H):(0,i.jsx)("a",{...z,...H,children:n}),(0,i.jsx)(y.Provider,{value:s,children:a})}e.r(284508);let y=(0,l.createContext)(h.IDLE_LINK_STATUS),w=()=>(0,l.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},402874,521323,636772,e=>{"use strict";var t=e.i(843476),r=e.i(764205),n=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("healthReadiness"),a=async()=>{let e=(0,r.getProxyBaseUrl)(),t=await fetch(`${e}/health/readiness`);if(!t.ok)throw Error(`Failed to fetch health readiness: ${t.statusText}`);return t.json()},i=()=>(0,n.useQuery)({queryKey:o.detail("readiness"),queryFn:a,staleTime:3e5});e.s(["useHealthReadiness",0,i],521323);var l=e.i(115571),s=e.i(271645);function c(e){let t=t=>{"disableBouncingIcon"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableBouncingIcon"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function u(){return"true"===(0,l.getLocalStorageItem)("disableBouncingIcon")}function d(){return(0,s.useSyncExternalStore)(c,u)}var f=e.i(275144),h=e.i(268004),m=e.i(321836),g=e.i(62478),p=e.i(44121),v=e.i(186515);e.i(247167);var y=e.i(931067),w=e.i(9583),x=e.i(464571),b=e.i(790848),j=e.i(262218),S=e.i(522016);function E(e){let t=t=>{"disableBlogPosts"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableBlogPosts"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function _(){return"true"===(0,l.getLocalStorageItem)("disableBlogPosts")}function L(){return(0,s.useSyncExternalStore)(E,_)}async function C(){let e=(0,r.getProxyBaseUrl)(),t=await fetch(`${e}/public/litellm_blog_posts`);if(!t.ok)throw Error(`Failed to fetch blog posts: ${t.statusText}`);return t.json()}var k=e.i(56456),T=e.i(326373),P=e.i(770914),O=e.i(898586);let{Text:I,Title:N,Paragraph:B}=O.Typography,z=()=>{let e,r=L(),{data:o,isLoading:a,isError:i,refetch:l}=(0,n.useQuery)({queryKey:["blogPosts"],queryFn:C,staleTime:36e5,retry:1,retryDelay:0});return r?null:(e=a?[{key:"loading",label:(0,t.jsx)(k.LoadingOutlined,{}),disabled:!0}]:i?[{key:"error",label:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(I,{type:"danger",children:"Failed to load posts"}),(0,t.jsx)(x.Button,{size:"small",onClick:()=>l(),children:"Retry"})]}),disabled:!0}]:o&&0!==o.posts.length?[...o.posts.slice(0,5).map(e=>({key:e.url,label:(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",width:380},children:[(0,t.jsx)(N,{level:5,style:{marginBottom:2},children:e.title}),(0,t.jsx)(I,{type:"secondary",style:{fontSize:11},children:new Date(e.date+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),(0,t.jsx)(B,{ellipsis:{rows:2},children:e.description})]})})),{type:"divider"},{key:"view-all",label:(0,t.jsx)("a",{href:"https://docs.litellm.ai/blog",target:"_blank",rel:"noopener noreferrer",children:"View all posts"})}]:[{key:"empty",label:(0,t.jsx)(I,{type:"secondary",children:"No posts available"}),disabled:!0}],(0,t.jsx)(T.Dropdown,{menu:{items:e},trigger:["hover"],placement:"bottomRight",children:(0,t.jsx)(x.Button,{type:"text",children:"Blog"})}))};function R(e){let t=t=>{"disableShowPrompts"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableShowPrompts"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function U(){return"true"===(0,l.getLocalStorageItem)("disableShowPrompts")}function M(){return(0,s.useSyncExternalStore)(R,U)}e.s(["useDisableShowPrompts",()=>M],636772);let A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"outlined"};var D=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:A}))});let $={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M409.4 128c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h76.7v-76.8c0-42.3-34.3-76.7-76.7-76.8zm0 204.8H204.7c-42.4 0-76.7 34.4-76.7 76.8s34.4 76.8 76.7 76.8h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.8-76.6-76.8zM614 486.4c42.4 0 76.8-34.4 76.7-76.8V204.8c0-42.4-34.3-76.8-76.7-76.8-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.5 34.3 76.8 76.7 76.8zm281.4-76.8c0-42.4-34.4-76.8-76.7-76.8S742 367.2 742 409.6v76.8h76.7c42.3 0 76.7-34.4 76.7-76.8zm-76.8 128H614c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM614 742.4h-76.7v76.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM409.4 537.6c-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8V614.4c0-20.3-8.1-39.9-22.4-54.3a76.92 76.92 0 00-54.3-22.5zM128 614.4c0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5c42.4 0 76.8-34.4 76.7-76.8v-76.8h-76.7c-42.3 0-76.7 34.4-76.7 76.8z"}}]},name:"slack",theme:"outlined"};var F=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:$}))});let H=()=>M()?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Button,{href:"https://www.litellm.ai/support",target:"_blank",rel:"noopener noreferrer",icon:(0,t.jsx)(F,{}),className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",children:"Join Slack"}),(0,t.jsx)(x.Button,{href:"https://github.com/BerriAI/litellm",target:"_blank",rel:"noopener noreferrer",className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",icon:(0,t.jsx)(D,{}),children:"Star us on GitHub"})]});var V=e.i(135214),K=e.i(371401),W=e.i(100486),G=e.i(755151);let q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};var Q=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:q}))}),X=e.i(948401),J=e.i(602073),Z=e.i(771674),Y=e.i(312361),ee=e.i(592968);let{Text:et}=O.Typography,er=({onLogout:e})=>{let{userId:r,userEmail:n,userRole:o,premiumUser:a}=(0,V.default)(),i=M(),c=(0,K.useDisableUsageIndicator)(),u=L(),f=d(),[h,m]=(0,s.useState)(!1);(0,s.useEffect)(()=>{m("true"===(0,l.getLocalStorageItem)("disableShowNewBadge"))},[]);let g=[{key:"logout",label:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Q,{}),"Logout"]}),onClick:e}];return(0,t.jsx)(T.Dropdown,{menu:{items:g},popupRender:e=>(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-lg",children:[(0,t.jsxs)(P.Space,{direction:"vertical",size:"small",style:{width:"100%",padding:"12px"},children:[(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(X.MailOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:n||"-"})]}),a?(0,t.jsx)(j.Tag,{icon:(0,t.jsx)(W.CrownOutlined,{}),color:"gold",children:"Premium"}):(0,t.jsx)(ee.Tooltip,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,t.jsx)(j.Tag,{icon:(0,t.jsx)(W.CrownOutlined,{}),children:"Standard"})})]}),(0,t.jsx)(Y.Divider,{style:{margin:"8px 0"}}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Z.UserOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:"User ID"})]}),(0,t.jsx)(et,{copyable:!0,ellipsis:!0,style:{maxWidth:"150px"},title:r||"-",children:r||"-"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(J.SafetyOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:"Role"})]}),(0,t.jsx)(et,{children:o})]}),(0,t.jsx)(Y.Divider,{style:{margin:"8px 0"}}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide New Feature Indicators"}),(0,t.jsx)(b.Switch,{size:"small",checked:h,onChange:e=>{m(e),e?(0,l.setLocalStorageItem)("disableShowNewBadge","true"):(0,l.removeLocalStorageItem)("disableShowNewBadge"),(0,l.emitLocalStorageChange)("disableShowNewBadge")},"aria-label":"Toggle hide new feature indicators"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide All Prompts"}),(0,t.jsx)(b.Switch,{size:"small",checked:i,onChange:e=>{e?(0,l.setLocalStorageItem)("disableShowPrompts","true"):(0,l.removeLocalStorageItem)("disableShowPrompts"),(0,l.emitLocalStorageChange)("disableShowPrompts")},"aria-label":"Toggle hide all prompts"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Usage Indicator"}),(0,t.jsx)(b.Switch,{size:"small",checked:c,onChange:e=>{e?(0,l.setLocalStorageItem)("disableUsageIndicator","true"):(0,l.removeLocalStorageItem)("disableUsageIndicator"),(0,l.emitLocalStorageChange)("disableUsageIndicator")},"aria-label":"Toggle hide usage indicator"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Blog Posts"}),(0,t.jsx)(b.Switch,{size:"small",checked:u,onChange:e=>{e?(0,l.setLocalStorageItem)("disableBlogPosts","true"):(0,l.removeLocalStorageItem)("disableBlogPosts"),(0,l.emitLocalStorageChange)("disableBlogPosts")},"aria-label":"Toggle hide blog posts"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Bouncing Icon"}),(0,t.jsx)(b.Switch,{size:"small",checked:f,onChange:e=>{e?(0,l.setLocalStorageItem)("disableBouncingIcon","true"):(0,l.removeLocalStorageItem)("disableBouncingIcon"),(0,l.emitLocalStorageChange)("disableBouncingIcon")},"aria-label":"Toggle hide bouncing icon"})]})]}),(0,t.jsx)(Y.Divider,{style:{margin:0}}),s.default.cloneElement(e,{style:{boxShadow:"none"}})]}),children:(0,t.jsx)(x.Button,{type:"text",children:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Z.UserOutlined,{}),(0,t.jsx)(et,{children:"User"}),(0,t.jsx)(G.DownOutlined,{})]})})})};var en=e.i(199133),eo=e.i(295320),ea=e.i(283713);let ei=({onWorkerSwitch:e})=>{let{isControlPlane:r,selectedWorker:n,workers:o}=(0,ea.useWorker)();return r&&n?(0,t.jsx)(en.Select,{showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),value:n.worker_id,style:{minWidth:180},suffixIcon:(0,t.jsx)(eo.CloudServerOutlined,{}),options:o.map(e=>({label:e.name,value:e.worker_id,disabled:e.worker_id===n.worker_id})),onChange:t=>{e(t)}}):null};e.s(["default",0,({userID:e,userEmail:n,userRole:o,premiumUser:a,proxySettings:l,setProxySettings:c,accessToken:u,isPublicPage:y=!1,sidebarCollapsed:w=!1,onToggleSidebar:b,isDarkMode:E,toggleDarkMode:_})=>{let L=(0,r.getProxyBaseUrl)(),[C,k]=(0,s.useState)(""),{logoUrl:T}=(0,f.useTheme)(),{data:P}=i(),O=P?.litellm_version,I=d(),N=T||`${L}/get_image`;return(0,s.useEffect)(()=>{(async()=>{if(u){let e=await (0,g.fetchProxySettings)(u);console.log("response from fetchProxySettings",e),e&&c(e)}})()},[u]),(0,s.useEffect)(()=>{k(l?.PROXY_LOGOUT_URL||"")},[l]),(0,t.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)("div",{className:"flex items-center h-14 px-4",children:[(0,t.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[b&&(0,t.jsx)("button",{onClick:b,className:"flex items-center justify-center w-10 h-10 mr-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded transition-colors",title:w?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("span",{className:"text-lg",children:w?(0,t.jsx)(v.MenuUnfoldOutlined,{}):(0,t.jsx)(p.MenuFoldOutlined,{})})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.default,{href:L||"/",className:"flex items-center",children:(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"h-10 max-w-48 flex items-center justify-center overflow-hidden",children:(0,t.jsx)("img",{src:N,alt:"LiteLLM Brand",className:"max-w-full max-h-full w-auto h-auto object-contain"})})})}),O&&(0,t.jsxs)("div",{className:"relative",children:[!I&&(0,t.jsx)("span",{className:"absolute -top-1 -left-2 text-lg animate-bounce",style:{animationDuration:"2s"},title:"Thanks for using LiteLLM!",children:"🌑"}),(0,t.jsx)(j.Tag,{className:"relative text-xs font-medium cursor-pointer z-10",children:(0,t.jsxs)("a",{href:"https://docs.litellm.ai/release_notes",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0",children:["v",O]})})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,t.jsx)(ei,{onWorkerSwitch:e=>{(0,h.clearTokenCookies)(),(0,m.clearStoredReturnUrl)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=`/ui/login?worker=${encodeURIComponent(e)}`}}),(0,t.jsx)(H,{}),!1,(0,t.jsx)(x.Button,{type:"text",href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,t.jsx)(z,{}),!y&&(0,t.jsx)(er,{onLogout:()=>{(0,h.clearTokenCookies)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=C}})]})]})})})}],402874)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,275144,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(764205);let o=(0,r.createContext)(void 0);e.s(["ThemeProvider",0,({children:e,accessToken:a})=>{let[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(null);return(0,r.useEffect)(()=>{(async()=>{try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.ok){let e=await r.json();e.values?.logo_url&&l(e.values.logo_url),e.values?.favicon_url&&c(e.values.favicon_url)}}catch(e){console.warn("Failed to load theme settings from backend:",e)}})()},[]),(0,r.useEffect)(()=>{if(s){let e=document.querySelectorAll("link[rel*='icon']");if(e.length>0)e.forEach(e=>{e.href=s});else{let e=document.createElement("link");e.rel="icon",e.href=s,document.head.appendChild(e)}}},[s]),(0,t.jsx)(o.Provider,{value:{logoUrl:i,setLogoUrl:l,faviconUrl:s,setFaviconUrl:c},children:e})},"useTheme",0,()=>{let e=(0,r.useContext)(o);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e}])},326373,e=>{"use strict";var t=e.i(21539);e.s(["Dropdown",()=>t.default])},100486,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:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",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(["CrownOutlined",0,a],100486)},44121,186515,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:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",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(["MenuFoldOutlined",0,a],44121);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"};var l=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:i}))});e.s(["MenuUnfoldOutlined",0,l],186515)},295320,283713,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:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",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(["CloudServerOutlined",0,a],295320);var i=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,n=e?.workers??[],[o,a]=(0,r.useState)(()=>localStorage.getItem(s));(0,r.useEffect)(()=>{if(!o||0===n.length)return;let e=n.find(e=>e.worker_id===o);e&&(0,i.switchToWorkerUrl)(e.url)},[o,n]);let c=n.find(e=>e.worker_id===o)??null,u=(0,r.useCallback)(e=>{let t=n.find(t=>t.worker_id===e);t&&(a(e),localStorage.setItem(s,e),(0,i.switchToWorkerUrl)(t.url))},[n]);return{isControlPlane:t,workers:n,selectedWorkerId:o,selectedWorker:c,selectWorker:u,disconnectFromWorker:(0,r.useCallback)(()=>{a(null),localStorage.removeItem(s),(0,i.switchToWorkerUrl)(null)},[])}}],283713)},998183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return s},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function a(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(151836)._(e.r(998183)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",l=e.hash||"",s=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),s&&"object"==typeof s&&(s=String(a.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),o&&"/"!==o[0]&&(o="/"+o)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),o=o.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${o}${u}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},718967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return x},NormalizeError:function(){return y},PageNotFoundError:function(){return w},SP:function(){return g},ST:function(){return p},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return f},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return j}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,p=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class y extends Error{}class w extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},573668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(718967),o=e.r(652817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},284508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},522016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return v},useLinkStatus:function(){return w}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(151836),i=e.r(843476),l=a._(e.r(271645)),s=e.r(195057),c=e.r(8372),u=e.r(818581),d=e.r(718967),f=e.r(405550);e.r(233525);let h=e.r(91949),m=e.r(573668),g=e.r(509396);function p(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}function v(t){var r;let n,o,a,[s,v]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),w=(0,l.useRef)(null),{href:x,as:b,children:j,prefetch:S=null,passHref:E,replace:_,shallow:L,scroll:C,onClick:k,onMouseEnter:T,onTouchStart:P,legacyBehavior:O=!1,onNavigate:I,ref:N,unstable_dynamicOnHover:B,...z}=t;n=j,O&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let R=l.default.useContext(c.AppRouterContext),U=!1!==S,M=!1!==S?null===(r=S)||"auto"===r?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,{href:A,as:D}=l.default.useMemo(()=>{let e=p(x);return{href:e,as:b?p(b):e}},[x,b]);if(O){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(n)}let $=O?o&&"object"==typeof o&&o.ref:N,F=l.default.useCallback(e=>(null!==R&&(w.current=(0,h.mountLinkInstance)(e,A,R,M,U,v)),()=>{w.current&&((0,h.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,h.unmountPrefetchableInstance)(e)}),[U,A,R,M,v]),H={ref:(0,u.useMergedRef)(F,$),onClick(t){O||"function"!=typeof k||k(t),O&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!R||t.defaultPrevented||function(t,r,n,o,a,i,s){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(699781);l.default.startTransition(()=>{d(n||r,a?"replace":"push",i??!0,o.current)})}}(t,A,D,w,_,C,I)},onMouseEnter(e){O||"function"!=typeof T||T(e),O&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),R&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===B)},onTouchStart:function(e){O||"function"!=typeof P||P(e),O&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),R&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===B)}};return(0,d.isAbsoluteUrl)(D)?H.href=D:O&&!E&&("a"!==o.type||"href"in o.props)||(H.href=(0,f.addBasePath)(D)),a=O?l.default.cloneElement(o,H):(0,i.jsx)("a",{...z,...H,children:n}),(0,i.jsx)(y.Provider,{value:s,children:a})}e.r(284508);let y=(0,l.createContext)(h.IDLE_LINK_STATUS),w=()=>(0,l.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},402874,521323,636772,e=>{"use strict";var t=e.i(843476),r=e.i(764205),n=e.i(266027);let o=(0,e.i(243652).createQueryKeys)("healthReadiness"),a=async()=>{let e=(0,r.getProxyBaseUrl)(),t=await fetch(`${e}/health/readiness`);if(!t.ok)throw Error(`Failed to fetch health readiness: ${t.statusText}`);return t.json()},i=()=>(0,n.useQuery)({queryKey:o.detail("readiness"),queryFn:a,staleTime:3e5});e.s(["useHealthReadiness",0,i],521323);var l=e.i(115571),s=e.i(271645);function c(e){let t=t=>{"disableBouncingIcon"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableBouncingIcon"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function u(){return"true"===(0,l.getLocalStorageItem)("disableBouncingIcon")}function d(){return(0,s.useSyncExternalStore)(c,u)}var f=e.i(275144),h=e.i(268004),m=e.i(321836),g=e.i(62478),p=e.i(44121),v=e.i(186515);e.i(247167);var y=e.i(931067),w=e.i(9583),x=e.i(464571),b=e.i(790848),j=e.i(262218),S=e.i(522016);function E(e){let t=t=>{"disableBlogPosts"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableBlogPosts"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function _(){return"true"===(0,l.getLocalStorageItem)("disableBlogPosts")}function L(){return(0,s.useSyncExternalStore)(E,_)}async function C(){let e=(0,r.getProxyBaseUrl)(),t=await fetch(`${e}/public/litellm_blog_posts`);if(!t.ok)throw Error(`Failed to fetch blog posts: ${t.statusText}`);return t.json()}var k=e.i(56456),T=e.i(326373),P=e.i(770914),O=e.i(898586);let{Text:I,Title:N,Paragraph:B}=O.Typography,z=()=>{let e,r=L(),{data:o,isLoading:a,isError:i,refetch:l}=(0,n.useQuery)({queryKey:["blogPosts"],queryFn:C,staleTime:36e5,retry:1,retryDelay:0});return r?null:(e=a?[{key:"loading",label:(0,t.jsx)(k.LoadingOutlined,{}),disabled:!0}]:i?[{key:"error",label:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(I,{type:"danger",children:"Failed to load posts"}),(0,t.jsx)(x.Button,{size:"small",onClick:()=>l(),children:"Retry"})]}),disabled:!0}]:o&&0!==o.posts.length?[...o.posts.slice(0,5).map(e=>({key:e.url,label:(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{display:"block",width:380},children:[(0,t.jsx)(N,{level:5,style:{marginBottom:2},children:e.title}),(0,t.jsx)(I,{type:"secondary",style:{fontSize:11},children:new Date(e.date+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),(0,t.jsx)(B,{ellipsis:{rows:2},children:e.description})]})})),{type:"divider"},{key:"view-all",label:(0,t.jsx)("a",{href:"https://docs.litellm.ai/blog",target:"_blank",rel:"noopener noreferrer",children:"View all posts"})}]:[{key:"empty",label:(0,t.jsx)(I,{type:"secondary",children:"No posts available"}),disabled:!0}],(0,t.jsx)(T.Dropdown,{menu:{items:e},trigger:["hover"],placement:"bottomRight",children:(0,t.jsx)(x.Button,{type:"text",children:"Blog"})}))};function R(e){let t=t=>{"disableShowPrompts"===t.key&&e()},r=t=>{let{key:r}=t.detail;"disableShowPrompts"===r&&e()};return window.addEventListener("storage",t),window.addEventListener(l.LOCAL_STORAGE_EVENT,r),()=>{window.removeEventListener("storage",t),window.removeEventListener(l.LOCAL_STORAGE_EVENT,r)}}function U(){return"true"===(0,l.getLocalStorageItem)("disableShowPrompts")}function M(){return(0,s.useSyncExternalStore)(R,U)}e.s(["useDisableShowPrompts",()=>M],636772);let A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"outlined"};var D=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:A}))});let $={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M409.4 128c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h76.7v-76.8c0-42.3-34.3-76.7-76.7-76.8zm0 204.8H204.7c-42.4 0-76.7 34.4-76.7 76.8s34.4 76.8 76.7 76.8h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.8-76.6-76.8zM614 486.4c42.4 0 76.8-34.4 76.7-76.8V204.8c0-42.4-34.3-76.8-76.7-76.8-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.5 34.3 76.8 76.7 76.8zm281.4-76.8c0-42.4-34.4-76.8-76.7-76.8S742 367.2 742 409.6v76.8h76.7c42.3 0 76.7-34.4 76.7-76.8zm-76.8 128H614c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM614 742.4h-76.7v76.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM409.4 537.6c-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8V614.4c0-20.3-8.1-39.9-22.4-54.3a76.92 76.92 0 00-54.3-22.5zM128 614.4c0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5c42.4 0 76.8-34.4 76.7-76.8v-76.8h-76.7c-42.3 0-76.7 34.4-76.7 76.8z"}}]},name:"slack",theme:"outlined"};var F=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:$}))});let H=()=>M()?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Button,{href:"https://www.litellm.ai/support",target:"_blank",rel:"noopener noreferrer",icon:(0,t.jsx)(F,{}),className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",children:"Join Slack"}),(0,t.jsx)(x.Button,{href:"https://github.com/BerriAI/litellm",target:"_blank",rel:"noopener noreferrer",className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",icon:(0,t.jsx)(D,{}),children:"Star us on GitHub"})]});var V=e.i(135214),K=e.i(371401),W=e.i(100486),G=e.i(755151);let q={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};var Q=s.forwardRef(function(e,t){return s.createElement(w.default,(0,y.default)({},e,{ref:t,icon:q}))}),X=e.i(948401),J=e.i(602073),Z=e.i(771674),Y=e.i(312361),ee=e.i(592968);let{Text:et}=O.Typography,er=({onLogout:e})=>{let{userId:r,userEmail:n,userRole:o,premiumUser:a}=(0,V.default)(),i=M(),c=(0,K.useDisableUsageIndicator)(),u=L(),f=d(),[h,m]=(0,s.useState)(!1);(0,s.useEffect)(()=>{m("true"===(0,l.getLocalStorageItem)("disableShowNewBadge"))},[]);let g=[{key:"logout",label:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Q,{}),"Logout"]}),onClick:e}];return(0,t.jsx)(T.Dropdown,{menu:{items:g},popupRender:e=>(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-lg",children:[(0,t.jsxs)(P.Space,{direction:"vertical",size:"small",style:{width:"100%",padding:"12px"},children:[(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(X.MailOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:n||"-"})]}),a?(0,t.jsx)(j.Tag,{icon:(0,t.jsx)(W.CrownOutlined,{}),color:"gold",children:"Premium"}):(0,t.jsx)(ee.Tooltip,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,t.jsx)(j.Tag,{icon:(0,t.jsx)(W.CrownOutlined,{}),children:"Standard"})})]}),(0,t.jsx)(Y.Divider,{style:{margin:"8px 0"}}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Z.UserOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:"User ID"})]}),(0,t.jsx)(et,{copyable:!0,ellipsis:!0,style:{maxWidth:"150px"},title:r||"-",children:r||"-"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(J.SafetyOutlined,{}),(0,t.jsx)(et,{type:"secondary",children:"Role"})]}),(0,t.jsx)(et,{children:o})]}),(0,t.jsx)(Y.Divider,{style:{margin:"8px 0"}}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide New Feature Indicators"}),(0,t.jsx)(b.Switch,{size:"small",checked:h,onChange:e=>{m(e),e?(0,l.setLocalStorageItem)("disableShowNewBadge","true"):(0,l.removeLocalStorageItem)("disableShowNewBadge"),(0,l.emitLocalStorageChange)("disableShowNewBadge")},"aria-label":"Toggle hide new feature indicators"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide All Prompts"}),(0,t.jsx)(b.Switch,{size:"small",checked:i,onChange:e=>{e?(0,l.setLocalStorageItem)("disableShowPrompts","true"):(0,l.removeLocalStorageItem)("disableShowPrompts"),(0,l.emitLocalStorageChange)("disableShowPrompts")},"aria-label":"Toggle hide all prompts"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Usage Indicator"}),(0,t.jsx)(b.Switch,{size:"small",checked:c,onChange:e=>{e?(0,l.setLocalStorageItem)("disableUsageIndicator","true"):(0,l.removeLocalStorageItem)("disableUsageIndicator"),(0,l.emitLocalStorageChange)("disableUsageIndicator")},"aria-label":"Toggle hide usage indicator"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Blog Posts"}),(0,t.jsx)(b.Switch,{size:"small",checked:u,onChange:e=>{e?(0,l.setLocalStorageItem)("disableBlogPosts","true"):(0,l.removeLocalStorageItem)("disableBlogPosts"),(0,l.emitLocalStorageChange)("disableBlogPosts")},"aria-label":"Toggle hide blog posts"})]}),(0,t.jsxs)(P.Space,{style:{width:"100%",justifyContent:"space-between"},children:[(0,t.jsx)(et,{type:"secondary",children:"Hide Bouncing Icon"}),(0,t.jsx)(b.Switch,{size:"small",checked:f,onChange:e=>{e?(0,l.setLocalStorageItem)("disableBouncingIcon","true"):(0,l.removeLocalStorageItem)("disableBouncingIcon"),(0,l.emitLocalStorageChange)("disableBouncingIcon")},"aria-label":"Toggle hide bouncing icon"})]})]}),(0,t.jsx)(Y.Divider,{style:{margin:0}}),s.default.cloneElement(e,{style:{boxShadow:"none"}})]}),children:(0,t.jsx)(x.Button,{type:"text",children:(0,t.jsxs)(P.Space,{children:[(0,t.jsx)(Z.UserOutlined,{}),(0,t.jsx)(et,{children:"User"}),(0,t.jsx)(G.DownOutlined,{})]})})})};var en=e.i(199133),eo=e.i(295320),ea=e.i(283713);let ei=({onWorkerSwitch:e})=>{let{isControlPlane:r,selectedWorker:n,workers:o}=(0,ea.useWorker)();return r&&n?(0,t.jsx)(en.Select,{showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),value:n.worker_id,style:{minWidth:180},suffixIcon:(0,t.jsx)(eo.CloudServerOutlined,{}),options:o.map(e=>({label:e.name,value:e.worker_id,disabled:e.worker_id===n.worker_id})),onChange:t=>{e(t)}}):null};e.s(["default",0,({userID:e,userEmail:n,userRole:o,premiumUser:a,proxySettings:l,setProxySettings:c,accessToken:u,isPublicPage:y=!1,sidebarCollapsed:w=!1,onToggleSidebar:b,isDarkMode:E,toggleDarkMode:_})=>{let L=(0,r.getProxyBaseUrl)(),[C,k]=(0,s.useState)(""),{logoUrl:T}=(0,f.useTheme)(),{data:P}=i(),O=P?.litellm_version,I=d(),N=T||`${L}/get_image`;return(0,s.useEffect)(()=>{(async()=>{if(u){let e=await (0,g.fetchProxySettings)(u);console.log("response from fetchProxySettings",e),e&&c(e)}})()},[u]),(0,s.useEffect)(()=>{k(l?.PROXY_LOGOUT_URL||"")},[l]),(0,t.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)("div",{className:"flex items-center h-14 px-4",children:[(0,t.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[b&&(0,t.jsx)("button",{onClick:b,className:"flex items-center justify-center w-10 h-10 mr-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded transition-colors",title:w?"Expand sidebar":"Collapse sidebar",children:(0,t.jsx)("span",{className:"text-lg",children:w?(0,t.jsx)(v.MenuUnfoldOutlined,{}):(0,t.jsx)(p.MenuFoldOutlined,{})})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.default,{href:L||"/",className:"flex items-center",children:(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"h-10 max-w-48 flex items-center justify-center overflow-hidden",children:(0,t.jsx)("img",{src:N,alt:"LiteLLM Brand",className:"max-w-full max-h-full w-auto h-auto object-contain"})})})}),O&&(0,t.jsxs)("div",{className:"relative",children:[!I&&(0,t.jsx)("span",{className:"absolute -top-1 -left-2 text-lg animate-bounce",style:{animationDuration:"2s"},title:"Thanks for using LiteLLM!",children:"🌑"}),(0,t.jsx)(j.Tag,{className:"relative text-xs font-medium cursor-pointer z-10",children:(0,t.jsxs)("a",{href:"https://docs.litellm.ai/release_notes",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0",children:["v",O]})})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,t.jsx)(ei,{onWorkerSwitch:e=>{(0,h.clearTokenCookies)(),(0,m.clearStoredReturnUrl)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=`/ui/login?worker=${encodeURIComponent(e)}`}}),(0,t.jsx)(H,{}),!1,(0,t.jsx)(x.Button,{type:"text",href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",children:"Docs"}),(0,t.jsx)(z,{}),!y&&(0,t.jsx)(er,{onLogout:()=>{(0,h.clearTokenCookies)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=C}})]})]})})})}],402874)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9984a74a61012f00.js b/litellm/proxy/_experimental/out/_next/static/chunks/9984a74a61012f00.js deleted file mode 100644 index b409c4ff125..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/9984a74a61012f00.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,214541,e=>{"use strict";var t=e.i(271645),a=e.i(135214),s=e.i(270345);e.s(["default",0,()=>{let[e,l]=(0,t.useState)([]),{accessToken:i,userId:r,userRole:n}=(0,a.default)();return(0,t.useEffect)(()=>{(async()=>{l(await (0,s.fetchTeams)(i,r,n,null))})()},[i,r,n]),{teams:e,setTeams:l}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function a(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function s(e,s){let l=t(e);return isNaN(s)?a(e,NaN):(s&&l.setDate(l.getDate()+s),l)}function l(e,s){let l=t(e);if(isNaN(s))return a(e,NaN);if(!s)return l;let i=l.getDate(),r=a(e,l.getTime());return(r.setMonth(l.getMonth()+s+1,0),i>=r.getDate())?r:(l.setFullYear(r.getFullYear(),r.getMonth(),i),l)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>a],96226),e.s(["addDays",()=>s],439189),e.s(["addMonths",()=>l],497245)},891547,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,disabled:o})=>{let[c,u]=(0,a.useState)([]),[d,m]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){m(!0);try{let e=await (0,l.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),u(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{m(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:i,loading:d,className:r,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),l=e.i(764205);function i(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${s})${e.description?` — ${e.description}`:""}`,value:"production"===s?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:r,className:n,accessToken:o,disabled:c,onPoliciesLoaded:u})=>{let[d,m]=(0,a.useState)([]),[h,f]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){f(!0);try{let e=await (0,l.getPoliciesList)(o);e.policies&&(m(e.policies),u?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{f(!1)}}})()},[o,u]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:r,loading:h,className:n,allowClear:!0,options:i(d),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>i])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var l=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(l.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["ClockCircleOutlined",0,i],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var l=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(l.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["ArrowLeftOutlined",0,i],447566)},954616,e=>{"use strict";var t=e.i(271645),a=e.i(114272),s=e.i(540143),l=e.i(915823),i=e.i(619273),r=class extends l.Subscribable{#e;#t=void 0;#a;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#l(),this.#i()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#l(){let e=this.#a?.state??(0,a.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,a,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,a,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,a){let l=(0,n.useQueryClient)(a),[o]=t.useState(()=>new r(l,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=t.useCallback((e,t)=>{o.mutate(e,t).catch(i.noop)},[o]);if(c.error&&(0,i.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:u,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(529681),l=e.i(908286),i=e.i(242064),r=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],u=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let s,l,i;return(0,a.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(l={},u.forEach(a=>{l[`${e}-align-${a}`]=t.align===a}),l[`${e}-align-stretch`]=!t.align&&!!t.vertical,l)),(i={},c.forEach(a=>{i[`${e}-justify-${a}`]=t.justify===a}),i)))},m=(0,r.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:a,paddingLG:s}=e,l=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:a,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(l),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(l),(e=>{let{componentCls:t}=e,a={};return o.forEach(e=>{a[`${t}-wrap-${e}`]={flexWrap:e}}),a})(l),(e=>{let{componentCls:t}=e,a={};return u.forEach(e=>{a[`${t}-align-${e}`]={alignItems:e}}),a})(l),(e=>{let{componentCls:t}=e,a={};return c.forEach(e=>{a[`${t}-justify-${e}`]={justifyContent:e}}),a})(l)]},()=>({}),{resetStyle:!1});var h=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,s=Object.getOwnPropertySymbols(e);lt.indexOf(s[l])&&Object.prototype.propertyIsEnumerable.call(e,s[l])&&(a[s[l]]=e[s[l]]);return a};let f=t.default.forwardRef((e,r)=>{let{prefixCls:n,rootClassName:o,className:c,style:u,flex:f,gap:p,vertical:g=!1,component:x="div",children:y}=e,b=h(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:v,direction:j,getPrefixCls:w}=t.default.useContext(i.ConfigContext),C=w("flex",n),[S,N,_]=m(C),k=null!=g?g:null==v?void 0:v.vertical,O=(0,a.default)(c,o,null==v?void 0:v.className,C,N,_,d(C,e),{[`${C}-rtl`]:"rtl"===j,[`${C}-gap-${p}`]:(0,l.isPresetSize)(p),[`${C}-vertical`]:k}),E=Object.assign(Object.assign({},null==v?void 0:v.style),u);return f&&(E.flex=f),p&&!(0,l.isPresetSize)(p)&&(E.gap=p),S(t.default.createElement(x,Object.assign({ref:r,className:O,style:E},(0,s.default)(b,["justify","wrap","align"])),y))});e.s(["Flex",0,f],525720)},969550,e=>{"use strict";var t=e.i(843476),a=e.i(271645);let s=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});var l=e.i(464571),i=e.i(311451),r=e.i(199133),n=e.i(374009);e.s(["default",0,({options:e,onApplyFilters:o,onResetFilters:c,initialValues:u={},buttonLabel:d="Filters"})=>{let[m,h]=(0,a.useState)(!1),[f,p]=(0,a.useState)(u),[g,x]=(0,a.useState)({}),[y,b]=(0,a.useState)({}),[v,j]=(0,a.useState)({}),[w,C]=(0,a.useState)({}),S=(0,a.useCallback)((0,n.default)(async(e,t)=>{if(t.isSearchable&&t.searchFn){b(e=>({...e,[t.name]:!0}));try{let a=await t.searchFn(e);x(e=>({...e,[t.name]:a}))}catch(e){console.error("Error searching:",e),x(e=>({...e,[t.name]:[]}))}finally{b(e=>({...e,[t.name]:!1}))}}},300),[]),N=(0,a.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){b(t=>({...t,[e.name]:!0})),C(t=>({...t,[e.name]:!0}));try{let t=await e.searchFn("");x(a=>({...a,[e.name]:t}))}catch(t){console.error("Error loading initial options:",t),x(t=>({...t,[e.name]:[]}))}finally{b(t=>({...t,[e.name]:!1}))}}},[w]);(0,a.useEffect)(()=>{m&&e.forEach(e=>{e.isSearchable&&!w[e.name]&&N(e)})},[m,e,N,w]);let _=(e,t)=>{let a={...f,[e]:t};p(a),o(a)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.Button,{icon:(0,t.jsx)(s,{className:"h-4 w-4"}),onClick:()=>h(!m),className:"flex items-center gap-2",children:d}),(0,t.jsx)(l.Button,{onClick:()=>{let t={};e.forEach(e=>{t[e.name]=""}),p(t),c()},children:"Reset Filters"})]}),m&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(a=>{let s,l=e.find(e=>e.label===a||e.name===a);return l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:l.label||l.name}),l.isSearchable?(0,t.jsx)(r.Select,{showSearch:!0,className:"w-full",placeholder:`Search ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>_(l.name,e),onOpenChange:e=>{e&&l.isSearchable&&!w[l.name]&&N(l)},onSearch:e=>{j(t=>({...t,[l.name]:e})),l.searchFn&&S(e,l)},filterOption:!1,loading:y[l.name],options:g[l.name]||[],allowClear:!0,notFoundContent:y[l.name]?"Loading...":"No results found"}):l.options?(0,t.jsx)(r.Select,{className:"w-full",placeholder:`Select ${l.label||l.name}...`,value:f[l.name]||void 0,onChange:e=>_(l.name,e),allowClear:!0,children:l.options.map(e=>(0,t.jsx)(r.Select.Option,{value:e.value,children:e.label},e.value))}):l.customComponent?(s=l.customComponent,(0,t.jsx)(s,{value:f[l.name]||void 0,onChange:e=>_(l.name,e??""),placeholder:`Select ${l.label||l.name}...`})):(0,t.jsx)(i.Input,{className:"w-full",placeholder:`Enter ${l.label||l.name}...`,value:f[l.name]||"",onChange:e=>_(l.name,e.target.value),allowClear:!0})]},l.name):null})})]})}],969550)},633627,e=>{"use strict";var t=e.i(764205);let a=(e,t,a,s)=>{for(let l of e){let e=l?.key_alias;e&&"string"==typeof e&&t.add(e.trim());let i=l?.organization_id??l?.org_id;i&&"string"==typeof i&&a.add(i.trim());let r=l?.user_id;if(r&&"string"==typeof r){let e=l?.user?.user_email||r;s.set(r,e)}}},s=async(e,s)=>{if(!e||!s)return{keyAliases:[],organizationIds:[],userIds:[]};try{let l=new Set,i=new Set,r=new Map,n=await (0,t.keyListCall)(e,null,s,null,null,null,1,100,null,null,"user",null),o=n?.keys||[],c=n?.total_pages??1;a(o,l,i,r);let u=Math.min(c,10)-1;if(u>0){let n=Array.from({length:u},(a,l)=>(0,t.keyListCall)(e,null,s,null,null,null,l+2,100,null,null,"user",null));for(let e of(await Promise.allSettled(n)))"fulfilled"===e.status&&a(e.value?.keys||[],l,i,r)}return{keyAliases:Array.from(l).sort(),organizationIds:Array.from(i).sort(),userIds:Array.from(r.entries()).map(([e,t])=>({id:e,email:t}))}}catch(e){return console.error("Error fetching team filter options:",e),{keyAliases:[],organizationIds:[],userIds:[]}}},l=async(e,a)=>{if(!e)return[];try{let s=[],l=1,i=!0;for(;i;){let r=await (0,t.teamListCall)(e,a||null,null);s=[...s,...r],l{if(!e)return[];try{let a=[],s=1,l=!0;for(;l;){let i=await (0,t.organizationListCall)(e);a=[...a,...i],s{"use strict";var t=e.i(764205);let a=async(e,a,s,l,i)=>{let r;r="Admin"!=s&&"Admin Viewer"!=s?await (0,t.teamListCall)(e,l?.organization_id||null,a):await (0,t.teamListCall)(e,l?.organization_id||null),console.log(`givenTeams: ${r}`),i(r)};e.s(["fetchTeams",0,a])},54943,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var l=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(l.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["SaveOutlined",0,i],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},621192,e=>{"use strict";let t=e.i(264042).Row;e.s(["Row",0,t],621192)},178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var l=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(l.default,(0,t.default)({},e,{ref:i,icon:s}))});e.s(["ReloadOutlined",0,i],91979)},468133,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(175712),l=e.i(464571),i=e.i(28651),r=e.i(898586),n=e.i(482725),o=e.i(199133),c=e.i(262218),u=e.i(621192),d=e.i(178654),m=e.i(751904),h=e.i(987432),f=e.i(764205),p=e.i(860585),g=e.i(355619),x=e.i(727749),y=e.i(162386);let{Title:b,Text:v}=r.Typography,j=["/key/generate","/key/update","/key/delete","/key/regenerate","/key/service-account/generate","/key/{key_id}/regenerate","/key/block","/key/unblock","/key/bulk_update","/key/{key_id}/reset_spend","/key/info","/key/list","/key/aliases","/team/daily/activity"],w=({label:e,description:a,isEditing:s,viewContent:l,editContent:i})=>(0,t.jsxs)(u.Row,{className:"py-5 border-b border-gray-100 last:border-0",children:[(0,t.jsxs)(d.Col,{span:8,className:"pr-6",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-gray-900",children:e}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-1 leading-relaxed",children:a})]}),(0,t.jsx)(d.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:s?i:l})})]}),C=()=>(0,t.jsx)(v,{className:"text-gray-400 italic",children:"Not set"}),S=(e,a)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(c.Tag,{color:"blue",children:a?a(e):e},e))}):(0,t.jsx)(C,{}),N={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[r,u]=(0,a.useState)(!0),[d,_]=(0,a.useState)(N),[k,O]=(0,a.useState)(!1),[E,M]=(0,a.useState)(N),[T,R]=(0,a.useState)(!1),[$,L]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{if(!e)return u(!1);try{let t=await (0,f.getDefaultTeamSettings)(e),a={...N,...t.values||{}};_(a),M(a)}catch(e){console.error("Error fetching team SSO settings:",e),L(!0),x.default.fromBackend("Failed to fetch team settings")}finally{u(!1)}})()},[e]);let z=async()=>{if(e){R(!0);try{let t=await (0,f.updateDefaultTeamSettings)(e,E),a={...N,...t.settings||{}};_(a),M(a),O(!1),x.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.default.fromBackend("Failed to update team settings")}finally{R(!1)}}},D=(e,t)=>{M(a=>({...a,[e]:t}))};return r?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(n.Spin,{size:"large"})}):$?(0,t.jsx)(s.Card,{children:(0,t.jsx)(v,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(s.Card,{styles:{body:{padding:32}},children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(b,{level:3,className:"m-0 text-gray-900",children:"Default Team Settings"}),(0,t.jsx)(v,{className:"text-gray-500 mt-1 block",children:"These settings will be applied by default when creating new teams."})]}),(0,t.jsx)("div",{children:k?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(l.Button,{onClick:()=>{O(!1),M(d)},disabled:T,children:"Cancel"}),(0,t.jsx)(l.Button,{type:"primary",onClick:z,loading:T,icon:(0,t.jsx)(h.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(l.Button,{onClick:()=>O(!0),icon:(0,t.jsx)(m.EditOutlined,{}),children:"Edit Settings"})})]}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:k,viewContent:null!=d.max_budget?(0,t.jsxs)(v,{children:["$",Number(d.max_budget).toLocaleString()]}):(0,t.jsx)(C,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:E.max_budget,onChange:e=>D("max_budget",e),placeholder:"Not set",prefix:"$",min:0})}),(0,t.jsx)(w,{label:"Budget Duration",description:"How frequently the team's budget resets.",isEditing:k,viewContent:d.budget_duration?(0,t.jsx)(v,{children:(0,p.getBudgetDurationLabel)(d.budget_duration)}):(0,t.jsx)(C,{}),editContent:(0,t.jsx)(p.default,{value:E.budget_duration||null,onChange:e=>D("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(w,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:k,viewContent:null!=d.tpm_limit?(0,t.jsx)(v,{children:d.tpm_limit.toLocaleString()}):(0,t.jsx)(C,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:E.tpm_limit,onChange:e=>D("tpm_limit",e),placeholder:"Not set",min:0})}),(0,t.jsx)(w,{label:"RPM Limit",description:"Maximum requests per minute allowed across all models.",isEditing:k,viewContent:null!=d.rpm_limit?(0,t.jsx)(v,{children:d.rpm_limit.toLocaleString()}):(0,t.jsx)(C,{}),editContent:(0,t.jsx)(i.InputNumber,{className:"w-full",style:{maxWidth:320},value:E.rpm_limit,onChange:e=>D("rpm_limit",e),placeholder:"Not set",min:0})})]})]}),(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("div",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:"Access & Permissions"}),(0,t.jsxs)("div",{className:"border-t border-gray-100",children:[(0,t.jsx)(w,{label:"Models",description:"Default list of models that new teams can access.",isEditing:k,viewContent:S(d.models,g.getModelDisplayName),editContent:(0,t.jsx)(y.ModelSelect,{value:E.models||[],onChange:e=>D("models",e),context:"global",style:{width:"100%"},options:{includeSpecialOptions:!0}})}),(0,t.jsx)(w,{label:"Team Member Permissions",description:"Default permissions granted to members of newly created teams. /key/info and /key/health are always included.",isEditing:k,viewContent:S(d.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:E.team_member_permissions||[],onChange:e=>D("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:a,onClose:s})=>(0,t.jsx)(c.Tag,{color:"blue",closable:a,onClose:s,className:"mr-1 mt-1 mb-1",children:e}),children:j.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},747871,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(269200),l=e.i(942232),i=e.i(977572),r=e.i(427612),n=e.i(64848),o=e.i(496020),c=e.i(304967),u=e.i(994388),d=e.i(599724),m=e.i(389083),h=e.i(764205),f=e.i(727749);e.s(["default",0,({accessToken:e,userID:p})=>{let[g,x]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(e&&p)try{let t=await (0,h.availableTeamListCall)(e);x(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,p]);let y=async t=>{if(e&&p)try{await (0,h.teamMemberAddCall)(e,t,{user_id:p,role:"user"}),f.default.success("Successfully joined team"),x(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),f.default.fromBackend("Failed to join team")}};return(0,t.jsx)(c.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(s.Table,{children:[(0,t.jsx)(r.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(n.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(n.TableHeaderCell,{children:"Description"}),(0,t.jsx)(n.TableHeaderCell,{children:"Members"}),(0,t.jsx)(n.TableHeaderCell,{children:"Models"}),(0,t.jsx)(n.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(l.TableBody,{children:[g.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(d.Text,{children:e.team_alias})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(d.Text,{children:e.description||"No description available"})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsxs)(d.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,a)=>(0,t.jsx)(m.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(d.Text,{children:e.length>30?`${e.slice(0,30)}...`:e})},a)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(d.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(i.TableCell,{children:(0,t.jsx)(u.Button,{size:"xs",variant:"secondary",onClick:()=>y(e.team_id),children:"Join Team"})})]},e.team_id)),0===g.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(i.TableCell,{colSpan:5,className:"text-center",children:(0,t.jsxs)(d.Text,{children:["No available teams to join. See how to set available teams"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/self_serve#all-settings-for-self-serve--sso-flow",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 underline",children:"here"}),"."]})})})]})]})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/9c8f0f460dea2bbd.js b/litellm/proxy/_experimental/out/_next/static/chunks/9c8f0f460dea2bbd.js new file mode 100644 index 00000000000..dfa662ae822 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/9c8f0f460dea2bbd.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,596115,e=>{"use strict";var s=e.i(843476),l=e.i(271645),a=e.i(764205),t=e.i(584578),r=e.i(808613),i=e.i(56567),o=e.i(468133),n=e.i(708347),d=e.i(304967),c=e.i(994388),m=e.i(309426),u=e.i(599724),h=e.i(350967),x=e.i(404206),p=e.i(747871),g=e.i(500330),_=e.i(752978),j=e.i(197647),f=e.i(653824),b=e.i(881073),v=e.i(723731),y=e.i(278587);let w=({lastRefreshed:e,onRefresh:l,userRole:a,children:t})=>(0,s.jsxs)(f.TabGroup,{className:"gap-2 h-[75vh] w-full",children:[(0,s.jsxs)(b.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)(j.Tab,{children:"Your Teams"}),(0,s.jsx)(j.Tab,{children:"Available Teams"}),(0,n.isAdminRole)(a||"")&&(0,s.jsx)(j.Tab,{children:"Default Team Settings"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[e&&(0,s.jsxs)(u.Text,{children:["Last Refreshed: ",e]}),(0,s.jsx)(_.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:l})]})]}),(0,s.jsx)(v.TabPanels,{children:t})]});var T=e.i(206929),C=e.i(35983);let N=({filters:e,organizations:l,showFilters:a,onToggleFilters:t,onChange:r,onReset:i})=>(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Search by Team Name...",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e.team_alias,onChange:e=>r("team_alias",e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,s.jsxs)("button",{className:`px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ${a?"bg-gray-100":""}`,onClick:()=>t(!a),children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters",(e.team_id||e.team_alias||e.organization_id)&&(0,s.jsx)("span",{"data-testid":"active-filter-indicator",className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:i,children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Reset Filters"]})]}),a&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Enter Team ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:e.team_id,onChange:e=>r("team_id",e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsx)(T.Select,{value:e.organization_id||"",onValueChange:e=>r("organization_id",e),placeholder:"Select Organization",children:l?.map(e=>(0,s.jsx)(C.SelectItem,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]});var S=e.i(135214),k=e.i(269200),I=e.i(942232),F=e.i(977572),A=e.i(427612),z=e.i(64848),M=e.i(496020),O=e.i(592968),P=e.i(591935),L=e.i(68155),D=e.i(389083),E=e.i(871943),B=e.i(502547),R=e.i(355619);let V=({team:e})=>{let[a,t]=(0,l.useState)(!1),r=!e.models||0===e.models.length||e.models.includes("all-proxy-models"),i=(0,l.useMemo)(()=>{if(r)return[];let s=e.models.map(e=>({name:e,source:"direct"}));for(let l of e.access_group_models||[])s.push({name:l,source:"access_group"});return s},[e.models,e.access_group_models,r]),o=(e,l)=>{if("all-proxy-models"===e.name)return(0,s.jsx)(D.Badge,{size:"xs",color:"red",children:(0,s.jsx)(u.Text,{children:"All Proxy Models"})},l);let a=(0,R.getModelDisplayName)(e.name),t=a.length>30?`${a.slice(0,30)}...`:a;return(0,s.jsx)(D.Badge,{size:"xs",color:"access_group"===e.source?"green":"blue",title:"access_group"===e.source?"From access group":"Direct assignment",children:(0,s.jsx)(u.Text,{children:t})},l)};return(0,s.jsx)(F.TableCell,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:i.length>3?"px-0":"",children:(0,s.jsx)("div",{className:"flex flex-col",children:0===i.length?(0,s.jsx)(D.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,s.jsx)(u.Text,{children:"All Proxy Models"})}):(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("div",{className:"flex items-start",children:[i.length>3&&(0,s.jsx)("div",{children:(0,s.jsx)(_.Icon,{icon:a?E.ChevronDownIcon:B.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{t(e=>!e)}})}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[i.slice(0,3).map((e,s)=>o(e,s)),i.length>3&&!a&&(0,s.jsx)(D.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,s.jsxs)(u.Text,{children:["+",i.length-3," ",i.length-3==1?"more model":"more models"]})}),a&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:i.slice(3).map((e,s)=>o(e,s+3))})]})]})})})})};var H=e.i(918549),H=H,W=e.i(846753),W=W;let U=({team:e,userId:l})=>{var a;let t,r=(a=((e,s)=>{if(!s)return null;let l=e.members_with_roles?.find(e=>e.user_id===s);return l?.role??null})(e,l),t="inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border","admin"===a?(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#EEF2FF",color:"#3730A3",borderColor:"#C7D2FE"},children:[(0,s.jsx)(H.default,{className:"h-3 w-3 mr-1"}),"Admin"]}):(0,s.jsxs)("span",{className:t,style:{backgroundColor:"#F3F4F6",color:"#4B5563",borderColor:"#E5E7EB"},children:[(0,s.jsx)(W.default,{className:"h-3 w-3 mr-1"}),"Member"]}));return(0,s.jsx)(F.TableCell,{children:r})},G=({teams:e,currentOrg:l,setSelectedTeamId:a,perTeamInfo:t,userRole:r,userId:i,setEditTeam:o,onDeleteTeam:n})=>(0,s.jsxs)(k.Table,{children:[(0,s.jsx)(A.TableHead,{children:(0,s.jsxs)(M.TableRow,{children:[(0,s.jsx)(z.TableHeaderCell,{children:"Team Name"}),(0,s.jsx)(z.TableHeaderCell,{children:"Team ID"}),(0,s.jsx)(z.TableHeaderCell,{children:"Created"}),(0,s.jsx)(z.TableHeaderCell,{children:"Spend (USD)"}),(0,s.jsx)(z.TableHeaderCell,{children:"Budget (USD)"}),(0,s.jsx)(z.TableHeaderCell,{children:"Models"}),(0,s.jsx)(z.TableHeaderCell,{children:"Organization"}),(0,s.jsx)(z.TableHeaderCell,{children:"Your Role"}),(0,s.jsx)(z.TableHeaderCell,{children:"Info"})]})}),(0,s.jsx)(I.TableBody,{children:e&&e.length>0?e.filter(e=>!l||e.organization_id===l.organization_id).sort((e,s)=>new Date(s.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,s.jsxs)(M.TableRow,{children:[(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,s.jsx)(F.TableCell,{children:(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(O.Tooltip,{title:e.team_id,children:(0,s.jsxs)(c.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>{a(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,g.formatNumberWithCommas)(e.spend,4)}),(0,s.jsx)(F.TableCell,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:null!==e.max_budget&&void 0!==e.max_budget?e.max_budget:"No limit"}),(0,s.jsx)(V,{team:e}),(0,s.jsx)(F.TableCell,{children:e.organization_id}),(0,s.jsx)(U,{team:e,userId:i}),(0,s.jsxs)(F.TableCell,{children:[(0,s.jsxs)(u.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].keys&&t[e.team_id].keys.length," ","Keys"]}),(0,s.jsxs)(u.Text,{children:[t&&e.team_id&&t[e.team_id]&&t[e.team_id].team_info&&t[e.team_id].team_info.members_with_roles&&t[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,s.jsx)(F.TableCell,{children:"Admin"==r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.Icon,{icon:P.PencilAltIcon,size:"sm",onClick:()=>{a(e.team_id),o(!0)}}),(0,s.jsx)(_.Icon,{onClick:()=>n(e.team_id),icon:L.TrashIcon,size:"sm"})]}):null})]},e.team_id)):null})]});var J=e.i(582458),J=J,$=e.i(995926);let K=({teams:e,teamToDelete:a,onCancel:t,onConfirm:r})=>{let[i,o]=(0,l.useState)(""),n=e?.find(e=>e.team_id===a),d=n?.team_alias||"",c=n?.keys?.length||0,m=i===d;return(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl min-h-[380px] py-6 overflow-hidden transform transition-all flex flex-col justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,s.jsx)("button",{"aria-label":"Close",onClick:()=>{t(),o("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,s.jsx)($.XIcon,{size:20})})]}),(0,s.jsxs)("div",{className:"px-6 py-4",children:[c>0&&(0,s.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,s.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,s.jsx)(J.default,{size:20})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",c," associated key",c>1?"s":"","."]}),(0,s.jsx)("p",{className:"text-base text-red-600 mt-2",children:"Deleting the team will also delete all associated keys. This action is irreversible."})]})]}),(0,s.jsx)("p",{className:"text-base text-gray-600 mb-5",children:"Are you sure you want to force delete this team and all its keys?"}),(0,s.jsxs)("div",{className:"mb-5",children:[(0,s.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,s.jsx)("span",{className:"underline",children:d})," to confirm deletion:"]}),(0,s.jsx)("input",{type:"text",value:i,onChange:e=>o(e.target.value),placeholder:"Enter team name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]})]})]}),(0,s.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,s.jsx)("button",{onClick:()=>{t(),o("")},className:"px-5 py-3 bg-white border border-gray-300 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),(0,s.jsx)("button",{onClick:r,disabled:!m,className:`px-5 py-3 rounded-md text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ${m?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"}`,children:"Force Delete"})]})]})})};var q=e.i(464571),Y=e.i(311451),X=e.i(212931),Q=e.i(199133),Z=e.i(790848),ee=e.i(677667),es=e.i(130643),el=e.i(898667),ea=e.i(779241),et=e.i(827252),er=e.i(435451),ei=e.i(916940),eo=e.i(75921),en=e.i(552130),ed=e.i(651904),ec=e.i(533882),em=e.i(727749),eu=e.i(390605);let eh=({isTeamModalVisible:e,handleOk:t,handleCancel:i,currentOrg:o,organizations:n,teams:d,setTeams:c,modelAliases:m,setModelAliases:h,loggingSettings:x,setLoggingSettings:p,setIsTeamModalVisible:g})=>{let{userId:_,userRole:j,accessToken:f,premiumUser:b}=(0,S.default)(),[v]=r.Form.useForm(),[y,w]=(0,l.useState)([]),[T,C]=(0,l.useState)(null),[N,k]=(0,l.useState)([]),[I,F]=(0,l.useState)([]),[A,z]=(0,l.useState)([]),[M,P]=(0,l.useState)([]),[L,D]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{try{if(null===_||null===j||null===f)return;let e=await (0,R.fetchAvailableModelsForTeamOrKey)(_,j,f);e&&w(e)}catch(e){console.error("Error fetching user models:",e)}})()},[f,_,j,d]),(0,l.useEffect)(()=>{let e;console.log(`currentOrgForCreateTeam: ${T}`);let s=(e=[],T&&T.models.length>0?(console.log(`organization.models: ${T.models}`),e=T.models):e=y,(0,R.unfurlWildcardModelsInList)(e,y));console.log(`models: ${s}`),k(s),v.setFieldValue("models",[])},[T,y,v]);let E=async()=>{try{if(null==f)return;let e=await (0,a.fetchMCPAccessGroups)(f);P(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,l.useEffect)(()=>{E()},[f,E]),(0,l.useEffect)(()=>{let e=async()=>{try{if(null==f)return;let e=(await (0,a.getPoliciesList)(f)).policies.map(e=>e.policy_name);z(e)}catch(e){console.error("Failed to fetch policies:",e)}};(async()=>{try{if(null==f)return;let e=(await (0,a.getGuardrailsList)(f)).guardrails.map(e=>e.guardrail_name);F(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e()},[f]);let B=async e=>{try{if(console.log(`formValues: ${JSON.stringify(e)}`),null!=f){let s=e?.team_alias,l=d?.map(e=>e.team_alias)??[],t=e?.organization_id||o?.organization_id;if(""===t||"string"!=typeof t?e.organization_id=null:e.organization_id=t.trim(),l.includes(s))throw Error(`Team alias ${s} already exists, please pick another alias`);if(em.default.info("Creating Team"),x.length>0){let s={};if(e.metadata)try{s=JSON.parse(e.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}s={...s,logging:x.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.secret_manager_settings&&"string"==typeof e.secret_manager_settings)if(""===e.secret_manager_settings.trim())delete e.secret_manager_settings;else try{e.secret_manager_settings=JSON.parse(e.secret_manager_settings)}catch(e){throw Error("Failed to parse secret manager settings: "+e)}if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolPermissions)){if(e.object_permission={},e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission.vector_stores=e.allowed_vector_store_ids,delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups){let{servers:s,accessGroups:l}=e.allowed_mcp_servers_and_groups;s&&s.length>0&&(e.object_permission.mcp_servers=s),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),delete e.allowed_mcp_servers_and_groups}if(e.mcp_tool_permissions&&Object.keys(e.mcp_tool_permissions).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=e.mcp_tool_permissions,delete e.mcp_tool_permissions),e.allowed_agents_and_groups){let{agents:s,accessGroups:l}=e.allowed_agents_and_groups;e.object_permission||(e.object_permission={}),s&&s.length>0&&(e.object_permission.agents=s),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}}e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),Object.keys(m).length>0&&(e.model_aliases=m);let r=await (0,a.teamCreateCall)(f,e);null!==d?c([...d,r]):c([r]),console.log(`response for team create call: ${r}`),em.default.success("Team created"),v.resetFields(),p([]),h({}),g(!1)}}catch(e){console.error("Error creating the team:",e),em.default.fromBackend("Error creating the team: "+e)}};return(0,s.jsx)(X.Modal,{title:"Create Team",open:e,width:1e3,footer:null,onOk:t,onCancel:i,children:(0,s.jsxs)(r.Form,{form:v,onFinish:B,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Form.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,s.jsx)(ea.TextInput,{placeholder:""})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Organization"," ",(0,s.jsx)(O.Tooltip,{title:(0,s.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/user_management_heirarchy",target:"_blank",rel:"noopener noreferrer",style:{color:"#1890ff",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"user management hierarchy"})]}),children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:o?o.organization_id:null,className:"mt-8",children:(0,s.jsx)(Q.Select,{showSearch:!0,allowClear:!0,placeholder:"Search or select an Organization",onChange:e=>{v.setFieldValue("organization_id",e),C(n?.find(s=>s.organization_id===e)||null)},filterOption:(e,s)=>!!s&&(s.children?.toString()||"").toLowerCase().includes(e.toLowerCase()),optionFilterProp:"children",children:n?.map(e=>(0,s.jsxs)(Q.Select.Option,{value:e.organization_id,children:[(0,s.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,s.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Models"," ",(0,s.jsx)(O.Tooltip,{title:"These are the models that your selected team has access to",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,s.jsxs)(Q.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,s.jsx)(Q.Select.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),N.map(e=>(0,s.jsx)(Q.Select.Option,{value:e,children:(0,R.getModelDisplayName)(e)},e))]})}),(0,s.jsx)(r.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,s.jsx)(er.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(r.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,s.jsxs)(Q.Select,{defaultValue:null,placeholder:"n/a",children:[(0,s.jsx)(Q.Select.Option,{value:"24h",children:"daily"}),(0,s.jsx)(Q.Select.Option,{value:"7d",children:"weekly"}),(0,s.jsx)(Q.Select.Option,{value:"30d",children:"monthly"})]})}),(0,s.jsx)(r.Form.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsxs)(ee.Accordion,{className:"mt-20 mb-8",onClick:()=>{L||(E(),D(!0))},children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Additional Settings"})}),(0,s.jsxs)(es.AccordionBody,{children:[(0,s.jsx)(r.Form.Item,{label:"Team ID",name:"team_id",help:"ID of the team you want to create. If not provided, it will be generated automatically.",children:(0,s.jsx)(ea.TextInput,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,s.jsx)(r.Form.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,s.jsx)(er.default,{step:.01,precision:2,width:200})}),(0,s.jsx)(r.Form.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,s.jsx)(ea.TextInput,{placeholder:"e.g., 30d"})}),(0,s.jsx)(r.Form.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,s.jsx)(er.default,{step:1,width:400})}),(0,s.jsx)(r.Form.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,s.jsx)(Y.Input.TextArea,{rows:4})}),(0,s.jsx)(r.Form.Item,{label:"Secret Manager Settings",name:"secret_manager_settings",help:b?"Enter secret manager configuration as a JSON object.":"Premium feature - Upgrade to manage secret manager settings.",rules:[{validator:async(e,s)=>{if(!s)return Promise.resolve();try{return JSON.parse(s),Promise.resolve()}catch(e){return Promise.reject(Error("Please enter valid JSON"))}}}],children:(0,s.jsx)(Y.Input.TextArea,{rows:4,placeholder:'{"namespace": "admin", "mount": "secret", "path_prefix": "litellm"}',disabled:!b})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(O.Tooltip,{title:"Setup your first guardrail",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,s.jsx)(Q.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:I.map(e=>({value:e,label:e}))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,s.jsx)(O.Tooltip,{title:"When enabled, this team will bypass any guardrails configured to run on every request (global guardrails)",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:"Bypass global guardrails for this team",children:(0,s.jsx)(Z.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Policies"," ",(0,s.jsx)(O.Tooltip,{title:"Apply policies to this team to control guardrails and other settings",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-8",help:"Select existing policies or enter new ones",children:(0,s.jsx)(Q.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter policies",options:A.map(e=>({value:e,label:e}))})}),(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,s.jsx)(O.Tooltip,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,s.jsx)(ei.default,{onChange:e=>v.setFieldValue("allowed_vector_store_ids",e),value:v.getFieldValue("allowed_vector_store_ids"),accessToken:f||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"MCP Settings"})}),(0,s.jsxs)(es.AccordionBody,{children:[(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,s.jsx)(O.Tooltip,{title:"Select which MCP servers or access groups this team can access",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,s.jsx)(eo.default,{onChange:e=>v.setFieldValue("allowed_mcp_servers_and_groups",e),value:v.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:f||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,s.jsx)(r.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,s.jsx)(Y.Input,{type:"hidden"})}),(0,s.jsx)(r.Form.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_mcp_servers_and_groups!==s.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(eu.default,{accessToken:f||"",selectedServers:v.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[],toolPermissions:v.getFieldValue("mcp_tool_permissions")||{},onChange:e=>v.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Agent Settings"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsx)(r.Form.Item,{label:(0,s.jsxs)("span",{children:["Allowed Agents"," ",(0,s.jsx)(O.Tooltip,{title:"Select which agents or access groups this team can access",children:(0,s.jsx)(et.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",className:"mt-4",help:"Select agents or access groups this team can access",children:(0,s.jsx)(en.default,{onChange:e=>v.setFieldValue("allowed_agents_and_groups",e),value:v.getFieldValue("allowed_agents_and_groups"),accessToken:f||"",placeholder:"Select agents or access groups (optional)"})})})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Logging Settings"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(ed.default,{value:x,onChange:p,premiumUser:b})})})]}),(0,s.jsxs)(ee.Accordion,{className:"mt-8 mb-8",children:[(0,s.jsx)(el.AccordionHeader,{children:(0,s.jsx)("b",{children:"Model Aliases"})}),(0,s.jsx)(es.AccordionBody,{children:(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)(u.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,s.jsx)(ec.default,{accessToken:f||"",initialModelAliases:m,onAliasUpdate:h,showExampleConfig:!1})]})})]})]}),(0,s.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,s.jsx)(q.Button,{htmlType:"submit",children:"Create Team"})})]})})},ex=({teams:e,accessToken:_,setTeams:j,userID:f,userRole:b,organizations:v,premiumUser:y=!1})=>{let[T,C]=(0,l.useState)(null),[k,I]=(0,l.useState)(!1),[F,A]=(0,l.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),[z]=r.Form.useForm(),[M]=r.Form.useForm(),[O,P]=(0,l.useState)(null),[L,D]=(0,l.useState)(!1),[E,B]=(0,l.useState)(!1),[R,V]=(0,l.useState)(!1),[H,W]=(0,l.useState)(!1),[U,J]=(0,l.useState)([]),[$,q]=(0,l.useState)(!1),[Y,X]=(0,l.useState)(null),[Q,Z]=(0,l.useState)({}),[ee,es]=(0,l.useState)([]),[el,ea]=(0,l.useState)({}),{lastRefreshed:et,onRefreshClick:er}=(({currentOrg:e,setTeams:s})=>{let[a,r]=(0,l.useState)(""),{accessToken:i,userId:o,userRole:n}=(0,S.default)(),d=(0,l.useCallback)(()=>{r(new Date().toLocaleString())},[]);return(0,l.useEffect)(()=>{i&&(0,t.fetchTeams)(i,o,n,e,s).then(),d()},[i,e,a,d,s,o,n]),{lastRefreshed:a,setLastRefreshed:r,onRefreshClick:d}})({currentOrg:T,setTeams:j});(0,l.useEffect)(()=>{e&&Z(e.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[e]);let ei=async e=>{X(e),q(!0)},eo=async()=>{if(null!=Y&&null!=e&&null!=_){try{await (0,a.teamDeleteCall)(_,Y),(0,t.fetchTeams)(_,f,b,T,j)}catch(e){console.error("Error deleting the team:",e)}q(!1),X(null)}};return(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(h.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(m.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"==b||"Org Admin"==b)&&(0,s.jsx)(c.Button,{className:"w-fit",onClick:()=>B(!0),children:"+ Create New Team"}),O?(0,s.jsx)(i.default,{teamId:O,onUpdate:e=>{j(s=>{if(null==s)return s;let l=s.map(s=>e.team_id===s.team_id?(0,g.updateExistingKeys)(s,e):s);return _&&(0,t.fetchTeams)(_,f,b,T,j),l})},onClose:()=>{P(null),D(!1)},accessToken:_,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===O)),is_proxy_admin:"Admin"==b,is_org_admin:(()=>{let s=e?.find(e=>e.team_id===O);if(!s?.organization_id||!v||!f)return!1;let l=v.find(e=>e.organization_id===s.organization_id);return l?.members?.some(e=>e.user_id===f&&"org_admin"===e.user_role)??!1})(),userModels:U,editTeam:L,premiumUser:y}):(0,s.jsxs)(w,{lastRefreshed:et,onRefresh:er,userRole:b,children:[(0,s.jsxs)(x.TabPanel,{children:[(0,s.jsxs)(u.Text,{children:["Click on “Team ID” to view team details ",(0,s.jsx)("b",{children:"and"})," manage team members."]}),(0,s.jsx)(h.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,s.jsx)(m.Col,{numColSpan:1,children:(0,s.jsxs)(d.Card,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsx)(N,{filters:F,organizations:v,showFilters:k,onToggleFilters:I,onChange:(e,s)=>{let l={...F,[e]:s};A(l),_&&(0,a.v2TeamListCall)(_,l.organization_id||null,null,l.team_id||null,l.team_alias||null).then(e=>{e&&e.teams&&j(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})},onReset:()=>{A({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),_&&(0,a.v2TeamListCall)(_,null,f||null,null,null).then(e=>{e&&e.teams&&j(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})}})})}),(0,s.jsx)(G,{teams:e,currentOrg:T,perTeamInfo:Q,userRole:b,userId:f,setSelectedTeamId:P,setEditTeam:D,onDeleteTeam:ei}),$&&(0,s.jsx)(K,{teams:e,teamToDelete:Y,onCancel:()=>{q(!1),X(null)},onConfirm:eo})]})})})]}),(0,s.jsx)(x.TabPanel,{children:(0,s.jsx)(p.default,{accessToken:_,userID:f})}),(0,n.isAdminRole)(b||"")&&(0,s.jsx)(x.TabPanel,{children:(0,s.jsx)(o.default,{accessToken:_,userID:f||"",userRole:b||""})})]}),("Admin"==b||"Org Admin"==b)&&(0,s.jsx)(eh,{isTeamModalVisible:E,handleOk:()=>{B(!1),z.resetFields(),es([]),ea({})},handleCancel:()=>{B(!1),z.resetFields(),es([]),ea({})},currentOrg:T,organizations:v,teams:e,setTeams:j,modelAliases:el,setModelAliases:ea,loggingSettings:ee,setLoggingSettings:es,setIsTeamModalVisible:B})]})})})};var ep=e.i(214541),eg=e.i(846835);e.s(["default",0,()=>{let{accessToken:e,userId:a,userRole:t}=(0,S.default)(),{teams:r,setTeams:i}=(0,ep.default)(),[o,n]=(0,l.useState)([]);return(0,l.useEffect)(()=>{(0,eg.fetchOrganizations)(e,n).then(()=>{})},[e]),(0,s.jsx)(ex,{teams:r,accessToken:e,setTeams:i,userID:a,userRole:t,organizations:o})}],596115)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a09d5d7fd3464016.js b/litellm/proxy/_experimental/out/_next/static/chunks/a09d5d7fd3464016.js deleted file mode 100644 index 1c60b17e480..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/a09d5d7fd3464016.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),s=e.i(915823),i=e.i(619273),l=class extends s.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.hashKey)(t.mutationKey)!==(0,i.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#s(),this.#i()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#s(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},o=e.i(912598);function n(e,r){let s=(0,o.useQueryClient)(r),[n]=t.useState(()=>new l(s,e));t.useEffect(()=>{n.setOptions(e)},[n,e]);let u=t.useSyncExternalStore(t.useCallback(e=>n.subscribe(a.notifyManager.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),c=t.useCallback((e,t)=>{n.mutate(e,t).catch(i.noop)},[n]);if(u.error&&(0,i.shouldThrowError)(n.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:c,mutateAsync:u.mutate}}e.s(["useMutation",()=>n],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(529681),s=e.i(908286),i=e.i(242064),l=e.i(246422),o=e.i(838378);let n=["wrap","nowrap","wrap-reverse"],u=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],c=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],d=function(e,t){let a,s,i;return(0,r.default)(Object.assign(Object.assign(Object.assign({},(a=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${a}`]:a&&n.includes(a)})),(s={},c.forEach(r=>{s[`${e}-align-${r}`]=t.align===r}),s[`${e}-align-stretch`]=!t.align&&!!t.vertical,s)),(i={},u.forEach(r=>{i[`${e}-justify-${r}`]=t.justify===r}),i)))},h=(0,l.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:a}=e,s=(0,o.mergeToken)(e,{flexGapSM:t,flexGap:r,flexGapLG:a});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(s),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(s),(e=>{let{componentCls:t}=e,r={};return n.forEach(e=>{r[`${t}-wrap-${e}`]={flexWrap:e}}),r})(s),(e=>{let{componentCls:t}=e,r={};return c.forEach(e=>{r[`${t}-align-${e}`]={alignItems:e}}),r})(s),(e=>{let{componentCls:t}=e,r={};return u.forEach(e=>{r[`${t}-justify-${e}`]={justifyContent:e}}),r})(s)]},()=>({}),{resetStyle:!1});var f=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(r[a[s]]=e[a[s]]);return r};let m=t.default.forwardRef((e,l)=>{let{prefixCls:o,rootClassName:n,className:u,style:c,flex:m,gap:p,vertical:g=!1,component:y="div",children:b}=e,v=f(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:x,direction:w,getPrefixCls:M}=t.default.useContext(i.ConfigContext),O=M("flex",o),[k,C,E]=h(O),j=null!=g?g:null==x?void 0:x.vertical,N=(0,r.default)(u,n,null==x?void 0:x.className,O,C,E,d(O,e),{[`${O}-rtl`]:"rtl"===w,[`${O}-gap-${p}`]:(0,s.isPresetSize)(p),[`${O}-vertical`]:j}),S=Object.assign(Object.assign({},null==x?void 0:x.style),c);return m&&(S.flex=m),p&&!(0,s.isPresetSize)(p)&&(S.gap=p),k(t.default.createElement(y,Object.assign({ref:l,className:N,style:S},(0,a.default)(v,["justify","wrap","align"])),b))});e.s(["Flex",0,m],525720)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,r]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;r(`${e}//${t}`)}},[]),e}])},688511,823429,e=>{"use strict";let t=(0,e.i(475254).default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);e.s(["default",()=>t],823429),e.s(["Edit",()=>t],688511)},114600,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),s=e.i(271645);let i=(0,a.makeClassName)("Divider"),l=s.default.forwardRef((e,a)=>{let{className:l,children:o}=e,n=(0,t.__rest)(e,["className","children"]);return s.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(i("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",l)},n),o?s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),s.default.createElement("div",{className:(0,r.tremorTwMerge)("text-inherit whitespace-nowrap")},o),s.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):s.default.createElement("div",{className:(0,r.tremorTwMerge)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});l.displayName="Divider",e.s(["Divider",()=>l],114600)},366283,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(95779),s=e.i(444755),i=e.i(673706);let l=(0,i.makeClassName)("Callout"),o=r.default.forwardRef((e,o)=>{let{title:n,icon:u,color:c,className:d,children:h}=e,f=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:o,className:(0,s.tremorTwMerge)(l("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,s.tremorTwMerge)((0,i.getColorClassNames)(c,a.colorPalette.background).bgColor,(0,i.getColorClassNames)(c,a.colorPalette.darkBorder).borderColor,(0,i.getColorClassNames)(c,a.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,s.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),d)},f),r.default.createElement("div",{className:(0,s.tremorTwMerge)(l("header"),"flex items-start")},u?r.default.createElement(u,{className:(0,s.tremorTwMerge)(l("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,s.tremorTwMerge)(l("title"),"font-semibold")},n)),r.default.createElement("p",{className:(0,s.tremorTwMerge)(l("body"),"overflow-y-auto",h?"mt-2":"")},h))});o.displayName="Callout",e.s(["Callout",()=>o],366283)},475647,286536,77705,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"};var s=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(s.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["PlusCircleOutlined",0,i],475647);var l=e.i(475254);let o=(0,l.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>o],286536);let n=(0,l.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>n],77705)},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",()=>t],727612)},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},596239,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var s=e.i(9583),i=r.forwardRef(function(e,i){return r.createElement(s.default,(0,t.default)({},e,{ref:i,icon:a}))});e.s(["LinkOutlined",0,i],596239)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},514236,e=>{"use strict";var t=e.i(843476),r=e.i(105278);e.s(["default",0,()=>(0,t.jsx)(r.default,{})])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/82bc4bb51160556f.js b/litellm/proxy/_experimental/out/_next/static/chunks/a4d4181427de43af.js similarity index 92% rename from litellm/proxy/_experimental/out/_next/static/chunks/82bc4bb51160556f.js rename to litellm/proxy/_experimental/out/_next/static/chunks/a4d4181427de43af.js index e1783caf150..27781042cd6 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/82bc4bb51160556f.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/a4d4181427de43af.js @@ -81,4 +81,4 @@ .primitives-collapse .ant-collapse-content-box { padding: 8px 12px !important; } - `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let[o,d]=(0,m.useState)(null),[g,x]=(0,m.useState)(null),[h,f]=(0,m.useState)(!0),[y,j]=(0,m.useState)(!1),[_]=r.Form.useForm(),[b,v]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[w,S]=(0,m.useState)(null),[k,I]=(0,m.useState)({}),[A,T]=(0,m.useState)(!1),O={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[P,B]=(0,m.useState)(O),[L,F]=(0,m.useState)(!1),[$,E]=(0,m.useState)(!1),M=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),R=(0,m.useCallback)((e,t,a,l,r)=>{M.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(f(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(d(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(v([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),v(t),C(a)}}else v([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{f(!1)}},G=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);x(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);S(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{G()},[a]),(0,m.useEffect)(()=>{z(),D()},[e,a]),(0,m.useEffect)(()=>{o&&_&&_.setFieldsValue({guardrail_name:o.guardrail_name,...o.litellm_params,guardrail_info:o.guardrail_info?JSON.stringify(o.guardrail_info,null,2):"",...o.litellm_params?.optional_params&&{optional_params:o.litellm_params.optional_params}})},[o,g,_]);let K=(0,m.useCallback)(()=>{o?.litellm_params?.guardrail==="tool_permission"?B({rules:o.litellm_params?.rules||[],default_action:(o.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(o.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:o.litellm_params?.violation_message_template||""}):B(O),F(!1)},[o]);(0,m.useEffect)(()=>{K()},[K]);let H=async t=>{try{if(!a)return;let d={litellm_params:{}};t.guardrail_name!==o.guardrail_name&&(d.guardrail_name=t.guardrail_name),t.default_on!==o.litellm_params?.default_on&&(d.litellm_params.default_on=t.default_on);let c=o.guardrail_info,m=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(c)!==JSON.stringify(m)&&(d.guardrail_info=m);let x=o.litellm_params?.pii_entities_config||{},h={};if(b.forEach(e=>{h[e]=N[e]||"MASK"}),JSON.stringify(x)!==JSON.stringify(h)&&(d.litellm_params.pii_entities_config=h),o.litellm_params?.guardrail==="litellm_content_filter"&&A){var l,r,i,s,n;let e,t=(l=M.current.patterns||[],r=M.current.blockedWords||[],i=M.current.categories||[],s=M.current.competitorIntentEnabled,n=M.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);d.litellm_params.patterns=t.patterns,d.litellm_params.blocked_words=t.blocked_words,d.litellm_params.categories=t.categories,d.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(o.litellm_params?.guardrail==="tool_permission"){let e=o.litellm_params?.rules||[],t=P.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(o.litellm_params?.default_action||"deny").toLowerCase(),r=(P.default_action||"deny").toLowerCase(),i=l!==r,s=(o.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(P.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=o.litellm_params?.violation_message_template||"",u=P.violation_message_template||"",p=m!==u;(L||a||i||c||p)&&(d.litellm_params.rules=t,d.litellm_params.default_action=r,d.litellm_params.on_disallowed_action=n,d.litellm_params.violation_message_template=u||null)}let f=Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",f);let y=o.litellm_params?.guardrail==="tool_permission";if(g&&f&&!y){let e=g[ea[f]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=o.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?d.litellm_params[e]=a:null!=l&&""!==l&&(d.litellm_params[e]=null))})}if(0===Object.keys(d.litellm_params).length&&delete d.litellm_params,0===Object.keys(d).length){u.default.info("No changes detected"),j(!1);return}await (0,p.updateGuardrailCall)(a,e,d),u.default.success("Guardrail updated successfully"),T(!1),z(),j(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(h)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!o)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let q=e=>e?new Date(e).toLocaleString():"-",{logo:J,displayName:W}=eo(o.litellm_params?.guardrail||""),U=async(e,t)=>{await (0,ta.copyToClipboard)(e)&&(I(e=>({...e,[t]:!0})),setTimeout(()=>{I(e=>({...e,[t]:!1}))},2e3))},V="config"===o.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(tr.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(tm.Title,{children:o.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eL.Text,{className:"text-gray-500 font-mono",children:o.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:k["guardrail-id"]?(0,l.jsx)(tu.CheckIcon,{size:12}):(0,l.jsx)(tp.CopyIcon,{size:12}),onClick:()=>U(o.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${k["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tn.TabGroup,{children:[(0,l.jsxs)(to.TabList,{className:"mb-4",children:[(0,l.jsx)(ts.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(ts.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tc.TabPanels,{children:[(0,l.jsxs)(td.TabPanel,{children:[(0,l.jsxs)(ti.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[J&&(0,l.jsx)("img",{src:J,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(tm.Title,{children:W})]})]}),(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(tm.Title,{children:o.litellm_params?.mode||"-"}),(0,l.jsx)(e4.Badge,{color:o.litellm_params?.default_on?"green":"gray",children:o.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(tm.Title,{children:q(o.created_at)}),(0,l.jsxs)(eL.Text,{children:["Last Updated: ",q(o.updated_at)]})]})]})]}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eB.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e4.Badge,{color:"blue",children:[Object.keys(o.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eB.Card,{className:"mt-6",children:[(0,l.jsx)(eL.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eL.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eL.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(o.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eL.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eL.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(ej.default,{}):(0,l.jsx)(e_.StopOutlined,{}),String(t)]})})]},e))})]})]}),o.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eB.Card,{className:"mt-6",children:(0,l.jsx)(eR,{value:P,disabled:!0})}),o.litellm_params?.guardrail==="custom_code"&&o.litellm_params?.custom_code&&(0,l.jsxs)(eB.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(tl.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eL.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!V&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(tl.CodeOutlined,{}),onClick:()=>E(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:o.litellm_params.custom_code})})})]}),(0,l.jsx)(t_,{guardrailData:o,guardrailSettings:w,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(td.TabPanel,{children:(0,l.jsxs)(eB.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(tm.Title,{children:"Guardrail Settings"}),V&&(0,l.jsx)(ef.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eE.InfoCircleOutlined,{})}),!y&&!V&&(o.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(tl.CodeOutlined,{}),onClick:()=>E(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>j(!0),children:"Edit Settings"}))]}),y?(0,l.jsxs)(r.Form,{form:_,onFinish:H,initialValues:{guardrail_name:o.guardrail_name,...o.litellm_params,guardrail_info:o.guardrail_info?JSON.stringify(o.guardrail_info,null,2):"",...o.litellm_params?.optional_params&&{optional_params:o.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),o.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eF.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:w&&(0,l.jsx)(eP,{entities:w.supported_entities,actions:w.supported_actions,selectedEntities:b,selectedActions:N,onEntitySelect:e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:w.pii_entity_categories})})]}),(0,l.jsx)(t_,{guardrailData:o,guardrailSettings:w,isEditing:!0,accessToken:a,onDataChange:R,onUnsavedChanges:T}),(o.litellm_params?.guardrail==="tool_permission"||g)&&(0,l.jsx)(eF.Divider,{orientation:"left",children:"Provider Settings"}),o.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eR,{value:P,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ex,{selectedProvider:Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail)||null,accessToken:a,providerParams:g,value:o.litellm_params}),g&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail);if(!e)return null;let t=g[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(eu,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:o.litellm_params}):null})()]}),(0,l.jsx)(eF.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{j(!1),T(!1),K()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:o.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:o.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:o.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e4.Badge,{color:o.litellm_params?.default_on?"green":"gray",children:o.litellm_params?.default_on?"Yes":"No"})]}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e4.Badge,{color:"blue",children:[Object.keys(o.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:q(o.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:q(o.updated_at)})]}),o.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eR,{value:P,disabled:!0})]})]})})]})]}),(0,l.jsx)(tF,{visible:$,onClose:()=>E(!1),onSuccess:()=>{E(!1),z()},accessToken:a,editData:o?{guardrail_id:o.guardrail_id,guardrail_name:o.guardrail_name,litellm_params:o.litellm_params}:null})]})}],969641);var t$=e.i(573421),tE=e.i(19732),tM=e.i(928685),tR=e.i(166406),tz=e.i(637235),tG=e.i(755151),tD=e.i(240647);let{Text:tK}=d.Typography,tH=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eB.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tD.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tG.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tv.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tz.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(eQ.Button,{size:"xs",variant:"secondary",icon:tR.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eB.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tD.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tG.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tz.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tq}=i.Input,{Text:tJ}=d.Typography,tW=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ef.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eE.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(eQ.Button,{size:"xs",variant:"secondary",icon:tR.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tq,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tJ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tJ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(eQ.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tH,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[i,s]=(0,m.useState)(new Set),[n,o]=(0,m.useState)(""),[d,c]=(0,m.useState)([]),[g,x]=(0,m.useState)([]),[h,f]=(0,m.useState)(!1),y=e.filter(e=>e.guardrail_name?.toLowerCase().includes(n.toLowerCase())),j=e=>{let t=new Set(i);t.has(e)?t.delete(e):t.add(e),s(t)},_=async e=>{if(0===i.size||!a)return;f(!0),c([]),x([]);let t=[],l=[];await Promise.all(Array.from(i).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),c(t),x(l),f(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(eB.Card,{className:"h-full",children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)(tm.Title,{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(e8.TextInput,{icon:tM.SearchOutlined,placeholder:"Search guardrails...",value:n,onValueChange:o})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(ep.Spin,{})}):0===y.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(e$.Empty,{description:n?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(t$.List,{dataSource:y,renderItem:e=>(0,l.jsx)(t$.List.Item,{onClick:()=>{e.guardrail_name&&j(e.guardrail_name)},className:`cursor-pointer hover:bg-gray-50 transition-colors px-4 ${i.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(t$.List.Item.Meta,{avatar:(0,l.jsx)(eh.Checkbox,{checked:i.has(e.guardrail_name||""),onClick:t=>{t.stopPropagation(),e.guardrail_name&&j(e.guardrail_name)}}),title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tE.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(eL.Text,{className:"text-xs text-gray-600",children:[i.size," of ",y.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(tm.Title,{className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===i.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tE.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(eL.Text,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(eL.Text,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tW,{guardrailNames:Array.from(i),onSubmit:_,results:d.length>0?d:null,errors:g.length>0?g:null,isLoading:h,onClose:()=>s(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tF],64352);let tU="../ui/assets/logos/",tV=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tU}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tU}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tU}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tU}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tU}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tU}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tU}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tU}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tU}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tU}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tU}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tU}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tU}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tU}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tU}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tU}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tU}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tU}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tU}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tU}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tU}akto.svg`,tags:["Security","Safety","Monitoring"]}];e.s(["ALL_CARDS",0,tV],230312)},826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(994388),r=e.i(653824),i=e.i(881073),s=e.i(197647),n=e.i(723731),o=e.i(404206),d=e.i(326373),c=e.i(755151),m=e.i(646563),u=e.i(245094),p=e.i(764205),g=e.i(185357),x=e.i(782719),h=e.i(708347),f=e.i(969641),y=e.i(476993),j=e.i(727749),_=e.i(127952),b=e.i(180766);e.i(824296);var v=e.i(64352),N=e.i(311451),C=e.i(928685),w=e.i(266537),S=e.i(230312),k=e.i(826910);let I=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},A=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(I,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(k.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var T=e.i(464571),O=e.i(447566);let P={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1}},B=({card:e,onBack:l,accessToken:r,onGuardrailCreated:i})=>{let[s,n]=(0,a.useState)(!1),[o,d]=(0,a.useState)("overview"),c=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],m=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],u=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:l,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(O.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(T.Button,{onClick:()=>n(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:u.map(e=>(0,t.jsx)("div",{onClick:()=>d(e.key),style:{padding:"12px 20px",fontSize:14,color:o===e.key?"#1a73e8":"#5f6368",borderBottom:o===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:o===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===o&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:c.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===o&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:m.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(g.default,{visible:s,onClose:()=>n(!1),accessToken:r,onSuccess:()=>{n(!1),i()},preset:P[e.id]})]})},L=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=S.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(B,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(N.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(C.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(A,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(A,{card:e,onClick:()=>n(e)},e.id))})]})]})};var F=e.i(988846),$=e.i(837007),E=e.i(409797),M=e.i(54131),R=e.i(995926),z=e.i(678784),G=e.i(634831),D=e.i(438100),K=e.i(302202),H=e.i(328196),q=e.i(879664);e.s(["InfoIcon",()=>q.default],168118);var q=q;function J(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt:function(e){if(!e)return"—";try{let t=new Date(e);return isNaN(t.getTime())?e:t.toISOString().slice(0,10)}catch{return e}}(e.submitted_at),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let W={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{label:"Pending Review",bg:"bg-yellow-50",text:"text-yellow-700",dot:"bg-yellow-500"},rejected:{label:"Rejected",bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}},U={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function V({label:e,value:a,color:l}){return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg px-4 py-3",children:[(0,t.jsx)("div",{className:`text-2xl font-bold ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function Y({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function Z({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=W[e.status],c=U[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(K.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(Y,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,className:"text-xs bg-green-500 hover:bg-green-600 text-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:o,className:"text-xs border border-red-300 text-red-600 hover:bg-red-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:"Reject"})]})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(M.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(E.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function Q({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function X({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=W[e.status],y=U[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(R.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(Q,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)(G.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(Q,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(D.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(Y,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(R.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(R.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(M.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(E.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(q.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(G.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(z.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(R.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ee({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="approve"===e;return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-xl p-6 max-w-sm w-full mx-4",children:[(0,t.jsx)("div",{className:`w-10 h-10 rounded-full flex items-center justify-center mb-4 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(z.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(H.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"flex-1 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:l,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function et({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[d,c]=(0,a.useState)("all"),[m,u]=(0,a.useState)(null),[g,x]=(0,a.useState)(new Set),[h,f]=(0,a.useState)(null),[y,_]=(0,a.useState)(!0),[b,v]=(0,a.useState)(null),[N,C]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let w=(0,a.useCallback)(async()=>{if(!e)return void _(!1);_(!0),v(null);try{let t="all"===d?void 0:"pending"===d?"pending_review":d,a=await (0,p.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(J)),s(a.summary)}catch(e){v(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{_(!1)}},[e,d,N]);(0,a.useEffect)(()=>{w()},[w]);let S=l.find(e=>e.id===m)??null,k=i.total,I=i.pending_review,A=i.active,T=i.rejected;async function O(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),j.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{j.default.fromBackend("Failed to update forward API key")}}async function P(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),j.default.success("Static headers updated")}catch{j.default.fromBackend("Failed to update static headers")}}async function B(t,a){if(e)try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),j.default.success("Forward client headers updated")}catch{j.default.fromBackend("Failed to update forward client headers")}}async function L(t){if(e)try{await (0,p.approveGuardrailSubmission)(e,t),f(null),m===t&&u(null),await w(),j.default.success("Guardrail approved")}catch{j.default.fromBackend("Failed to approve guardrail")}}async function E(t){if(e)try{await (0,p.rejectGuardrailSubmission)(e,t),f(null),m===t&&u(null),await w(),j.default.success("Guardrail rejected")}catch{j.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${S?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(V,{label:"Total Submitted",value:k,color:"text-gray-900"}),(0,t.jsx)(V,{label:"Pending Review",value:I,color:"text-yellow-600"}),(0,t.jsx)(V,{label:"Active",value:A,color:"text-green-600"}),(0,t.jsx)(V,{label:"Rejected",value:T,color:"text-red-600"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(F.SearchIcon,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,t.jsx)("input",{type:"text",placeholder:"Search guardrails...",value:n,onChange:e=>o(e.target.value),className:"w-full pl-9 pr-4 py-2 border border-gray-200 rounded-md text-sm text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:d,onChange:e=>c(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 bg-white",children:[(0,t.jsx)("option",{value:"all",children:"All Status"}),(0,t.jsx)("option",{value:"pending",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)($.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[y&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),b&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:b}),!y&&!b&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!y&&!b&&l.map(e=>(0,t.jsx)(Z,{guardrail:e,isSelected:m===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>u(m===e.id?null:e.id),onToggleForwardKey:()=>O(e.id),onToggleHeaders:()=>{var t;return t=e.id,void x(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>f({id:e.id,action:"approve"}),onReject:()=>f({id:e.id,action:"reject"})},e.id))]})]}),S&&(0,t.jsx)(X,{guardrail:S,onClose:()=>u(null),onApprove:()=>f({id:S.id,action:"approve"}),onReject:()=>f({id:S.id,action:"reject"}),onToggleForwardKey:()=>O(S.id),onUpdateCustomHeaders:e=>P(S.id,e),onUpdateExtraHeaders:e=>B(S.id,e)}),h&&(0,t.jsx)(ee,{action:h.action,guardrailName:l.find(e=>e.id===h.id)?.name??"",onConfirm:()=>"approve"===h.action?L(h.id):E(h.id),onCancel:()=>f(null)})]})}e.s(["default",0,({accessToken:e,userRole:N})=>{let[C,w]=(0,a.useState)([]),[S,k]=(0,a.useState)(!1),[I,A]=(0,a.useState)(!1),[T,O]=(0,a.useState)(!1),[P,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),[E,M]=(0,a.useState)(!1),[R,z]=(0,a.useState)(null),[G,D]=(0,a.useState)(0),K=!!N&&(0,h.isAdminRole)(N),H=async()=>{if(e){O(!0);try{let t=await (0,p.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),w(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{O(!1)}}};(0,a.useEffect)(()=>{H()},[e]);let q=()=>{H()},J=async()=>{if(F&&e){B(!0);try{await (0,p.deleteGuardrailCall)(e,F.guardrail_id),j.default.success(`Guardrail "${F.guardrail_name}" deleted successfully`),await H()}catch(e){console.error("Error deleting guardrail:",e),j.default.fromBackend("Failed to delete guardrail")}finally{B(!1),M(!1),$(null)}}},W=F&&F.litellm_params?(0,b.getGuardrailLogoAndName)(F.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsxs)(r.TabGroup,{index:G,onIndexChange:D,children:[(0,t.jsxs)(i.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Guardrail Garden"}),(0,t.jsx)(s.Tab,{children:"Guardrails"}),(0,t.jsx)(s.Tab,{disabled:!e||0===C.length,children:"Test Playground"}),(0,t.jsx)(s.Tab,{children:"Submitted Guardrails"})]}),(0,t.jsxs)(n.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(L,{accessToken:e,onGuardrailCreated:q})}),(0,t.jsxs)(o.TabPanel,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(d.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(m.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{R&&z(null),k(!0)}},{key:"custom_code",icon:(0,t.jsx)(u.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{R&&z(null),A(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(c.DownOutlined,{className:"ml-2"})]})})}),R?(0,t.jsx)(f.default,{guardrailId:R,onClose:()=>z(null),accessToken:e,isAdmin:K}):(0,t.jsx)(x.default,{guardrailsList:C,isLoading:T,onDeleteClick:(e,t)=>{$(C.find(t=>t.guardrail_id===e)||null),M(!0)},accessToken:e,onGuardrailUpdated:H,isAdmin:K,onGuardrailClick:e=>z(e)}),(0,t.jsx)(g.default,{visible:S,onClose:()=>{k(!1)},accessToken:e,onSuccess:q}),(0,t.jsx)(v.CustomCodeModal,{visible:I,onClose:()=>{A(!1)},accessToken:e,onSuccess:q}),(0,t.jsx)(_.default,{isOpen:E,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${F?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:F?.guardrail_name},{label:"ID",value:F?.guardrail_id,code:!0},{label:"Provider",value:W},{label:"Mode",value:F?.litellm_params.mode},{label:"Default On",value:F?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{M(!1),$(null)},onOk:J,confirmLoading:P})]}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(y.default,{guardrailsList:C,isLoading:T,accessToken:e,onClose:()=>D(0)})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(et,{accessToken:e})})]})]})})}],487304)}]); \ No newline at end of file + `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let[o,d]=(0,m.useState)(null),[g,x]=(0,m.useState)(null),[h,f]=(0,m.useState)(!0),[y,j]=(0,m.useState)(!1),[_]=r.Form.useForm(),[b,v]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[w,S]=(0,m.useState)(null),[k,I]=(0,m.useState)({}),[A,T]=(0,m.useState)(!1),O={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[P,B]=(0,m.useState)(O),[L,F]=(0,m.useState)(!1),[$,E]=(0,m.useState)(!1),M=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),R=(0,m.useCallback)((e,t,a,l,r)=>{M.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(f(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(d(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(v([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),v(t),C(a)}}else v([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{f(!1)}},G=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);x(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);S(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{G()},[a]),(0,m.useEffect)(()=>{z(),D()},[e,a]),(0,m.useEffect)(()=>{o&&_&&_.setFieldsValue({guardrail_name:o.guardrail_name,...o.litellm_params,guardrail_info:o.guardrail_info?JSON.stringify(o.guardrail_info,null,2):"",...o.litellm_params?.optional_params&&{optional_params:o.litellm_params.optional_params}})},[o,g,_]);let K=(0,m.useCallback)(()=>{o?.litellm_params?.guardrail==="tool_permission"?B({rules:o.litellm_params?.rules||[],default_action:(o.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(o.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:o.litellm_params?.violation_message_template||""}):B(O),F(!1)},[o]);(0,m.useEffect)(()=>{K()},[K]);let H=async t=>{try{if(!a)return;let d={litellm_params:{}};t.guardrail_name!==o.guardrail_name&&(d.guardrail_name=t.guardrail_name),t.default_on!==o.litellm_params?.default_on&&(d.litellm_params.default_on=t.default_on);let c=o.guardrail_info,m=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(c)!==JSON.stringify(m)&&(d.guardrail_info=m);let x=o.litellm_params?.pii_entities_config||{},h={};if(b.forEach(e=>{h[e]=N[e]||"MASK"}),JSON.stringify(x)!==JSON.stringify(h)&&(d.litellm_params.pii_entities_config=h),o.litellm_params?.guardrail==="litellm_content_filter"&&A){var l,r,i,s,n;let e,t=(l=M.current.patterns||[],r=M.current.blockedWords||[],i=M.current.categories||[],s=M.current.competitorIntentEnabled,n=M.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);d.litellm_params.patterns=t.patterns,d.litellm_params.blocked_words=t.blocked_words,d.litellm_params.categories=t.categories,d.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(o.litellm_params?.guardrail==="tool_permission"){let e=o.litellm_params?.rules||[],t=P.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(o.litellm_params?.default_action||"deny").toLowerCase(),r=(P.default_action||"deny").toLowerCase(),i=l!==r,s=(o.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(P.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=o.litellm_params?.violation_message_template||"",u=P.violation_message_template||"",p=m!==u;(L||a||i||c||p)&&(d.litellm_params.rules=t,d.litellm_params.default_action=r,d.litellm_params.on_disallowed_action=n,d.litellm_params.violation_message_template=u||null)}let f=Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",f);let y=o.litellm_params?.guardrail==="tool_permission";if(g&&f&&!y){let e=g[ea[f]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=o.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?d.litellm_params[e]=a:null!=l&&""!==l&&(d.litellm_params[e]=null))})}if(0===Object.keys(d.litellm_params).length&&delete d.litellm_params,0===Object.keys(d).length){u.default.info("No changes detected"),j(!1);return}await (0,p.updateGuardrailCall)(a,e,d),u.default.success("Guardrail updated successfully"),T(!1),z(),j(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(h)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!o)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let q=e=>e?new Date(e).toLocaleString():"-",{logo:J,displayName:W}=eo(o.litellm_params?.guardrail||""),U=async(e,t)=>{await (0,ta.copyToClipboard)(e)&&(I(e=>({...e,[t]:!0})),setTimeout(()=>{I(e=>({...e,[t]:!1}))},2e3))},V="config"===o.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(tr.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(tm.Title,{children:o.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eL.Text,{className:"text-gray-500 font-mono",children:o.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:k["guardrail-id"]?(0,l.jsx)(tu.CheckIcon,{size:12}):(0,l.jsx)(tp.CopyIcon,{size:12}),onClick:()=>U(o.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${k["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tn.TabGroup,{children:[(0,l.jsxs)(to.TabList,{className:"mb-4",children:[(0,l.jsx)(ts.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(ts.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tc.TabPanels,{children:[(0,l.jsxs)(td.TabPanel,{children:[(0,l.jsxs)(ti.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[J&&(0,l.jsx)("img",{src:J,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(tm.Title,{children:W})]})]}),(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(tm.Title,{children:o.litellm_params?.mode||"-"}),(0,l.jsx)(e4.Badge,{color:o.litellm_params?.default_on?"green":"gray",children:o.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(tm.Title,{children:q(o.created_at)}),(0,l.jsxs)(eL.Text,{children:["Last Updated: ",q(o.updated_at)]})]})]})]}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eB.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e4.Badge,{color:"blue",children:[Object.keys(o.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eB.Card,{className:"mt-6",children:[(0,l.jsx)(eL.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eL.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eL.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(o.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eL.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eL.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(ej.default,{}):(0,l.jsx)(e_.StopOutlined,{}),String(t)]})})]},e))})]})]}),o.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eB.Card,{className:"mt-6",children:(0,l.jsx)(eR,{value:P,disabled:!0})}),o.litellm_params?.guardrail==="custom_code"&&o.litellm_params?.custom_code&&(0,l.jsxs)(eB.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(tl.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eL.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!V&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(tl.CodeOutlined,{}),onClick:()=>E(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:o.litellm_params.custom_code})})})]}),(0,l.jsx)(t_,{guardrailData:o,guardrailSettings:w,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(td.TabPanel,{children:(0,l.jsxs)(eB.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(tm.Title,{children:"Guardrail Settings"}),V&&(0,l.jsx)(ef.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eE.InfoCircleOutlined,{})}),!y&&!V&&(o.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(tl.CodeOutlined,{}),onClick:()=>E(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>j(!0),children:"Edit Settings"}))]}),y?(0,l.jsxs)(r.Form,{form:_,onFinish:H,initialValues:{guardrail_name:o.guardrail_name,...o.litellm_params,guardrail_info:o.guardrail_info?JSON.stringify(o.guardrail_info,null,2):"",...o.litellm_params?.optional_params&&{optional_params:o.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),o.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eF.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:w&&(0,l.jsx)(eP,{entities:w.supported_entities,actions:w.supported_actions,selectedEntities:b,selectedActions:N,onEntitySelect:e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:w.pii_entity_categories})})]}),(0,l.jsx)(t_,{guardrailData:o,guardrailSettings:w,isEditing:!0,accessToken:a,onDataChange:R,onUnsavedChanges:T}),(o.litellm_params?.guardrail==="tool_permission"||g)&&(0,l.jsx)(eF.Divider,{orientation:"left",children:"Provider Settings"}),o.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eR,{value:P,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ex,{selectedProvider:Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail)||null,accessToken:a,providerParams:g,value:o.litellm_params}),g&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail);if(!e)return null;let t=g[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(eu,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:o.litellm_params}):null})()]}),(0,l.jsx)(eF.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{j(!1),T(!1),K()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:o.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:o.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:o.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e4.Badge,{color:o.litellm_params?.default_on?"green":"gray",children:o.litellm_params?.default_on?"Yes":"No"})]}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e4.Badge,{color:"blue",children:[Object.keys(o.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:q(o.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:q(o.updated_at)})]}),o.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eR,{value:P,disabled:!0})]})]})})]})]}),(0,l.jsx)(tF,{visible:$,onClose:()=>E(!1),onSuccess:()=>{E(!1),z()},accessToken:a,editData:o?{guardrail_id:o.guardrail_id,guardrail_name:o.guardrail_name,litellm_params:o.litellm_params}:null})]})}],969641);var t$=e.i(573421),tE=e.i(19732),tM=e.i(928685),tR=e.i(166406),tz=e.i(637235),tG=e.i(755151),tD=e.i(240647);let{Text:tK}=d.Typography,tH=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eB.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tD.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tG.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tv.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tz.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(eQ.Button,{size:"xs",variant:"secondary",icon:tR.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eB.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tD.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tG.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tz.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tq}=i.Input,{Text:tJ}=d.Typography,tW=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ef.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eE.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(eQ.Button,{size:"xs",variant:"secondary",icon:tR.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tq,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tJ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tJ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(eQ.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tH,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[i,s]=(0,m.useState)(new Set),[n,o]=(0,m.useState)(""),[d,c]=(0,m.useState)([]),[g,x]=(0,m.useState)([]),[h,f]=(0,m.useState)(!1),y=e.filter(e=>e.guardrail_name?.toLowerCase().includes(n.toLowerCase())),j=e=>{let t=new Set(i);t.has(e)?t.delete(e):t.add(e),s(t)},_=async e=>{if(0===i.size||!a)return;f(!0),c([]),x([]);let t=[],l=[];await Promise.all(Array.from(i).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),c(t),x(l),f(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(eB.Card,{className:"h-full",children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)(tm.Title,{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(e8.TextInput,{icon:tM.SearchOutlined,placeholder:"Search guardrails...",value:n,onValueChange:o})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(ep.Spin,{})}):0===y.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(e$.Empty,{description:n?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(t$.List,{dataSource:y,renderItem:e=>(0,l.jsx)(t$.List.Item,{onClick:()=>{e.guardrail_name&&j(e.guardrail_name)},className:`cursor-pointer hover:bg-gray-50 transition-colors px-4 ${i.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(t$.List.Item.Meta,{avatar:(0,l.jsx)(eh.Checkbox,{checked:i.has(e.guardrail_name||""),onClick:t=>{t.stopPropagation(),e.guardrail_name&&j(e.guardrail_name)}}),title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tE.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(eL.Text,{className:"text-xs text-gray-600",children:[i.size," of ",y.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(tm.Title,{className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===i.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tE.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(eL.Text,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(eL.Text,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tW,{guardrailNames:Array.from(i),onSubmit:_,results:d.length>0?d:null,errors:g.length>0?g:null,isLoading:h,onClose:()=>s(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tF],64352);let tU="../ui/assets/logos/",tV=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tU}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tU}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tU}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tU}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tU}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tU}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tU}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tU}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tU}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tU}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tU}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tU}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tU}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tU}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tU}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tU}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tU}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tU}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tU}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tU}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tU}akto.svg`,tags:["Security","Safety","Monitoring"]}];e.s(["ALL_CARDS",0,tV],230312)},826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(994388),r=e.i(653824),i=e.i(881073),s=e.i(197647),n=e.i(723731),o=e.i(404206),d=e.i(326373),c=e.i(755151),m=e.i(646563),u=e.i(245094),p=e.i(764205),g=e.i(185357),x=e.i(782719),h=e.i(708347),f=e.i(969641),y=e.i(476993),j=e.i(727749),_=e.i(127952),b=e.i(180766);e.i(824296);var v=e.i(64352),N=e.i(311451),C=e.i(928685),w=e.i(266537),S=e.i(230312),k=e.i(826910);let I=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},A=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(I,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(k.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var T=e.i(464571),O=e.i(447566);let P={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1}},B=({card:e,onBack:l,accessToken:r,onGuardrailCreated:i})=>{let[s,n]=(0,a.useState)(!1),[o,d]=(0,a.useState)("overview"),c=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],m=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],u=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:l,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(O.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(T.Button,{onClick:()=>n(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:u.map(e=>(0,t.jsx)("div",{onClick:()=>d(e.key),style:{padding:"12px 20px",fontSize:14,color:o===e.key?"#1a73e8":"#5f6368",borderBottom:o===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:o===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===o&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:c.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===o&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:m.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(g.default,{visible:s,onClose:()=>n(!1),accessToken:r,onSuccess:()=>{n(!1),i()},preset:P[e.id]})]})},L=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=S.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(B,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(N.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(C.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(A,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(A,{card:e,onClick:()=>n(e)},e.id))})]})]})};var F=e.i(988846),$=e.i(837007),E=e.i(409797),M=e.i(54131),R=e.i(995926),z=e.i(678784),G=e.i(634831),D=e.i(438100),K=e.i(302202),H=e.i(328196),q=e.i(879664);e.s(["InfoIcon",()=>q.default],168118);var q=q;function J(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt:function(e){if(!e)return"—";try{let t=new Date(e);return isNaN(t.getTime())?e:t.toISOString().slice(0,10)}catch{return e}}(e.submitted_at),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let W={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{label:"Pending Review",bg:"bg-yellow-50",text:"text-yellow-700",dot:"bg-yellow-500"},rejected:{label:"Rejected",bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}},U={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function V({label:e,value:a,color:l}){return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg px-4 py-3",children:[(0,t.jsx)("div",{className:`text-2xl font-bold ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function Y({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function Z({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=W[e.status],c=U[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(K.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(Y,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,className:"text-xs bg-green-500 hover:bg-green-600 text-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:o,className:"text-xs border border-red-300 text-red-600 hover:bg-red-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:"Reject"})]})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(M.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(E.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function Q({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function X({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=W[e.status],y=U[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(R.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(Q,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)(G.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(Q,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(D.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(Y,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(R.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(R.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(M.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(E.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(q.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(G.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(z.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(R.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ee({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="approve"===e;return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-xl p-6 max-w-sm w-full mx-4",children:[(0,t.jsx)("div",{className:`w-10 h-10 rounded-full flex items-center justify-center mb-4 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(z.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(H.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"flex-1 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:l,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function et({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[d,c]=(0,a.useState)("all"),[m,u]=(0,a.useState)(null),[g,x]=(0,a.useState)(new Set),[h,f]=(0,a.useState)(null),[y,_]=(0,a.useState)(!0),[b,v]=(0,a.useState)(null),[N,C]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let w=(0,a.useCallback)(async()=>{if(!e)return void _(!1);_(!0),v(null);try{let t="all"===d?void 0:"pending"===d?"pending_review":d,a=await (0,p.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(J)),s(a.summary)}catch(e){v(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{_(!1)}},[e,d,N]);(0,a.useEffect)(()=>{w()},[w]);let S=l.find(e=>e.id===m)??null,k=i.total,I=i.pending_review,A=i.active,T=i.rejected;async function O(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),j.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{j.default.fromBackend("Failed to update forward API key")}}async function P(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),j.default.success("Static headers updated")}catch{j.default.fromBackend("Failed to update static headers")}}async function B(t,a){if(e)try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),j.default.success("Forward client headers updated")}catch{j.default.fromBackend("Failed to update forward client headers")}}async function L(t){if(e)try{await (0,p.approveGuardrailSubmission)(e,t),f(null),m===t&&u(null),await w(),j.default.success("Guardrail approved")}catch{j.default.fromBackend("Failed to approve guardrail")}}async function E(t){if(e)try{await (0,p.rejectGuardrailSubmission)(e,t),f(null),m===t&&u(null),await w(),j.default.success("Guardrail rejected")}catch{j.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${S?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(V,{label:"Total Submitted",value:k,color:"text-gray-900"}),(0,t.jsx)(V,{label:"Pending Review",value:I,color:"text-yellow-600"}),(0,t.jsx)(V,{label:"Active",value:A,color:"text-green-600"}),(0,t.jsx)(V,{label:"Rejected",value:T,color:"text-red-600"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(F.SearchIcon,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,t.jsx)("input",{type:"text",placeholder:"Search guardrails...",value:n,onChange:e=>o(e.target.value),className:"w-full pl-9 pr-4 py-2 border border-gray-200 rounded-md text-sm text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:d,onChange:e=>c(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 bg-white",children:[(0,t.jsx)("option",{value:"all",children:"All Status"}),(0,t.jsx)("option",{value:"pending",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)($.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[y&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),b&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:b}),!y&&!b&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!y&&!b&&l.map(e=>(0,t.jsx)(Z,{guardrail:e,isSelected:m===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>u(m===e.id?null:e.id),onToggleForwardKey:()=>O(e.id),onToggleHeaders:()=>{var t;return t=e.id,void x(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>f({id:e.id,action:"approve"}),onReject:()=>f({id:e.id,action:"reject"})},e.id))]})]}),S&&(0,t.jsx)(X,{guardrail:S,onClose:()=>u(null),onApprove:()=>f({id:S.id,action:"approve"}),onReject:()=>f({id:S.id,action:"reject"}),onToggleForwardKey:()=>O(S.id),onUpdateCustomHeaders:e=>P(S.id,e),onUpdateExtraHeaders:e=>B(S.id,e)}),h&&(0,t.jsx)(ee,{action:h.action,guardrailName:l.find(e=>e.id===h.id)?.name??"",onConfirm:()=>"approve"===h.action?L(h.id):E(h.id),onCancel:()=>f(null)})]})}e.s(["default",0,({accessToken:e,userRole:N})=>{let[C,w]=(0,a.useState)([]),[S,k]=(0,a.useState)(!1),[I,A]=(0,a.useState)(!1),[T,O]=(0,a.useState)(!1),[P,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),[E,M]=(0,a.useState)(!1),[R,z]=(0,a.useState)(null),[G,D]=(0,a.useState)(0),K=!!N&&(0,h.isAdminRole)(N),H=async()=>{if(e){O(!0);try{let t=await (0,p.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),w(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{O(!1)}}};(0,a.useEffect)(()=>{H()},[e]);let q=()=>{H()},J=async()=>{if(F&&e){B(!0);try{await (0,p.deleteGuardrailCall)(e,F.guardrail_id),j.default.success(`Guardrail "${F.guardrail_name}" deleted successfully`),await H()}catch(e){console.error("Error deleting guardrail:",e),j.default.fromBackend("Failed to delete guardrail")}finally{B(!1),M(!1),$(null)}}},W=F&&F.litellm_params?(0,b.getGuardrailLogoAndName)(F.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsxs)(r.TabGroup,{index:G,onIndexChange:D,children:[(0,t.jsxs)(i.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Guardrail Garden"}),(0,t.jsx)(s.Tab,{children:"Guardrails"}),(0,t.jsx)(s.Tab,{disabled:!e||0===C.length,children:"Test Playground"}),(0,t.jsx)(s.Tab,{children:"Submitted Guardrails"})]}),(0,t.jsxs)(n.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(L,{accessToken:e,onGuardrailCreated:q})}),(0,t.jsxs)(o.TabPanel,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(d.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(m.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{R&&z(null),k(!0)}},{key:"custom_code",icon:(0,t.jsx)(u.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{R&&z(null),A(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(c.DownOutlined,{className:"ml-2"})]})})}),R?(0,t.jsx)(f.default,{guardrailId:R,onClose:()=>z(null),accessToken:e,isAdmin:K}):(0,t.jsx)(x.default,{guardrailsList:C,isLoading:T,onDeleteClick:(e,t)=>{$(C.find(t=>t.guardrail_id===e)||null),M(!0)},accessToken:e,onGuardrailUpdated:H,isAdmin:K,onGuardrailClick:e=>z(e)}),(0,t.jsx)(g.default,{visible:S,onClose:()=>{k(!1)},accessToken:e,onSuccess:q}),(0,t.jsx)(v.CustomCodeModal,{visible:I,onClose:()=>{A(!1)},accessToken:e,onSuccess:q}),(0,t.jsx)(_.default,{isOpen:E,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${F?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:F?.guardrail_name},{label:"ID",value:F?.guardrail_id,code:!0},{label:"Provider",value:W},{label:"Mode",value:F?.litellm_params.mode},{label:"Default On",value:F?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{M(!1),$(null)},onOk:J,confirmLoading:P})]}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(y.default,{guardrailsList:C,isLoading:T,accessToken:e,onClose:()=>D(0)})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(et,{accessToken:e})})]})]})})}],487304)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/aa393ca378b22a92.js b/litellm/proxy/_experimental/out/_next/static/chunks/aa393ca378b22a92.js new file mode 100644 index 00000000000..027c4295d36 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/aa393ca378b22a92.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),p=e.i(72713),g=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:k}=s.Typography;function N({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:N,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(k,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(p.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),l=e.i(477386),r=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,l)=>{var i;let n=(i=e.callback_name,Object.entries(r.callback_map).find(([e,t])=>t===i)?.[0]||i),o=r.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=r.reverse_callback_map[e]||e,n=r.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),d]})}])},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),p=e.i(808613),g=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),k=e.i(237016),N=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=p.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),N.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),N.default.fromBackend(e),C(!1)}}},E=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:E,footer:_?[(0,n.jsx)(o.Button,{onClick:E,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:E,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(k.CopyToClipboard,{text:_,onCopy:()=>N.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(p.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(p.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(p.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(g.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(p.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(p.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),p=e.i(653824),g=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),k=e.i(784647),N=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),E=e.i(190702),B=e.i(891547),O=e.i(109799),P=e.i(921511),K=e.i(827252),z=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[p,g]=(0,N.useState)([]),[h,j]=(0,N.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,N.useState)([]),[v,k]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,N.useState)(e.organization_id||null),[A,M]=(0,N.useState)(e.auto_rotate||!1),[R,D]=(0,N.useState)(e.rotation_interval||""),[E,el]=(0,N.useState)(!e.expires),[er,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,N.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let ep=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:ep(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,N.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,N.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}E&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(z.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(B.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:p.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(K.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{k((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:E,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:B,teams:O,onKeyDataUpdate:P,onDelete:K,backButtonText:z="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,er]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ed]=(0,N.useState)(!1),[ec,em]=(0,N.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[ep,eg]=(0,N.useState)(B),[eh,ej]=(0,N.useState)(null),[e_,ey]=(0,N.useState)(!1),[eb,ef]=(0,N.useState)({}),[ev,ek]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{B&&eg(B)},[B]),(0,N.useEffect)(()=>{(async()=>{let e=ep?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;ek(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ek(!1)}})()},[U,ep?.metadata?.policies]),(0,N.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!ep)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:z}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ep.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...ep.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);eg(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,ep.token||ep.token_id),F.default.success("Key deleted successfully"),K&&K(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"")||$===ep.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===ep.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(k.KeyInfoHeader,{data:{keyName:ep.key_alias||"Virtual Key",keyId:ep.token_id||ep.token,userId:ep.user_id||"",userEmail:ep.user_email||"",createdBy:ep.user_email||ep.user_id||"",createdAt:ep.created_at?ew(ep.created_at):"",lastUpdated:ep.updated_at?ew(ep.updated_at):"",lastActive:ep.last_active?ew(ep.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:z,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:ep,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:ep?.key_alias||"-"},{label:"Key ID",value:ep?.token_id||ep?.token||"-",code:!0},{label:"Team ID",value:ep?.team_id||"-",code:!0},{label:"Spend",value:ep?.spend?`$${(0,i.formatNumberWithCommas)(ep.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:ep?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(ep.token||ep.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,E.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:ep?.key_alias||ep?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(p.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(ep.metadata?.guardrails)&&ep.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ep.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof ep.metadata?.disable_global_guardrails&&!0===ep.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(ep.metadata?.policies)&&ep.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ep.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:ep,onCancel:()=>Z(!1),onSubmit:eN,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.token_id||ep.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:ep.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:ep.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:ep.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:ep.project_id?(V=J?.find(e=>e.project_id===ep.project_id),V?.project_alias?`${V.project_alias} (${ep.project_id})`:ep.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(ep.organization_id??ep.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(ep.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:ep.expires?ew(ep.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:ep.auto_rotate,rotationInterval:ep.rotation_interval,lastRotationAt:ep.last_rotation_at,keyRotationAt:ep.key_rotation_at,nextRotationAt:ep.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(ep.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==ep.max_budget?`$${(0,i.formatNumberWithCommas)(ep.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.metadata?.tags)&&ep.metadata.tags.length>0?ep.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.prompts)&&ep.metadata.prompts.length>0?ep.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(ep.allowed_routes)&&ep.allowed_routes.length>0?ep.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(ep.metadata?.allowed_passthrough_routes)&&ep.metadata.allowed_passthrough_routes.length>0?ep.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:ep.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ep.models&&ep.models.length>0?ep.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==ep.tpm_limit?ep.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==ep.rpm_limit?ep.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==ep.max_parallel_requests?ep.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",ep.metadata?.model_tpm_limit?JSON.stringify(ep.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",ep.metadata?.model_rpm_limit?JSON.stringify(ep.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(ep.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:ep.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(ep.metadata),disabledCallbacks:Array.isArray(ep.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(ep.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1da362a651d209bd.js b/litellm/proxy/_experimental/out/_next/static/chunks/adfb239c02cec598.js similarity index 53% rename from litellm/proxy/_experimental/out/_next/static/chunks/1da362a651d209bd.js rename to litellm/proxy/_experimental/out/_next/static/chunks/adfb239c02cec598.js index a6ba2596a0d..481cc4e603a 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/1da362a651d209bd.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/adfb239c02cec598.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,973706,e=>{"use strict";var t=e.i(843476),s=e.i(72713),a=e.i(637235),r=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:c,label:d="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(e),[g,f]=(0,n.useState)(null),[j,_]=(0,n.useState)(""),[y,b]=(0,n.useState)(""),k=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let s=t.getValue(),a=(0,i.default)(e.from).isSame((0,i.default)(s.from),"day"),r=(0,i.default)(e.to).isSame((0,i.default)(s.to),"day");if(a&&r)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{f(v(e))},[e,v]);let N=(0,n.useCallback)(()=>{if(!j||!y)return{isValid:!0,error:""};let e=(0,i.default)(j,"YYYY-MM-DD"),t=(0,i.default)(y,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[j,y])();(0,n.useEffect)(()=>{e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let T=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let s=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${s(e)} - ${s(t)}`},[]),C=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let s={...e},a=new Date(e.from);return t=new Date(e.to?e.to:e.from),a.toDateString()===t.toDateString(),a.setHours(0,0,0,0),t.setHours(23,59,59,999),s.from=a,s.to=t,s},[]),w=(0,n.useCallback)(()=>{try{if(j&&y&&N.isValid){let e=(0,i.default)(j,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let s={from:e.toDate(),to:t.toDate()};p(s);let a=v(s);f(a)}}}catch(e){console.warn("Invalid date format:",e)}},[j,y,N.isValid,v]);return(0,n.useEffect)(()=>{w()},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:d}),(0,t.jsxs)("div",{className:"relative",ref:k,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>x(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:T(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-[9999] min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:o.map(e=>{let s=g===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:s}=e.getValue();p({from:t,to:s}),f(e.shortLabel),_((0,i.default)(t).format("YYYY-MM-DD")),b((0,i.default)(s).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${s?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${s?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:j,onChange:e=>_(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:y,onChange:e=>b(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!N.isValid&&N.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:N.error})]})}),h.from&&h.to&&N.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,i.default)(h.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,i.default)(h.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),f(v(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:()=>{h.from&&h.to&&N.isValid&&(c(h),requestIdleCallback(()=>{c(C(h))},{timeout:100}),x(!1))},disabled:!h.from||!h.to||!N.isValid,children:"Apply"})]})})]})]})})]})]})}])},289793,952840,617885,286718,23371,487147,498610,785952,193523,260573,e=>{"use strict";var t=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(708347),l=e.i(135214);let i=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&r.all_admin_roles.includes(a||"")})}],289793);let n=(0,a.createQueryKeys)("customers");e.s(["useCustomers",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.allEndUsersCall)(e),enabled:!!e&&r.all_admin_roles.includes(a)})}],952840);var o=e.i(621482);let c=(0,a.createQueryKeys)("infiniteUsers"),d=50;e.s(["useInfiniteUsers",0,(e=d,s)=>{let{accessToken:a,userRole:i}=(0,l.default)();return(0,o.useInfiniteQuery)({queryKey:c.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:r})=>await (0,t.userListCall)(a,null,r,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.pagee&&t&&t.length?(0,u.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,u.jsx)("p",{className:"text-tremor-content-strong",children:s}),t.map(e=>{let t=e.dataKey?.toString();if(!t||!e.payload)return null;let s=((e,t)=>{let s=t.substring(t.indexOf(".")+1);if(e.metrics&&s in e.metrics)return e.metrics[s]})(e.payload,t),a=t.includes("spend"),r=void 0!==s?a?`$${s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:s.toLocaleString():"N/A",l=b[e.color]||e.color;return(0,u.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:l}}),(0,u.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:t.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]}),(0,u.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:r})]},t)})]}):null,v=({categories:e,colors:t})=>(0,u.jsx)("div",{className:"flex items-center justify-end space-x-4",children:e.map((e,s)=>{let a=b[t[s]]||t[s];return(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:a}}),(0,u.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]},e)})});e.s(["CustomLegend",0,v,"CustomTooltip",0,k],286718);var N=e.i(291542),T=e.i(271645);let C=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,u.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,u.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],w=({topModels:e})=>{let[t,s]=(0,T.useState)("table");return 0===e.length?null:(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,u.jsx)(_.Title,{children:"Model Usage"}),(0,u.jsxs)("div",{className:"flex space-x-2",children:[(0,u.jsx)("button",{onClick:()=>s("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table"}),(0,u.jsx)("button",{onClick:()=>s("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart"})]})]}),"chart"===t?(0,u.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,u.jsx)(p.BarChart,{style:{height:40*e.length},data:e.map(e=>({key:e.model,spend:e.spend})),index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,u.jsx)(N.Table,{columns:C,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})]})};function q(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function S(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}e.s(["valueFormatter",()=>q,"valueFormatterSpend",()=>S],23371);let L=({modelName:e,metrics:t,hidePromptCachingMetrics:s=!1})=>(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:t.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:t.total_tokens.toLocaleString()}),(0,u.jsxs)(j.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend,2)]}),(0,u.jsxs)(j.Text,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsx)(_.Title,{children:"Top Virtual Keys by Spend"}),(0,u.jsx)("div",{className:"mt-3",children:(0,u.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,u.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,u.jsxs)("div",{className:"text-right",children:[(0,u.jsxs)(j.Text,{className:"font-medium",children:["$",(0,m.formatNumberWithCommas)(e.spend,2)]}),(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:[e.requests.toLocaleString()," requests | ",e.tokens.toLocaleString()," tokens"]})]})]},e.api_key))})})]}),t.top_models&&t.top_models.length>0&&(0,u.jsx)(w,{topModels:t.top_models}),(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Spend per day"}),(0,u.jsx)(v,{categories:["metrics.spend"],colors:["green"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:q,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Requests per day"}),(0,u.jsx)(v,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:q,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Success vs Failed Requests"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:q,customTooltip:k,showLegend:!1})]}),!s&&(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Prompt Caching Metrics"}),(0,u.jsx)(v,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)(j.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,u.jsxs)(j.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"],valueFormatter:q,customTooltip:k,showLegend:!1})]})]})]});e.s(["ActivityMetrics",0,({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let s=Object.keys(e).sort((t,s)=>""===t?1:""===s?-1:e[s].total_spend-e[t].total_spend),a={total_requests:0,total_successful_requests:0,total_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,daily_data:{}};Object.values(e).forEach(e=>{a.total_requests+=e.total_requests,a.total_successful_requests+=e.total_successful_requests,a.total_tokens+=e.total_tokens,a.total_spend+=e.total_spend,a.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,a.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{a.daily_data[e.date]||(a.daily_data[e.date]={prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,spend:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0}),a.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,a.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,a.daily_data[e.date].total_tokens+=e.metrics.total_tokens,a.daily_data[e.date].api_requests+=e.metrics.api_requests,a.daily_data[e.date].spend+=e.metrics.spend,a.daily_data[e.date].successful_requests+=e.metrics.successful_requests,a.daily_data[e.date].failed_requests+=e.metrics.failed_requests,a.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,a.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(a.daily_data).map(([e,t])=>({date:e,metrics:t})).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,u.jsx)(_.Title,{children:"Overall Usage"}),(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:a.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:a.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:a.total_tokens.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(a.total_spend,2)]})]})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens Over Time"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:q,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Requests Over Time"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:k,showLegend:!1})]})]})]}),(0,u.jsx)(y.Collapse,{defaultActiveKey:s[0],children:s.map(s=>(0,u.jsx)(y.Collapse.Panel,{header:(0,u.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,u.jsx)(_.Title,{children:e[s].label||"Unknown Item"}),(0,u.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,u.jsxs)("span",{children:["$",(0,m.formatNumberWithCommas)(e[s].total_spend,2)]}),(0,u.jsxs)("span",{children:[e[s].total_requests.toLocaleString()," requests"]})]})]}),children:(0,u.jsx)(L,{modelName:s||"Unknown Model",metrics:e[s],hidePromptCachingMetrics:t})},s))})]})},"processActivityData",0,(e,t,s=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[t]||{}).forEach(([r,l])=>{a[r]||(a[r]={label:"api_keys"===t?((e,t,s)=>{let a=e.metadata.key_alias||`key-hash-${t}`,r=e.metadata.team_id;if(r){let e=(0,x.resolveTeamAliasFromTeamID)(r,s);return e?`${a} (team: ${e})`:`${a} (team_id: ${r})`}return a})(l,r,s):"entities"===t&&(l.metadata?.agent_name||l.metadata?.team_alias)||r,total_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0,prompt_tokens:0,completion_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,top_api_keys:[],top_models:[],daily_data:[]}),a[r].total_requests+=l.metrics.api_requests,a[r].prompt_tokens+=l.metrics.prompt_tokens,a[r].completion_tokens+=l.metrics.completion_tokens,a[r].total_tokens+=l.metrics.total_tokens,a[r].total_spend+=l.metrics.spend,a[r].total_successful_requests+=l.metrics.successful_requests,a[r].total_failed_requests+=l.metrics.failed_requests,a[r].total_cache_read_input_tokens+=l.metrics.cache_read_input_tokens||0,a[r].total_cache_creation_input_tokens+=l.metrics.cache_creation_input_tokens||0,a[r].daily_data.push({date:e.date,metrics:{prompt_tokens:l.metrics.prompt_tokens,completion_tokens:l.metrics.completion_tokens,total_tokens:l.metrics.total_tokens,api_requests:l.metrics.api_requests,spend:l.metrics.spend,successful_requests:l.metrics.successful_requests,failed_requests:l.metrics.failed_requests,cache_read_input_tokens:l.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:l.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==t&&Object.entries(a).forEach(([s,r])=>{let l={};e.results.forEach(e=>{let a=e.breakdown[t]?.[s];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,t])=>{l[e]||(l[e]={api_key:e,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),l[e].spend+=t.metrics.spend,l[e].requests+=t.metrics.api_requests,l[e].tokens+=t.metrics.total_tokens})}),a[s].top_api_keys=Object.values(l).sort((e,t)=>t.spend-e.spend).slice(0,5)}),"api_keys"===t&&Object.entries(a).forEach(([t,s])=>{let r={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,s])=>{if(s&&"api_key_breakdown"in s){let a=s.api_key_breakdown?.[t];a&&(r[e]||(r[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),r[e].spend+=a.metrics.spend,r[e].requests+=a.metrics.api_requests,r[e].successful_requests+=a.metrics.successful_requests||0,r[e].failed_requests+=a.metrics.failed_requests||0,r[e].tokens+=a.metrics.total_tokens)}})}),a[t].top_models=Object.values(r).sort((e,t)=>t.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())}),a}],487147);var D=e.i(994388),A=e.i(366283),M=e.i(779241),E=e.i(212931),O=e.i(808613),F=e.i(482725),$=e.i(199133),U=e.i(727749);e.s(["default",0,({isOpen:e,onClose:s,accessToken:a})=>{let[r]=O.Form.useForm(),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(null),[c,d]=(0,T.useState)(!1),[m,x]=(0,T.useState)("cloudzero"),[h,p]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e&&a&&g()},[e,a]);let g=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let t=await e.json();o(t),r.setFieldsValue({connection_id:t.connection_id})}else if(404!==e.status){let t=await e.json();U.default.fromBackend(`Failed to load existing settings: ${t.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),U.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},f=async e=>{if(!a)return void U.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",r=n?"PUT":"POST",l={...e,timezone:"UTC"},i=await fetch(s,{method:r,headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await i.json();if(i.ok)return U.default.success(c.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return U.default.fromBackend(c.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),U.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},_=async()=>{if(!a)return void U.default.fromBackend("No access token available");p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),r=await e.json();e.ok?(U.default.success(r.message||"Export to CloudZero completed successfully"),s()):U.default.fromBackend(r.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),U.default.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},y=async()=>{p(!0);try{U.default.info("CSV export functionality coming soon!"),s()}catch(e){console.error("Error exporting CSV:",e),U.default.fromBackend("Failed to export CSV")}finally{p(!1)}},b=async()=>{if("cloudzero"===m){if(!n){let e=await r.validateFields();if(!await f(e))return}await _()}else await y()},k=()=>{r.resetFields(),x("cloudzero"),o(null),s()},v=[{value:"cloudzero",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,u.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,u.jsx)("span",{children:"Export to CSV"})]})}];return(0,u.jsx)(E.Modal,{title:"Export Data",open:e,onCancel:k,footer:null,width:600,destroyOnHidden:!0,children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,u.jsx)($.Select,{value:m,onChange:x,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,u.jsx)("div",{children:c?(0,u.jsx)("div",{className:"flex justify-center py-8",children:(0,u.jsx)(F.Spin,{size:"large"})}):(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(A.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),color:"green",className:"mb-4",children:(0,u.jsxs)(j.Text,{children:["API Key: ",n.api_key_masked,(0,u.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,u.jsxs)(O.Form,{form:r,layout:"vertical",children:[(0,u.jsx)(O.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,u.jsx)(M.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,u.jsx)(O.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,u.jsx)(M.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,u.jsx)(A.Callout,{title:"CSV Export",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,u.jsx)(j.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,u.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,u.jsx)(D.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,u.jsx)(D.Button,{onClick:b,loading:l||h,disabled:l||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})}],498610);var P=e.i(785242),R=e.i(464571),V=e.i(981339);let z=({value:e,onChange:t})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,u.jsx)($.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),I=({dateRange:e,selectedFilters:t})=>(0,u.jsxs)("div",{className:"text-sm text-gray-500",children:[e.from?.toLocaleDateString()," - ",e.to?.toLocaleDateString(),t.length>0&&` \xb7 ${t.length} filter${t.length>1?"s":""}`]});var B=e.i(91739);let W=({value:e,onChange:t,entityType:s})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,u.jsx)(B.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s," and key"]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s,", split by API key"]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",s," and model"]}),(0,u.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var K=e.i(59935);let Y=e=>{if(!e)return null;for(let t of Object.values(e)){let e=t?.metadata?.team_id;if(e)return e}return null},H=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],G=e=>{let t=e.entities;return t&&Object.keys(t).length>0?t:(e=>{let t=e.api_keys;if(!t||0===Object.keys(t).length)return{};let s={};for(let[e,a]of Object.entries(t)){let t=a?.metadata?.team_id||"Unassigned";s[t]||(s[t]={metrics:Object.fromEntries(H.map(e=>[e,0])),api_key_breakdown:{}});let r=s[t].metrics,l=a?.metrics||{};for(let e of H)r[e]+=l[e]||0;s[t].api_key_breakdown[e]=a}return s})(e)},Z=(e,t,s,a={})=>{switch(t){case"daily":default:return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([r,l])=>{let i=Y(l.api_key_breakdown),n=i&&s[i]||null;a.push({Date:e.date,[t]:n||"-",[`${t} ID`]:i||"-","Spend ($)":(0,m.formatNumberWithCommas)(l.metrics.spend,4),Requests:l.metrics.api_requests,"Successful Requests":l.metrics.successful_requests,"Failed Requests":l.metrics.failed_requests,"Total Tokens":l.metrics.total_tokens,"Prompt Tokens":l.metrics.prompt_tokens||0,"Completion Tokens":l.metrics.completion_tokens||0})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_keys":return((e,t,s={})=>{let a={};return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([t,r])=>{Object.entries(r.api_key_breakdown||{}).forEach(([r,l])=>{let i=l?.metadata?.key_alias||null,n=l?.metadata?.team_id||t,o=n&&s[n]||null,c=`${e.date}_${n}_${r}`;a[c]?(a[c].metrics.spend+=l.metrics?.spend||0,a[c].metrics.api_requests+=l.metrics?.api_requests||0,a[c].metrics.successful_requests+=l.metrics?.successful_requests||0,a[c].metrics.failed_requests+=l.metrics?.failed_requests||0,a[c].metrics.total_tokens+=l.metrics?.total_tokens||0,a[c].metrics.prompt_tokens+=l.metrics?.prompt_tokens||0,a[c].metrics.completion_tokens+=l.metrics?.completion_tokens||0):a[c]={Date:e.date,teamId:n,teamAlias:o,keyId:r,keyAlias:i,metrics:{spend:l.metrics?.spend||0,api_requests:l.metrics?.api_requests||0,successful_requests:l.metrics?.successful_requests||0,failed_requests:l.metrics?.failed_requests||0,total_tokens:l.metrics?.total_tokens||0,prompt_tokens:l.metrics?.prompt_tokens||0,completion_tokens:l.metrics?.completion_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[t]:e.teamAlias||"-",[`${t} ID`]:e.teamId||"-","Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,m.formatNumberWithCommas)(e.metrics.spend,4),Requests:e.metrics.api_requests,"Successful Requests":e.metrics.successful_requests,"Failed Requests":e.metrics.failed_requests,"Total Tokens":e.metrics.total_tokens,"Prompt Tokens":e.metrics.prompt_tokens,"Completion Tokens":e.metrics.completion_tokens})).sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_models":return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{let r={};Object.entries(G(e.breakdown)).forEach(([t,s])=>{r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{Object.entries(s.api_key_breakdown||{}).forEach(([s,a])=>{r[t][e]||(r[t][e]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][e].spend+=a.metrics.spend||0,r[t][e].requests+=a.metrics.api_requests||0,r[t][e].successful+=a.metrics.successful_requests||0,r[t][e].failed+=a.metrics.failed_requests||0,r[t][e].tokens+=a.metrics.total_tokens||0})})}),Object.entries(r).forEach(([r,l])=>{let i=G(e.breakdown)[r],n=Y(i?.api_key_breakdown),o=n&&s[n]||null;Object.entries(l).forEach(([s,r])=>{a.push({Date:e.date,[t]:o||"-",[`${t} ID`]:n||"-",Model:s,"Spend ($)":(0,m.formatNumberWithCommas)(r.spend,4),Requests:r.requests,Successful:r.successful,Failed:r.failed,"Total Tokens":r.tokens})})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a)}},J=({isOpen:e,onClose:t,entityType:s,spendData:a,dateRange:r,selectedFilters:l,customTitle:i})=>{let[n,o]=(0,T.useState)("csv"),[c,d]=(0,T.useState)("daily"),[m,h]=(0,T.useState)(!1),{data:p,isLoading:g}=(0,P.useTeams)(),f=s.charAt(0).toUpperCase()+s.slice(1),j=i||`Export ${f} Usage`,_=(0,T.useMemo)(()=>(0,x.createTeamAliasMap)(p),[p]),y=async e=>{let i=e||n;h(!0);try{"csv"===i?(((e,t,s,a,r={})=>{let l=Z(e,t,s,r),i=new Blob([K.default.unparse(l)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)})(a,c,f,s,_),U.default.success(`${f} usage data exported successfully as CSV`)):(((e,t,s,a,r,l,i={})=>{let n=Z(e,t,s,i),o={export_date:new Date().toISOString(),entity_type:a,date_range:{from:r.from?.toISOString(),to:r.to?.toISOString()},filters_applied:l.length>0?l:"None",export_scope:t,summary:{total_spend:e.metadata.total_spend,total_requests:e.metadata.total_api_requests,successful_requests:e.metadata.total_successful_requests,failed_requests:e.metadata.total_failed_requests,total_tokens:e.metadata.total_tokens}},c=new Blob([JSON.stringify({metadata:o,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)})(a,c,f,s,r,l,_),U.default.success(`${f} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),U.default.fromBackend("Failed to export data")}finally{h(!1)}};return(0,u.jsx)(E.Modal,{title:(0,u.jsx)("span",{className:"text-base font-semibold",children:j}),open:e,onCancel:t,footer:null,width:480,children:(0,u.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,u.jsx)(V.Skeleton,{active:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(I,{dateRange:r,selectedFilters:l}),(0,u.jsx)(W,{value:c,onChange:d,entityType:s}),(0,u.jsx)(z,{value:n,onChange:o})]}),g?(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(V.Skeleton.Button,{active:!0}),(0,u.jsx)(V.Skeleton.Button,{active:!0})]}):(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(R.Button,{variant:"outlined",onClick:t,disabled:m,children:"Cancel"}),(0,u.jsx)(R.Button,{onClick:()=>y(),loading:m||g,disabled:m||g,type:"primary",children:m?"Exporting...":`Export ${n.toUpperCase()}`})]})]})})};e.s(["default",0,J],785952),e.s(["default",0,({dateValue:e,entityType:t,spendData:s,showFilters:a=!1,filterLabel:r,filterPlaceholder:l,selectedFilters:i=[],onFiltersChange:n,filterOptions:o=[],filterMode:c="multiple",customTitle:d,compactLayout:m=!1,teams:x=[]})=>{let[h,p]=(0,T.useState)(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mb-4",children:(0,u.jsxs)("div",{className:`grid ${a&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[a&&o.length>0&&(0,u.jsxs)("div",{children:[r&&(0,u.jsx)(j.Text,{className:"mb-2",children:r}),(0,u.jsx)($.Select,{mode:"single"===c?void 0:"multiple",style:{width:"100%"},placeholder:l,value:"single"===c?i[0]??void 0:i,onChange:e=>{"single"===c?n?.(e?[e]:[]):n?.(e)},options:o,allowClear:!0})]}),(0,u.jsx)("div",{className:"justify-self-end",children:(0,u.jsx)(D.Button,{onClick:()=>p(!0),icon:()=>(0,u.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})})]})}),(0,u.jsx)(J,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:s,dateRange:e,selectedFilters:i,customTitle:d,teams:x})]})}],193523),e.s([],260573)},797305,497650,e=>{"use strict";var t=e.i(843476),s=e.i(755151),a=e.i(872934),r=e.i(827252),l=e.i(56456),i=e.i(240647),n=e.i(152473),o=e.i(584935),c=e.i(304967),d=e.i(309426),u=e.i(350967),m=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),f=e.i(599724),j=e.i(629569),_=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),N=e.i(898586),T=e.i(271645),C=e.i(289793),w=e.i(952840),q=e.i(135214),S=e.i(738014),L=e.i(617885),D=e.i(500330),A=e.i(708347),M=e.i(487147),E=e.i(498610);e.i(260573);var O=e.i(785952),F=e.i(764205),$=e.i(973706),U=e.i(571303);let P=({isDateChanging:e=!1})=>(0,t.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)(U.UiLoadingSpinner,{className:"size-5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,t.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var R=e.i(290571),V=e.i(95779),z=e.i(444755),I=e.i(673706);let B=T.default.forwardRef((e,t)=>{let{color:s,children:a,className:r}=e,l=(0,R.__rest)(e,["color","children","className"]);return T.default.createElement("p",Object.assign({ref:t,className:(0,z.tremorTwMerge)("font-semibold text-tremor-metric",s?(0,I.getColorClassNames)(s,V.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",r)},l),a)});B.displayName="Metric";var W=e.i(37091),K=e.i(269200),Y=e.i(427612),H=e.i(496020),G=e.i(64848),Z=e.i(942232),J=e.i(977572),Q=e.i(994388);let X=({accessToken:e,selectedTags:s,formatAbbreviatedNumber:a})=>{let r,l,i,n,[c,d]=(0,T.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[u,_]=(0,T.useState)(!1),[y,b]=(0,T.useState)(1),k=async()=>{if(e){_(!0);try{let t=await (0,F.perUserAnalyticsCall)(e,y,50,s.length>0?s:void 0);d(t)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{_(!1)}}};return(0,T.useEffect)(()=>{k()},[e,s,y]),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"Per User Usage"}),(0,t.jsx)(W.Subtitle,{children:"Individual developer usage metrics"}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"User Details"}),(0,t.jsx)(m.Tab,{children:"Usage Distribution"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"User ID"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Email"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Agent"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,t.jsx)(Z.TableBody,{children:c.results.slice(0,10).map((e,s)=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{className:"font-medium",children:e.user_id})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_email||"N/A"})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_agent||"Unknown"})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.successful_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.total_tokens)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.failed_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsxs)(f.Text,{children:["$",a(e.spend,4)]})})]},s))})]}),c.results.length>10&&(0,t.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,t.jsxs)(f.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y>1&&b(y-1)},disabled:1===y,children:"Previous"}),(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y=c.total_pages,children:"Next"})]})]})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,t.jsx)(W.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,t.jsx)(o.BarChart,{data:(r=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";r.set(t,(r.get(t)||0)+1)}),l=Array.from(r.entries()).sort(([,e],[,t])=>t-e).slice(0,8).map(([e])=>e),i={"1-9 requests":{range:[1,9],agents:{}},"10-99 requests":{range:[10,99],agents:{}},"100-999 requests":{range:[100,999],agents:{}},"1K-9.9K requests":{range:[1e3,9999],agents:{}},"10K-99.9K requests":{range:[1e4,99999],agents:{}},"100K+ requests":{range:[1e5,1/0],agents:{}}},c.results.forEach(e=>{let t=e.successful_requests,s=e.user_agent||"Unknown";l.includes(s)&&Object.entries(i).forEach(([e,a])=>{t>=a.range[0]&&t<=a.range[1]&&(a.agents[s]||(a.agents[s]=0),a.agents[s]++)})}),Object.entries(i).map(([e,t])=>{let s={category:e};return l.forEach(e=>{s[e]=t.agents[e]||0}),s})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";n.set(t,(n.get(t)||0)+1)}),Array.from(n.entries()).sort(([,e],[,t])=>t-e).slice(0,8).map(([e])=>e)),colors:["blue","green","orange","red","purple","yellow","pink","indigo"],valueFormatter:e=>`${e} users`,yAxisWidth:80,showLegend:!0,stack:!0})]})]})]})]})},ee=({accessToken:e,userRole:s,dateValue:a,onDateChange:r})=>{let[l,i]=(0,T.useState)({results:[]}),[n,d]=(0,T.useState)({results:[]}),[_,y]=(0,T.useState)({results:[]}),[b,N]=(0,T.useState)({results:[]}),[C,w]=(0,T.useState)(""),[q,S]=(0,T.useState)([]),[L,D]=(0,T.useState)([]),[A,M]=(0,T.useState)(!1),[E,O]=(0,T.useState)(!1),[$,U]=(0,T.useState)(!1),[R,V]=(0,T.useState)(!1),[z,I]=(0,T.useState)(!1),K=new Date,Y=async()=>{if(e){M(!0);try{let t=await (0,F.tagDistinctCall)(e);S(t.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{M(!1)}}},H=async()=>{if(e){O(!0);try{let t=await (0,F.tagDauCall)(e,K,C||void 0,L.length>0?L:void 0);i(t)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{O(!1)}}},G=async()=>{if(e){U(!0);try{let t=await (0,F.tagWauCall)(e,K,C||void 0,L.length>0?L:void 0);d(t)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{U(!1)}}},Z=async()=>{if(e){V(!0);try{let t=await (0,F.tagMauCall)(e,K,C||void 0,L.length>0?L:void 0);y(t)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},J=async()=>{if(e&&a.from&&a.to){I(!0);try{let t=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);N(t)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{I(!1)}}};(0,T.useEffect)(()=>{Y()},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{H(),G(),Z()},50);return()=>clearTimeout(t)},[e,C,L]),(0,T.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{J()},50);return()=>clearTimeout(e)},[e,a,L]);let Q=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,ee=e=>Object.entries(e.reduce((e,t)=>(e[t.tag]=(e[t.tag]||0)+t.active_users,e),{})).sort(([,e],[,t])=>t-e).map(([e])=>e),et=ee(l.results).slice(0,10),es=ee(n.results).slice(0,10),ea=ee(_.results).slice(0,10),er=(()=>{let e=[],t=new Date;for(let s=6;s>=0;s--){let a=new Date(t);a.setDate(a.getDate()-s);let r={date:a.toISOString().split("T")[0]};et.forEach(e=>{r[Q(e)]=0}),e.push(r)}return l.results.forEach(t=>{let s=Q(t.tag),a=e.find(e=>e.date===t.date);a&&(a[s]=t.active_users)}),e})(),el=(()=>{let e=[];for(let t=1;t<=7;t++){let s={week:`Week ${t}`};es.forEach(e=>{s[Q(e)]=0}),e.push(s)}return n.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Week (\d+)/);if(a){let r=`Week ${a[1]}`,l=e.find(e=>e.week===r);l&&(l[s]=t.active_users)}}),e})(),ei=(()=>{let e=[];for(let t=1;t<=7;t++){let s={month:`Month ${t}`};ea.forEach(e=>{s[Q(e)]=0}),e.push(s)}return _.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Month (\d+)/);if(a){let r=`Month ${a[1]}`,l=e.find(e=>e.month===r);l&&(l[s]=t.active_users)}}),e})(),en=(e,t=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(t)+"M";if(e>=1e6)return(e/1e6).toFixed(t)+"M";if(e>=1e4)return(e/1e3).toFixed(t)+"K";if(e>=1e3)return(e/1e3).toFixed(t)+"K";else return e.toFixed(t)};return(0,t.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:"Summary by User Agent"}),(0,t.jsx)(W.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,t.jsxs)("div",{className:"w-96",children:[(0,t.jsx)(f.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:A,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:q.map(e=>{let s=Q(e),a=s.length>50?`${s.substring(0,50)}...`:s;return(0,t.jsx)(k.Select.Option,{value:e,label:a,title:s,children:a},e)})})]})]}),z?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4",children:[(b.results||[]).slice(0,4).map((e,s)=>{let a=Q(e.tag),r=a.length>15?a.substring(0,15)+"...":a;return(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,t.jsx)(j.Title,{className:"truncate",children:r})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(B,{className:"text-lg",children:en(e.successful_requests)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(B,{className:"text-lg",children:en(e.total_tokens)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsxs)(B,{className:"text-lg",children:["$",en(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(b.results||[]).length)}).map((e,s)=>(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"No Data"}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]})]})]},`empty-${s}`))]})]})}),(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU/WAU/MAU"}),(0,t.jsx)(m.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,t.jsx)(W.Subtitle,{children:"Active users across different time periods"})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU"}),(0,t.jsx)(m.Tab,{children:"WAU"}),(0,t.jsx)(m.Tab,{children:"MAU"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),E?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:er,index:"date",categories:et.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),$?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:el,index:"week",categories:es.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),R?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:ei,index:"month",categories:ea.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(X,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:en})})]})]})})]})};var et=e.i(617802);let es=["total_spend","total_prompt_tokens","total_completion_tokens","total_tokens","total_api_requests","total_successful_requests","total_failed_requests","total_cache_read_input_tokens","total_cache_creation_input_tokens"],ea={results:[],metadata:{total_spend:0,total_prompt_tokens:0,total_completion_tokens:0,total_tokens:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,total_pages:1,has_more:!1,page:1}};function er({fetchFn:e,args:t,enabled:s}){let[a,r]=(0,T.useState)(ea),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),[c,d]=(0,T.useState)({currentPage:0,totalPages:0}),[u,m]=(0,T.useState)(!1),x=(0,T.useRef)(0),h=(0,T.useRef)(!1),p=(0,T.useRef)(null),g=(0,T.useRef)(t);g.current=t;let f=JSON.stringify(t),j=(0,T.useCallback)(()=>{h.current=!0,m(!0),o(!1),null!==p.current&&(clearTimeout(p.current),p.current=null)},[]);return(0,T.useEffect)(()=>{if(!s){r(ea),i(!1),o(!1),d({currentPage:0,totalPages:0}),m(!1);return}let t=++x.current;h.current=!1,m(!1);let a=()=>x.current!==t||h.current,l=e=>new Promise(t=>{p.current=setTimeout(()=>{p.current=null,t()},e)});return(async()=>{let t=g.current;i(!0),o(!1),d({currentPage:1,totalPages:1});try{let s=[...t.slice(0,3),1,...t.slice(3)],n=await e(...s);if(a())return;r(n);let c=n.metadata?.total_pages||1;if(d({currentPage:1,totalPages:c}),c<=1)return void i(!1);i(!1),o(!0);let u=[...n.results],m={...n.metadata};for(let s=2;s<=c;s++){if(a()||(await l(300),a()))return;let i=[...t.slice(0,3),s,...t.slice(3)],n=await e(...i);if(a())return;u=[...u,...n.results],(m=function(e,t){let s={...e};for(let a of es)s[a]=(e[a]||0)+(t[a]||0);return s}(m,n.metadata)).total_pages=c,m.has_more=s{x.current++,null!==p.current&&(clearTimeout(p.current),p.current=null)}},[s,e,f]),{data:a,loading:l,isFetchingMore:n,progress:c,cancelled:u,cancel:j}}var el=e.i(23371),ei=e.i(286718);let en=({endpointData:e})=>{let s=e||{},a=T.default.useMemo(()=>Object.entries(s).map(([e,t])=>({endpoint:e,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}})),[s]);return(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(j.Title,{children:"Success vs Failed Requests by Endpoint"}),(0,t.jsx)(ei.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,t.jsx)(o.BarChart,{className:"mt-4",data:a,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:ei.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})]})};var eo=e.i(731195),ec=e.i(883966),ed=e.i(555706),eu=e.i(785183),em=e.i(93230),ex=e.i(844171),eh=(0,ec.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:ed.Line,axisComponents:[{axisType:"xAxis",AxisComp:eu.XAxis},{axisType:"yAxis",AxisComp:em.YAxis}],formatAxisMap:ex.formatAxisMap}),ep=e.i(872526),eg=e.i(800494),ef=e.i(234239),ej=e.i(559559),e_=e.i(238279),ey=e.i(114887),eb=e.i(933303),ek=e.i(628781),ev=e.i(472007),eN=e.i(480731);let eT=T.default.forwardRef((e,t)=>{let{data:s=[],categories:a=[],index:r,colors:l=V.themeColorRange,valueFormatter:i=I.defaultValueFormatter,startEndOnly:n=!1,showXAxis:o=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:u="equidistantPreserveStart",animationDuration:m=900,showAnimation:x=!1,showTooltip:h=!0,showLegend:p=!0,showGridLines:g=!0,autoMinValue:f=!1,curveType:j="linear",minValue:_,maxValue:y,connectNulls:b=!1,allowDecimals:k=!0,noDataText:v,className:N,onValueChange:C,enableLegendSlider:w=!1,customTooltip:q,rotateLabelX:S,padding:L=o||c?{left:20,right:20}:{left:0,right:0},tickGap:D=5,xAxisLabel:A,yAxisLabel:M}=e,E=(0,R.__rest)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[O,F]=(0,T.useState)(60),[$,U]=(0,T.useState)(void 0),[P,B]=(0,T.useState)(void 0),W=(0,ev.constructCategoryColors)(a,l),K=(0,ev.getYAxisDomain)(f,_,y),Y=!!C;function H(e){Y&&(e===P&&!$||(0,ev.hasOnlyOneValueForThisKey)(s,e)&&$&&$.dataKey===e?(B(void 0),null==C||C(null)):(B(e),null==C||C({eventType:"category",categoryClicked:e})),U(void 0))}return T.default.createElement("div",Object.assign({ref:t,className:(0,z.tremorTwMerge)("w-full h-80",N)},E),T.default.createElement(eo.ResponsiveContainer,{className:"h-full w-full"},(null==s?void 0:s.length)?T.default.createElement(eh,{data:s,onClick:Y&&(P||$)?()=>{U(void 0),B(void 0),null==C||C(null)}:void 0,margin:{bottom:A?30:void 0,left:M?20:void 0,right:M?5:void 0,top:5}},g?T.default.createElement(ep.CartesianGrid,{className:(0,z.tremorTwMerge)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,T.default.createElement(eu.XAxis,{padding:L,hide:!o,dataKey:r,interval:n?"preserveStartEnd":u,tick:{transform:"translate(0, 6)"},ticks:n?[s[0][r],s[s.length-1][r]]:void 0,fill:"",stroke:"",className:(0,z.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:D,angle:null==S?void 0:S.angle,dy:null==S?void 0:S.verticalShift,height:null==S?void 0:S.xAxisHeight},A&&T.default.createElement(eg.Label,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},A)),T.default.createElement(em.YAxis,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:K,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,z.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:i,allowDecimals:k},M&&T.default.createElement(eg.Label,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},M)),T.default.createElement(ef.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:h?({active:e,payload:t,label:s})=>q?T.default.createElement(q,{payload:null==t?void 0:t.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!=(t=W.get(e.dataKey))?t:eN.BaseColors.Gray})}),active:e,label:s}):T.default.createElement(eb.default,{active:e,payload:t,label:s,valueFormatter:i,categoryColors:W}):T.default.createElement(T.default.Fragment,null),position:{y:0}}),p?T.default.createElement(ej.Legend,{verticalAlign:"top",height:O,content:({payload:e})=>(0,ey.default)({payload:e},W,F,P,Y?e=>H(e):void 0,w)}):null,a.map(e=>{var t;return T.default.createElement(ed.Line,{className:(0,z.tremorTwMerge)((0,I.getColorClassNames)(null!=(t=W.get(e))?t:eN.BaseColors.Gray,V.colorPalette.text).strokeColor),strokeOpacity:$||P&&P!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,dataKey:c}=e;return T.default.createElement(e_.Dot,{className:(0,z.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,I.getColorClassNames)(null!=(t=W.get(c))?t:eN.BaseColors.Gray,V.colorPalette.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,onClick:(t,a)=>{a.stopPropagation(),Y&&(e.index===(null==$?void 0:$.index)&&e.dataKey===(null==$?void 0:$.dataKey)||(0,ev.hasOnlyOneValueForThisKey)(s,e.dataKey)&&P&&P===e.dataKey?(B(void 0),U(void 0),null==C||C(null)):(B(e.dataKey),U({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,cx:o,cy:c,dataKey:d,index:u}=t;return(0,ev.hasOnlyOneValueForThisKey)(s,e)&&!($||P&&P!==e)||(null==$?void 0:$.index)===u&&(null==$?void 0:$.dataKey)===e?T.default.createElement(e_.Dot,{key:u,cx:o,cy:c,r:5,stroke:r,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,className:(0,z.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,I.getColorClassNames)(null!=(a=W.get(d))?a:eN.BaseColors.Gray,V.colorPalette.text).fillColor)}):T.default.createElement(T.Fragment,{key:u})},key:e,name:e,type:j,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:x,animationDuration:m,connectNulls:b})}),C?a.map(e=>T.default.createElement(ed.Line,{className:(0,z.tremorTwMerge)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:j,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:b,onClick:(e,t)=>{t.stopPropagation();let{name:s}=e;H(s)}})):null):T.default.createElement(ek.default,{noDataText:v})))});eT.displayName="LineChart";let eC=function({dailyData:e,endpointData:s}){let a=(0,T.useMemo)(()=>{var t;let s,a;return e?.results&&0!==e.results.length?(t=e.results,s=[],a=new Set,t.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),t.forEach(e=>{let t={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(s=>{let a=e.breakdown.endpoints?.[s];t[s]=a?.metrics.api_requests||0}),s.push(t)}),s.reverse()):[]},[e]),r=(0,T.useMemo)(()=>0===a.length?[]:Object.keys(a[0]).filter(e=>"date"!==e),[a]);return(0,t.jsxs)(c.Card,{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)(j.Title,{children:"Endpoint Usage Trends"})}),(0,t.jsx)(eT,{className:"h-80",data:a,index:"date",categories:r,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,r.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})};var ew=e.i(291542),eq=e.i(309821);e.s(["Progress",()=>eq.default],497650);var eq=eq;let eS=({endpointData:e})=>{let s=Object.entries(e).map(([e,t])=>{var s,a;return{key:e,endpoint:e,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,api_requests:t.metrics.api_requests,total_tokens:t.metrics.total_tokens,spend:t.metrics.spend,successRate:(s=t.metrics.successful_requests,0===(a=t.metrics.api_requests)?0:s/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let a=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return a>0&&a<100&&(l[`${a}%`]="#22c55e",l[`${a+.01}%`]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)(eq.default,{percent:a+r,size:"small",strokeColor:l,showInfo:!1})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,t.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,t.jsx)("span",{className:"text-gray-400",children:"/"}),(0,t.jsx)("span",{className:"text-red-600 font-medium",children:s.failed_requests.toLocaleString()})]})]})}},{title:"Total Request",dataIndex:"api_requests",key:"api_requests",render:e=>e.toLocaleString()},{title:"Success Rate",dataIndex:"successRate",key:"successRate",render:e=>{let s=e.toFixed(2);return(0,t.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`}];return(0,t.jsx)(ew.Table,{columns:a,dataSource:s,pagination:!1})},eL=({userSpendData:e})=>{let s=(0,T.useMemo)(()=>{let t={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,s])=>{t[e]||(t[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:s.metadata||{},api_key_breakdown:{}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,t[e].metrics.completion_tokens+=s.metrics.completion_tokens,t[e].metrics.total_tokens+=s.metrics.total_tokens,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests||0,t[e].metrics.failed_requests+=s.metrics.failed_requests||0,t[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,t[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),t},[e]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eS,{endpointData:s}),(0,t.jsx)(en,{endpointData:s}),(0,t.jsx)(eC,{dailyData:e,endpointData:s})]})};var eD=e.i(214541),eA=e.i(413990),eM=e.i(193523),eM=eM,eE=e.i(916925),eO=e.i(1023),eF=e.i(149121);function e$({topModels:e,topModelsLimit:s,setTopModelsLimit:a}){let[r,l]=(0,T.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return`$${(0,D.formatNumberWithCommas)(t,2)}`}},{header:"Successful",accessorKey:"successful_requests",cell:e=>(0,t.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",cell:e=>(0,t.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:s,onChange:e=>a(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>l("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>l("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===r?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(o.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,s)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(eF.DataTable,{columns:i,data:n,renderSubComponent:()=>(0,t.jsx)(t.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}let eU={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},eP=({accessToken:e,entityType:s,entityId:r,entityList:i,dateValue:n})=>{let b,k,v,{teams:N}=(0,eD.default)(),[C,w]=(0,T.useState)([]),[q,S]=(0,T.useState)(5),[L,A]=(0,T.useState)(5),[E,O]=(0,T.useState)(5),$=(0,T.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),U=(0,T.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,T.useMemo)(()=>"user"===s?C.length>0?C[0]:null:C.length>0?C:null,[s,C]),R=eU[s],V=!!e&&!!$&&!!U,{data:z,isFetchingMore:I,progress:B,cancelled:Q,cancel:X}=er({fetchFn:R,args:[e,$,U,P],enabled:V}),{data:ee,isFetchingMore:et,progress:es,cancelled:ea,cancel:ei}=er({fetchFn:F.agentDailyActivityCall,args:[e,$,U,null],enabled:V&&"team"===s}),en=(0,M.processActivityData)(z,"models",N||[]),eo=(0,M.processActivityData)(z,"api_keys",N||[]),ec="team"===s?(0,M.processActivityData)(ee,"entities",N||[]):{},ed=()=>{let e={};return z.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=s.metrics.spend,e[t].requests+=s.metrics.api_requests,e[t].successful_requests+=s.metrics.successful_requests,e[t].failed_requests+=s.metrics.failed_requests,e[t].tokens+=s.metrics.total_tokens}catch(e){console.error(`Error processing provider ${t}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,t)=>t.spend-e.spend)},eu=(e,t)=>{if(i){let t=i.find(t=>t.value===e);if(t)return t.label}return t?.team_alias?t.team_alias:e},em=()=>{var e;let t={};return z.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{t[e]||(t[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{alias:eu(e,s.metadata),id:e}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests,t[e].metrics.failed_requests+=s.metrics.failed_requests,t[e].metrics.total_tokens+=s.metrics.total_tokens})}),e=Object.values(t).sort((e,t)=>t.metrics.spend-e.metrics.spend),0===C.length?e:e.filter(e=>C.includes(e.metadata.id))},ex=s.charAt(0).toUpperCase()+s.slice(1);return(0,t.jsxs)("div",{style:{width:"100%"},className:"relative",children:[I&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",B.currentPage," / ",B.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:X,children:"Stop"})]})}),Q&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",B.currentPage,"/",B.totalPages," pages loaded)"]})}),et&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching agent data: fetched ",es.currentPage," / ",es.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:ei,children:"Stop"})]})}),ea&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),(0,t.jsx)(eM.default,{dateValue:n,entityType:s,spendData:z,showFilters:null!==i&&i.length>0,filterLabel:`Filter by ${s}`,filterPlaceholder:`Select ${s} to filter...`,selectedFilters:C,onFiltersChange:w,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===s?"single":"multiple",teams:N||[]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"agent"===s?"Request / Token Consumption":"Model Activity"}),"team"===s?(0,t.jsx)(m.Tab,{children:"Agent Activity"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)(j.Title,{children:[ex," Spend Overview"]}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Spend"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)(z.metadata.total_spend,2)]})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:z.metadata.total_api_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:z.metadata.total_successful_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:z.metadata.total_failed_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:z.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),(0,t.jsx)(o.BarChart,{data:[...z.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload,r=Object.keys(a.breakdown.entities||{}).length;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total ",ex,"s: ",r]}),(0,t.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,t.jsxs)("p",{className:"font-semibold",children:["Spend by ",ex,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,t])=>{let s=e.metrics.spend;return t.metrics.spend-s}).slice(0,5).map(([e,s])=>(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:[eu(e,s.metadata),": $",(0,D.formatNumberWithCommas)(s.metrics.spend,2)]},e)),r>5&&(0,t.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",r-5," more"]})]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsxs)(j.Title,{children:["Spend Per ",ex]}),(0,t.jsx)(W.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,t.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,t.jsxs)("span",{children:["Get Started by Tracking cost per ",ex," "]}),(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/enterprise#spend-tracking",className:"text-blue-500 hover:text-blue-700 ml-1",children:"here"})]})]}),(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-6",children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(o.BarChart,{className:"mt-4 h-52",data:em().slice(0,5).map(e=>({...e,metadata:{...e.metadata,alias_display:e.metadata.alias&&e.metadata.alias.length>15?`${e.metadata.alias.slice(0,15)}...`:e.metadata.alias}})),index:"metadata.alias_display",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:ex}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:em().filter(e=>e.metrics.spend>0).map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:e.metadata.alias}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.metrics.spend,4)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eO.default,{topKeys:(console.log("debugTags",{spendData:z}),b={},z.results.forEach(e=>{let{breakdown:t}=e,{entities:s}=t;console.log("debugTags",{entities:s});let a=Object.keys(s).reduce((e,t)=>{let{api_key_breakdown:a}=s[t];return Object.keys(a).forEach(s=>{let r={tag:t,usage:a[s].metrics.spend};e[s]?e[s].push(r):e[s]=[r]}),e},{});console.log("debugTags",{tagDictionary:a}),Object.entries(e.breakdown.api_keys||{}).forEach(([e,t])=>{b[e]||(b[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:t.metadata.key_alias,team_id:t.metadata.team_id||null,tags:a[e]||[]}},console.log("debugTags",{keySpend:b})),b[e].metrics.spend+=t.metrics.spend,b[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,b[e].metrics.completion_tokens+=t.metrics.completion_tokens,b[e].metrics.total_tokens+=t.metrics.total_tokens,b[e].metrics.api_requests+=t.metrics.api_requests,b[e].metrics.successful_requests+=t.metrics.successful_requests,b[e].metrics.failed_requests+=t.metrics.failed_requests,b[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,b[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(b).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,q)),teams:null,showTags:"tag"===s,topKeysLimit:q,setTopKeysLimit:S})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"agent"===s?"Top Agents":"Top Models"}),(0,t.jsx)(e$,{topModels:(k={},z.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{k[e].spend+=t.metrics.spend}catch(s){console.error(`Error adding spend for ${e}: ${s}, got metrics: ${JSON.stringify(t)}`)}k[e].requests+=t.metrics.api_requests,k[e].successful_requests+=t.metrics.successful_requests,k[e].failed_requests+=t.metrics.failed_requests,k[e].tokens+=t.metrics.total_tokens})}),Object.entries(k).map(([e,t])=>({key:e,...t})).sort((e,t)=>t.spend-e.spend).slice(0,L)),topModelsLimit:L,setTopModelsLimit:A})]})}),"team"===s&&(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,t.jsx)(e$,{topModels:(v={},ee.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{v[e]||(v[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:t.metadata?.agent_name||e}),v[e].spend+=t.metrics.spend,v[e].requests+=t.metrics.api_requests,v[e].successful_requests+=t.metrics.successful_requests,v[e].failed_requests+=t.metrics.failed_requests,v[e].tokens+=t.metrics.total_tokens})}),Object.entries(v).map(([e,t])=>({key:t.agent_name,...t})).sort((e,t)=>t.spend-e.spend).slice(0,E)),topModelsLimit:E,setTopModelsLimit:O})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsx)(j.Title,{children:"Provider Usage"}),(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:ed(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:ed().map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)("img",{src:(0,eE.getProviderLogoAndName)(e.provider).logo,alt:`${e.provider} logo`,className:"w-4 h-4",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.provider?.charAt(0)||"-",a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:en,hidePromptCachingMetrics:"agent"===s})}),"team"===s?(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:ec})}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:eo,hidePromptCachingMetrics:"agent"===s})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:z})})]})]})]})};var eR=e.i(793130),eV=e.i(418371);let ez=({loading:e,isDateChanging:s,providerSpend:a})=>{let[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),m=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!l||e.spend>0);return(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Spend by Provider"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,t.jsx)(eR.Switch,{checked:l,onChange:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,t.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(eR.Switch,{checked:n,onChange:o})]})]})]}),e?(0,t.jsx)(P,{isDateChanging:s}):(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:m,index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:m.map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)(eV.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var eI=e.i(311451),eB=e.i(482725),eW=e.i(918789);let{TextArea:eK}=eI.Input,eY={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},eH=({step:e})=>{let s=eY[e.tool_name]||"🔧",a=e.arguments,r=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",l=a.team_ids||a.tags||a.user_id||"";return(0,t.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-gray-100 border border-gray-200 text-xs",children:[(0,t.jsx)("span",{className:"flex-shrink-0 mt-0.5",children:"running"===e.status?(0,t.jsx)(eB.Spin,{size:"small"}):"error"===e.status?(0,t.jsx)("span",{className:"text-red-500",children:"✗"}):(0,t.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"font-medium text-gray-700",children:[s," ",e.tool_label]}),r&&(0,t.jsx)("div",{className:"text-gray-500 mt-0.5",children:r}),l&&(0,t.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",l]}),"error"===e.status&&e.error&&(0,t.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},eG=({content:e})=>(0,t.jsx)(eW.default,{components:{p:({children:e})=>(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,t.jsx)("li",{children:e}),h1:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:s})=>s?.includes("language-")?(0,t.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto text-xs",children:(0,t.jsx)("code",{children:e})}):(0,t.jsx)("code",{className:"px-1 py-0.5 rounded bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,t.jsx)("div",{className:"overflow-x-auto my-2",children:(0,t.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,t.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,t.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),eZ=({open:e,onClose:s,accessToken:a})=>{let[r,l]=(0,T.useState)([]),[i,n]=(0,T.useState)(""),[o,c]=(0,T.useState)(!1),[d,u]=(0,T.useState)(void 0),[m,x]=(0,T.useState)([]),[h,p]=(0,T.useState)(!1),[g,f]=(0,T.useState)(""),[j,_]=(0,T.useState)(null),[b,v]=(0,T.useState)([]),N=(0,T.useRef)(null),C=(0,T.useRef)(null);(0,T.useEffect)(()=>{e&&0===m.length&&w()},[e]),(0,T.useEffect)(()=>{"function"==typeof N.current?.scrollIntoView&&N.current.scrollIntoView({behavior:"smooth"})},[r,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let t=e.data.map(e=>e.model_group).sort();x(t)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},q=async()=>{if(!a||!i.trim()||o)return;let e=[...r,{role:"user",content:i.trim()}];l(e),n(""),c(!0),f(""),_(null),v([]);let t=new AbortController;C.current=t;let s="",u=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{_(null),s+=e,f(s)},()=>{_(null),v([]),l(e=>[...e,{role:"assistant",content:s,toolCalls:u.length>0?[...u]:void 0}]),f("")},e=>{_(null),v([]),l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")},e=>{_(e)},e=>{let t=u.findIndex(t=>t.tool_name===e.tool_name);t>=0?u[t]={...e}:u.push({...e}),v([...u])},t.signal)}catch(s){if(s?.name==="AbortError"||t.signal.aborted)return;let e=s?.message||"Failed to get response. Please try again.";l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")}finally{c(!1),C.current=null}};return(0,t.jsxs)("div",{"data-testid":"usage-ai-chat-panel",className:`fixed top-0 right-0 h-full bg-white border-l border-gray-200 shadow-2xl z-50 flex flex-col transition-transform duration-300 ease-in-out ${e?"translate-x-0":"translate-x-full"}`,style:{width:420},children:[(0,t.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,t.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),s()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,t.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 flex-shrink-0",children:(0,t.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>u(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:m.map(e=>({label:e,value:e})),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===r.length&&!g&&!o&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),r.map((e,s)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("div",{className:"max-w-[88%] rounded-xl px-3.5 py-2 text-sm leading-relaxed bg-blue-600 text-white",children:e.content})}):(0,t.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,s)=>(0,t.jsx)(eH,{step:e},s))}),(0,t.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,t.jsx)(eG,{content:e.content})})]})},s)),o&&b.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:b.map((e,s)=>(0,t.jsx)(eH,{step:e},s))}),o&&!g&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,t.jsx)(eB.Spin,{size:"small"}),(0,t.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,t.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,t.jsx)(eG,{content:g})}),(0,t.jsx)("div",{ref:N})]}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(eK,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),q())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:o}),(0,t.jsx)(y.Button,{type:"primary",onClick:q,disabled:!i.trim()||o,loading:o,children:"Send"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,t.jsx)("button",{onClick:()=>{l([]),f(""),v([]),_(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===r.length,children:"Clear chat"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};var eJ=e.i(299251),eQ=e.i(153702);e.i(247167);var eX=e.i(931067);let e0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var e1=e.i(9583),e2=T.forwardRef(function(e,t){return T.createElement(e1.default,(0,eX.default)({},e,{ref:t,icon:e0}))}),e4=e.i(777579),e5=e.i(983561);let e3={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"};var e6=T.forwardRef(function(e,t){return T.createElement(e1.default,(0,eX.default)({},e,{ref:t,icon:e3}))}),e7=e.i(232164),e9=e.i(645526),e8=e.i(771674),te=e.i(906579);let tt=[{value:"global",label:"Global Usage",showForAdmin:"Global Usage",showForNonAdmin:"Your Usage",description:"View usage across all resources",descriptionForAdmin:"View usage across all resources",descriptionForNonAdmin:"View your usage",icon:(0,t.jsx)(e2,{style:{fontSize:"16px"}})},{value:"organization",label:"Organization Usage",showForAdmin:"Organization Usage",showForNonAdmin:"Your Organization Usage",description:"View organization-level usage",descriptionForAdmin:"View usage across all organizations",descriptionForNonAdmin:"View your organization's usage",icon:(0,t.jsx)(eJ.BankOutlined,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,t.jsx)(e9.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,t.jsx)(e6,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,t.jsx)(e7.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,t.jsx)(e5.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,t.jsx)(e8.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,t.jsx)(e4.LineChartOutlined,{style:{fontSize:"16px"}}),adminOnly:!0}],ts=({value:e,onChange:s,isAdmin:a,title:r="Usage View",description:l="Select the usage data you want to view","data-id":i})=>{let n=tt.filter(e=>!e.adminOnly||!!a).map(e=>{let t=e.label,s=e.description;return e.showForAdmin&&e.showForNonAdmin&&(t=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(s=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:t,description:s,icon:e.icon,badgeText:e.badgeText}});return(0,t.jsx)("div",{className:"w-full","data-id":i,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,t.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,t.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,t.jsx)(eQ.BarChartOutlined,{style:{fontSize:"32px"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:l})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(k.Select,{value:e,onChange:s,className:"w-54 sm:w-64 md:w-72",size:"large",options:n.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,t.jsx)("div",{className:"items-center",children:(0,t.jsx)(te.Badge,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:s.icon}),(0,t.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};e.s(["default",0,({teams:e,organizations:U})=>{let R,{accessToken:V,userRole:z,userId:I,premiumUser:B}=(0,q.default)(),[W,K]=(0,T.useState)(null),[Y,H]=(0,T.useState)(!1),[G,Z]=(0,T.useState)(!1),[J,Q]=(0,T.useState)(!1),X=(0,T.useMemo)(()=>new Date(Date.now()-6048e5),[]),es=(0,T.useMemo)(()=>new Date,[]),[ea,ei]=(0,T.useState)({from:X,to:es}),[en,eo]=(0,T.useState)([]),{data:ec=[]}=(0,w.useCustomers)(),{data:ed}=(0,C.useAgents)(),{data:eu}=(0,S.useCurrentUser)();console.log(`currentUser: ${JSON.stringify(eu)}`),console.log(`currentUser max budget: ${eu?.max_budget}`);let em=A.all_admin_roles.includes(z||""),[ex,eh]=(0,T.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:300}),{data:ef,fetchNextPage:ej,hasNextPage:e_,isFetchingNextPage:ey,isLoading:eb}=(0,L.useInfiniteUsers)(50,ep||void 0),ek=(0,T.useMemo)(()=>{if(!ef?.pages)return[];let e=new Set,t=[];for(let s of ef.pages)for(let a of s.users)e.has(a.user_id)||(e.add(a.user_id),t.push({value:a.user_id,label:a.user_alias?`${a.user_alias} (${a.user_id})`:a.user_email?`${a.user_email} (${a.user_id})`:a.user_id}));return t},[ef]),[ev,eN]=(0,T.useState)(em?null:I||null),[eT,eC]=(0,T.useState)("groups"),[ew,eq]=(0,T.useState)(!1),[eS,eD]=(0,T.useState)(!1),[eA,eM]=(0,T.useState)(!1),[eE,eF]=(0,T.useState)("global"),[e$,eU]=(0,T.useState)(!0),[eR,eV]=(0,T.useState)(5),[eI,eB]=(0,T.useState)(5),[eW,eK]=(0,T.useState)(!1),eY=async()=>{V&&eo(Object.values(await (0,F.tagListCall)(V)).map(e=>({label:e.name,value:e.name})))};(0,T.useEffect)(()=>{eY()},[V]),(0,T.useEffect)(()=>{!em&&I&&eN(I)},[em,I]);let eH=em?ev:I||null,eG=(0,T.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),eJ=(0,T.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]),eQ=(0,T.useRef)(0);(0,T.useEffect)(()=>{if(!V||!eG||!eJ)return;let e=++eQ.current;Z(!0),H(!1),K(null),(0,F.userDailyActivityAggregatedCall)(V,eG,eJ,eH).then(t=>{eQ.current===e&&(K(t),Z(!1),Q(!1))}).catch(()=>{eQ.current===e&&(H(!0),Z(!1))})},[V,eG,eJ,eH]);let eX=er({fetchFn:F.userDailyActivityCall,args:[V,eG,eJ,eH],enabled:Y&&!!V&&!!eG&&!!eJ}),e0=(0,T.useMemo)(()=>W||(Y?eX.data:{results:[],metadata:{}}),[W,Y,eX.data]),e1=G||eX.loading;(0,T.useEffect)(()=>{Y&&!eX.loading&&eX.data.results.length>0&&Q(!1)},[Y,eX.loading,eX.data.results.length]);let e2=(0,T.useCallback)(e=>{Q(!0),ei(e)},[]),e4=e0.metadata?.total_spend||0,e5=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.models||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eI)},[e0.results,eI]),e3=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.model_groups||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eI)},[e0.results,eI]),e6=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({provider:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}))},[e0.results]),e7=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.api_keys||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:s.metadata.key_alias,team_id:null,tags:s.metadata.tags||[]}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests,e[t].metrics.failed_requests+=s.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,eR)},[e0.results,eR]),e9=(0,T.useMemo)(()=>[...e0.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),[e0.results]),e8=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"models",e),[e0,e]),te=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"api_keys",e),[e0,e]),tt=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"mcp_servers",e),[e0,e]);return(0,t.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,t.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,t.jsx)(ts,{value:eE,onChange:e=>eF(e),isAdmin:em}),(0,t.jsx)($.default,{value:ea,onValueChange:e2})]}),eX.isFetchingMore&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",eX.progress.currentPage," /"," ",eX.progress.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:eX.cancel,children:"Stop"})]})}),eX.cancelled&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",eX.progress.currentPage,"/",eX.progress.totalPages," ","pages loaded)"]})}),"global"===eE&&(0,t.jsxs)(t.Fragment,{children:[em&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by user"}),(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:ev,onChange:e=>eN(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&e_&&!ey&&ej()},loading:eb,notFoundContent:eb?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No users found",options:ek,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,ey&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]})})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"Model Activity"}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"MCP Server Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>eM(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),children:"Ask AI"}),(0,t.jsx)(y.Button,{onClick:()=>eD(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsxs)(d.Col,{numColSpan:2,children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,t.jsxs)(f.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,t.jsxs)(t.Fragment,{children:[ea.from.toLocaleDateString("en-US",{month:"short",day:"numeric",year:ea.from.getFullYear()!==ea.to.getFullYear()?"numeric":void 0})," - ",ea.to.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]})}),(0,t.jsx)(et.default,{userSpend:e4,selectedTeam:null,userMaxBudget:eu?.max_budget||null})]}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Usage Metrics"}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(v.Tooltip,{title:"Includes requests that failed to route to a provider, tool usage failures, and other request errors where the provider cannot be determined.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e0.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Average Cost per Request"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)((e4||0)/(e0.metadata?.total_api_requests||1),4)]})]}),(0,t.jsxs)(c.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eK(!eW),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),eW?(0,t.jsx)(s.DownOutlined,{className:"text-gray-400 text-xs"}):(0,t.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_tokens?.toLocaleString()||0})]})]}),eW&&(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Input Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:e0.metadata?.total_prompt_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Output Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e0.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e0.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)(o.BarChart,{data:e9,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eO.default,{topKeys:e7,teams:null,topKeysLimit:eR,setTopKeysLimit:eV})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"groups"===eT?"Top Public Model Names":"Top Litellm Models"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eI,onChange:e=>eB(e)}),(0,t.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"groups"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("groups"),children:"Public Model Name"}),(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"individual"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("individual"),children:"Litellm Model Name"})]})]}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(R="groups"===eT?e3:e5,(0,t.jsx)(o.BarChart,{className:"mt-4",style:{height:52*Math.min(R.length,eI)},data:R,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.key}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(ez,{loading:e1,isDateChanging:J,providerSpend:e6})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:e8})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:te})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:tt})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:e0})})]})]})]}),"organization"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"organization",userID:I,userRole:z,dateValue:ea,entityList:U?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:B}),"team"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"team",userID:I,userRole:z,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:B,dateValue:ea}),"customer"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"customer",userID:I,userRole:z,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:B,dateValue:ea}),"tag"===eE&&(0,t.jsxs)(t.Fragment,{children:[e$&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,t.jsxs)(N.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,t.jsx)(N.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>eU(!1),className:"mb-5"}),(0,t.jsx)(eP,{accessToken:V,entityType:"tag",userID:I,userRole:z,entityList:en,premiumUser:B,dateValue:ea})]}),"agent"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"agent",userID:I,userRole:z,entityList:ed?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:B,dateValue:ea}),"user"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"user",userID:I,userRole:z,entityList:ek.length>0?ek:null,premiumUser:B,dateValue:ea}),"user-agent-activity"===eE&&(0,t.jsx)(ee,{accessToken:V,userRole:z,dateValue:ea})]})}),(0,t.jsx)(E.default,{isOpen:ew,onClose:()=>eq(!1),accessToken:V}),(0,t.jsx)(O.default,{isOpen:eS,onClose:()=>eD(!1),entityType:"team",spendData:{results:e0.results,metadata:e0.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,t.jsx)(eZ,{open:eA,onClose:()=>eM(!1),accessToken:V})]})}],797305)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,973706,e=>{"use strict";var t=e.i(843476),s=e.i(72713),a=e.i(637235),r=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:c,label:d="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(e),[g,f]=(0,n.useState)(null),[j,_]=(0,n.useState)(""),[y,b]=(0,n.useState)(""),k=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let s=t.getValue(),a=(0,i.default)(e.from).isSame((0,i.default)(s.from),"day"),r=(0,i.default)(e.to).isSame((0,i.default)(s.to),"day");if(a&&r)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{f(v(e))},[e,v]);let N=(0,n.useCallback)(()=>{if(!j||!y)return{isValid:!0,error:""};let e=(0,i.default)(j,"YYYY-MM-DD"),t=(0,i.default)(y,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[j,y])();(0,n.useEffect)(()=>{e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let T=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let s=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${s(e)} - ${s(t)}`},[]),C=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let s={...e},a=new Date(e.from);return t=new Date(e.to?e.to:e.from),a.toDateString()===t.toDateString(),a.setHours(0,0,0,0),t.setHours(23,59,59,999),s.from=a,s.to=t,s},[]),w=(0,n.useCallback)(()=>{try{if(j&&y&&N.isValid){let e=(0,i.default)(j,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let s={from:e.toDate(),to:t.toDate()};p(s);let a=v(s);f(a)}}}catch(e){console.warn("Invalid date format:",e)}},[j,y,N.isValid,v]);return(0,n.useEffect)(()=>{w()},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:d}),(0,t.jsxs)("div",{className:"relative",ref:k,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>x(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:T(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-[9999] min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:o.map(e=>{let s=g===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:s}=e.getValue();p({from:t,to:s}),f(e.shortLabel),_((0,i.default)(t).format("YYYY-MM-DD")),b((0,i.default)(s).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${s?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${s?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:j,onChange:e=>_(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:y,onChange:e=>b(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!N.isValid&&N.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:N.error})]})}),h.from&&h.to&&N.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,i.default)(h.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,i.default)(h.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),f(v(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:()=>{h.from&&h.to&&N.isValid&&(c(h),requestIdleCallback(()=>{c(C(h))},{timeout:100}),x(!1))},disabled:!h.from||!h.to||!N.isValid,children:"Apply"})]})})]})]})})]})]})}])},289793,952840,617885,286718,23371,487147,498610,785952,193523,260573,e=>{"use strict";var t=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(708347),l=e.i(135214);let i=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&r.all_admin_roles.includes(a||"")})}],289793);let n=(0,a.createQueryKeys)("customers");e.s(["useCustomers",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.allEndUsersCall)(e),enabled:!!e&&r.all_admin_roles.includes(a)})}],952840);var o=e.i(621482);let c=(0,a.createQueryKeys)("infiniteUsers"),d=50;e.s(["useInfiniteUsers",0,(e=d,s)=>{let{accessToken:a,userRole:i}=(0,l.default)();return(0,o.useInfiniteQuery)({queryKey:c.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:r})=>await (0,t.userListCall)(a,null,r,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.pagee&&t&&t.length?(0,u.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,u.jsx)("p",{className:"text-tremor-content-strong",children:s}),t.map(e=>{let t=e.dataKey?.toString();if(!t||!e.payload)return null;let s=((e,t)=>{let s=t.substring(t.indexOf(".")+1);if(e.metrics&&s in e.metrics)return e.metrics[s]})(e.payload,t),a=t.includes("spend"),r=void 0!==s?a?`$${s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:s.toLocaleString():"N/A",l=b[e.color]||e.color;return(0,u.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:l}}),(0,u.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:t.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]}),(0,u.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:r})]},t)})]}):null,v=({categories:e,colors:t})=>(0,u.jsx)("div",{className:"flex items-center justify-end space-x-4",children:e.map((e,s)=>{let a=b[t[s]]||t[s];return(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:a}}),(0,u.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]},e)})});e.s(["CustomLegend",0,v,"CustomTooltip",0,k],286718);var N=e.i(291542),T=e.i(271645);let C=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,u.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,u.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],w=({topModels:e})=>{let[t,s]=(0,T.useState)("table");return 0===e.length?null:(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,u.jsx)(_.Title,{children:"Model Usage"}),(0,u.jsxs)("div",{className:"flex space-x-2",children:[(0,u.jsx)("button",{onClick:()=>s("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table"}),(0,u.jsx)("button",{onClick:()=>s("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart"})]})]}),"chart"===t?(0,u.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,u.jsx)(p.BarChart,{style:{height:40*e.length},data:e.map(e=>({key:e.model,spend:e.spend})),index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,u.jsx)(N.Table,{columns:C,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})]})};function S(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function q(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}e.s(["valueFormatter",()=>S,"valueFormatterSpend",()=>q],23371);let L=({modelName:e,metrics:t,hidePromptCachingMetrics:s=!1})=>(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:t.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:t.total_tokens.toLocaleString()}),(0,u.jsxs)(j.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend,2)]}),(0,u.jsxs)(j.Text,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsx)(_.Title,{children:"Top Virtual Keys by Spend"}),(0,u.jsx)("div",{className:"mt-3",children:(0,u.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,u.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,u.jsxs)("div",{className:"text-right",children:[(0,u.jsxs)(j.Text,{className:"font-medium",children:["$",(0,m.formatNumberWithCommas)(e.spend,2)]}),(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:[e.requests.toLocaleString()," requests | ",e.tokens.toLocaleString()," tokens"]})]})]},e.api_key))})})]}),t.top_models&&t.top_models.length>0&&(0,u.jsx)(w,{topModels:t.top_models}),(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Spend per day"}),(0,u.jsx)(v,{categories:["metrics.spend"],colors:["green"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Requests per day"}),(0,u.jsx)(v,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Success vs Failed Requests"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),!s&&(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Prompt Caching Metrics"}),(0,u.jsx)(v,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)(j.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,u.jsxs)(j.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"],valueFormatter:S,customTooltip:k,showLegend:!1})]})]})]});e.s(["ActivityMetrics",0,({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let s=Object.keys(e).sort((t,s)=>""===t?1:""===s?-1:e[s].total_spend-e[t].total_spend),a={total_requests:0,total_successful_requests:0,total_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,daily_data:{}};Object.values(e).forEach(e=>{a.total_requests+=e.total_requests,a.total_successful_requests+=e.total_successful_requests,a.total_tokens+=e.total_tokens,a.total_spend+=e.total_spend,a.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,a.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{a.daily_data[e.date]||(a.daily_data[e.date]={prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,spend:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0}),a.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,a.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,a.daily_data[e.date].total_tokens+=e.metrics.total_tokens,a.daily_data[e.date].api_requests+=e.metrics.api_requests,a.daily_data[e.date].spend+=e.metrics.spend,a.daily_data[e.date].successful_requests+=e.metrics.successful_requests,a.daily_data[e.date].failed_requests+=e.metrics.failed_requests,a.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,a.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(a.daily_data).map(([e,t])=>({date:e,metrics:t})).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,u.jsx)(_.Title,{children:"Overall Usage"}),(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:a.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:a.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:a.total_tokens.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(a.total_spend,2)]})]})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens Over Time"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Requests Over Time"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:k,showLegend:!1})]})]})]}),(0,u.jsx)(y.Collapse,{defaultActiveKey:s[0],children:s.map(s=>(0,u.jsx)(y.Collapse.Panel,{header:(0,u.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,u.jsx)(_.Title,{children:e[s].label||"Unknown Item"}),(0,u.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,u.jsxs)("span",{children:["$",(0,m.formatNumberWithCommas)(e[s].total_spend,2)]}),(0,u.jsxs)("span",{children:[e[s].total_requests.toLocaleString()," requests"]})]})]}),children:(0,u.jsx)(L,{modelName:s||"Unknown Model",metrics:e[s],hidePromptCachingMetrics:t})},s))})]})},"processActivityData",0,(e,t,s=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[t]||{}).forEach(([r,l])=>{a[r]||(a[r]={label:"api_keys"===t?((e,t,s)=>{let a=e.metadata.key_alias||`key-hash-${t}`,r=e.metadata.team_id;if(r){let e=(0,x.resolveTeamAliasFromTeamID)(r,s);return e?`${a} (team: ${e})`:`${a} (team_id: ${r})`}return a})(l,r,s):"entities"===t&&(l.metadata?.agent_name||l.metadata?.team_alias)||r,total_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0,prompt_tokens:0,completion_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,top_api_keys:[],top_models:[],daily_data:[]}),a[r].total_requests+=l.metrics.api_requests,a[r].prompt_tokens+=l.metrics.prompt_tokens,a[r].completion_tokens+=l.metrics.completion_tokens,a[r].total_tokens+=l.metrics.total_tokens,a[r].total_spend+=l.metrics.spend,a[r].total_successful_requests+=l.metrics.successful_requests,a[r].total_failed_requests+=l.metrics.failed_requests,a[r].total_cache_read_input_tokens+=l.metrics.cache_read_input_tokens||0,a[r].total_cache_creation_input_tokens+=l.metrics.cache_creation_input_tokens||0,a[r].daily_data.push({date:e.date,metrics:{prompt_tokens:l.metrics.prompt_tokens,completion_tokens:l.metrics.completion_tokens,total_tokens:l.metrics.total_tokens,api_requests:l.metrics.api_requests,spend:l.metrics.spend,successful_requests:l.metrics.successful_requests,failed_requests:l.metrics.failed_requests,cache_read_input_tokens:l.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:l.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==t&&Object.entries(a).forEach(([s,r])=>{let l={};e.results.forEach(e=>{let a=e.breakdown[t]?.[s];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,t])=>{l[e]||(l[e]={api_key:e,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),l[e].spend+=t.metrics.spend,l[e].requests+=t.metrics.api_requests,l[e].tokens+=t.metrics.total_tokens})}),a[s].top_api_keys=Object.values(l).sort((e,t)=>t.spend-e.spend).slice(0,5)}),"api_keys"===t&&Object.entries(a).forEach(([t,s])=>{let r={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,s])=>{if(s&&"api_key_breakdown"in s){let a=s.api_key_breakdown?.[t];a&&(r[e]||(r[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),r[e].spend+=a.metrics.spend,r[e].requests+=a.metrics.api_requests,r[e].successful_requests+=a.metrics.successful_requests||0,r[e].failed_requests+=a.metrics.failed_requests||0,r[e].tokens+=a.metrics.total_tokens)}})}),a[t].top_models=Object.values(r).sort((e,t)=>t.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())}),a}],487147);var D=e.i(994388),A=e.i(366283),M=e.i(779241),E=e.i(212931),O=e.i(808613),F=e.i(482725),$=e.i(199133),U=e.i(727749);e.s(["default",0,({isOpen:e,onClose:s,accessToken:a})=>{let[r]=O.Form.useForm(),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(null),[c,d]=(0,T.useState)(!1),[m,x]=(0,T.useState)("cloudzero"),[h,p]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e&&a&&g()},[e,a]);let g=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let t=await e.json();o(t),r.setFieldsValue({connection_id:t.connection_id})}else if(404!==e.status){let t=await e.json();U.default.fromBackend(`Failed to load existing settings: ${t.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),U.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},f=async e=>{if(!a)return void U.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",r=n?"PUT":"POST",l={...e,timezone:"UTC"},i=await fetch(s,{method:r,headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await i.json();if(i.ok)return U.default.success(c.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return U.default.fromBackend(c.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),U.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},_=async()=>{if(!a)return void U.default.fromBackend("No access token available");p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),r=await e.json();e.ok?(U.default.success(r.message||"Export to CloudZero completed successfully"),s()):U.default.fromBackend(r.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),U.default.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},y=async()=>{p(!0);try{U.default.info("CSV export functionality coming soon!"),s()}catch(e){console.error("Error exporting CSV:",e),U.default.fromBackend("Failed to export CSV")}finally{p(!1)}},b=async()=>{if("cloudzero"===m){if(!n){let e=await r.validateFields();if(!await f(e))return}await _()}else await y()},k=()=>{r.resetFields(),x("cloudzero"),o(null),s()},v=[{value:"cloudzero",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,u.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,u.jsx)("span",{children:"Export to CSV"})]})}];return(0,u.jsx)(E.Modal,{title:"Export Data",open:e,onCancel:k,footer:null,width:600,destroyOnHidden:!0,children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,u.jsx)($.Select,{value:m,onChange:x,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,u.jsx)("div",{children:c?(0,u.jsx)("div",{className:"flex justify-center py-8",children:(0,u.jsx)(F.Spin,{size:"large"})}):(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(A.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),color:"green",className:"mb-4",children:(0,u.jsxs)(j.Text,{children:["API Key: ",n.api_key_masked,(0,u.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,u.jsxs)(O.Form,{form:r,layout:"vertical",children:[(0,u.jsx)(O.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,u.jsx)(M.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,u.jsx)(O.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,u.jsx)(M.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,u.jsx)(A.Callout,{title:"CSV Export",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,u.jsx)(j.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,u.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,u.jsx)(D.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,u.jsx)(D.Button,{onClick:b,loading:l||h,disabled:l||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})}],498610);var P=e.i(785242),R=e.i(464571),V=e.i(981339);let z=({value:e,onChange:t})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,u.jsx)($.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),I=({dateRange:e,selectedFilters:t})=>(0,u.jsxs)("div",{className:"text-sm text-gray-500",children:[e.from?.toLocaleDateString()," - ",e.to?.toLocaleDateString(),t.length>0&&` \xb7 ${t.length} filter${t.length>1?"s":""}`]});var B=e.i(91739);let W=({value:e,onChange:t,entityType:s})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,u.jsx)(B.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s," and key"]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s,", split by API key"]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",s," and model"]}),(0,u.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var K=e.i(59935);let Y=e=>{if(!e)return null;for(let t of Object.values(e)){let e=t?.metadata?.team_id;if(e)return e}return null},H=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],G=e=>{let t=e.entities;return t&&Object.keys(t).length>0?t:(e=>{let t=e.api_keys;if(!t||0===Object.keys(t).length)return{};let s={};for(let[e,a]of Object.entries(t)){let t=a?.metadata?.team_id||"Unassigned";s[t]||(s[t]={metrics:Object.fromEntries(H.map(e=>[e,0])),api_key_breakdown:{}});let r=s[t].metrics,l=a?.metrics||{};for(let e of H)r[e]+=l[e]||0;s[t].api_key_breakdown[e]=a}return s})(e)},Z=(e,t,s,a={})=>{switch(t){case"daily":default:return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([r,l])=>{let i=Y(l.api_key_breakdown),n=i&&s[i]||null;a.push({Date:e.date,[t]:n||"-",[`${t} ID`]:i||"-","Spend ($)":(0,m.formatNumberWithCommas)(l.metrics.spend,4),Requests:l.metrics.api_requests,"Successful Requests":l.metrics.successful_requests,"Failed Requests":l.metrics.failed_requests,"Total Tokens":l.metrics.total_tokens,"Prompt Tokens":l.metrics.prompt_tokens||0,"Completion Tokens":l.metrics.completion_tokens||0})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_keys":return((e,t,s={})=>{let a={};return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([t,r])=>{Object.entries(r.api_key_breakdown||{}).forEach(([r,l])=>{let i=l?.metadata?.key_alias||null,n=l?.metadata?.team_id||t,o=n&&s[n]||null,c=`${e.date}_${n}_${r}`;a[c]?(a[c].metrics.spend+=l.metrics?.spend||0,a[c].metrics.api_requests+=l.metrics?.api_requests||0,a[c].metrics.successful_requests+=l.metrics?.successful_requests||0,a[c].metrics.failed_requests+=l.metrics?.failed_requests||0,a[c].metrics.total_tokens+=l.metrics?.total_tokens||0,a[c].metrics.prompt_tokens+=l.metrics?.prompt_tokens||0,a[c].metrics.completion_tokens+=l.metrics?.completion_tokens||0):a[c]={Date:e.date,teamId:n,teamAlias:o,keyId:r,keyAlias:i,metrics:{spend:l.metrics?.spend||0,api_requests:l.metrics?.api_requests||0,successful_requests:l.metrics?.successful_requests||0,failed_requests:l.metrics?.failed_requests||0,total_tokens:l.metrics?.total_tokens||0,prompt_tokens:l.metrics?.prompt_tokens||0,completion_tokens:l.metrics?.completion_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[t]:e.teamAlias||"-",[`${t} ID`]:e.teamId||"-","Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,m.formatNumberWithCommas)(e.metrics.spend,4),Requests:e.metrics.api_requests,"Successful Requests":e.metrics.successful_requests,"Failed Requests":e.metrics.failed_requests,"Total Tokens":e.metrics.total_tokens,"Prompt Tokens":e.metrics.prompt_tokens,"Completion Tokens":e.metrics.completion_tokens})).sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_models":return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{let r={};Object.entries(G(e.breakdown)).forEach(([t,s])=>{r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{Object.entries(s.api_key_breakdown||{}).forEach(([s,a])=>{r[t][e]||(r[t][e]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][e].spend+=a.metrics.spend||0,r[t][e].requests+=a.metrics.api_requests||0,r[t][e].successful+=a.metrics.successful_requests||0,r[t][e].failed+=a.metrics.failed_requests||0,r[t][e].tokens+=a.metrics.total_tokens||0})})}),Object.entries(r).forEach(([r,l])=>{let i=G(e.breakdown)[r],n=Y(i?.api_key_breakdown),o=n&&s[n]||null;Object.entries(l).forEach(([s,r])=>{a.push({Date:e.date,[t]:o||"-",[`${t} ID`]:n||"-",Model:s,"Spend ($)":(0,m.formatNumberWithCommas)(r.spend,4),Requests:r.requests,Successful:r.successful,Failed:r.failed,"Total Tokens":r.tokens})})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a)}},J=({isOpen:e,onClose:t,entityType:s,spendData:a,dateRange:r,selectedFilters:l,customTitle:i})=>{let[n,o]=(0,T.useState)("csv"),[c,d]=(0,T.useState)("daily"),[m,h]=(0,T.useState)(!1),{data:p,isLoading:g}=(0,P.useTeams)(),f=s.charAt(0).toUpperCase()+s.slice(1),j=i||`Export ${f} Usage`,_=(0,T.useMemo)(()=>(0,x.createTeamAliasMap)(p),[p]),y=async e=>{let i=e||n;h(!0);try{"csv"===i?(((e,t,s,a,r={})=>{let l=Z(e,t,s,r),i=new Blob([K.default.unparse(l)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)})(a,c,f,s,_),U.default.success(`${f} usage data exported successfully as CSV`)):(((e,t,s,a,r,l,i={})=>{let n=Z(e,t,s,i),o={export_date:new Date().toISOString(),entity_type:a,date_range:{from:r.from?.toISOString(),to:r.to?.toISOString()},filters_applied:l.length>0?l:"None",export_scope:t,summary:{total_spend:e.metadata.total_spend,total_requests:e.metadata.total_api_requests,successful_requests:e.metadata.total_successful_requests,failed_requests:e.metadata.total_failed_requests,total_tokens:e.metadata.total_tokens}},c=new Blob([JSON.stringify({metadata:o,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)})(a,c,f,s,r,l,_),U.default.success(`${f} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),U.default.fromBackend("Failed to export data")}finally{h(!1)}};return(0,u.jsx)(E.Modal,{title:(0,u.jsx)("span",{className:"text-base font-semibold",children:j}),open:e,onCancel:t,footer:null,width:480,children:(0,u.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,u.jsx)(V.Skeleton,{active:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(I,{dateRange:r,selectedFilters:l}),(0,u.jsx)(W,{value:c,onChange:d,entityType:s}),(0,u.jsx)(z,{value:n,onChange:o})]}),g?(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(V.Skeleton.Button,{active:!0}),(0,u.jsx)(V.Skeleton.Button,{active:!0})]}):(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(R.Button,{variant:"outlined",onClick:t,disabled:m,children:"Cancel"}),(0,u.jsx)(R.Button,{onClick:()=>y(),loading:m||g,disabled:m||g,type:"primary",children:m?"Exporting...":`Export ${n.toUpperCase()}`})]})]})})};e.s(["default",0,J],785952),e.s(["default",0,({dateValue:e,entityType:t,spendData:s,showFilters:a=!1,filterLabel:r,filterPlaceholder:l,selectedFilters:i=[],onFiltersChange:n,filterOptions:o=[],filterMode:c="multiple",customTitle:d,compactLayout:m=!1,teams:x=[]})=>{let[h,p]=(0,T.useState)(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mb-4",children:(0,u.jsxs)("div",{className:`grid ${a&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[a&&o.length>0&&(0,u.jsxs)("div",{children:[r&&(0,u.jsx)(j.Text,{className:"mb-2",children:r}),(0,u.jsx)($.Select,{mode:"single"===c?void 0:"multiple",style:{width:"100%"},placeholder:l,value:"single"===c?i[0]??void 0:i,onChange:e=>{"single"===c?n?.(e?[e]:[]):n?.(e)},options:o,allowClear:!0})]}),(0,u.jsx)("div",{className:"justify-self-end",children:(0,u.jsx)(D.Button,{onClick:()=>p(!0),icon:()=>(0,u.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})})]})}),(0,u.jsx)(J,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:s,dateRange:e,selectedFilters:i,customTitle:d,teams:x})]})}],193523),e.s([],260573)},797305,497650,e=>{"use strict";var t=e.i(843476),s=e.i(755151),a=e.i(872934),r=e.i(827252),l=e.i(56456),i=e.i(240647),n=e.i(152473),o=e.i(584935),c=e.i(304967),d=e.i(309426),u=e.i(350967),m=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),f=e.i(599724),j=e.i(629569),_=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),N=e.i(898586),T=e.i(271645),C=e.i(289793),w=e.i(952840),S=e.i(135214),q=e.i(738014),L=e.i(617885),D=e.i(500330),A=e.i(708347),M=e.i(487147),E=e.i(498610);e.i(260573);var O=e.i(785952),F=e.i(764205),$=e.i(973706),U=e.i(571303);let P=({isDateChanging:e=!1})=>(0,t.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)(U.UiLoadingSpinner,{className:"size-5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,t.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var R=e.i(290571),V=e.i(95779),z=e.i(444755),I=e.i(673706);let B=T.default.forwardRef((e,t)=>{let{color:s,children:a,className:r}=e,l=(0,R.__rest)(e,["color","children","className"]);return T.default.createElement("p",Object.assign({ref:t,className:(0,z.tremorTwMerge)("font-semibold text-tremor-metric",s?(0,I.getColorClassNames)(s,V.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",r)},l),a)});B.displayName="Metric";var W=e.i(37091),K=e.i(269200),Y=e.i(427612),H=e.i(496020),G=e.i(64848),Z=e.i(942232),J=e.i(977572),Q=e.i(994388);let X=({accessToken:e,selectedTags:s,formatAbbreviatedNumber:a})=>{let r,l,i,n,[c,d]=(0,T.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[u,_]=(0,T.useState)(!1),[y,b]=(0,T.useState)(1),k=async()=>{if(e){_(!0);try{let t=await (0,F.perUserAnalyticsCall)(e,y,50,s.length>0?s:void 0);d(t)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{_(!1)}}};return(0,T.useEffect)(()=>{k()},[e,s,y]),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"Per User Usage"}),(0,t.jsx)(W.Subtitle,{children:"Individual developer usage metrics"}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"User Details"}),(0,t.jsx)(m.Tab,{children:"Usage Distribution"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"User ID"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Email"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Agent"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,t.jsx)(Z.TableBody,{children:c.results.slice(0,10).map((e,s)=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{className:"font-medium",children:e.user_id})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_email||"N/A"})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_agent||"Unknown"})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.successful_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.total_tokens)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.failed_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsxs)(f.Text,{children:["$",a(e.spend,4)]})})]},s))})]}),c.results.length>10&&(0,t.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,t.jsxs)(f.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y>1&&b(y-1)},disabled:1===y,children:"Previous"}),(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y=c.total_pages,children:"Next"})]})]})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,t.jsx)(W.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,t.jsx)(o.BarChart,{data:(r=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";r.set(t,(r.get(t)||0)+1)}),l=Array.from(r.entries()).sort(([,e],[,t])=>t-e).slice(0,8).map(([e])=>e),i={"1-9 requests":{range:[1,9],agents:{}},"10-99 requests":{range:[10,99],agents:{}},"100-999 requests":{range:[100,999],agents:{}},"1K-9.9K requests":{range:[1e3,9999],agents:{}},"10K-99.9K requests":{range:[1e4,99999],agents:{}},"100K+ requests":{range:[1e5,1/0],agents:{}}},c.results.forEach(e=>{let t=e.successful_requests,s=e.user_agent||"Unknown";l.includes(s)&&Object.entries(i).forEach(([e,a])=>{t>=a.range[0]&&t<=a.range[1]&&(a.agents[s]||(a.agents[s]=0),a.agents[s]++)})}),Object.entries(i).map(([e,t])=>{let s={category:e};return l.forEach(e=>{s[e]=t.agents[e]||0}),s})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";n.set(t,(n.get(t)||0)+1)}),Array.from(n.entries()).sort(([,e],[,t])=>t-e).slice(0,8).map(([e])=>e)),colors:["blue","green","orange","red","purple","yellow","pink","indigo"],valueFormatter:e=>`${e} users`,yAxisWidth:80,showLegend:!0,stack:!0})]})]})]})]})},ee=({accessToken:e,userRole:s,dateValue:a,onDateChange:r})=>{let[l,i]=(0,T.useState)({results:[]}),[n,d]=(0,T.useState)({results:[]}),[_,y]=(0,T.useState)({results:[]}),[b,N]=(0,T.useState)({results:[]}),[C,w]=(0,T.useState)(""),[S,q]=(0,T.useState)([]),[L,D]=(0,T.useState)([]),[A,M]=(0,T.useState)(!1),[E,O]=(0,T.useState)(!1),[$,U]=(0,T.useState)(!1),[R,V]=(0,T.useState)(!1),[z,I]=(0,T.useState)(!1),K=new Date,Y=async()=>{if(e){M(!0);try{let t=await (0,F.tagDistinctCall)(e);q(t.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{M(!1)}}},H=async()=>{if(e){O(!0);try{let t=await (0,F.tagDauCall)(e,K,C||void 0,L.length>0?L:void 0);i(t)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{O(!1)}}},G=async()=>{if(e){U(!0);try{let t=await (0,F.tagWauCall)(e,K,C||void 0,L.length>0?L:void 0);d(t)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{U(!1)}}},Z=async()=>{if(e){V(!0);try{let t=await (0,F.tagMauCall)(e,K,C||void 0,L.length>0?L:void 0);y(t)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},J=async()=>{if(e&&a.from&&a.to){I(!0);try{let t=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);N(t)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{I(!1)}}};(0,T.useEffect)(()=>{Y()},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{H(),G(),Z()},50);return()=>clearTimeout(t)},[e,C,L]),(0,T.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{J()},50);return()=>clearTimeout(e)},[e,a,L]);let Q=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,ee=e=>Object.entries(e.reduce((e,t)=>(e[t.tag]=(e[t.tag]||0)+t.active_users,e),{})).sort(([,e],[,t])=>t-e).map(([e])=>e),et=ee(l.results).slice(0,10),es=ee(n.results).slice(0,10),ea=ee(_.results).slice(0,10),er=(()=>{let e=[],t=new Date;for(let s=6;s>=0;s--){let a=new Date(t);a.setDate(a.getDate()-s);let r={date:a.toISOString().split("T")[0]};et.forEach(e=>{r[Q(e)]=0}),e.push(r)}return l.results.forEach(t=>{let s=Q(t.tag),a=e.find(e=>e.date===t.date);a&&(a[s]=t.active_users)}),e})(),el=(()=>{let e=[];for(let t=1;t<=7;t++){let s={week:`Week ${t}`};es.forEach(e=>{s[Q(e)]=0}),e.push(s)}return n.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Week (\d+)/);if(a){let r=`Week ${a[1]}`,l=e.find(e=>e.week===r);l&&(l[s]=t.active_users)}}),e})(),ei=(()=>{let e=[];for(let t=1;t<=7;t++){let s={month:`Month ${t}`};ea.forEach(e=>{s[Q(e)]=0}),e.push(s)}return _.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Month (\d+)/);if(a){let r=`Month ${a[1]}`,l=e.find(e=>e.month===r);l&&(l[s]=t.active_users)}}),e})(),en=(e,t=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(t)+"M";if(e>=1e6)return(e/1e6).toFixed(t)+"M";if(e>=1e4)return(e/1e3).toFixed(t)+"K";if(e>=1e3)return(e/1e3).toFixed(t)+"K";else return e.toFixed(t)};return(0,t.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:"Summary by User Agent"}),(0,t.jsx)(W.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,t.jsxs)("div",{className:"w-96",children:[(0,t.jsx)(f.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:A,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:S.map(e=>{let s=Q(e),a=s.length>50?`${s.substring(0,50)}...`:s;return(0,t.jsx)(k.Select.Option,{value:e,label:a,title:s,children:a},e)})})]})]}),z?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4",children:[(b.results||[]).slice(0,4).map((e,s)=>{let a=Q(e.tag),r=a.length>15?a.substring(0,15)+"...":a;return(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,t.jsx)(j.Title,{className:"truncate",children:r})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(B,{className:"text-lg",children:en(e.successful_requests)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(B,{className:"text-lg",children:en(e.total_tokens)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsxs)(B,{className:"text-lg",children:["$",en(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(b.results||[]).length)}).map((e,s)=>(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"No Data"}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]})]})]},`empty-${s}`))]})]})}),(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU/WAU/MAU"}),(0,t.jsx)(m.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,t.jsx)(W.Subtitle,{children:"Active users across different time periods"})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU"}),(0,t.jsx)(m.Tab,{children:"WAU"}),(0,t.jsx)(m.Tab,{children:"MAU"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),E?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:er,index:"date",categories:et.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),$?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:el,index:"week",categories:es.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),R?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:ei,index:"month",categories:ea.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(X,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:en})})]})]})})]})};var et=e.i(617802);let es=["total_spend","total_prompt_tokens","total_completion_tokens","total_tokens","total_api_requests","total_successful_requests","total_failed_requests","total_cache_read_input_tokens","total_cache_creation_input_tokens"],ea={results:[],metadata:{total_spend:0,total_prompt_tokens:0,total_completion_tokens:0,total_tokens:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,total_pages:1,has_more:!1,page:1}};function er({fetchFn:e,args:t,enabled:s}){let[a,r]=(0,T.useState)(ea),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),[c,d]=(0,T.useState)({currentPage:0,totalPages:0}),[u,m]=(0,T.useState)(!1),x=(0,T.useRef)(0),h=(0,T.useRef)(!1),p=(0,T.useRef)(null),g=(0,T.useRef)(t);g.current=t;let f=JSON.stringify(t),j=(0,T.useCallback)(()=>{h.current=!0,m(!0),o(!1),null!==p.current&&(clearTimeout(p.current),p.current=null)},[]);return(0,T.useEffect)(()=>{if(!s){r(ea),i(!1),o(!1),d({currentPage:0,totalPages:0}),m(!1);return}let t=++x.current;h.current=!1,m(!1);let a=()=>x.current!==t||h.current,l=e=>new Promise(t=>{p.current=setTimeout(()=>{p.current=null,t()},e)});return(async()=>{let t=g.current;i(!0),o(!1),d({currentPage:1,totalPages:1});try{let s=[...t.slice(0,3),1,...t.slice(3)],n=await e(...s);if(a())return;r(n);let c=n.metadata?.total_pages||1;if(d({currentPage:1,totalPages:c}),c<=1)return void i(!1);i(!1),o(!0);let u=[...n.results],m={...n.metadata};for(let s=2;s<=c;s++){if(a()||(await l(300),a()))return;let i=[...t.slice(0,3),s,...t.slice(3)],n=await e(...i);if(a())return;u=[...u,...n.results],(m=function(e,t){let s={...e};for(let a of es)s[a]=(e[a]||0)+(t[a]||0);return s}(m,n.metadata)).total_pages=c,m.has_more=s{x.current++,null!==p.current&&(clearTimeout(p.current),p.current=null)}},[s,e,f]),{data:a,loading:l,isFetchingMore:n,progress:c,cancelled:u,cancel:j}}var el=e.i(23371),ei=e.i(286718);let en=({endpointData:e})=>{let s=e||{},a=T.default.useMemo(()=>Object.entries(s).map(([e,t])=>({endpoint:e,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}})),[s]);return(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(j.Title,{children:"Success vs Failed Requests by Endpoint"}),(0,t.jsx)(ei.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,t.jsx)(o.BarChart,{className:"mt-4",data:a,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:ei.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})]})};var eo=e.i(731195),ec=e.i(883966),ed=e.i(555706),eu=e.i(785183),em=e.i(93230),ex=e.i(844171),eh=(0,ec.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:ed.Line,axisComponents:[{axisType:"xAxis",AxisComp:eu.XAxis},{axisType:"yAxis",AxisComp:em.YAxis}],formatAxisMap:ex.formatAxisMap}),ep=e.i(872526),eg=e.i(800494),ef=e.i(234239),ej=e.i(559559),e_=e.i(238279),ey=e.i(114887),eb=e.i(933303),ek=e.i(628781),ev=e.i(472007),eN=e.i(480731);let eT=T.default.forwardRef((e,t)=>{let{data:s=[],categories:a=[],index:r,colors:l=V.themeColorRange,valueFormatter:i=I.defaultValueFormatter,startEndOnly:n=!1,showXAxis:o=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:u="equidistantPreserveStart",animationDuration:m=900,showAnimation:x=!1,showTooltip:h=!0,showLegend:p=!0,showGridLines:g=!0,autoMinValue:f=!1,curveType:j="linear",minValue:_,maxValue:y,connectNulls:b=!1,allowDecimals:k=!0,noDataText:v,className:N,onValueChange:C,enableLegendSlider:w=!1,customTooltip:S,rotateLabelX:q,padding:L=o||c?{left:20,right:20}:{left:0,right:0},tickGap:D=5,xAxisLabel:A,yAxisLabel:M}=e,E=(0,R.__rest)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[O,F]=(0,T.useState)(60),[$,U]=(0,T.useState)(void 0),[P,B]=(0,T.useState)(void 0),W=(0,ev.constructCategoryColors)(a,l),K=(0,ev.getYAxisDomain)(f,_,y),Y=!!C;function H(e){Y&&(e===P&&!$||(0,ev.hasOnlyOneValueForThisKey)(s,e)&&$&&$.dataKey===e?(B(void 0),null==C||C(null)):(B(e),null==C||C({eventType:"category",categoryClicked:e})),U(void 0))}return T.default.createElement("div",Object.assign({ref:t,className:(0,z.tremorTwMerge)("w-full h-80",N)},E),T.default.createElement(eo.ResponsiveContainer,{className:"h-full w-full"},(null==s?void 0:s.length)?T.default.createElement(eh,{data:s,onClick:Y&&(P||$)?()=>{U(void 0),B(void 0),null==C||C(null)}:void 0,margin:{bottom:A?30:void 0,left:M?20:void 0,right:M?5:void 0,top:5}},g?T.default.createElement(ep.CartesianGrid,{className:(0,z.tremorTwMerge)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,T.default.createElement(eu.XAxis,{padding:L,hide:!o,dataKey:r,interval:n?"preserveStartEnd":u,tick:{transform:"translate(0, 6)"},ticks:n?[s[0][r],s[s.length-1][r]]:void 0,fill:"",stroke:"",className:(0,z.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:D,angle:null==q?void 0:q.angle,dy:null==q?void 0:q.verticalShift,height:null==q?void 0:q.xAxisHeight},A&&T.default.createElement(eg.Label,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},A)),T.default.createElement(em.YAxis,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:K,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,z.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:i,allowDecimals:k},M&&T.default.createElement(eg.Label,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},M)),T.default.createElement(ef.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:h?({active:e,payload:t,label:s})=>S?T.default.createElement(S,{payload:null==t?void 0:t.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!=(t=W.get(e.dataKey))?t:eN.BaseColors.Gray})}),active:e,label:s}):T.default.createElement(eb.default,{active:e,payload:t,label:s,valueFormatter:i,categoryColors:W}):T.default.createElement(T.default.Fragment,null),position:{y:0}}),p?T.default.createElement(ej.Legend,{verticalAlign:"top",height:O,content:({payload:e})=>(0,ey.default)({payload:e},W,F,P,Y?e=>H(e):void 0,w)}):null,a.map(e=>{var t;return T.default.createElement(ed.Line,{className:(0,z.tremorTwMerge)((0,I.getColorClassNames)(null!=(t=W.get(e))?t:eN.BaseColors.Gray,V.colorPalette.text).strokeColor),strokeOpacity:$||P&&P!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,dataKey:c}=e;return T.default.createElement(e_.Dot,{className:(0,z.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,I.getColorClassNames)(null!=(t=W.get(c))?t:eN.BaseColors.Gray,V.colorPalette.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,onClick:(t,a)=>{a.stopPropagation(),Y&&(e.index===(null==$?void 0:$.index)&&e.dataKey===(null==$?void 0:$.dataKey)||(0,ev.hasOnlyOneValueForThisKey)(s,e.dataKey)&&P&&P===e.dataKey?(B(void 0),U(void 0),null==C||C(null)):(B(e.dataKey),U({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,cx:o,cy:c,dataKey:d,index:u}=t;return(0,ev.hasOnlyOneValueForThisKey)(s,e)&&!($||P&&P!==e)||(null==$?void 0:$.index)===u&&(null==$?void 0:$.dataKey)===e?T.default.createElement(e_.Dot,{key:u,cx:o,cy:c,r:5,stroke:r,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,className:(0,z.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,I.getColorClassNames)(null!=(a=W.get(d))?a:eN.BaseColors.Gray,V.colorPalette.text).fillColor)}):T.default.createElement(T.Fragment,{key:u})},key:e,name:e,type:j,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:x,animationDuration:m,connectNulls:b})}),C?a.map(e=>T.default.createElement(ed.Line,{className:(0,z.tremorTwMerge)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:j,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:b,onClick:(e,t)=>{t.stopPropagation();let{name:s}=e;H(s)}})):null):T.default.createElement(ek.default,{noDataText:v})))});eT.displayName="LineChart";let eC=function({dailyData:e,endpointData:s}){let a=(0,T.useMemo)(()=>{var t;let s,a;return e?.results&&0!==e.results.length?(t=e.results,s=[],a=new Set,t.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),t.forEach(e=>{let t={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(s=>{let a=e.breakdown.endpoints?.[s];t[s]=a?.metrics.api_requests||0}),s.push(t)}),s.reverse()):[]},[e]),r=(0,T.useMemo)(()=>0===a.length?[]:Object.keys(a[0]).filter(e=>"date"!==e),[a]);return(0,t.jsxs)(c.Card,{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)(j.Title,{children:"Endpoint Usage Trends"})}),(0,t.jsx)(eT,{className:"h-80",data:a,index:"date",categories:r,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,r.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})};var ew=e.i(291542),eS=e.i(309821);e.s(["Progress",()=>eS.default],497650);var eS=eS;let eq=({endpointData:e})=>{let s=Object.entries(e).map(([e,t])=>{var s,a;return{key:e,endpoint:e,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,api_requests:t.metrics.api_requests,total_tokens:t.metrics.total_tokens,spend:t.metrics.spend,successRate:(s=t.metrics.successful_requests,0===(a=t.metrics.api_requests)?0:s/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let a=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return a>0&&a<100&&(l[`${a}%`]="#22c55e",l[`${a+.01}%`]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)(eS.default,{percent:a+r,size:"small",strokeColor:l,showInfo:!1})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,t.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,t.jsx)("span",{className:"text-gray-400",children:"/"}),(0,t.jsx)("span",{className:"text-red-600 font-medium",children:s.failed_requests.toLocaleString()})]})]})}},{title:"Total Request",dataIndex:"api_requests",key:"api_requests",render:e=>e.toLocaleString()},{title:"Success Rate",dataIndex:"successRate",key:"successRate",render:e=>{let s=e.toFixed(2);return(0,t.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`}];return(0,t.jsx)(ew.Table,{columns:a,dataSource:s,pagination:!1})},eL=({userSpendData:e})=>{let s=(0,T.useMemo)(()=>{let t={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,s])=>{t[e]||(t[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:s.metadata||{},api_key_breakdown:{}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,t[e].metrics.completion_tokens+=s.metrics.completion_tokens,t[e].metrics.total_tokens+=s.metrics.total_tokens,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests||0,t[e].metrics.failed_requests+=s.metrics.failed_requests||0,t[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,t[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),t},[e]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eq,{endpointData:s}),(0,t.jsx)(en,{endpointData:s}),(0,t.jsx)(eC,{dailyData:e,endpointData:s})]})};var eD=e.i(214541),eA=e.i(413990),eM=e.i(785242);let{Text:eE}=N.Typography,eO=({value:e=[],onChange:s,disabled:a,organizationId:r,pageSize:i=20,placeholder:o="Search teams by alias..."})=>{let[c,d]=(0,T.useState)(""),[u,m]=(0,n.useDebouncedState)("",{wait:300}),{data:x,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:g,isLoading:f}=(0,eM.useInfiniteTeams)(i,u||void 0,r),j=(0,T.useMemo)(()=>{if(!x?.pages)return[];let e=new Set,t=[];for(let s of x.pages)for(let a of s.teams)e.has(a.team_id)||(e.add(a.team_id),t.push(a));return t},[x]);return(0,t.jsx)(k.Select,{mode:"multiple",showSearch:!0,placeholder:o,value:e,onChange:e=>s?.(e),disabled:a,allowClear:!0,filterOption:!1,onSearch:e=>{d(e),m(e)},searchValue:c,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!g&&h()},loading:f,notFoundContent:f?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No teams found",style:{width:"100%"},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]}),children:j.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(eE,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})};var eF=e.i(193523),eF=eF,e$=e.i(916925),eU=e.i(1023),eP=e.i(149121);function eR({topModels:e,topModelsLimit:s,setTopModelsLimit:a}){let[r,l]=(0,T.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return`$${(0,D.formatNumberWithCommas)(t,2)}`}},{header:"Successful",accessorKey:"successful_requests",cell:e=>(0,t.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",cell:e=>(0,t.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:s,onChange:e=>a(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>l("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>l("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===r?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(o.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,s)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(eP.DataTable,{columns:i,data:n,renderSubComponent:()=>(0,t.jsx)(t.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}let eV={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},ez=({accessToken:e,entityType:s,entityId:r,entityList:i,dateValue:n})=>{let b,k,v,{teams:N}=(0,eD.default)(),[C,w]=(0,T.useState)([]),[S,q]=(0,T.useState)(5),[L,A]=(0,T.useState)(5),[E,O]=(0,T.useState)(5),$=(0,T.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),U=(0,T.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,T.useMemo)(()=>"user"===s?C.length>0?C[0]:null:C.length>0?C:null,[s,C]),R=eV[s],V=!!e&&!!$&&!!U,{data:z,isFetchingMore:I,progress:B,cancelled:Q,cancel:X}=er({fetchFn:R,args:[e,$,U,P],enabled:V}),{data:ee,isFetchingMore:et,progress:es,cancelled:ea,cancel:ei}=er({fetchFn:F.agentDailyActivityCall,args:[e,$,U,null],enabled:V&&"team"===s}),en=(0,M.processActivityData)(z,"models",N||[]),eo=(0,M.processActivityData)(z,"api_keys",N||[]),ec="team"===s?(0,M.processActivityData)(ee,"entities",N||[]):{},ed=()=>{let e={};return z.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=s.metrics.spend,e[t].requests+=s.metrics.api_requests,e[t].successful_requests+=s.metrics.successful_requests,e[t].failed_requests+=s.metrics.failed_requests,e[t].tokens+=s.metrics.total_tokens}catch(e){console.error(`Error processing provider ${t}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,t)=>t.spend-e.spend)},eu=(e,t)=>{if(i){let t=i.find(t=>t.value===e);if(t)return t.label}return t?.team_alias?t.team_alias:e},em=()=>{var e;let t={};return z.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{t[e]||(t[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{alias:eu(e,s.metadata),id:e}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests,t[e].metrics.failed_requests+=s.metrics.failed_requests,t[e].metrics.total_tokens+=s.metrics.total_tokens})}),e=Object.values(t).sort((e,t)=>t.metrics.spend-e.metrics.spend),0===C.length?e:e.filter(e=>C.includes(e.metadata.id))},ex=s.charAt(0).toUpperCase()+s.slice(1);return(0,t.jsxs)("div",{style:{width:"100%"},className:"relative",children:[I&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",B.currentPage," / ",B.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:X,children:"Stop"})]})}),Q&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",B.currentPage,"/",B.totalPages," pages loaded)"]})}),et&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching agent data: fetched ",es.currentPage," / ",es.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:ei,children:"Stop"})]})}),ea&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),"team"===s&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by team"}),(0,t.jsx)(eO,{value:C,onChange:w})]}),(0,t.jsx)(eF.default,{dateValue:n,entityType:s,spendData:z,showFilters:"team"!==s&&null!==i&&i.length>0,filterLabel:`Filter by ${s}`,filterPlaceholder:`Select ${s} to filter...`,selectedFilters:C,onFiltersChange:w,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===s?"single":"multiple",teams:N||[]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"agent"===s?"Request / Token Consumption":"Model Activity"}),"team"===s?(0,t.jsx)(m.Tab,{children:"Agent Activity"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)(j.Title,{children:[ex," Spend Overview"]}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Spend"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)(z.metadata.total_spend,2)]})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:z.metadata.total_api_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:z.metadata.total_successful_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:z.metadata.total_failed_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:z.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),(0,t.jsx)(o.BarChart,{data:[...z.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload,r=Object.keys(a.breakdown.entities||{}).length;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total ",ex,"s: ",r]}),(0,t.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,t.jsxs)("p",{className:"font-semibold",children:["Spend by ",ex,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,t])=>{let s=e.metrics.spend;return t.metrics.spend-s}).slice(0,5).map(([e,s])=>(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:[eu(e,s.metadata),": $",(0,D.formatNumberWithCommas)(s.metrics.spend,2)]},e)),r>5&&(0,t.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",r-5," more"]})]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsxs)(j.Title,{children:["Spend Per ",ex]}),(0,t.jsx)(W.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,t.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,t.jsxs)("span",{children:["Get Started by Tracking cost per ",ex," "]}),(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/enterprise#spend-tracking",className:"text-blue-500 hover:text-blue-700 ml-1",children:"here"})]})]}),(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-6",children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(o.BarChart,{className:"mt-4 h-52",data:em().slice(0,5).map(e=>({...e,metadata:{...e.metadata,alias_display:e.metadata.alias&&e.metadata.alias.length>15?`${e.metadata.alias.slice(0,15)}...`:e.metadata.alias}})),index:"metadata.alias_display",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:ex}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:em().filter(e=>e.metrics.spend>0).map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:e.metadata.alias}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.metrics.spend,4)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:(console.log("debugTags",{spendData:z}),b={},z.results.forEach(e=>{let{breakdown:t}=e,{entities:s}=t;console.log("debugTags",{entities:s});let a=Object.keys(s).reduce((e,t)=>{let{api_key_breakdown:a}=s[t];return Object.keys(a).forEach(s=>{let r={tag:t,usage:a[s].metrics.spend};e[s]?e[s].push(r):e[s]=[r]}),e},{});console.log("debugTags",{tagDictionary:a}),Object.entries(e.breakdown.api_keys||{}).forEach(([e,t])=>{b[e]||(b[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:t.metadata.key_alias,team_id:t.metadata.team_id||null,tags:a[e]||[]}},console.log("debugTags",{keySpend:b})),b[e].metrics.spend+=t.metrics.spend,b[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,b[e].metrics.completion_tokens+=t.metrics.completion_tokens,b[e].metrics.total_tokens+=t.metrics.total_tokens,b[e].metrics.api_requests+=t.metrics.api_requests,b[e].metrics.successful_requests+=t.metrics.successful_requests,b[e].metrics.failed_requests+=t.metrics.failed_requests,b[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,b[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(b).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,S)),teams:null,showTags:"tag"===s,topKeysLimit:S,setTopKeysLimit:q})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"agent"===s?"Top Agents":"Top Models"}),(0,t.jsx)(eR,{topModels:(k={},z.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{k[e].spend+=t.metrics.spend}catch(s){console.error(`Error adding spend for ${e}: ${s}, got metrics: ${JSON.stringify(t)}`)}k[e].requests+=t.metrics.api_requests,k[e].successful_requests+=t.metrics.successful_requests,k[e].failed_requests+=t.metrics.failed_requests,k[e].tokens+=t.metrics.total_tokens})}),Object.entries(k).map(([e,t])=>({key:e,...t})).sort((e,t)=>t.spend-e.spend).slice(0,L)),topModelsLimit:L,setTopModelsLimit:A})]})}),"team"===s&&(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,t.jsx)(eR,{topModels:(v={},ee.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{v[e]||(v[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:t.metadata?.agent_name||e}),v[e].spend+=t.metrics.spend,v[e].requests+=t.metrics.api_requests,v[e].successful_requests+=t.metrics.successful_requests,v[e].failed_requests+=t.metrics.failed_requests,v[e].tokens+=t.metrics.total_tokens})}),Object.entries(v).map(([e,t])=>({key:t.agent_name,...t})).sort((e,t)=>t.spend-e.spend).slice(0,E)),topModelsLimit:E,setTopModelsLimit:O})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsx)(j.Title,{children:"Provider Usage"}),(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:ed(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:ed().map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)("img",{src:(0,e$.getProviderLogoAndName)(e.provider).logo,alt:`${e.provider} logo`,className:"w-4 h-4",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.provider?.charAt(0)||"-",a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:en,hidePromptCachingMetrics:"agent"===s})}),"team"===s?(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:ec})}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:eo,hidePromptCachingMetrics:"agent"===s})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:z})})]})]})]})};var eI=e.i(793130),eB=e.i(418371);let eW=({loading:e,isDateChanging:s,providerSpend:a})=>{let[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),m=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!l||e.spend>0);return(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Spend by Provider"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,t.jsx)(eI.Switch,{checked:l,onChange:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,t.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(eI.Switch,{checked:n,onChange:o})]})]})]}),e?(0,t.jsx)(P,{isDateChanging:s}):(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:m,index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:m.map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)(eB.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var eK=e.i(311451),eY=e.i(482725),eH=e.i(918789);let{TextArea:eG}=eK.Input,eZ={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},eJ=({step:e})=>{let s=eZ[e.tool_name]||"🔧",a=e.arguments,r=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",l=a.team_ids||a.tags||a.user_id||"";return(0,t.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-gray-100 border border-gray-200 text-xs",children:[(0,t.jsx)("span",{className:"flex-shrink-0 mt-0.5",children:"running"===e.status?(0,t.jsx)(eY.Spin,{size:"small"}):"error"===e.status?(0,t.jsx)("span",{className:"text-red-500",children:"✗"}):(0,t.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"font-medium text-gray-700",children:[s," ",e.tool_label]}),r&&(0,t.jsx)("div",{className:"text-gray-500 mt-0.5",children:r}),l&&(0,t.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",l]}),"error"===e.status&&e.error&&(0,t.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},eQ=({content:e})=>(0,t.jsx)(eH.default,{components:{p:({children:e})=>(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,t.jsx)("li",{children:e}),h1:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:s})=>s?.includes("language-")?(0,t.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto text-xs",children:(0,t.jsx)("code",{children:e})}):(0,t.jsx)("code",{className:"px-1 py-0.5 rounded bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,t.jsx)("div",{className:"overflow-x-auto my-2",children:(0,t.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,t.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,t.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),eX=({open:e,onClose:s,accessToken:a})=>{let[r,l]=(0,T.useState)([]),[i,n]=(0,T.useState)(""),[o,c]=(0,T.useState)(!1),[d,u]=(0,T.useState)(void 0),[m,x]=(0,T.useState)([]),[h,p]=(0,T.useState)(!1),[g,f]=(0,T.useState)(""),[j,_]=(0,T.useState)(null),[b,v]=(0,T.useState)([]),N=(0,T.useRef)(null),C=(0,T.useRef)(null);(0,T.useEffect)(()=>{e&&0===m.length&&w()},[e]),(0,T.useEffect)(()=>{"function"==typeof N.current?.scrollIntoView&&N.current.scrollIntoView({behavior:"smooth"})},[r,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let t=e.data.map(e=>e.model_group).sort();x(t)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},S=async()=>{if(!a||!i.trim()||o)return;let e=[...r,{role:"user",content:i.trim()}];l(e),n(""),c(!0),f(""),_(null),v([]);let t=new AbortController;C.current=t;let s="",u=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{_(null),s+=e,f(s)},()=>{_(null),v([]),l(e=>[...e,{role:"assistant",content:s,toolCalls:u.length>0?[...u]:void 0}]),f("")},e=>{_(null),v([]),l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")},e=>{_(e)},e=>{let t=u.findIndex(t=>t.tool_name===e.tool_name);t>=0?u[t]={...e}:u.push({...e}),v([...u])},t.signal)}catch(s){if(s?.name==="AbortError"||t.signal.aborted)return;let e=s?.message||"Failed to get response. Please try again.";l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")}finally{c(!1),C.current=null}};return(0,t.jsxs)("div",{"data-testid":"usage-ai-chat-panel",className:`fixed top-0 right-0 h-full bg-white border-l border-gray-200 shadow-2xl z-50 flex flex-col transition-transform duration-300 ease-in-out ${e?"translate-x-0":"translate-x-full"}`,style:{width:420},children:[(0,t.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,t.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),s()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,t.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 flex-shrink-0",children:(0,t.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>u(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:m.map(e=>({label:e,value:e})),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===r.length&&!g&&!o&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),r.map((e,s)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("div",{className:"max-w-[88%] rounded-xl px-3.5 py-2 text-sm leading-relaxed bg-blue-600 text-white",children:e.content})}):(0,t.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),(0,t.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,t.jsx)(eQ,{content:e.content})})]})},s)),o&&b.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:b.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),o&&!g&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,t.jsx)(eY.Spin,{size:"small"}),(0,t.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,t.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,t.jsx)(eQ,{content:g})}),(0,t.jsx)("div",{ref:N})]}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(eG,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),S())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:o}),(0,t.jsx)(y.Button,{type:"primary",onClick:S,disabled:!i.trim()||o,loading:o,children:"Send"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,t.jsx)("button",{onClick:()=>{l([]),f(""),v([]),_(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===r.length,children:"Clear chat"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};var e0=e.i(299251),e1=e.i(153702);e.i(247167);var e2=e.i(931067);let e4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var e5=e.i(9583),e3=T.forwardRef(function(e,t){return T.createElement(e5.default,(0,e2.default)({},e,{ref:t,icon:e4}))}),e6=e.i(777579),e7=e.i(983561);let e9={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"};var e8=T.forwardRef(function(e,t){return T.createElement(e5.default,(0,e2.default)({},e,{ref:t,icon:e9}))}),te=e.i(232164),tt=e.i(645526),ts=e.i(771674),ta=e.i(906579);let tr=[{value:"global",label:"Global Usage",showForAdmin:"Global Usage",showForNonAdmin:"Your Usage",description:"View usage across all resources",descriptionForAdmin:"View usage across all resources",descriptionForNonAdmin:"View your usage",icon:(0,t.jsx)(e3,{style:{fontSize:"16px"}})},{value:"organization",label:"Organization Usage",showForAdmin:"Organization Usage",showForNonAdmin:"Your Organization Usage",description:"View organization-level usage",descriptionForAdmin:"View usage across all organizations",descriptionForNonAdmin:"View your organization's usage",icon:(0,t.jsx)(e0.BankOutlined,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,t.jsx)(tt.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,t.jsx)(e8,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,t.jsx)(te.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,t.jsx)(e7.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,t.jsx)(ts.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,t.jsx)(e6.LineChartOutlined,{style:{fontSize:"16px"}}),adminOnly:!0}],tl=({value:e,onChange:s,isAdmin:a,title:r="Usage View",description:l="Select the usage data you want to view","data-id":i})=>{let n=tr.filter(e=>!e.adminOnly||!!a).map(e=>{let t=e.label,s=e.description;return e.showForAdmin&&e.showForNonAdmin&&(t=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(s=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:t,description:s,icon:e.icon,badgeText:e.badgeText}});return(0,t.jsx)("div",{className:"w-full","data-id":i,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,t.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,t.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,t.jsx)(e1.BarChartOutlined,{style:{fontSize:"32px"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:l})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(k.Select,{value:e,onChange:s,className:"w-54 sm:w-64 md:w-72",size:"large",options:n.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,t.jsx)("div",{className:"items-center",children:(0,t.jsx)(ta.Badge,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:s.icon}),(0,t.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};e.s(["default",0,({teams:e,organizations:U})=>{let R,{accessToken:V,userRole:z,userId:I,premiumUser:B}=(0,S.default)(),[W,K]=(0,T.useState)(null),[Y,H]=(0,T.useState)(!1),[G,Z]=(0,T.useState)(!1),[J,Q]=(0,T.useState)(!1),X=(0,T.useMemo)(()=>new Date(Date.now()-6048e5),[]),es=(0,T.useMemo)(()=>new Date,[]),[ea,ei]=(0,T.useState)({from:X,to:es}),[en,eo]=(0,T.useState)([]),{data:ec=[]}=(0,w.useCustomers)(),{data:ed}=(0,C.useAgents)(),{data:eu}=(0,q.useCurrentUser)();console.log(`currentUser: ${JSON.stringify(eu)}`),console.log(`currentUser max budget: ${eu?.max_budget}`);let em=A.all_admin_roles.includes(z||""),[ex,eh]=(0,T.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:300}),{data:ef,fetchNextPage:ej,hasNextPage:e_,isFetchingNextPage:ey,isLoading:eb}=(0,L.useInfiniteUsers)(50,ep||void 0),ek=(0,T.useMemo)(()=>{if(!ef?.pages)return[];let e=new Set,t=[];for(let s of ef.pages)for(let a of s.users)e.has(a.user_id)||(e.add(a.user_id),t.push({value:a.user_id,label:a.user_alias?`${a.user_alias} (${a.user_id})`:a.user_email?`${a.user_email} (${a.user_id})`:a.user_id}));return t},[ef]),[ev,eN]=(0,T.useState)(em?null:I||null),[eT,eC]=(0,T.useState)("groups"),[ew,eS]=(0,T.useState)(!1),[eq,eD]=(0,T.useState)(!1),[eA,eM]=(0,T.useState)(!1),[eE,eO]=(0,T.useState)("global"),[eF,e$]=(0,T.useState)(!0),[eP,eR]=(0,T.useState)(5),[eV,eI]=(0,T.useState)(5),[eB,eK]=(0,T.useState)(!1),eY=async()=>{V&&eo(Object.values(await (0,F.tagListCall)(V)).map(e=>({label:e.name,value:e.name})))};(0,T.useEffect)(()=>{eY()},[V]),(0,T.useEffect)(()=>{!em&&I&&eN(I)},[em,I]);let eH=em?ev:I||null,eG=(0,T.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),eZ=(0,T.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]),eJ=(0,T.useRef)(0);(0,T.useEffect)(()=>{if(!V||!eG||!eZ)return;let e=++eJ.current;Z(!0),H(!1),K(null),(0,F.userDailyActivityAggregatedCall)(V,eG,eZ,eH).then(t=>{eJ.current===e&&(K(t),Z(!1),Q(!1))}).catch(()=>{eJ.current===e&&(H(!0),Z(!1))})},[V,eG,eZ,eH]);let eQ=er({fetchFn:F.userDailyActivityCall,args:[V,eG,eZ,eH],enabled:Y&&!!V&&!!eG&&!!eZ}),e0=(0,T.useMemo)(()=>W||(Y?eQ.data:{results:[],metadata:{}}),[W,Y,eQ.data]),e1=G||eQ.loading;(0,T.useEffect)(()=>{Y&&!eQ.loading&&eQ.data.results.length>0&&Q(!1)},[Y,eQ.loading,eQ.data.results.length]);let e2=(0,T.useCallback)(e=>{Q(!0),ei(e)},[]),e4=e0.metadata?.total_spend||0,e5=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.models||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e3=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.model_groups||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e6=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({provider:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}))},[e0.results]),e7=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.api_keys||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:s.metadata.key_alias,team_id:null,tags:s.metadata.tags||[]}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests,e[t].metrics.failed_requests+=s.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,eP)},[e0.results,eP]),e9=(0,T.useMemo)(()=>[...e0.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),[e0.results]),e8=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"models",e),[e0,e]),te=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"api_keys",e),[e0,e]),tt=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"mcp_servers",e),[e0,e]);return(0,t.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,t.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,t.jsx)(tl,{value:eE,onChange:e=>eO(e),isAdmin:em}),(0,t.jsx)($.default,{value:ea,onValueChange:e2})]}),eQ.isFetchingMore&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",eQ.progress.currentPage," /"," ",eQ.progress.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:eQ.cancel,children:"Stop"})]})}),eQ.cancelled&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",eQ.progress.currentPage,"/",eQ.progress.totalPages," ","pages loaded)"]})}),"global"===eE&&(0,t.jsxs)(t.Fragment,{children:[em&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by user"}),(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:ev,onChange:e=>eN(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&e_&&!ey&&ej()},loading:eb,notFoundContent:eb?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No users found",options:ek,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,ey&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]})})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"Model Activity"}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"MCP Server Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>eM(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),children:"Ask AI"}),(0,t.jsx)(y.Button,{onClick:()=>eD(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsxs)(d.Col,{numColSpan:2,children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,t.jsxs)(f.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,t.jsxs)(t.Fragment,{children:[ea.from.toLocaleDateString("en-US",{month:"short",day:"numeric",year:ea.from.getFullYear()!==ea.to.getFullYear()?"numeric":void 0})," - ",ea.to.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]})}),(0,t.jsx)(et.default,{userSpend:e4,selectedTeam:null,userMaxBudget:eu?.max_budget||null})]}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Usage Metrics"}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(v.Tooltip,{title:"Includes requests that failed to route to a provider, tool usage failures, and other request errors where the provider cannot be determined.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e0.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Average Cost per Request"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)((e4||0)/(e0.metadata?.total_api_requests||1),4)]})]}),(0,t.jsxs)(c.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eK(!eB),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),eB?(0,t.jsx)(s.DownOutlined,{className:"text-gray-400 text-xs"}):(0,t.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_tokens?.toLocaleString()||0})]})]}),eB&&(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Input Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:e0.metadata?.total_prompt_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Output Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e0.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e0.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)(o.BarChart,{data:e9,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:e7,teams:null,topKeysLimit:eP,setTopKeysLimit:eR})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"groups"===eT?"Top Public Model Names":"Top Litellm Models"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eV,onChange:e=>eI(e)}),(0,t.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"groups"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("groups"),children:"Public Model Name"}),(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"individual"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("individual"),children:"Litellm Model Name"})]})]}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(R="groups"===eT?e3:e5,(0,t.jsx)(o.BarChart,{className:"mt-4",style:{height:52*Math.min(R.length,eV)},data:R,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.key}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(eW,{loading:e1,isDateChanging:J,providerSpend:e6})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:e8})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:te})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:tt})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:e0})})]})]})]}),"organization"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"organization",userID:I,userRole:z,dateValue:ea,entityList:U?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:B}),"team"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"team",userID:I,userRole:z,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:B,dateValue:ea}),"customer"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"customer",userID:I,userRole:z,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:B,dateValue:ea}),"tag"===eE&&(0,t.jsxs)(t.Fragment,{children:[eF&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,t.jsxs)(N.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,t.jsx)(N.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>e$(!1),className:"mb-5"}),(0,t.jsx)(ez,{accessToken:V,entityType:"tag",userID:I,userRole:z,entityList:en,premiumUser:B,dateValue:ea})]}),"agent"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"agent",userID:I,userRole:z,entityList:ed?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:B,dateValue:ea}),"user"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"user",userID:I,userRole:z,entityList:ek.length>0?ek:null,premiumUser:B,dateValue:ea}),"user-agent-activity"===eE&&(0,t.jsx)(ee,{accessToken:V,userRole:z,dateValue:ea})]})}),(0,t.jsx)(E.default,{isOpen:ew,onClose:()=>eS(!1),accessToken:V}),(0,t.jsx)(O.default,{isOpen:eq,onClose:()=>eD(!1),entityType:"team",spendData:{results:e0.results,metadata:e0.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,t.jsx)(eX,{open:eA,onClose:()=>eM(!1),accessToken:V})]})}],797305)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/dad8b43751822f79.js b/litellm/proxy/_experimental/out/_next/static/chunks/b1d6b16bfc1eabf5.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/dad8b43751822f79.js rename to litellm/proxy/_experimental/out/_next/static/chunks/b1d6b16bfc1eabf5.js index 21038220859..53c1cab875b 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/dad8b43751822f79.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/b1d6b16bfc1eabf5.js @@ -390,7 +390,7 @@ audio_file = open("path/to/your/audio/file.mp3", "rb") response = client.audio.transcriptions.create( model="${L}", file=audio_file${n?`, - prompt="${n.replace(/"/g,'\\"')}"`:""} + prompt="${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} ) print(response.text) diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/b69db537c2cf883e.js b/litellm/proxy/_experimental/out/_next/static/chunks/b69db537c2cf883e.js new file mode 100644 index 00000000000..ce704958c2b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/b69db537c2cf883e.js @@ -0,0 +1,72 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,233525,(e,t,l)=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0}),Object.defineProperty(l,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},349356,e=>{e.v({AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"})},137429,e=>{e.v({0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"})},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},883552,e=>{"use strict";e.i(247167);var t=e.i(271645),l=e.i(562901),a=e.i(343794),s=e.i(914949),r=e.i(529681),i=e.i(242064),n=e.i(829672),o=e.i(285781),c=e.i(836938),d=e.i(920228),u=e.i(62405),m=e.i(408850),h=e.i(87414),g=e.i(310730);let x=(0,e.i(246422).genStyleHooks)("Popconfirm",e=>(e=>{let{componentCls:t,iconCls:l,antCls:a,zIndexPopup:s,colorText:r,colorWarning:i,marginXXS:n,marginXS:o,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:s,[`&${a}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:o,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${l}`]:{color:i,fontSize:c,lineHeight:1,marginInlineEnd:o},[`${t}-title`]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:n,color:r}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:o}}}}})(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1});var p=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let f=e=>{let{prefixCls:a,okButtonProps:s,cancelButtonProps:r,title:n,description:g,cancelText:x,okText:p,okType:f="primary",icon:b=t.createElement(l.default,null),showCancel:y=!0,close:j,onConfirm:v,onCancel:w,onPopupClick:_}=e,{getPrefixCls:N}=t.useContext(i.ConfigContext),[k]=(0,m.useLocale)("Popconfirm",h.default.Popconfirm),C=(0,c.getRenderPropValue)(n),S=(0,c.getRenderPropValue)(g);return t.createElement("div",{className:`${a}-inner-content`,onClick:_},t.createElement("div",{className:`${a}-message`},b&&t.createElement("span",{className:`${a}-message-icon`},b),t.createElement("div",{className:`${a}-message-text`},C&&t.createElement("div",{className:`${a}-title`},C),S&&t.createElement("div",{className:`${a}-description`},S))),t.createElement("div",{className:`${a}-buttons`},y&&t.createElement(d.default,Object.assign({onClick:w,size:"small"},r),x||(null==k?void 0:k.cancelText)),t.createElement(o.default,{buttonProps:Object.assign(Object.assign({size:"small"},(0,u.convertLegacyProps)(f)),s),actionFn:v,close:j,prefixCls:N("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},p||(null==k?void 0:k.okText))))};var b=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,a=Object.getOwnPropertySymbols(e);st.indexOf(a[s])&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(l[a[s]]=e[a[s]]);return l};let y=t.forwardRef((e,o)=>{var c,d;let{prefixCls:u,placement:m="top",trigger:h="click",okType:g="primary",icon:p=t.createElement(l.default,null),children:y,overlayClassName:j,onOpenChange:v,onVisibleChange:w,overlayStyle:_,styles:N,classNames:k}=e,C=b(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:S,className:T,style:I,classNames:E,styles:A}=(0,i.useComponentConfig)("popconfirm"),[P,D]=(0,s.default)(!1,{value:null!=(c=e.open)?c:e.visible,defaultValue:null!=(d=e.defaultOpen)?d:e.defaultVisible}),M=(e,t)=>{D(e,!0),null==w||w(e),null==v||v(e,t)},B=S("popconfirm",u),O=(0,a.default)(B,T,j,E.root,null==k?void 0:k.root),F=(0,a.default)(E.body,null==k?void 0:k.body),[R]=x(B);return R(t.createElement(n.default,Object.assign({},(0,r.default)(C,["title"]),{trigger:h,placement:m,onOpenChange:(t,l)=>{let{disabled:a=!1}=e;a||M(t,l)},open:P,ref:o,classNames:{root:O,body:F},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},A.root),I),_),null==N?void 0:N.root),body:Object.assign(Object.assign({},A.body),null==N?void 0:N.body)},content:t.createElement(f,Object.assign({okType:g,icon:p},e,{prefixCls:B,close:e=>{M(!1,e)},onConfirm:t=>{var l;return null==(l=e.onConfirm)?void 0:l.call(void 0,t)},onCancel:t=>{var l;M(!1,t),null==(l=e.onCancel)||l.call(void 0,t)}})),"data-popover-inject":!0}),y))});y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:l,placement:s,className:r,style:n}=e,o=p(e,["prefixCls","placement","className","style"]),{getPrefixCls:c}=t.useContext(i.ConfigContext),d=c("popconfirm",l),[u]=x(d);return u(t.createElement(g.default,{placement:s,className:(0,a.default)(d,r),style:n,content:t.createElement(f,Object.assign({prefixCls:d},o))}))},e.s(["Popconfirm",0,y],883552)},292335,122520,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",AWS_SIGV4:"aws_sigv4"},l={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};function a(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["AUTH_TYPE",0,t,"OAUTH_FLOW",0,{INTERACTIVE:"interactive",M2M:"m2m"},"TRANSPORT",0,l,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?l.SSE:t&&e!==l.STDIO?l.OPENAPI:e],292335),e.s(["extractErrorMessage",()=>a],122520)},724154,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={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-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["StopOutlined",0,r],724154)},564897,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["MinusCircleOutlined",0,r],564897)},750113,e=>{"use strict";var t=e.i(684024);e.s(["QuestionCircleOutlined",()=>t.default])},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["MessageOutlined",0,r],264843)},988846,e=>{"use strict";var t=e.i(54943);e.s(["SearchIcon",()=>t.default])},54131,634831,438100,e=>{"use strict";var t=e.i(399219);e.s(["ChevronUpIcon",()=>t.default],54131);var l=e.i(546467);e.s(["ExternalLinkIcon",()=>l.default],634831);let a=(0,e.i(475254).default)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);e.s(["KeyIcon",()=>a],438100)},302202,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["ServerIcon",()=>t],302202)},328196,e=>{"use strict";var t=e.i(361653);e.s(["AlertCircleIcon",()=>t.default])},546467,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",()=>t])},987432,e=>{"use strict";e.i(247167);var t=e.i(931067),l=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};var s=e.i(9583),r=l.forwardRef(function(e,r){return l.createElement(s.default,(0,t.default)({},e,{ref:r,icon:a}))});e.s(["SaveOutlined",0,r],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},446891,836991,153472,e=>{"use strict";var t,l,a=e.i(843476),s=e.i(464571),r=e.i(326373),i=e.i(94629),n=e.i(360820),o=e.i(871943),c=e.i(271645);let d=c.forwardRef(function(e,t){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),c.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.s(["XIcon",0,d],836991),e.s(["TableHeaderSortDropdown",0,({sortState:e,onSortChange:t})=>{let l=[{key:"asc",label:"Ascending",icon:(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,a.jsx)(d,{className:"h-4 w-4"})}];return(0,a.jsx)(r.Dropdown,{menu:{items:l,onClick:({key:e})=>{"asc"===e?t("asc"):"desc"===e?t("desc"):"reset"===e&&t(!1)},selectable:!0,selectedKeys:e?[e]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,a.jsx)(s.Button,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===e?(0,a.jsx)(n.ChevronUpIcon,{className:"h-4 w-4"}):"desc"===e?(0,a.jsx)(o.ChevronDownIcon,{className:"h-4 w-4"}):(0,a.jsx)(i.SwitchVerticalIcon,{className:"h-4 w-4"}),className:e?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})}],446891);var u=e.i(266027),m=e.i(954616),h=e.i(243652),g=e.i(135214),x=e.i(764205),p=((t={}).GENERAL_SETTINGS="general_settings",t),f=((l={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",l);let b=async(e,t)=>{try{let l=x.proxyBaseUrl?`${x.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(l,{method:"GET",headers:{[(0,x.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,x.deriveErrorMessage)(e);throw(0,x.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},y=(0,h.createQueryKeys)("proxyConfig"),j=async(e,t)=>{try{let l=x.proxyBaseUrl?`${x.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(l,{method:"POST",headers:{[(0,x.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,x.deriveErrorMessage)(e);throw(0,x.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to delete proxy config field ${t.field_name}:`,e),e}};e.s(["ConfigType",()=>p,"GeneralSettingsFieldName",()=>f,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,g.default)();return(0,m.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await j(e,t)}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,g.default)();return(0,u.useQuery)({queryKey:y.list({filters:{configType:e}}),queryFn:async()=>await b(t,e),enabled:!!t})}],153472)},418371,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(916925);e.s(["ProviderLogo",0,({provider:e,className:s="w-4 h-4"})=>{let[r,i]=(0,l.useState)(!1),{logo:n}=(0,a.getProviderLogoAndName)(e);return r||!n?(0,t.jsx)("div",{className:`${s} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:e?.charAt(0)||"-"}):(0,t.jsx)("img",{src:n,alt:`${e} logo`,className:s,onError:()=>i(!0)})}])},149121,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(152990),s=e.i(682830),r=e.i(269200),i=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:h,renderChildRows:g,getRowCanExpand:x,isLoading:p=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:b="No logs found",enableSorting:y=!1}){let j=!!(h||g)&&!!x,[v,w]=(0,l.useState)([]),_=(0,a.useReactTable)({data:e,columns:u,...y&&{state:{sorting:v},onSortingChange:w,enableSortingRemoval:!1},...j&&{getRowCanExpand:x},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,s.getCoreRowModel)(),...y&&{getSortedRowModel:(0,s.getSortedRowModel)()},...j&&{getExpandedRowModel:(0,s.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(r.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(i.TableHead,{children:_.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>{let l=y&&e.column.getCanSort(),s=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${l?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:l?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),l&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===s?"↑":"desc"===s?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(o.TableBody,{children:p?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(c.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),j&&e.getIsExpanded()&&g&&g({row:e}),j&&e.getIsExpanded()&&h&&!g&&(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:h({row:e})})})})]},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:b})})})})})]})})}e.s(["DataTable",()=>u])},37091,e=>{"use strict";var t=e.i(290571),l=e.i(95779),a=e.i(444755),s=e.i(673706),r=e.i(271645);let i=r.default.forwardRef((e,i)=>{let{color:n,children:o,className:c}=e,d=(0,t.__rest)(e,["color","children","className"]);return r.default.createElement("p",Object.assign({ref:i,className:(0,a.tremorTwMerge)(n?(0,s.getColorClassNames)(n,l.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),o)});i.displayName="Subtitle",e.s(["Subtitle",()=>i],37091)},571303,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(115504);function s({className:e="",...s}){var r,i;let n=(0,l.useId)();return r=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===n),l=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==n);t&&l&&(t.currentTime=l.currentTime)},i=[n],(0,l.useLayoutEffect)(r,i),(0,t.jsxs)("svg",{"data-spinner-id":n,className:(0,a.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...s,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>s],571303)},936578,e=>{"use strict";var t=e.i(843476),l=e.i(115504),a=e.i(571303);function s(){return(0,t.jsxs)("div",{className:(0,l.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(a.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>s])},902739,e=>{"use strict";var t=e.i(843476),l=e.i(111672),a=e.i(764205),s=e.i(135214),r=e.i(271645);e.s(["default",0,({setPage:e,defaultSelectedKey:i,sidebarCollapsed:n})=>{let{accessToken:o}=(0,s.default)(),[c,d]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),[x,p]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[y,j]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(!o)return console.log("[SidebarProvider] No access token, skipping UI settings fetch");try{console.log("[SidebarProvider] Fetching UI settings from /get/ui_settings");let e=await (0,a.getUISettings)(o);console.log("[SidebarProvider] UI settings response:",e),e?.values?.enabled_ui_pages_internal_users!==void 0?(console.log("[SidebarProvider] Setting enabled pages:",e.values.enabled_ui_pages_internal_users),d(e.values.enabled_ui_pages_internal_users)):console.log("[SidebarProvider] No enabled_ui_pages_internal_users in response (all pages visible by default)"),e?.values?.enable_projects_ui!==void 0&&m(!!e.values.enable_projects_ui),e?.values?.disable_agents_for_internal_users!==void 0&&g(!!e.values.disable_agents_for_internal_users),e?.values?.allow_agents_for_team_admins!==void 0&&p(!!e.values.allow_agents_for_team_admins),e?.values?.disable_vector_stores_for_internal_users!==void 0&&b(!!e.values.disable_vector_stores_for_internal_users),e?.values?.allow_vector_stores_for_team_admins!==void 0&&j(!!e.values.allow_vector_stores_for_team_admins)}catch(e){console.error("[SidebarProvider] Failed to fetch UI settings:",e)}})()},[o]),(0,t.jsx)(l.default,{setPage:e,defaultSelectedKey:i,collapsed:n,enabledPagesInternalUsers:c,enableProjectsUI:u,disableAgentsForInternalUsers:h,allowAgentsForTeamAdmins:x,disableVectorStoresForInternalUsers:f,allowVectorStoresForTeamAdmins:y})}])},208075,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),s=e.i(629569),r=e.i(599724),i=e.i(779241),n=e.i(994388),o=e.i(275144),c=e.i(764205),d=e.i(727749);e.s(["default",0,({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:h,setLogoUrl:g,faviconUrl:x,setFaviconUrl:p}=(0,o.useTheme)(),[f,b]=(0,l.useState)(""),[y,j]=(0,l.useState)(""),[v,w]=(0,l.useState)(!1);(0,l.useEffect)(()=>{m&&_()},[m]);let _=async()=>{try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",l=await fetch(t,{method:"GET",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(l.ok){let e=await l.json();b(e.values?.logo_url||""),j(e.values?.favicon_url||""),g(e.values?.logo_url||null),p(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},N=async()=>{w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:f||null,favicon_url:y||null})})).ok)d.default.success("Theme settings updated successfully!"),g(f||null),p(y||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),d.default.fromBackend("Failed to update theme settings")}finally{w(!1)}},k=async()=>{b(""),j(""),g(null),p(null),w(!0);try{let e=(0,c.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,c.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)d.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),d.default.fromBackend("Failed to reset theme settings")}finally{w(!1)}};return m?(0,t.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(s.Title,{className:"text-2xl font-bold mb-2",children:"UI Theme Customization"}),(0,t.jsx)(r.Text,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(a.Card,{className:"shadow-sm p-6",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,t.jsx)(i.TextInput,{placeholder:"https://example.com/logo.png",value:f,onValueChange:e=>{b(e),g(e||null)},className:"w-full"}),(0,t.jsx)(r.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Text,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Favicon URL"}),(0,t.jsx)(i.TextInput,{placeholder:"https://example.com/favicon.ico",value:y,onValueChange:e=>{j(e),p(e||null)},className:"w-full"}),(0,t.jsx)(r.Text,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom favicon (.ico, .png, or .svg) or leave empty for default"})]}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,t.jsx)(n.Button,{onClick:N,loading:v,disabled:v,color:"indigo",children:"Save Changes"}),(0,t.jsx)(n.Button,{onClick:k,loading:v,disabled:v,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}])},662316,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(464571),s=e.i(166406),r=e.i(629569),i=e.i(764205),n=e.i(727749);e.s(["default",0,({accessToken:e})=>{let[o,c]=(0,l.useState)(`{ + "model": "openai/gpt-4o", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "Explain quantum computing in simple terms" + } + ], + "temperature": 0.7, + "max_tokens": 500, + "stream": true +}`),[d,u]=(0,l.useState)(""),[m,h]=(0,l.useState)(!1),g=async()=>{h(!0);try{let s;try{s=JSON.parse(o)}catch(e){n.default.fromBackend("Invalid JSON in request body"),h(!1);return}let r={call_type:"completion",request_body:s};if(!e){n.default.fromBackend("No access token found"),h(!1);return}let c=await (0,i.transformRequestCall)(e,r);if(c.raw_request_api_base&&c.raw_request_body){var t,l,a;let e,s,r=(t=c.raw_request_api_base,l=c.raw_request_body,a=c.raw_request_headers||{},e=JSON.stringify(l,null,2).split("\n").map(e=>` ${e}`).join("\n"),s=Object.entries(a).map(([e,t])=>`-H '${e}: ${t}'`).join(" \\\n "),`curl -X POST \\ + ${t} \\ + ${s?`${s} \\ + `:""}-H 'Content-Type: application/json' \\ + -d '{ +${e} + }'`);u(r),n.default.success("Request transformed successfully")}else{let e="string"==typeof c?c:JSON.stringify(c);u(e),n.default.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),n.default.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(r.Title,{children:"Playground"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,t.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(a.Button,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:m,children:[(0,t.jsx)("span",{children:"Transform"}),(0,t.jsx)("span",{children:"→"})]})})]}),(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,t.jsx)("br",{}),(0,t.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,t.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:d||`curl -X POST \\ + https://api.openai.com/v1/chat/completions \\ + -H 'Authorization: Bearer sk-xxx' \\ + -H 'Content-Type: application/json' \\ + -d '{ + "model": "gpt-4", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + } + ], + "temperature": 0.7 + }'`}),(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(s.CopyOutlined,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(d||""),n.default.success("Copied to clipboard")}})]})]})]}),(0,t.jsx)("div",{className:"mt-4 text-right w-full",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}])},673709,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(678784);let s=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var r=e.i(650056);let i={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:n})=>{let[o,c]=(0,l.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:o?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(s,{size:16})}),(0,t.jsx)(r.Prism,{language:n,style:i,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],673709)},778917,e=>{"use strict";var t=e.i(546467);e.s(["ExternalLink",()=>t.default])},646050,e=>{"use strict";var t=e.i(843476),l=e.i(994388),a=e.i(304967),s=e.i(197647),r=e.i(653824),i=e.i(269200),n=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),m=e.i(881073),h=e.i(404206),g=e.i(723731),x=e.i(599724),p=e.i(271645),f=e.i(650056),b=e.i(127952),y=e.i(902555),j=e.i(727749),v=e.i(266027),w=e.i(954616),_=e.i(912598),N=e.i(243652),k=e.i(764205),C=e.i(135214);let S=(0,N.createQueryKeys)("budgets");var T=e.i(779241),I=e.i(677667),E=e.i(898667),A=e.i(130643),P=e.i(464571),D=e.i(212931),M=e.i(808613),B=e.i(28651),O=e.i(199133);let F=({isModalVisible:e,setIsModalVisible:l})=>{let[a]=M.Form.useForm(),s=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,k.budgetCreateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),r=async e=>{try{j.default.info("Making API Call"),await s.mutateAsync(e),j.default.success("Budget Created"),a.resetFields(),l(!1)}catch(e){console.error("Error creating the budget:",e),j.default.fromBackend(`Error creating the budget: ${e}`)}};return(0,t.jsx)(D.Modal,{title:"Create Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),a.resetFields()},onCancel:()=>{l(!1),a.resetFields()},children:(0,t.jsxs)(M.Form,{form:a,onFinish:r,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Form.Item,{label:"Budget ID",name:"budget_id",rules:[{required:!0,message:"Please input a human-friendly name for the budget"}],help:"A human-friendly name for the budget",children:(0,t.jsx)(T.TextInput,{placeholder:""})}),(0,t.jsx)(M.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(M.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(I.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(A.AccordionBody,{children:[(0,t.jsx)(M.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(M.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(O.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(O.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(O.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(O.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(P.Button,{htmlType:"submit",children:"Create Budget"})})]})})},R=({isModalVisible:e,setIsModalVisible:l,existingBudget:a})=>{let[s]=M.Form.useForm(),r=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,k.budgetUpdateCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})();(0,p.useEffect)(()=>{s.setFieldsValue(a)},[a,s]);let i=async e=>{try{j.default.info("Making API Call"),await r.mutateAsync(e),j.default.success("Budget Updated"),s.resetFields(),l(!1)}catch(e){console.error("Error updating the budget:",e),j.default.fromBackend(`Error updating the budget: ${e}`)}};return(0,t.jsx)(D.Modal,{title:"Edit Budget",open:e,width:800,footer:null,onOk:()=>{l(!1),s.resetFields()},onCancel:()=>{l(!1),s.resetFields()},children:(0,t.jsxs)(M.Form,{form:s,onFinish:i,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:a,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Form.Item,{label:"Budget ID",name:"budget_id",help:"Budget ID cannot be changed after creation",children:(0,t.jsx)(T.TextInput,{placeholder:"",disabled:!0})}),(0,t.jsx)(M.Form.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsx)(M.Form.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(B.InputNumber,{step:1,precision:2,width:200})}),(0,t.jsxs)(I.Accordion,{className:"mt-20 mb-8",children:[(0,t.jsx)(E.AccordionHeader,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(A.AccordionBody,{children:[(0,t.jsx)(M.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(B.InputNumber,{step:.01,precision:2,width:200})}),(0,t.jsx)(M.Form.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(O.Select,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(O.Select.Option,{value:"24h",children:"daily"}),(0,t.jsx)(O.Select.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(O.Select.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(P.Button,{htmlType:"submit",children:"Save"})})]})})},L=` +curl -X POST --location '/end_user/new' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{"user_id": "my-customer-id', "budget_id": ""}' # 👈 KEY CHANGE + +`,z=` +curl -X POST --location '/chat/completions' \\ + +-H 'Authorization: Bearer ' \\ + +-H 'Content-Type: application/json' \\ + +-d '{ + "model": "gpt-3.5-turbo', + "messages":[{"role": "user", "content": "Hey, how's it going?"}], + "user": "my-customer-id" +}' # 👈 KEY CHANGE + +`,U=`from openai import OpenAI +client = OpenAI( + base_url="", + api_key="" +) + +completion = client.chat.completions.create( + model="gpt-3.5-turbo", + messages=[ + {"role": "system", "content": "You are a helpful assistant."}, + {"role": "user", "content": "Hello!"} + ], + user="my-customer-id" +) + +print(completion.choices[0].message)`;e.s(["default",0,({accessToken:e})=>{let[N,T]=(0,p.useState)(!1),[I,E]=(0,p.useState)(!1),[A,P]=(0,p.useState)(null),[D,M]=(0,p.useState)(!1),{data:B=[]}=(()=>{let{accessToken:e}=(0,C.default)();return(0,v.useQuery)({queryKey:S.list({}),queryFn:async()=>(await (0,k.getBudgetList)(e)??[]).filter(e=>null!=e),enabled:!!e})})(),O=(()=>{let{accessToken:e}=(0,C.default)(),t=(0,_.useQueryClient)();return(0,w.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return(0,k.budgetDeleteCall)(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:S.all})}})})(),H=async t=>{null!=e&&(P(t),E(!0))},V=async()=>{if(A&&null!=e)try{await O.mutateAsync(A.budget_id),j.default.success("Budget deleted.")}catch(e){console.error("Error deleting budget:",e),"function"==typeof j.default.fromBackend?j.default.fromBackend("Failed to delete budget"):j.default.info("Failed to delete budget")}finally{M(!1),P(null)}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(l.Button,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>T(!0),children:"+ Create Budget"}),(0,t.jsxs)(r.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(s.Tab,{children:"Budgets"}),(0,t.jsx)(s.Tab,{children:"Examples"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(F,{isModalVisible:N,setIsModalVisible:T}),A&&(0,t.jsx)(R,{isModalVisible:I,setIsModalVisible:E,existingBudget:A}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(x.Text,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(i.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"Budget ID"}),(0,t.jsx)(d.TableHeaderCell,{children:"Max Budget"}),(0,t.jsx)(d.TableHeaderCell,{children:"TPM"}),(0,t.jsx)(d.TableHeaderCell,{children:"RPM"})]})}),(0,t.jsx)(n.TableBody,{children:B.slice().sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()).map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e.budget_id}),(0,t.jsx)(o.TableCell,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(o.TableCell,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(y.default,{variant:"Edit",tooltipText:"Edit budget",onClick:()=>H(e),dataTestId:"edit-budget-button"}),(0,t.jsx)(y.default,{variant:"Delete",tooltipText:"Delete budget",onClick:()=>{P(e),M(!0)},dataTestId:"delete-budget-button"})]},e.budget_id))})]})]}),(0,t.jsx)(b.default,{isOpen:D,title:"Delete Budget?",message:"Are you sure you want to delete this budget? This action cannot be undone.",resourceInformationTitle:"Budget Information",resourceInformation:[{label:"Budget ID",value:A?.budget_id,code:!0},{label:"Max Budget",value:A?.max_budget},{label:"TPM",value:A?.tpm_limit},{label:"RPM",value:A?.rpm_limit}],onCancel:()=>{M(!1)},onOk:V,confirmLoading:O.isPending})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)(x.Text,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(r.TabGroup,{children:[(0,t.jsxs)(m.TabList,{children:[(0,t.jsx)(s.Tab,{children:"Assign Budget to Customer"}),(0,t.jsx)(s.Tab,{children:"Test it (Curl)"}),(0,t.jsx)(s.Tab,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:L})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"bash",children:z})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(f.Prism,{language:"python",children:U})})]})]})]})})]})]})]})}],646050)},345244,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(752978),s=e.i(994388),r=e.i(309426),i=e.i(599724),n=e.i(350967),o=e.i(278587),c=e.i(304967),d=e.i(629569),u=e.i(389083),m=e.i(677667),h=e.i(898667),g=e.i(130643),x=e.i(808613),p=e.i(311451),f=e.i(199133),b=e.i(592968),y=e.i(827252),j=e.i(702597),v=e.i(355619),w=e.i(764205),_=e.i(727749),N=e.i(435451),k=e.i(860585),C=e.i(500330),S=e.i(678784),T=e.i(118366),I=e.i(464571);let E=({tagId:e,onClose:a,accessToken:r,is_admin:n,editTag:o})=>{let[E]=x.Form.useForm(),[A,P]=(0,l.useState)(null),[D,M]=(0,l.useState)(o),[B,O]=(0,l.useState)([]),[F,R]=(0,l.useState)({}),L=async(e,t)=>{await (0,C.copyToClipboard)(e)&&(R(e=>({...e,[t]:!0})),setTimeout(()=>{R(e=>({...e,[t]:!1}))},2e3))},z=async()=>{if(r)try{let t=(await (0,w.tagInfoCall)(r,[e]))[e];t&&(P(t),o&&E.setFieldsValue({name:t.name,description:t.description,models:t.models,max_budget:t.litellm_budget_table?.max_budget,budget_duration:t.litellm_budget_table?.budget_duration}))}catch(e){console.error("Error fetching tag details:",e),_.default.fromBackend("Error fetching tag details: "+e)}};(0,l.useEffect)(()=>{z()},[e,r]),(0,l.useEffect)(()=>{r&&(0,j.fetchUserModels)("dummy-user","Admin",r,O)},[r]);let U=async e=>{if(r)try{await (0,w.tagUpdateCall)(r,{name:e.name,description:e.description,models:e.models,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,budget_duration:e.budget_duration}),_.default.success("Tag updated successfully"),M(!1),z()}catch(e){console.error("Error updating tag:",e),_.default.fromBackend("Error updating tag: "+e)}};return A?(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Button,{onClick:a,className:"mb-4",children:"← Back to Tags"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Tag Name:"}),(0,t.jsx)("span",{className:"font-mono px-2 py-1 bg-gray-100 rounded text-sm border border-gray-200",children:A.name}),(0,t.jsx)(I.Button,{type:"text",size:"small",icon:F["tag-name"]?(0,t.jsx)(S.CheckIcon,{size:12}):(0,t.jsx)(T.CopyIcon,{size:12}),onClick:()=>L(A.name,"tag-name"),className:`transition-all duration-200 ${F["tag-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]}),(0,t.jsx)(i.Text,{className:"text-gray-500",children:A.description||"No description"})]}),n&&!D&&(0,t.jsx)(s.Button,{onClick:()=>M(!0),children:"Edit Tag"})]}),D?(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.Form,{form:E,onFinish:U,layout:"vertical",initialValues:A,children:[(0,t.jsx)(x.Form.Item,{label:"Tag Name",name:"name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(p.Input,{className:"rounded-md border-gray-300"})}),(0,t.jsx)(x.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(p.Input.TextArea,{rows:4})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process this type of data",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:B.map(e=>(0,t.jsx)(f.Select.Option,{value:e,children:(0,v.getModelDisplayName)(e)},e))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(N.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(k.default,{onChange:e=>E.setFieldValue("budget_duration",e)})}),(0,t.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-md border border-gray-200",children:(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["TPM/RPM limits for tags are not currently supported. If you need this feature, please"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"create a GitHub issue"}),"."]})})]})]}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(s.Button,{onClick:()=>M(!1),children:"Cancel"}),(0,t.jsx)(s.Button,{type:"submit",children:"Save Changes"})]})]})}):(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Tag Details"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Name"}),(0,t.jsx)(i.Text,{children:A.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Description"}),(0,t.jsx)(i.Text,{children:A.description||"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Allowed Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:A.models&&0!==A.models.length?A.models.map(e=>(0,t.jsx)(u.Badge,{color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:A.model_info?.[e]||e})},e)):(0,t.jsx)(u.Badge,{color:"red",children:"All Models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(i.Text,{children:A.created_at?new Date(A.created_at).toLocaleString():"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(i.Text,{children:A.updated_at?new Date(A.updated_at).toLocaleString():"-"})]})]})]}),A.litellm_budget_table&&(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(d.Title,{children:"Budget & Rate Limits"}),(0,t.jsxs)("div",{className:"space-y-4 mt-4",children:[void 0!==A.litellm_budget_table.max_budget&&null!==A.litellm_budget_table.max_budget&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Max Budget"}),(0,t.jsxs)(i.Text,{children:["$",A.litellm_budget_table.max_budget]})]}),A.litellm_budget_table.budget_duration&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"Budget Duration"}),(0,t.jsx)(i.Text,{children:A.litellm_budget_table.budget_duration})]}),void 0!==A.litellm_budget_table.tpm_limit&&null!==A.litellm_budget_table.tpm_limit&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"TPM Limit"}),(0,t.jsx)(i.Text,{children:A.litellm_budget_table.tpm_limit.toLocaleString()})]}),void 0!==A.litellm_budget_table.rpm_limit&&null!==A.litellm_budget_table.rpm_limit&&(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Text,{className:"font-medium",children:"RPM Limit"}),(0,t.jsx)(i.Text,{children:A.litellm_budget_table.rpm_limit.toLocaleString()})]})]})]})]})]}):(0,t.jsx)("div",{children:"Loading..."})};var A=e.i(871943),P=e.i(360820),D=e.i(591935),M=e.i(94629),B=e.i(68155),O=e.i(152990),F=e.i(682830),R=e.i(269200),L=e.i(942232),z=e.i(977572),U=e.i(427612),H=e.i(64848),V=e.i(496020);let $="This is just a spend tag that was passed dynamically in a request. It does not control any LLM models.",q=({data:e,onEdit:r,onDelete:n,onSelectTag:o})=>{let[c,d]=l.default.useState([{id:"created_at",desc:!0}]),m=[{header:"Tag Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,a=l.description===$;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(b.Tooltip,{title:a?"You cannot view the information of a dynamically generated spend tag":l.name,children:(0,t.jsx)(s.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5",onClick:()=>o(l.name),disabled:a,children:l.name})})})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original;return(0,t.jsx)(b.Tooltip,{title:l.description,children:(0,t.jsx)("span",{className:"text-xs",children:l.description||"-"})})}},{header:"Allowed Models",accessorKey:"models",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:l?.models?.length===0?(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"red",children:"All Models"}):l?.models?.map(e=>(0,t.jsx)(u.Badge,{size:"xs",className:"mb-1",color:"blue",children:(0,t.jsx)(b.Tooltip,{title:`ID: ${e}`,children:(0,t.jsx)(i.Text,{children:l.model_info?.[e]||e})})},e))})}},{header:"Created",accessorKey:"created_at",sortingFn:"datetime",cell:({row:e})=>{let l=e.original;return(0,t.jsx)("span",{className:"text-xs",children:new Date(l.created_at).toLocaleDateString()})}},{id:"actions",header:"Actions",cell:({row:e})=>{let l=e.original,s=l.description===$;return(0,t.jsxs)("div",{className:"flex space-x-2",children:[s?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be edited",children:(0,t.jsx)(a.Icon,{icon:D.PencilAltIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Edit tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Edit tag",children:(0,t.jsx)(a.Icon,{icon:D.PencilAltIcon,size:"sm",onClick:()=>r(l),className:"cursor-pointer hover:text-blue-500"})}),s?(0,t.jsx)(b.Tooltip,{title:"Dynamically generated spend tags cannot be deleted",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",className:"opacity-50 cursor-not-allowed","aria-label":"Delete tag (disabled)"})}):(0,t.jsx)(b.Tooltip,{title:"Delete tag",children:(0,t.jsx)(a.Icon,{icon:B.TrashIcon,size:"sm",onClick:()=>n(l.name),className:"cursor-pointer hover:text-red-500"})})]})}}],h=(0,O.useReactTable)({data:e,columns:m,state:{sorting:c},onSortingChange:d,getCoreRowModel:(0,F.getCoreRowModel)(),getSortedRowModel:(0,F.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(R.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(U.TableHead,{children:h.getHeaderGroups().map(e=>(0,t.jsx)(V.TableRow,{children:e.headers.map(e=>(0,t.jsx)(H.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,O.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(P.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(A.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(M.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(L.TableBody,{children:h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,t.jsx)(V.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(z.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,O.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(V.TableRow,{children:(0,t.jsx)(z.TableCell,{colSpan:m.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No tags found"})})})})})]})})})};var K=e.i(779241),G=e.i(212931);let W=({visible:e,onCancel:l,onSubmit:a,availableModels:r})=>{let[i]=x.Form.useForm();return(0,t.jsx)(G.Modal,{title:"Create New Tag",open:e,width:800,footer:null,onCancel:()=>{i.resetFields(),l()},children:(0,t.jsxs)(x.Form,{form:i,onFinish:e=>{a(e),i.resetFields()},labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(x.Form.Item,{label:"Tag Name",name:"tag_name",rules:[{required:!0,message:"Please input a tag name"}],children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(x.Form.Item,{label:"Description",name:"description",children:(0,t.jsx)(p.Input.TextArea,{rows:4})}),(0,t.jsx)(x.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Models",(0,t.jsx)(b.Tooltip,{title:"Select which models are allowed to process requests from this tag",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_llms",children:(0,t.jsx)(f.Select,{mode:"multiple",placeholder:"Select Models",children:r.map(e=>(0,t.jsx)(f.Select.Option,{value:e.model_info.id,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:e.model_name}),(0,t.jsxs)("span",{className:"text-gray-400 ml-2",children:["(",e.model_info.id,")"]})]})},e.model_info.id))})}),(0,t.jsxs)(m.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(h.AccordionHeader,{children:(0,t.jsx)(d.Title,{className:"m-0",children:"Budget & Rate Limits (Optional)"})}),(0,t.jsxs)(g.AccordionBody,{children:[(0,t.jsx)(x.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(b.Tooltip,{title:"Maximum amount in USD this tag can spend. When reached, requests with this tag will be blocked",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",children:(0,t.jsx)(N.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(x.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(b.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(y.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",children:(0,t.jsx)(k.default,{onChange:e=>i.setFieldValue("budget_duration",e)})}),(0,t.jsx)("div",{className:"mt-4 p-3 bg-gray-50 rounded-md border border-gray-200",children:(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["TPM/RPM limits for tags are not currently supported. If you need this feature, please"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"create a GitHub issue"}),"."]})})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(s.Button,{type:"submit",children:"Create Tag"})})]})})};e.s(["default",0,({accessToken:e,userID:c,userRole:d})=>{let[u,m]=(0,l.useState)([]),[h,g]=(0,l.useState)(!1),[x,p]=(0,l.useState)(null),[f,b]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),[v,N]=(0,l.useState)(null),[k,C]=(0,l.useState)(""),[S,T]=(0,l.useState)([]),I=async()=>{if(e)try{let t=await (0,w.tagListCall)(e);console.log("List tags response:",t),m(Object.values(t))}catch(e){console.error("Error fetching tags:",e),_.default.fromBackend("Error fetching tags: "+e)}},A=async t=>{if(e)try{await (0,w.tagCreateCall)(e,{name:t.tag_name,description:t.description,models:t.allowed_llms,max_budget:t.max_budget,soft_budget:t.soft_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,budget_duration:t.budget_duration}),_.default.success("Tag created successfully"),g(!1),I()}catch(e){console.error("Error creating tag:",e),_.default.fromBackend("Error creating tag: "+e)}},P=async e=>{N(e),j(!0)},D=async()=>{if(e&&v){try{await (0,w.tagDeleteCall)(e,v),_.default.success("Tag deleted successfully"),I()}catch(e){console.error("Error deleting tag:",e),_.default.fromBackend("Error deleting tag: "+e)}j(!1),N(null)}};return(0,l.useEffect)(()=>{c&&d&&e&&(async()=>{try{let t=await (0,w.modelInfoCall)(e,c,d);t&&t.data&&T(t.data)}catch(e){console.error("Error fetching models:",e),_.default.fromBackend("Error fetching models: "+e)}})()},[e,c,d]),(0,l.useEffect)(()=>{I()},[e]),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:x?(0,t.jsx)(E,{tagId:x,onClose:()=>{p(null),b(!1)},accessToken:e,is_admin:"Admin"===d,editTag:f}):(0,t.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,t.jsx)("h1",{children:"Tag Management"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[k&&(0,t.jsxs)(i.Text,{children:["Last Refreshed: ",k]}),(0,t.jsx)(a.Icon,{icon:o.RefreshIcon,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{I(),C(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(i.Text,{className:"mb-4",children:["Click on a tag name to view and edit its details.",(0,t.jsxs)("p",{children:["You can use tags to restrict the usage of certain LLMs based on tags passed in the request. Read more about tag routing"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/tag_routing",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})]}),(0,t.jsx)(s.Button,{className:"mb-4",onClick:()=>g(!0),children:"+ Create New Tag"}),(0,t.jsx)(n.Grid,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,t.jsx)(r.Col,{numColSpan:1,children:(0,t.jsx)(q,{data:u,onEdit:e=>{p(e.name),b(!0)},onDelete:P,onSelectTag:p})})}),(0,t.jsx)(W,{visible:h,onCancel:()=>g(!1),onSubmit:A,availableModels:S}),y&&(0,t.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,t.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,t.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,t.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,t.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,t.jsx)("div",{className:"sm:flex sm:items-start",children:(0,t.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Tag"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this tag?"})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,t.jsx)(s.Button,{onClick:D,color:"red",className:"ml-2",children:"Delete"}),(0,t.jsx)(s.Button,{onClick:()=>{j(!1),N(null)},children:"Cancel"})]})]})]})})]})})}],345244)},735042,e=>{"use strict";e.i(247167);var t=e.i(843476),l=e.i(584935),a=e.i(290571),s=e.i(271645),r=e.i(95779),i=e.i(444755),n=e.i(673706);let o=(0,n.makeClassName)("BarList");function c(e,t){let{data:l=[],color:c,valueFormatter:d=n.defaultValueFormatter,showAnimation:u=!1,onValueChange:m,sortOrder:h="descending",className:g}=e,x=(0,a.__rest)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),p=m?"button":"div",f=s.default.useMemo(()=>"none"===h?l:[...l].sort((e,t)=>"ascending"===h?e.value-t.value:t.value-e.value),[l,h]),b=s.default.useMemo(()=>{let e=Math.max(...f.map(e=>e.value),0);return f.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[f]);return s.default.createElement("div",Object.assign({ref:t,className:(0,i.tremorTwMerge)(o("root"),"flex justify-between space-x-6",g),"aria-sort":h},x),s.default.createElement("div",{className:(0,i.tremorTwMerge)(o("bars"),"relative w-full space-y-1.5")},f.map((e,t)=>{var l,a,d;let h=e.icon;return s.default.createElement(p,{key:null!=(l=e.key)?l:t,onClick:()=>{null==m||m(e)},className:(0,i.tremorTwMerge)(o("bar"),"group w-full flex items-center rounded-tremor-small",m?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},s.default.createElement("div",{className:(0,i.tremorTwMerge)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||c?[(0,n.getColorClassNames)(null!=(a=e.color)?a:c,r.colorPalette.background).bgColor,m?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!m||e.color||c?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===f.length-1?"mb-0":"",u?"duration-500":""),style:{width:`${b[t]}%`,transition:u?"all 1s":""}},s.default.createElement("div",{className:(0,i.tremorTwMerge)("absolute left-2 pr-4 flex max-w-full")},h?s.default.createElement(h,{className:(0,i.tremorTwMerge)(o("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?s.default.createElement("a",{href:e.href,target:null!=(d=e.target)?d:"_blank",rel:"noreferrer",className:(0,i.tremorTwMerge)(o("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",m?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):s.default.createElement("p",{className:(0,i.tremorTwMerge)(o("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),s.default.createElement("div",{className:o("labels")},f.map((e,t)=>{var l;return s.default.createElement("div",{key:null!=(l=e.key)?l:t,className:(0,i.tremorTwMerge)(o("labelWrapper"),"flex justify-end items-center","h-8",t===f.length-1?"mb-0":"mb-1.5")},s.default.createElement("p",{className:(0,i.tremorTwMerge)(o("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},d(e.value)))})))}c.displayName="BarList";let d=s.default.forwardRef(c);var u=e.i(304967),m=e.i(629569),h=e.i(269200),g=e.i(427612),x=e.i(64848),p=e.i(496020),f=e.i(977572),b=e.i(942232),y=e.i(37091),j=e.i(617802),v=e.i(144267),w=e.i(350967),_=e.i(309426),N=e.i(599724),k=e.i(404206),C=e.i(723731),S=e.i(653824),T=e.i(881073),I=e.i(197647),E=e.i(206929),A=e.i(35983),P=e.i(413990),D=e.i(476961),M=e.i(994388),B=e.i(621642),O=e.i(25080),F=e.i(764205),R=e.i(1023),L=e.i(500330);console.log("process.env.NODE_ENV","production");let z=e=>null!==e&&("Admin"===e||"Admin Viewer"===e);e.s(["default",0,({accessToken:e,token:a,userRole:r,userID:i,keys:n,premiumUser:o})=>{let c=new Date,[U,H]=(0,s.useState)([]),[V,$]=(0,s.useState)([]),[q,K]=(0,s.useState)([]),[G,W]=(0,s.useState)([]),[J,Y]=(0,s.useState)([]),[Q,X]=(0,s.useState)([]),[Z,ee]=(0,s.useState)([]),[et,el]=(0,s.useState)([]),[ea,es]=(0,s.useState)([]),[er,ei]=(0,s.useState)([]),[en,eo]=(0,s.useState)({}),[ec,ed]=(0,s.useState)([]),[eu,em]=(0,s.useState)(""),[eh,eg]=(0,s.useState)(["all-tags"]),[ex,ep]=(0,s.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ef,eb]=(0,s.useState)(null),[ey,ej]=(0,s.useState)(0),ev=new Date(c.getFullYear(),c.getMonth(),1),ew=new Date(c.getFullYear(),c.getMonth()+1,0),e_=eI(ev),eN=eI(ew);function ek(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}console.log("keys in usage",n),console.log("premium user in usage",o);let eC=async()=>{if(e)try{let t=await (0,F.getProxyUISettings)(e);return console.log("usage tab: proxy_settings",t),t}catch(e){console.error("Error fetching proxy settings:",e)}};(0,s.useEffect)(()=>{eT(ex.from,ex.to)},[ex,eh]);let eS=async(t,l,a)=>{if(!t||!l||!e)return;console.log("uiSelectedKey",a);let s=await (0,F.adminTopEndUsersCall)(e,a,t.toISOString(),l.toISOString());console.log("End user data updated successfully",s),W(s)},eT=async(t,l)=>{if(!t||!l||!e)return;let a=await eC();a?.DISABLE_EXPENSIVE_DB_QUERIES||(X((await (0,F.tagsSpendLogsCall)(e,t.toISOString(),l.toISOString(),0===eh.length?void 0:eh)).spend_per_tag),console.log("Tag spend data updated successfully"))};function eI(e){let t=e.getFullYear(),l=e.getMonth()+1,a=e.getDate();return`${t}-${l<10?"0"+l:l}-${a<10?"0"+a:a}`}console.log(`Start date is ${e_}`),console.log(`End date is ${eN}`);let eE=async(e,t,l)=>{try{let l=await e();t(l)}catch(e){console.error(l,e)}},eA=(e,t,l,a)=>{let s=[],r=new Date(t),i=new Map(e.map(e=>{let t=(e=>{if(e.includes("-"))return e;{let[t,l]=e.split(" ");return new Date(new Date().getFullYear(),new Date(`${t} 01 2024`).getMonth(),parseInt(l)).toISOString().split("T")[0]}})(e.date);return[t,{...e,date:t}]}));for(;r<=l;){let e=r.toISOString().split("T")[0];if(i.has(e))s.push(i.get(e));else{let t={date:e,api_requests:0,total_tokens:0};a.forEach(e=>{t[e]||(t[e]=0)}),s.push(t)}r.setDate(r.getDate()+1)}return s},eP=async()=>{if(e)try{let t=await (0,F.adminSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),s=new Date(l.getFullYear(),l.getMonth()+1,0),r=eA(t,a,s,[]),i=Number(r.reduce((e,t)=>e+(t.spend||0),0).toFixed(2));ej(i),H(r)}catch(e){console.error("Error fetching overall spend:",e)}},eD=async()=>{e&&await eE(async()=>(await (0,F.adminTopKeysCall)(e)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),$,"Error fetching top keys")},eM=async()=>{e&&await eE(async()=>(await (0,F.adminTopModelsCall)(e)).map(e=>({key:e.model,spend:(0,L.formatNumberWithCommas)(e.total_spend,2)})),K,"Error fetching top models")},eB=async()=>{e&&await eE(async()=>{let t=await (0,F.teamSpendLogsCall)(e),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),s=new Date(l.getFullYear(),l.getMonth()+1,0);return Y(eA(t.daily_spend,a,s,t.teams)),el(t.teams),t.total_spend_per_team.map(e=>({name:e.team_id||"",value:(0,L.formatNumberWithCommas)(e.total_spend||0,2)}))},es,"Error fetching team spend")},eO=async()=>{if(e)try{let t=await (0,F.adminGlobalActivity)(e,e_,eN),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),s=new Date(l.getFullYear(),l.getMonth()+1,0),r=eA(t.daily_data||[],a,s,["api_requests","total_tokens"]);eo({...t,daily_data:r})}catch(e){console.error("Error fetching global activity:",e)}},eF=async()=>{if(e)try{let t=await (0,F.adminGlobalActivityPerModel)(e,e_,eN),l=new Date,a=new Date(l.getFullYear(),l.getMonth(),1),s=new Date(l.getFullYear(),l.getMonth()+1,0),r=t.map(e=>({...e,daily_data:eA(e.daily_data||[],a,s,["api_requests","total_tokens"])}));ed(r)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,s.useEffect)(()=>{(async()=>{if(e&&a&&r&&i){let t=await eC();!(t&&(eb(t),t?.DISABLE_EXPENSIVE_DB_QUERIES))&&(console.log("fetching data - valiue of proxySettings",ef),eP(),eE(()=>e&&a?(0,F.adminspendByProvider)(e,a,e_,eN):Promise.reject("No access token or token"),ei,"Error fetching provider spend"),eD(),eM(),eO(),eF(),z(r)&&(eB(),e&&eE(async()=>(await (0,F.allTagNamesCall)(e)).tag_names,ee,"Error fetching tag names"),e&&eE(()=>(0,F.tagsSpendLogsCall)(e,ex.from?.toISOString(),ex.to?.toISOString(),void 0),e=>X(e.spend_per_tag),"Error fetching top tags"),e&&eE(()=>(0,F.adminTopEndUsersCall)(e,null,void 0,void 0),W,"Error fetching top end users")))}})()},[e,a,r,i,e_,eN]),ef?.DISABLE_EXPENSIVE_DB_QUERIES)?(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Database Query Limit Reached"}),(0,t.jsxs)(N.Text,{className:"mt-4",children:["SpendLogs in DB has ",ef.NUM_SPEND_LOGS_ROWS," rows.",(0,t.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,t.jsx)(M.Button,{className:"mt-4",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/spending_monitoring",target:"_blank",children:"View Usage Guide"})})]})}):(0,t.jsx)("div",{style:{width:"100%"},className:"p-8",children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{className:"mt-2",children:[(0,t.jsx)(I.Tab,{children:"All Up"}),z(r)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.Tab,{children:"Team Based Usage"}),(0,t.jsx)(I.Tab,{children:"Customer Usage"}),(0,t.jsx)(I.Tab,{children:"Tag Based Usage"})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{})})]}),(0,t.jsxs)(C.TabPanels,{children:[(0,t.jsx)(k.TabPanel,{children:(0,t.jsxs)(S.TabGroup,{children:[(0,t.jsxs)(T.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(I.Tab,{children:"Cost"}),(0,t.jsx)(I.Tab,{children:"Activity"})]}),(0,t.jsxs)(C.TabPanels,{children:[(0,t.jsx)(k.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[100vh] w-full",children:[(0,t.jsxs)(_.Col,{numColSpan:2,children:[(0,t.jsxs)(N.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 -"," ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,t.jsx)(j.default,{userSpend:ey,selectedTeam:null,userMaxBudget:null})]}),(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Monthly Spend"}),(0,t.jsx)(l.BarChart,{data:U,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$ ${(0,L.formatNumberWithCommas)(e,2)}`,yAxisWidth:100,tickGap:5})]})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(R.default,{topKeys:V,teams:null,topKeysLimit:5,setTopKeysLimit:()=>{}})]})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(u.Card,{className:"h-full",children:[(0,t.jsx)(m.Title,{children:"Top Models"}),(0,t.jsx)(l.BarChart,{className:"mt-4 h-40",data:q,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>`$${(0,L.formatNumberWithCommas)(e,2)}`})]})}),(0,t.jsx)(_.Col,{numColSpan:1}),(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Spend by Provider"}),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsx)(P.DonutChart,{className:"mt-4 h-40",variant:"pie",data:er,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>`$${(0,L.formatNumberWithCommas)(e,2)}`})}),(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(x.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(x.TableHeaderCell,{children:"Spend"})]})}),(0,t.jsx)(b.TableBody,{children:er.map(e=>(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.provider}),(0,t.jsx)(f.TableCell,{children:1e-5>parseFloat(e.spend.toFixed(2))?"less than 0.00":(0,L.formatNumberWithCommas)(e.spend,2)})]},e.provider))})]})})]})})]})})]})}),(0,t.jsx)(k.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:1,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"All Up"}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",ek(en.sum_api_requests)]}),(0,t.jsx)(D.AreaChart,{className:"h-40",data:en.daily_data,valueFormatter:ek,index:"date",colors:["cyan"],categories:["api_requests"],onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",ek(en.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:en.daily_data,valueFormatter:ek,index:"date",colors:["cyan"],categories:["total_tokens"],onValueChange:e=>console.log(e)})]})]})]}),(0,t.jsx)(t.Fragment,{children:ec.map((e,a)=>(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:e.model}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["API Requests ",ek(e.sum_api_requests)]}),(0,t.jsx)(D.AreaChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:ek,onValueChange:e=>console.log(e)})]}),(0,t.jsxs)(_.Col,{children:[(0,t.jsxs)(y.Subtitle,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Tokens ",ek(e.sum_total_tokens)]}),(0,t.jsx)(l.BarChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:ek,onValueChange:e=>console.log(e)})]})]})]},a))})]})})]})]})}),(0,t.jsx)(k.TabPanel,{children:(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full",children:[(0,t.jsxs)(_.Col,{numColSpan:2,children:[(0,t.jsxs)(u.Card,{className:"mb-2",children:[(0,t.jsx)(m.Title,{children:"Total Spend Per Team"}),(0,t.jsx)(d,{data:ea})]}),(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Daily Spend Per Team"}),(0,t.jsx)(l.BarChart,{className:"h-72",data:J,showLegend:!0,index:"date",categories:et,yAxisWidth:80,stack:!0})]})]}),(0,t.jsx)(_.Col,{numColSpan:2})]})}),(0,t.jsxs)(k.TabPanel,{children:[(0,t.jsxs)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",children:"docs here"})]}),(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{children:(0,t.jsx)(v.default,{value:ex,onValueChange:e=>{ep(e),eS(e.from,e.to,null)}})}),(0,t.jsxs)(_.Col,{children:[(0,t.jsx)(N.Text,{children:"Select Key"}),(0,t.jsxs)(E.Select,{defaultValue:"all-keys",children:[(0,t.jsx)(A.SelectItem,{value:"all-keys",onClick:()=>{eS(ex.from,ex.to,null)},children:"All Keys"},"all-keys"),n?.map((e,l)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,t.jsx)(A.SelectItem,{value:String(l),onClick:()=>{eS(ex.from,ex.to,e.token)},children:e.key_alias},l):null)]})]})]}),(0,t.jsx)(u.Card,{className:"mt-4",children:(0,t.jsxs)(h.Table,{className:"max-h-[70vh] min-h-[500px]",children:[(0,t.jsx)(g.TableHead,{children:(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(x.TableHeaderCell,{children:"Customer"}),(0,t.jsx)(x.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(x.TableHeaderCell,{children:"Total Events"})]})}),(0,t.jsx)(b.TableBody,{children:G?.map((e,l)=>(0,t.jsxs)(p.TableRow,{children:[(0,t.jsx)(f.TableCell,{children:e.end_user}),(0,t.jsx)(f.TableCell,{children:(0,L.formatNumberWithCommas)(e.total_spend,2)}),(0,t.jsx)(f.TableCell,{children:e.total_count})]},l))})]})})]}),(0,t.jsxs)(k.TabPanel,{children:[(0,t.jsxs)(w.Grid,{numItems:2,children:[(0,t.jsx)(_.Col,{numColSpan:1,children:(0,t.jsx)(v.default,{className:"mb-4",value:ex,onValueChange:e=>{ep(e),eT(e.from,e.to)}})}),(0,t.jsx)(_.Col,{children:o?(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(O.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsx)(O.MultiSelectItem,{value:String(e),children:e},e))]})}):(0,t.jsx)("div",{children:(0,t.jsxs)(B.MultiSelect,{value:eh,onValueChange:e=>eg(e),children:[(0,t.jsx)(O.MultiSelectItem,{value:"all-tags",onClick:()=>eg(["all-tags"]),children:"All Tags"},"all-tags"),Z&&Z.filter(e=>"all-tags"!==e).map((e,l)=>(0,t.jsxs)(A.SelectItem,{value:String(e),disabled:!0,children:["✨ ",e," (Enterprise only Feature)"]},e))]})})})]}),(0,t.jsxs)(w.Grid,{numItems:2,className:"gap-2 h-[75vh] w-full mb-4",children:[(0,t.jsx)(_.Col,{numColSpan:2,children:(0,t.jsxs)(u.Card,{children:[(0,t.jsx)(m.Title,{children:"Spend Per Tag"}),(0,t.jsxs)(N.Text,{children:["Get Started by Tracking cost per tag"," ",(0,t.jsx)("a",{className:"text-blue-500",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",children:"here"})]}),(0,t.jsx)(l.BarChart,{className:"h-72",data:Q,index:"name",categories:["spend"],colors:["cyan"]})]})}),(0,t.jsx)(_.Col,{numColSpan:2})]})]})]})]})})}],735042)},704308,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(994388),s=e.i(212931),r=e.i(764205),i=e.i(808613),n=e.i(311451),o=e.i(199133),c=e.i(888259),d=e.i(209261);let{TextArea:u}=n.Input,{Option:m}=o.Select,h=["Development","Productivity","Learning","Security","Data & Analytics","Integration","Testing","Documentation"],g=({visible:e,onClose:g,accessToken:x,onSuccess:p})=>{let[f]=i.Form.useForm(),[b,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)("github"),w=async e=>{if(!x)return void c.default.error("No access token available");if(!(0,d.validatePluginName)(e.name))return void c.default.error("Plugin name must be kebab-case (lowercase letters, numbers, and hyphens only)");if(e.version&&!(0,d.isValidSemanticVersion)(e.version))return void c.default.error("Version must be in semantic versioning format (e.g., 1.0.0)");if(e.authorEmail&&!(0,d.isValidEmail)(e.authorEmail))return void c.default.error("Invalid email format");if(e.homepage&&!(0,d.isValidUrl)(e.homepage))return void c.default.error("Invalid homepage URL format");if(("url"===j||"git-subdir"===j)&&e.url&&!(0,d.isValidUrl)(e.url))return void c.default.error("Invalid git URL format");y(!0);try{let t={name:e.name.trim(),source:"github"===j?{source:"github",repo:e.repo.trim()}:"git-subdir"===j?{source:"git-subdir",url:e.url.trim(),path:e.path.trim()}:{source:"url",url:e.url.trim()}};e.version&&(t.version=e.version.trim()),e.description&&(t.description=e.description.trim()),(e.authorName||e.authorEmail)&&(t.author={},e.authorName&&(t.author.name=e.authorName.trim()),e.authorEmail&&(t.author.email=e.authorEmail.trim())),e.homepage&&(t.homepage=e.homepage.trim()),e.category&&(t.category=e.category),e.keywords&&(t.keywords=(0,d.parseKeywords)(e.keywords)),await (0,r.registerClaudeCodePlugin)(x,t),c.default.success("Plugin registered successfully"),f.resetFields(),v("github"),p(),g()}catch(e){console.error("Error registering plugin:",e),c.default.error("Failed to register plugin")}finally{y(!1)}},_=()=>{f.resetFields(),v("github"),g()};return(0,t.jsx)(s.Modal,{title:"Add New Claude Code Plugin",open:e,onCancel:_,footer:null,width:700,className:"top-8",children:(0,t.jsxs)(i.Form,{form:f,layout:"vertical",onFinish:w,className:"mt-4",children:[(0,t.jsx)(i.Form.Item,{label:"Plugin Name",name:"name",rules:[{required:!0,message:"Please enter plugin name"},{pattern:/^[a-z0-9-]+$/,message:"Name must be kebab-case (lowercase, numbers, hyphens only)"}],tooltip:"Unique identifier in kebab-case format (e.g., my-awesome-plugin)",children:(0,t.jsx)(n.Input,{placeholder:"my-awesome-plugin",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Source Type",name:"sourceType",initialValue:"github",rules:[{required:!0,message:"Please select source type"}],children:(0,t.jsxs)(o.Select,{onChange:e=>{v(e),f.setFieldsValue({repo:void 0,url:void 0,path:void 0})},className:"rounded-lg",children:[(0,t.jsx)(m,{value:"github",children:"GitHub"}),(0,t.jsx)(m,{value:"url",children:"Git URL"}),(0,t.jsx)(m,{value:"git-subdir",children:"Git Subdir"})]})}),"github"===j&&(0,t.jsx)(i.Form.Item,{label:"GitHub Repository",name:"repo",rules:[{required:!0,message:"Please enter repository"},{pattern:/^[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+$/,message:"Repository must be in format: org/repo"}],tooltip:"Format: organization/repository (e.g., anthropics/claude-code)",children:(0,t.jsx)(n.Input,{placeholder:"anthropics/claude-code",className:"rounded-lg"})}),("url"===j||"git-subdir"===j)&&(0,t.jsx)(i.Form.Item,{label:"Git URL",name:"url",rules:[{required:!0,message:"Please enter git URL"}],tooltip:"Full git URL to the repository",children:(0,t.jsx)(n.Input,{type:"url",placeholder:"https://github.com/org/repo.git",className:"rounded-lg"})}),"git-subdir"===j&&(0,t.jsx)(i.Form.Item,{label:"Subdirectory Path",name:"path",rules:[{required:!0,message:"Please enter subdirectory path"},{pattern:/^[a-zA-Z0-9][a-zA-Z0-9._-]*(\/[a-zA-Z0-9][a-zA-Z0-9._-]*)*$/,message:"Path must be relative segments (alphanumeric, dots, hyphens, underscores), e.g. plugins/plugin-name"}],tooltip:"Path to the plugin directory within the repository (e.g., plugins/plugin-name)",children:(0,t.jsx)(n.Input,{placeholder:"plugins/plugin-name",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Version (Optional)",name:"version",tooltip:"Semantic version (e.g., 1.0.0)",children:(0,t.jsx)(n.Input,{placeholder:"1.0.0",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Description (Optional)",name:"description",tooltip:"Brief description of what the plugin does",children:(0,t.jsx)(u,{rows:3,placeholder:"A plugin that helps with...",maxLength:500,className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Category (Optional)",name:"category",tooltip:"Select a category or enter a custom one",children:(0,t.jsx)(o.Select,{placeholder:"Select or type a category",allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"rounded-lg",children:h.map(e=>(0,t.jsx)(m,{value:e,children:e},e))})}),(0,t.jsx)(i.Form.Item,{label:"Keywords (Optional)",name:"keywords",tooltip:"Comma-separated list of keywords for search",children:(0,t.jsx)(n.Input,{placeholder:"search, web, api",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Author Name (Optional)",name:"authorName",tooltip:"Name of the plugin author or organization",children:(0,t.jsx)(n.Input,{placeholder:"Your Name or Organization",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Author Email (Optional)",name:"authorEmail",rules:[{type:"email",message:"Please enter a valid email"}],tooltip:"Contact email for the plugin author",children:(0,t.jsx)(n.Input,{type:"email",placeholder:"author@example.com",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{label:"Homepage (Optional)",name:"homepage",rules:[{type:"url",message:"Please enter a valid URL"}],tooltip:"URL to the plugin's homepage or documentation",children:(0,t.jsx)(n.Input,{type:"url",placeholder:"https://example.com",className:"rounded-lg"})}),(0,t.jsx)(i.Form.Item,{className:"mb-0 mt-6",children:(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:_,disabled:b,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"submit",loading:b,children:b?"Registering...":"Register Plugin"})]})})]})})};var x=e.i(166406),p=e.i(871943),f=e.i(360820),b=e.i(94629),y=e.i(68155),j=e.i(152990),v=e.i(682830),w=e.i(389083),_=e.i(269200),N=e.i(942232),k=e.i(977572),C=e.i(427612),S=e.i(64848),T=e.i(496020),I=e.i(790848),E=e.i(592968),A=e.i(727749);let P=({pluginsList:e,isLoading:s,onDeleteClick:i,accessToken:n,onPluginUpdated:o,isAdmin:c,onPluginClick:u})=>{let[m,h]=(0,l.useState)([{id:"created_at",desc:!0}]),[g,P]=(0,l.useState)(null),D=async e=>{if(n){P(e.id);try{e.enabled?(await (0,r.disableClaudeCodePlugin)(n,e.name),A.default.success(`Plugin "${e.name}" disabled`)):(await (0,r.enableClaudeCodePlugin)(n,e.name),A.default.success(`Plugin "${e.name}" enabled`)),o()}catch(e){A.default.error("Failed to toggle plugin status")}finally{P(null)}}},M=[{header:"Plugin Name",accessorKey:"name",cell:({row:e})=>{let l=e.original,s=l.name||"";return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(E.Tooltip,{title:s,children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[150px] justify-start",onClick:()=>u(l.id),children:s})}),(0,t.jsx)(E.Tooltip,{title:"Copy Plugin ID",children:(0,t.jsx)(x.CopyOutlined,{onClick:e=>{var t;e.stopPropagation(),t=l.id,navigator.clipboard.writeText(t),A.default.success("Copied to clipboard!")},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Version",accessorKey:"version",cell:({row:e})=>{let l=e.original.version||"N/A";return(0,t.jsx)("span",{className:"text-xs text-gray-600",children:l})}},{header:"Description",accessorKey:"description",cell:({row:e})=>{let l=e.original.description||"No description";return(0,t.jsx)(E.Tooltip,{title:l,children:(0,t.jsx)("span",{className:"text-xs text-gray-600 block max-w-[300px] truncate",children:l})})}},{header:"Category",accessorKey:"category",cell:({row:e})=>{let l=e.original.category;if(!l)return(0,t.jsx)(w.Badge,{color:"gray",className:"text-xs font-normal",size:"xs",children:"Uncategorized"});let a=(0,d.getCategoryBadgeColor)(l);return(0,t.jsx)(w.Badge,{color:a,className:"text-xs font-normal",size:"xs",children:l})}},{header:"Enabled",accessorKey:"enabled",cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(w.Badge,{color:l.enabled?"green":"gray",className:"text-xs font-normal",size:"xs",children:l.enabled?"Yes":"No"}),c&&(0,t.jsx)(E.Tooltip,{title:l.enabled?"Disable plugin":"Enable plugin",children:(0,t.jsx)(I.Switch,{size:"small",checked:l.enabled,loading:g===l.id,onChange:()=>D(l)})})]})}},{header:"Created At",accessorKey:"created_at",cell:({row:e})=>{var l;let a=e.original;return(0,t.jsx)(E.Tooltip,{title:a.created_at,children:(0,t.jsx)("span",{className:"text-xs",children:(l=a.created_at)?new Date(l).toLocaleString():"-"})})}},...c?[{header:"Actions",id:"actions",enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsx)(E.Tooltip,{title:"Delete plugin",children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),i(l.name,l.name)},icon:y.TrashIcon,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],B=(0,j.useReactTable)({data:e,columns:M,state:{sorting:m},onSortingChange:h,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),enableSorting:!0});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(_.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(C.TableHead,{children:B.getHeaderGroups().map(e=>(0,t.jsx)(T.TableRow,{children:e.headers.map(e=>(0,t.jsx)(S.TableHeaderCell,{className:`py-1 h-8 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(f.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(b.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(N.TableBody,{children:s?(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:M.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"Loading..."})})})}):e&&e.length>0?B.getRowModel().rows.map(e=>(0,t.jsx)(T.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(k.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(T.TableRow,{children:(0,t.jsx)(k.TableCell,{colSpan:M.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No plugins found. Add one to get started."})})})})})]})})})};var D=e.i(708347),M=e.i(530212),B=e.i(434626),O=e.i(304967),F=e.i(350967),R=e.i(599724),L=e.i(629569),z=e.i(482725);let U=({pluginId:e,onClose:s,accessToken:i,isAdmin:n,onPluginUpdated:o})=>{let[c,u]=(0,l.useState)(null),[m,h]=(0,l.useState)(!0),[g,p]=(0,l.useState)(!1);(0,l.useEffect)(()=>{f()},[e,i]);let f=async()=>{if(i){h(!0);try{let t=await (0,r.getClaudeCodePluginDetails)(i,e);u(t.plugin)}catch(e){console.error("Error fetching plugin info:",e),A.default.error("Failed to load plugin information")}finally{h(!1)}}},b=async()=>{if(i&&c){p(!0);try{c.enabled?(await (0,r.disableClaudeCodePlugin)(i,c.name),A.default.success(`Plugin "${c.name}" disabled`)):(await (0,r.enableClaudeCodePlugin)(i,c.name),A.default.success(`Plugin "${c.name}" enabled`)),o(),f()}catch(e){A.default.error("Failed to toggle plugin status")}finally{p(!1)}}},y=e=>{navigator.clipboard.writeText(e),A.default.success("Copied to clipboard!")};if(m)return(0,t.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,t.jsx)(z.Spin,{size:"large"})});if(!c)return(0,t.jsxs)("div",{className:"p-8 text-center text-gray-500",children:[(0,t.jsx)("p",{children:"Plugin not found"}),(0,t.jsx)(a.Button,{className:"mt-4",onClick:s,children:"Go Back"})]});let j=(0,d.formatInstallCommand)(c),v=(0,d.getSourceLink)(c.source),_=(0,d.getCategoryBadgeColor)(c.category);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,t.jsx)(M.ArrowLeftIcon,{className:"h-5 w-5 cursor-pointer text-gray-500 hover:text-gray-700",onClick:s}),(0,t.jsx)("h2",{className:"text-2xl font-bold",children:c.name}),c.version&&(0,t.jsxs)(w.Badge,{color:"blue",size:"xs",children:["v",c.version]}),c.category&&(0,t.jsx)(w.Badge,{color:_,size:"xs",children:c.category}),(0,t.jsx)(w.Badge,{color:c.enabled?"green":"gray",size:"xs",children:c.enabled?"Enabled":"Disabled"})]}),(0,t.jsx)(O.Card,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs mb-2",children:"Install Command"}),(0,t.jsx)("div",{className:"font-mono bg-gray-100 px-3 py-2 rounded text-sm",children:j})]}),(0,t.jsx)(E.Tooltip,{title:"Copy install command",children:(0,t.jsx)(a.Button,{size:"xs",variant:"secondary",icon:x.CopyOutlined,onClick:()=>y(j),className:"ml-4",children:"Copy"})})]})}),(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Plugin Details"}),(0,t.jsxs)(F.Grid,{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Plugin ID"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)(R.Text,{className:"font-mono text-xs",children:c.id}),(0,t.jsx)(x.CopyOutlined,{className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs",onClick:()=>y(c.id)})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Name"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:c.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Version"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:c.version||"N/A"})]}),(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Source"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)(R.Text,{className:"font-semibold",children:(0,d.getSourceDisplayText)(c.source)}),v&&(0,t.jsx)("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700",children:(0,t.jsx)(B.ExternalLinkIcon,{className:"h-4 w-4"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Category"}),(0,t.jsx)("div",{className:"mt-1",children:c.category?(0,t.jsx)(w.Badge,{color:_,size:"xs",children:c.category}):(0,t.jsx)(R.Text,{className:"text-gray-400",children:"Uncategorized"})})]}),n&&(0,t.jsxs)("div",{className:"col-span-3",children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Status"}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[(0,t.jsx)(I.Switch,{checked:c.enabled,loading:g,onChange:b}),(0,t.jsx)(R.Text,{className:"text-sm",children:c.enabled?"Plugin is enabled and visible in marketplace":"Plugin is disabled and hidden from marketplace"})]})]})]})]}),c.description&&(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Description"}),(0,t.jsx)(R.Text,{className:"mt-2",children:c.description})]}),c.keywords&&c.keywords.length>0&&(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Keywords"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:c.keywords.map((e,l)=>(0,t.jsx)(w.Badge,{color:"gray",size:"xs",children:e},l))})]}),c.author&&(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Author Information"}),(0,t.jsxs)(F.Grid,{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-4",children:[c.author.name&&(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Name"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:c.author.name})]}),c.author.email&&(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Email"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:(0,t.jsx)("a",{href:`mailto:${c.author.email}`,className:"text-blue-500 hover:text-blue-700",children:c.author.email})})]})]})]}),c.homepage&&(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Homepage"}),(0,t.jsxs)("a",{href:c.homepage,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:text-blue-700 flex items-center gap-2 mt-2",children:[c.homepage,(0,t.jsx)(B.ExternalLinkIcon,{className:"h-4 w-4"})]})]}),(0,t.jsxs)(O.Card,{children:[(0,t.jsx)(L.Title,{children:"Metadata"}),(0,t.jsxs)(F.Grid,{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Created At"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:(0,d.formatDateString)(c.created_at)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Updated At"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:(0,d.formatDateString)(c.updated_at)})]}),c.created_by&&(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(R.Text,{className:"text-gray-600 text-xs",children:"Created By"}),(0,t.jsx)(R.Text,{className:"font-semibold mt-1",children:c.created_by})]})]})]})]})};e.s(["default",0,({accessToken:e,userRole:i})=>{let[n,o]=(0,l.useState)([]),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),[h,x]=(0,l.useState)(!1),[p,f]=(0,l.useState)(null),[b,y]=(0,l.useState)(null),j=!!i&&(0,D.isAdminRole)(i),v=async()=>{if(e){m(!0);try{let t=await (0,r.getClaudeCodePluginsList)(e,!1);console.log(`Claude Code plugins: ${JSON.stringify(t)}`),o(t.plugins)}catch(e){console.error("Error fetching Claude Code plugins:",e)}finally{m(!1)}}};(0,l.useEffect)(()=>{v()},[e]);let w=async()=>{if(p&&e){x(!0);try{await (0,r.deleteClaudeCodePlugin)(e,p.name),A.default.success(`Plugin "${p.displayName}" deleted successfully`),v()}catch(e){console.error("Error deleting plugin:",e),A.default.error("Failed to delete plugin")}finally{x(!1),f(null)}}};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-4",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Claude Code Plugins"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Manage Claude Code marketplace plugins. Add, enable, disable, or delete plugins that will be available in your marketplace catalog. Enabled plugins will appear in the public marketplace at"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"/claude-code/marketplace.json"}),"."]}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(a.Button,{onClick:()=>{b&&y(null),d(!0)},disabled:!e||!j,children:"+ Add New Plugin"})})]}),b?(0,t.jsx)(U,{pluginId:b,onClose:()=>y(null),accessToken:e,isAdmin:j,onPluginUpdated:v}):(0,t.jsx)(P,{pluginsList:n,isLoading:u,onDeleteClick:(e,t)=>{f({name:e,displayName:t})},accessToken:e,onPluginUpdated:v,isAdmin:j,onPluginClick:e=>y(e)}),(0,t.jsx)(g,{visible:c,onClose:()=>{d(!1)},accessToken:e,onSuccess:()=>{v()}}),p&&(0,t.jsxs)(s.Modal,{title:"Delete Plugin",open:null!==p,onOk:w,onCancel:()=>{f(null)},confirmLoading:h,okText:"Delete",okButtonProps:{danger:!0},children:[(0,t.jsxs)("p",{children:["Are you sure you want to delete plugin:"," ",(0,t.jsx)("strong",{children:p.displayName}),"?"]}),(0,t.jsx)("p",{children:"This action cannot be undone."})]})]})}],704308)},368670,e=>{"use strict";var t=e.i(764205),l=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,l.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},226898,972520,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(304967),s=e.i(269200),r=e.i(427612),i=e.i(496020),n=e.i(389083),o=e.i(64848),c=e.i(977572),d=e.i(942232),u=e.i(599724),m=e.i(994388),h=e.i(752978),g=e.i(793130),x=e.i(404206),p=e.i(723731),f=e.i(653824),b=e.i(881073),y=e.i(197647),j=e.i(764205),v=e.i(28651),w=e.i(68155),_=e.i(220508),N=e.i(727749),k=e.i(158392);let C=({accessToken:e,userRole:a,userID:s,modelData:r})=>{let[i,n]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)({}),[h,g]=(0,l.useState)({});return((0,l.useEffect)(()=>{e&&a&&s&&((0,j.getCallbacksCall)(e,s,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy;let l=t.routing_strategy||null;n(e=>({...e,routerSettings:t,selectedStrategy:l}))}),(0,j.getRouterSettingsCall)(e).then(e=>{if(console.log("router settings from API",e),e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),u(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&c(l.options),e.routing_strategy_descriptions&&g(e.routing_strategy_descriptions);let a=e.fields.find(e=>"enable_tag_filtering"===e.field_name);a?.field_value!==null&&a?.field_value!==void 0&&n(e=>({...e,enableTagFiltering:a.field_value}))}}))},[e,a,s]),e)?(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(k.default,{value:i,onChange:n,routerFieldsMetadata:d,availableRoutingStrategies:o,routingStrategyDescriptions:h}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(m.Button,{variant:"secondary",size:"sm",onClick:()=>window.location.reload(),className:"text-sm",children:"Reset"}),(0,t.jsx)(m.Button,{size:"sm",onClick:()=>{if(!e)return;let t=i.routerSettings;console.log("router_settings",t);let l=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),a=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...t,enable_tag_filtering:i.enableTagFiltering}).map(([e,t])=>{if("routing_strategy_args"!==e&&"routing_strategy"!==e&&"enable_tag_filtering"!==e){let s=document.querySelector(`input[name="${e}"]`),r=((e,t,s)=>{if(void 0===t)return s;let r=t.trim();if("null"===r.toLowerCase())return null;if(l.has(e)){let e=Number(r);return Number.isNaN(e)?s:e}if(a.has(e)){if(""===r)return null;try{return JSON.parse(r)}catch{return s}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(e,s?.value,t);return[e,r]}if("routing_strategy"===e)return[e,i.selectedStrategy];if("enable_tag_filtering"===e)return[e,i.enableTagFiltering];if("routing_strategy_args"===e&&"latency-based-routing"===i.selectedStrategy){let e={},t=document.querySelector('input[name="lowest_latency_buffer"]'),l=document.querySelector('input[name="ttl"]');return t?.value&&(e.lowest_latency_buffer=Number(t.value)),l?.value&&(e.ttl=Number(l.value)),console.log(`setRoutingStrategyArgs: ${e}`),["routing_strategy_args",e]}return null}).filter(e=>null!=e));console.log("updatedVariables",s);try{(0,j.setCallbacksCall)(e,{router_settings:s})}catch(e){N.default.fromBackend("Failed to update router settings: "+e)}N.default.success("router settings updated successfully")},className:"text-sm font-medium",children:"Save Changes"})]})]}):null};e.i(247167);var S=e.i(368670);let T=l.forwardRef(function(e,t){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 5l7 7m0 0l-7 7m7-7H3"}))});var I=e.i(122577),E=e.i(592968),A=e.i(898586),P=e.i(356449),D=e.i(127952),M=e.i(418371),B=e.i(464571),O=e.i(888259),F=e.i(689020),R=e.i(212931);let L=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function z({open:e,onCancel:l,children:a}){return(0,t.jsx)(R.Modal,{title:(0,t.jsx)("div",{className:"pb-4 border-b border-gray-100",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-gray-800",children:[(0,t.jsx)("div",{className:"p-2 bg-indigo-50 rounded-lg",children:(0,t.jsx)(L,{className:"w-5 h-5 text-indigo-600"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-bold m-0",children:"Configure Model Fallbacks"}),(0,t.jsx)("p",{className:"text-sm text-gray-500 font-normal m-0",children:"Manage multiple fallback chains for different models (up to 5 groups at a time)"})]})]})}),open:e,width:900,footer:null,onCancel:l,maskClosable:!1,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:a})})}e.s(["ArrowRight",()=>L],972520);var U=e.i(419470);function H({models:e,accessToken:a,value:s=[],onChange:r}){let[i,n]=(0,l.useState)(!1),[o,c]=(0,l.useState)([]),[d,u]=(0,l.useState)(0),[h,g]=(0,l.useState)(!1),[x,p]=(0,l.useState)([{id:"1",primaryModel:null,fallbackModels:[]}]);(0,l.useEffect)(()=>{i&&(p([{id:"1",primaryModel:null,fallbackModels:[]}]),u(e=>e+1))},[i]),(0,l.useEffect)(()=>{let e=async()=>{try{let e=await (0,F.fetchAvailableModels)(a);console.log("Fetched models for fallbacks:",e),c(e)}catch(e){console.error("Error fetching model info for fallbacks:",e)}};i&&e()},[a,i]);let f=Array.from(new Set(o.map(e=>e.model_group))).sort(),b=()=>{n(!1),p([{id:"1",primaryModel:null,fallbackModels:[]}])},y=async()=>{let e=x.filter(e=>!e.primaryModel||0===e.fallbackModels.length);if(e.length>0)return void O.default.error(`Please complete configuration for all groups. ${e.length} group(s) incomplete.`);let t=[...s||[],...x.map(e=>({[e.primaryModel]:e.fallbackModels}))];if(r){g(!0);try{await r(t),N.default.success(`${x.length} fallback configuration(s) added successfully!`),b()}catch(e){console.error("Error saving fallbacks:",e)}finally{g(!1)}}else N.default.fromBackend("onChange callback not provided")};return(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Button,{className:"mx-auto",onClick:()=>n(!0),icon:()=>(0,t.jsx)("span",{className:"mr-1",children:"+"}),children:"Add Fallbacks"}),(0,t.jsxs)(z,{open:i,onCancel:b,children:[(0,t.jsx)(U.FallbackSelectionForm,{groups:x,onGroupsChange:p,availableModels:f,maxFallbacks:10,maxGroups:5},d),x.length>0&&(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 mt-6 border-t border-gray-100",children:[(0,t.jsx)(B.Button,{type:"default",onClick:b,disabled:h,children:"Cancel"}),(0,t.jsx)(B.Button,{type:"default",onClick:y,disabled:0===x.length||h,loading:h,children:h?"Saving Configuration...":"Save All Configurations"})]})]})]})}let V="inline-flex items-center gap-2 px-2.5 py-1 rounded-md border border-gray-200 bg-gray-50 text-sm font-medium text-gray-800 shrink-0";async function $(e,l){console.log=function(){};let a=window.location.origin,s=new P.default.OpenAI({apiKey:l,baseURL:a,dangerouslyAllowBrowser:!0});try{N.default.info("Testing fallback model response...");let l=await s.chat.completions.create({model:e,messages:[{role:"user",content:"Hi, this is a test message"}],mock_testing_fallbacks:!0});N.default.success((0,t.jsxs)("span",{children:["Test model=",(0,t.jsx)("strong",{children:e}),", received model=",(0,t.jsx)("strong",{children:l.model}),". See"," ",(0,t.jsx)("a",{href:"#",onClick:()=>window.open("https://docs.litellm.ai/docs/proxy/reliability","_blank"),style:{textDecoration:"underline",color:"blue"},children:"curl"})]}))}catch(e){N.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`)}}let q=({accessToken:e,userRole:a,userID:n,modelData:u})=>{let[m,g]=(0,l.useState)({}),[x,p]=(0,l.useState)(!1),[f,b]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),{data:_}=(0,S.useModelCostMap)(),k=e=>null!=_&&"object"==typeof _&&e in _?_[e].litellm_provider??"":"";(0,l.useEffect)(()=>{e&&a&&n&&(0,j.getCallbacksCall)(e,n,a).then(e=>{console.log("callbacks",e);let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)})},[e,a,n]);let C=e=>{b(e),v(!0)},P=async()=>{if(!f||!e)return;let t=Object.keys(f)[0];if(!t)return;p(!0);let l=m.fallbacks.map(e=>{let l={...e};return t in l&&Array.isArray(l[t])&&delete l[t],l}).filter(e=>Object.keys(e).length>0),a={...m,fallbacks:l};try{await (0,j.setCallbacksCall)(e,{router_settings:a}),g(a),N.default.success("Router settings updated successfully")}catch(e){N.default.fromBackend("Failed to update router settings: "+e)}finally{p(!1),v(!1),b(null)}};if(!e)return null;let B=async t=>{if(!e)return;let l={...m,fallbacks:t};try{await (0,j.setCallbacksCall)(e,{router_settings:l}),g(l)}catch(t){throw N.default.fromBackend("Failed to update router settings: "+t),e&&a&&n&&(0,j.getCallbacksCall)(e,n,a).then(e=>{let t=e.router_settings;"model_group_retry_policy"in t&&delete t.model_group_retry_policy,g(t)}),t}},O=Array.isArray(m.fallbacks)&&m.fallbacks.length>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H,{models:u?.data?u.data.map(e=>e.model_name):[],accessToken:e||"",value:m.fallbacks||[],onChange:B}),O?(0,t.jsxs)(s.Table,{children:[(0,t.jsx)(r.TableHead,{children:(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Model Name"}),(0,t.jsx)(o.TableHeaderCell,{children:"Fallbacks"}),(0,t.jsx)(o.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsx)(d.TableBody,{children:m.fallbacks.map((a,s)=>Object.entries(a).map(([r,n])=>{let o;return(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(c.TableCell,{className:"align-top",children:(o=k?.(r)??r,(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(M.ProviderLogo,{provider:o,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:r})]}))}),(0,t.jsx)(c.TableCell,{className:"align-top",children:function(e,a,s){let r=Array.isArray(a)?a:[];if(0===r.length)return null;let i=({modelName:e})=>{let l=s?.(e)??e;return(0,t.jsxs)("span",{className:V,children:[(0,t.jsx)(M.ProviderLogo,{provider:l,className:"w-4 h-4 shrink-0"}),(0,t.jsx)("span",{children:e})]})};return(0,t.jsxs)("span",{className:"grid grid-cols-[auto_1fr] items-start gap-x-2 w-full min-w-0",children:[(0,t.jsx)("span",{className:"inline-flex items-center justify-center w-8 h-8 shrink-0 self-start text-blue-600","aria-hidden":!0,children:(0,t.jsx)(T,{className:"w-5 h-5 stroke-[2.5]"})}),(0,t.jsx)("span",{className:"flex flex-wrap items-start gap-1 min-w-0",children:r.map((e,a)=>(0,t.jsxs)(l.default.Fragment,{children:[a>0&&(0,t.jsx)(h.Icon,{icon:T,size:"xs",className:"shrink-0 text-gray-400"}),(0,t.jsx)(i,{modelName:e})]},e))})]})}(0,Array.isArray(n)?n:[],k)}),(0,t.jsxs)(c.TableCell,{className:"align-top",children:[(0,t.jsx)(E.Tooltip,{title:"Test fallback",children:(0,t.jsx)(h.Icon,{icon:I.PlayIcon,size:"sm",onClick:()=>$(Object.keys(a)[0],e||""),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(E.Tooltip,{title:"Delete fallback",children:(0,t.jsx)("span",{"data-testid":"delete-fallback-button",role:"button",tabIndex:0,onClick:()=>C(a),onKeyDown:e=>"Enter"===e.key&&C(a),className:"cursor-pointer inline-flex",children:(0,t.jsx)(h.Icon,{icon:w.TrashIcon,size:"sm",className:"hover:text-red-600"})})})]})]},s.toString()+r)}))})]}):(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-6 text-center",children:(0,t.jsx)(A.Typography.Text,{type:"secondary",children:"No fallbacks configured. Add fallbacks to automatically try another model when the primary fails."})}),(0,t.jsx)(D.default,{isOpen:y,title:"Delete Fallback?",message:"Are you sure you want to delete this fallback? This action cannot be undone.",resourceInformationTitle:"Fallback Information",resourceInformation:[{label:"Model Name",value:f?Object.keys(f)[0]:"",code:!0}],onCancel:()=>{v(!1),b(null)},onOk:P,confirmLoading:x})]})};e.s(["default",0,({accessToken:e,userRole:N,userID:k,modelData:S})=>{let[T,I]=(0,l.useState)([]);(0,l.useEffect)(()=>{e&&(0,j.getGeneralSettingsCall)(e).then(e=>{I(e)})},[e]);let E=(e,t)=>{I(T.map(l=>l.field_name===e?{...l,field_value:t}:l))};return e?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(f.TabGroup,{className:"h-[75vh] w-full",children:[(0,t.jsxs)(b.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(y.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(y.Tab,{value:"2",children:"Fallbacks"}),(0,t.jsx)(y.Tab,{value:"3",children:"General"})]}),(0,t.jsxs)(p.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(x.TabPanel,{children:(0,t.jsx)(C,{accessToken:e,userRole:N,userID:k,modelData:S})}),(0,t.jsx)(x.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:N,userID:k,modelData:S})}),(0,t.jsx)(x.TabPanel,{children:(0,t.jsx)(a.Card,{children:(0,t.jsxs)(s.Table,{children:[(0,t.jsx)(r.TableHead,{children:(0,t.jsxs)(i.TableRow,{children:[(0,t.jsx)(o.TableHeaderCell,{children:"Setting"}),(0,t.jsx)(o.TableHeaderCell,{children:"Value"}),(0,t.jsx)(o.TableHeaderCell,{children:"Status"}),(0,t.jsx)(o.TableHeaderCell,{children:"Action"})]})}),(0,t.jsx)(d.TableBody,{children:T.filter(e=>"TypedDictionary"!==e.field_type).map((l,a)=>(0,t.jsxs)(i.TableRow,{children:[(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(u.Text,{children:l.field_name}),(0,t.jsx)("p",{style:{fontSize:"0.65rem",color:"#808080",fontStyle:"italic"},className:"mt-1",children:l.field_description})]}),(0,t.jsx)(c.TableCell,{children:"Integer"==l.field_type?(0,t.jsx)(v.InputNumber,{step:1,value:l.field_value,onChange:e=>E(l.field_name,e)}):"Boolean"==l.field_type?(0,t.jsx)(g.Switch,{checked:!0===l.field_value||"true"===l.field_value,onChange:e=>E(l.field_name,e)}):null}),(0,t.jsx)(c.TableCell,{children:!0==l.stored_in_db?(0,t.jsx)(n.Badge,{icon:_.CheckCircleIcon,className:"text-white",children:"In DB"}):!1==l.stored_in_db?(0,t.jsx)(n.Badge,{className:"text-gray bg-white outline",children:"In Config"}):(0,t.jsx)(n.Badge,{className:"text-gray bg-white outline",children:"Not Set"})}),(0,t.jsxs)(c.TableCell,{children:[(0,t.jsx)(m.Button,{onClick:()=>((t,l)=>{if(!e)return;let a=T[l].field_value;if(null!=a&&void 0!=a)try{(0,j.updateConfigFieldSetting)(e,t,a);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:!0}:e);I(l)}catch(e){}})(l.field_name,a),children:"Update"}),(0,t.jsx)(h.Icon,{icon:w.TrashIcon,color:"red",onClick:()=>((t,l)=>{if(e)try{(0,j.deleteConfigFieldSetting)(e,t);let l=T.map(e=>e.field_name===t?{...e,stored_in_db:null,field_value:null}:e);I(l)}catch(e){}})(l.field_name,0),children:"Reset"})]})]},a))})]})})})]})]})}):null}],226898)},566606,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(618566),s=e.i(947293),r=e.i(764205),i=e.i(954616),n=e.i(266027),o=e.i(612256);let c=(0,e.i(243652).createQueryKeys)("onboarding");var d=e.i(482725),u=e.i(56456);function m(){return(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10 flex justify-center",children:(0,t.jsx)(d.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"large"})})}var h=e.i(560445),g=e.i(464571);function x(){return(0,t.jsxs)("div",{className:"mx-auto w-full max-w-md mt-10",children:[(0,t.jsx)(h.Alert,{type:"error",message:"Failed to load invitation",description:"The invitation link may be invalid or expired.",showIcon:!0}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(g.Button,{href:"/ui/login",children:"Back to Login"})})]})}var p=e.i(175712),f=e.i(808613),b=e.i(311451),y=e.i(898586);function j({variant:e,userEmail:a,isPending:s,claimError:r,onSubmit:i}){let[n]=f.Form.useForm();return l.default.useEffect(()=>{a&&n.setFieldValue("user_email",a)},[a,n]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-md mt-10",children:(0,t.jsxs)(p.Card,{children:[(0,t.jsx)(y.Typography.Title,{level:5,className:"text-center mb-5",children:"🚅 LiteLLM"}),(0,t.jsx)(y.Typography.Title,{level:3,children:"reset_password"===e?"Reset Password":"Sign Up"}),(0,t.jsx)(y.Typography.Text,{children:"reset_password"===e?"Reset your password to access Admin UI.":"Claim your user account to login to Admin UI."}),"signup"===e&&(0,t.jsx)(h.Alert,{className:"mt-4",type:"info",message:"SSO",description:(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{children:"SSO is under the Enterprise Tier."}),(0,t.jsx)(g.Button,{type:"primary",size:"small",href:"https://forms.gle/W3U4PZpJGFHWtHyA9",target:"_blank",children:"Get Free Trial"})]}),showIcon:!0}),(0,t.jsxs)(f.Form,{className:"mt-10 mb-5",layout:"vertical",form:n,onFinish:e=>i({password:e.password}),children:[(0,t.jsx)(f.Form.Item,{label:"Email Address",name:"user_email",children:(0,t.jsx)(b.Input,{type:"email",disabled:!0})}),(0,t.jsx)(f.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"password required to sign up"}],help:"reset_password"===e?"Enter your new password":"Create a password for your account",children:(0,t.jsx)(b.Input.Password,{})}),r&&(0,t.jsx)(h.Alert,{type:"error",message:r,showIcon:!0,className:"mb-4"}),(0,t.jsx)("div",{className:"mt-10",children:(0,t.jsx)(g.Button,{htmlType:"submit",loading:s,children:"reset_password"===e?"Reset Password":"Sign Up"})})]})]})})}function v({variant:e}){let d=(0,a.useSearchParams)().get("invitation_id"),[u,h]=l.default.useState(null),{data:g,isLoading:p,isError:f}=(e=>{let{isLoading:t}=(0,o.useUIConfig)();return(0,n.useQuery)({queryKey:c.detail(e??""),queryFn:async()=>{if(!e)throw Error("inviteId is required");return(0,r.getOnboardingCredentials)(e)},enabled:!!e&&!t})})(d),{mutate:b,isPending:y}=(0,i.useMutation)({mutationFn:async({accessToken:e,inviteId:t,userId:l,password:a})=>await (0,r.claimOnboardingToken)(e,t,l,a)}),v=g?.token?(0,s.jwtDecode)(g.token):null,w=v?.user_email??"",_=v?.user_id??null,N=v?.key??null,k=g?.token??null;return p?(0,t.jsx)(m,{}):f?(0,t.jsx)(x,{}):(0,t.jsx)(j,{variant:e,userEmail:w,isPending:y,claimError:u,onSubmit:e=>{N&&k&&_&&d&&(h(null),b({accessToken:N,inviteId:d,userId:_,password:e.password},{onSuccess:()=>{document.cookie=`token=${k}; path=/; SameSite=Lax`;let e=(0,r.getProxyBaseUrl)();window.location.href=e?`${e}/ui/?login=success`:"/ui/?login=success"},onError:e=>{h(e.message||"Failed to submit. Please try again.")}}))}})}function w(){let e=(0,a.useSearchParams)().get("action");return(0,t.jsx)(v,{variant:"reset_password"===e?"reset_password":"signup"})}function _(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}),children:(0,t.jsx)(w,{})})}e.s(["default",()=>_],566606)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,l]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;l(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),l=e.i(621482),a=e.i(243652),s=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("infiniteKeyAliases");var n=e.i(56456),o=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:a,placeholder:u="Select a key alias",style:m,pageSize:h=50,allowClear:g=!0,disabled:x=!1,allFilters:p})=>{let[f,b]=(0,d.useState)(""),[y,j]=(0,o.useDebouncedState)("",{wait:300}),{data:v,fetchNextPage:w,hasNextPage:_,isFetchingNextPage:N,isLoading:k}=((e=50,t,a)=>{let{accessToken:n}=(0,r.default)();return(0,l.useInfiniteQuery)({queryKey:i.list({filters:{size:e,...t&&{search:t},...a&&{team_id:a}}}),queryFn:async({pageParam:l})=>await (0,s.keyAliasesCall)(n,l,e,t,a),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!v?.pages)return[];let e=new Set,t=[];for(let l of v.pages)for(let a of l.aliases)!a||e.has(a)||(e.add(a),t.push({label:a,value:a}));return t},[v]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{a?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:x,showSearch:!0,filterOption:!1,onSearch:e=>{b(e),j(e)},searchValue:f,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&_&&!N&&w()},loading:k,notFoundContent:k?(0,t.jsx)(n.LoadingOutlined,{spin:!0}):"No key aliases found",options:C,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,N&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(n.LoadingOutlined,{spin:!0})})]})})}],50882)},693569,e=>{"use strict";var t=e.i(843476),l=e.i(268004),a=e.i(309426),s=e.i(350967),r=e.i(898586),i=e.i(947293),n=e.i(618566),o=e.i(271645),c=e.i(566606),d=e.i(584578),u=e.i(764205),m=e.i(702597),h=e.i(207082),g=e.i(109799),x=e.i(500330),p=e.i(871943),f=e.i(502547),b=e.i(360820),y=e.i(94629),j=e.i(152990),v=e.i(682830),w=e.i(389083),_=e.i(994388),N=e.i(752978),k=e.i(269200),C=e.i(942232),S=e.i(977572),T=e.i(427612),I=e.i(64848),E=e.i(496020),A=e.i(599724),P=e.i(827252),D=e.i(772345),M=e.i(464571),B=e.i(282786),O=e.i(981339),F=e.i(592968),R=e.i(355619),L=e.i(633627),z=e.i(374009),U=e.i(700514),H=e.i(135214),V=e.i(50882),$=e.i(969550),q=e.i(304911),K=e.i(20147);function G({teams:e,organizations:l,onSortChange:a,currentSort:s}){let{data:i}=(0,g.useOrganizations)(),n=i??l??[],[c,d]=(0,o.useState)(null),[m,G]=o.default.useState(()=>s?[{id:s.sortBy,desc:"desc"===s.sortOrder}]:[{id:"created_at",desc:!0}]),[W,J]=o.default.useState({pageIndex:0,pageSize:50}),Y=m.length>0?m[0].id:null,Q=m.length>0?m[0].desc?"desc":"asc":null,{data:X,isPending:Z,isFetching:ee,isError:et,refetch:el}=(0,h.useKeys)(W.pageIndex+1,W.pageSize,{sortBy:Y||void 0,sortOrder:Q||void 0,expand:"user"}),[ea,es]=(0,o.useState)({}),{filters:er,filteredKeys:ei,filteredTotalCount:en,allTeams:eo,allOrganizations:ec,handleFilterChange:ed,handleFilterReset:eu}=function({keys:e,teams:t,organizations:l}){let a={"Team ID":"","Organization ID":"","Key Alias":"","User ID":"","Sort By":"created_at","Sort Order":"desc"},{accessToken:s}=(0,H.default)(),[r,i]=(0,o.useState)(a),[n,c]=(0,o.useState)(t||[]),[d,m]=(0,o.useState)(l||[]),[h,g]=(0,o.useState)(e),[x,p]=(0,o.useState)(null),f=(0,o.useRef)(0),b=(0,o.useCallback)((0,z.default)(async e=>{if(!s)return;let t=Date.now();f.current=t;try{let l=await (0,u.keyListCall)(s,e["Organization ID"]||null,e["Team ID"]||null,e["Key Alias"]||null,e["User ID"]||null,e["Key Hash"]||null,1,U.defaultPageSize,e["Sort By"]||null,e["Sort Order"]||null);t===f.current&&l&&(g(l.keys),p(l.total_count??null),console.log("called from debouncedSearch filters:",JSON.stringify(e)),console.log("called from debouncedSearch data:",JSON.stringify(l)))}catch(e){console.error("Error searching users:",e)}},300),[s]);return(0,o.useEffect)(()=>{if(!e)return void g([]);let t=[...e];r["Team ID"]&&(t=t.filter(e=>e.team_id===r["Team ID"])),r["Organization ID"]&&(t=t.filter(e=>(e.organization_id??e.org_id)===r["Organization ID"])),g(t)},[e,r]),(0,o.useEffect)(()=>{let e=async()=>{let e=await (0,L.fetchAllTeams)(s);e.length>0&&c(e);let t=await (0,L.fetchAllOrganizations)(s);t.length>0&&m(t)};s&&e()},[s]),(0,o.useEffect)(()=>{t&&t.length>0&&c(e=>e.length{l&&l.length>0&&m(e=>e.length{i({"Team ID":e["Team ID"]||"","Organization ID":e["Organization ID"]||"","Key Alias":e["Key Alias"]||"","User ID":e["User ID"]||"","Sort By":e["Sort By"]||"created_at","Sort Order":e["Sort Order"]||"desc"}),t||b({...r,...e})},handleFilterReset:()=>{i(a),p(null),b(a)}}}({keys:X?.keys||[],teams:e,organizations:l}),em=(0,o.useDeferredValue)(ee),eh=(ee||em)&&!et,eg=en??X?.total_count??0;(0,o.useEffect)(()=>{if(el){let e=()=>{el()};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}},[el]);let ex=(0,o.useMemo)(()=>[{id:"expander",header:()=>null,size:40,enableSorting:!1,cell:({row:e})=>e.getCanExpand()?(0,t.jsx)("button",{onClick:e.getToggleExpandedHandler(),style:{cursor:"pointer"},children:e.getIsExpanded()?"▼":"▶"}):null},{id:"token",accessorKey:"token",header:"Key ID",size:100,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)(F.Tooltip,{title:l,children:(0,t.jsx)(_.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate block",style:{maxWidth:a,overflow:"hidden"},onClick:()=>d(e.row.original),children:l??"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,enableSorting:!0,cell:e=>{let l=e.getValue(),a=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:a,overflow:"hidden"},children:l??"-"})}},{id:"key_name",accessorKey:"key_name",header:"Secret Key",size:120,enableSorting:!1,cell:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e.getValue()})},{id:"team_alias",accessorKey:"team_id",header:"Team",size:120,enableSorting:!1,cell:l=>{let a=l.getValue();if(!a)return"-";let s=e?.find(e=>e.team_id===a),r=s?.team_alias||a,i=l.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:i,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=n.find(e=>e.organization_id===l),s=a?.organization_alias||l,r=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:r,overflow:"hidden"},children:s})}},{id:"user",accessorKey:"user",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["User",(0,t.jsx)(B.Popover,{content:"Displays the first available value: User Alias, User Email, or User ID.",trigger:"hover",children:(0,t.jsx)(P.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:160,enableSorting:!1,cell:({row:e})=>{let l=e.original,a=l.user?.user_alias??null,s=l.user?.user_email??l.user_email??null,i=l.user_id??null,n="default_user_id"===i,o=a||s||i,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:a},{label:"User Email",value:s},{label:"User ID",value:i}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||a||s?(0,t.jsx)(B.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o||"-"})}):(0,t.jsx)(B.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(q.default,{userId:i})})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"-"}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:160,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let a=e.row.original.created_by_user,s=a?.user_alias??null,i=a?.user_email??null,n="default_user_id"===l,o=s||i||l,c=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:s},{label:"User Email",value:i},{label:"User ID",value:l}].map(({label:e,value:l})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),l?(0,t.jsx)(r.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:l},copyable:!0,children:l}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!n||s||i?(0,t.jsx)(B.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:160,overflow:"hidden"},children:o})}):(0,t.jsx)(B.Popover,{content:c,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(q.default,{userId:l})})})}},{id:"updated_at",accessorKey:"updated_at",header:"Updated At",size:120,enableSorting:!0,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"last_active",accessorKey:"last_active",header:()=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:["Last Active",(0,t.jsx)(B.Popover,{content:"This is a new field and is not backfilled. Only new key usage will update this value.",trigger:"hover",children:(0,t.jsx)(P.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),size:130,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"Unknown";let a=new Date(l);return(0,t.jsx)(F.Tooltip,{title:a.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"long"}),children:(0,t.jsx)("span",{children:a.toLocaleDateString()})})}},{id:"expires",accessorKey:"expires",header:"Expires",size:120,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleDateString():"Never"}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,enableSorting:!0,cell:e=>(0,x.formatNumberWithCommas)(e.getValue(),4)},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,enableSorting:!0,cell:e=>{let t=e.getValue();return null===t?"Unlimited":`$${(0,x.formatNumberWithCommas)(t)}`}},{id:"budget_reset_at",accessorKey:"budget_reset_at",header:"Budget Reset",size:130,enableSorting:!1,cell:e=>{let t=e.getValue();return t?new Date(t).toLocaleString():"Never"}},{id:"models",accessorKey:"models",header:"Models",size:200,enableSorting:!1,cell:e=>{let l=e.getValue();return(0,t.jsx)("div",{className:"flex flex-col py-2",children:Array.isArray(l)?(0,t.jsx)("div",{className:"flex flex-col",children:0===l.length?(0,t.jsx)(w.Badge,{size:"xs",className:"mb-1",color:"red",children:(0,t.jsx)(A.Text,{children:"All Proxy Models"})}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex items-start",children:[l.length>3&&(0,t.jsx)("div",{children:(0,t.jsx)(N.Icon,{icon:ea[e.row.id]?p.ChevronDownIcon:f.ChevronRightIcon,className:"cursor-pointer",size:"xs",onClick:()=>{es(t=>({...t,[e.row.id]:!t[e.row.id]}))}})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[l.slice(0,3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(A.Text,{children:"All Proxy Models"})},l):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(A.Text,{children:e.length>30?`${(0,R.getModelDisplayName)(e).slice(0,30)}...`:(0,R.getModelDisplayName)(e)})},l)),l.length>3&&!ea[e.row.id]&&(0,t.jsx)(w.Badge,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,t.jsxs)(A.Text,{children:["+",l.length-3," ",l.length-3==1?"more model":"more models"]})}),ea[e.row.id]&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:l.slice(3).map((e,l)=>"all-proxy-models"===e?(0,t.jsx)(w.Badge,{size:"xs",color:"red",children:(0,t.jsx)(A.Text,{children:"All Proxy Models"})},l+3):(0,t.jsx)(w.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(A.Text,{children:e.length>30?`${(0,R.getModelDisplayName)(e).slice(0,30)}...`:(0,R.getModelDisplayName)(e)})},l+3))})]})]})})}):null})}},{id:"rate_limits",header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let l=e.original;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:["TPM: ",null!==l.tpm_limit?l.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==l.rpm_limit?l.rpm_limit:"Unlimited"]})]})}}],[e,n]),ep=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>eo&&0!==eo.length?eo.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Organization ID",label:"Organization ID",isSearchable:!0,searchFn:async e=>ec&&0!==ec.length?ec.filter(t=>t.organization_id?.toLowerCase().includes(e.toLowerCase())??!1).filter(e=>null!==e.organization_id&&void 0!==e.organization_id).map(e=>({label:`${e.organization_id||"Unknown"} (${e.organization_id})`,value:e.organization_id})):[]},{name:"Key Alias",label:"Key Alias",customComponent:V.PaginatedKeyAliasSelect},{name:"User ID",label:"User ID",isSearchable:!1},{name:"Key Hash",label:"Key Hash",isSearchable:!1}],ef=(0,j.useReactTable)({data:ei,columns:ex.filter(e=>"expander"!==e.id),columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:m,pagination:W},onSortingChange:e=>{let t="function"==typeof e?e(m):e;if(G(t),t&&t.length>0){let e=t[0],l=e.id,s=e.desc?"desc":"asc";ed({...er,"Sort By":l,"Sort Order":s},!0),a?.(l,s)}},onPaginationChange:J,getCoreRowModel:(0,v.getCoreRowModel)(),getSortedRowModel:(0,v.getSortedRowModel)(),getPaginationRowModel:(0,v.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(eg/W.pageSize)});o.default.useEffect(()=>{s&&G([{id:s.sortBy,desc:"desc"===s.sortOrder}])},[s]);let{pageIndex:eb,pageSize:ey}=ef.getState().pagination,ej=Math.min((eb+1)*ey,eg),ev=`${eb*ey+1} - ${ej}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:c?(0,t.jsx)(K.default,{keyId:c.token,onClose:()=>d(null),keyData:c,teams:eo,onDelete:el}):(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"w-full mb-6",children:(0,t.jsx)($.default,{options:ep,onApplyFilters:ed,initialValues:er,onResetFilters:eu})}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(O.Skeleton.Node,{active:!0,style:{width:200,height:20}}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",ev," of ",eg," results"]}),(0,t.jsx)(M.Button,{type:"default",icon:(0,t.jsx)(D.SyncOutlined,{spin:eh}),onClick:()=>{el()},disabled:eh,title:"Fetch data",children:eh?"Fetching":"Fetch"})]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[Z?(0,t.jsx)(O.Skeleton.Node,{active:!0,style:{width:74,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",eb+1," of ",ef.getPageCount()]}),Z?(0,t.jsx)(O.Skeleton.Button,{active:!0,size:"small",style:{width:84,height:30}}):(0,t.jsx)("button",{onClick:()=>ef.previousPage(),disabled:Z||!ef.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Z?(0,t.jsx)(O.Skeleton.Button,{active:!0,size:"small",style:{width:58,height:30}}):(0,t.jsx)("button",{onClick:()=>ef.nextPage(),disabled:Z||!ef.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(k.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:ef.getCenterTotalSize()},children:[(0,t.jsx)(T.TableHead,{children:ef.getHeaderGroups().map(e=>(0,t.jsx)(E.TableRow,{children:e.headers.map(e=>(0,t.jsx)(I.TableHeaderCell,{"data-header-id":e.id,className:`py-1 h-8 relative hover:bg-gray-50 ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""}`,style:{width:e.getSize(),position:"relative",cursor:e.column.getCanSort()?"pointer":"default"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,j.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(b.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(p.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(y.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${ef.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(C.TableBody,{children:Z?(0,t.jsx)(E.TableRow,{children:(0,t.jsx)(S.TableCell,{colSpan:ex.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):ei.length>0?ef.getRowModel().rows.map(e=>(0,t.jsx)(E.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(S.TableCell,{style:{width:e.column.getSize(),maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ${"models"===e.column.id&&Array.isArray(e.getValue())&&e.getValue().length>3?"px-0":""}`,children:(0,j.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(E.TableRow,{children:(0,t.jsx)(S.TableCell,{colSpan:ex.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No keys found"})})})})})]})})})})]})})}e.s(["default",0,({userID:e,userRole:h,teams:g,keys:x,setUserRole:p,userEmail:f,setUserEmail:b,setTeams:y,setKeys:j,premiumUser:v,organizations:w,addKey:_,createClicked:N,autoOpenCreate:k,prefillData:C})=>{let S,[T,I]=(0,o.useState)(null),[E,A]=(0,o.useState)(null),P=(0,n.useSearchParams)(),D=(console.log("COOKIES",document.cookie),(S=document.cookie.split("; ").find(e=>e.startsWith("token=")))?S.split("=")[1]:null),M=P.get("invitation_id"),[B,O]=(0,o.useState)(null),[F,R]=(0,o.useState)(null),[L,z]=(0,o.useState)([]),[U,H]=(0,o.useState)(null),[V,$]=(0,o.useState)(null);if((0,o.useEffect)(()=>{let e=()=>{sessionStorage.clear()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(D){let e=(0,i.jwtDecode)(D);if(e){if(console.log("Decoded token:",e),console.log("Decoded key:",e.key),O(e.key),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(console.log(`Received user role: ${e}`),e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role);console.log("Decoded user_role:",t),p(t)}else console.log("User role not defined");e.user_email?b(e.user_email):console.log(`User Email is not set ${e}`)}}if(e&&B&&h&&!T){let t=sessionStorage.getItem("userModels"+e);t?z(JSON.parse(t)):(console.log(`currentOrg: ${JSON.stringify(E)}`),(async()=>{try{let t=await (0,u.getProxyUISettings)(B);H(t);let l=await (0,u.userGetInfoV2)(B,e);I(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let a=(await (0,u.modelAvailableCall)(B,e,h)).data.map(e=>e.id);console.log("available_model_names:",a),z(a),console.log("userModels:",L),sessionStorage.setItem("userModels"+e,JSON.stringify(a))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&q()}})(),(0,d.fetchTeams)(B,e,h,E,y))}},[e,D,B,h]),(0,o.useEffect)(()=>{B&&(async()=>{try{let e=await (0,u.keyInfoCall)(B,[B]);console.log("keyInfo: ",e)}catch(e){e.message.includes("Invalid proxy server token passed")&&q()}})()},[B]),(0,o.useEffect)(()=>{console.log(`currentOrg: ${JSON.stringify(E)}, accessToken: ${B}, userID: ${e}, userRole: ${h}`),B&&(console.log("fetching teams"),(0,d.fetchTeams)(B,e,h,E,y))},[E]),(0,o.useEffect)(()=>{if(null!==x&&null!=V&&null!==V.team_id){let e=0;for(let t of(console.log(`keys: ${JSON.stringify(x)}`),x))V.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===V.team_id&&(e+=t.spend);console.log(`sum: ${e}`),R(e)}else if(null!==x){let e=0;for(let t of x)e+=t.spend;R(e)}},[V]),null!=M)return(0,t.jsx)(c.default,{});function q(){(0,l.clearTokenCookies)();let e=(0,u.getProxyBaseUrl)();console.log("proxyBaseUrl:",e);let t=e?`${e}/sso/key/generate`:"/sso/key/generate";return console.log("Full URL:",t),window.location.href=t,null}if(null==D)return console.log("All cookies before redirect:",document.cookie),q(),null;try{let e=(0,i.jwtDecode)(D);console.log("Decoded token:",e);let t=e.exp,l=Math.floor(Date.now()/1e3);if(t&&l>=t)return console.log("Token expired, redirecting to login"),q(),null}catch(e){return console.error("Error decoding token:",e),(0,l.clearTokenCookies)(),q(),null}if(null==B)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});if(null==h&&p("App Owner"),h&&"Admin Viewer"==h){let{Title:e,Paragraph:l}=r.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(l,{children:"Ask your proxy admin for access to create keys"})]})}return console.log("inside user dashboard, selected team",V),console.log("All cookies after redirect:",document.cookie),(0,t.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsxs)(a.Col,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,t.jsx)(m.default,{team:V,teams:g,data:x,addKey:_,autoOpenCreate:k,prefillData:C},V?V.team_id:null),(0,t.jsx)(G,{teams:g,organizations:w})]})})})}],693569)},559061,e=>{"use strict";var t=e.i(843476),l=e.i(584935),a=e.i(304967),s=e.i(309426),r=e.i(350967),i=e.i(752978),n=e.i(621642),o=e.i(25080),c=e.i(37091),d=e.i(197647),u=e.i(653824),m=e.i(881073),h=e.i(404206),g=e.i(723731),x=e.i(599724),p=e.i(271645),f=e.i(727749),b=e.i(144267),y=e.i(278587),j=e.i(764205),v=e.i(994388),w=e.i(220508),_=e.i(964306),N=e.i(551332);let k=({responseTimeMs:e})=>null==e?null:(0,t.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-500 font-mono",children:[(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 6V12L16 14M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,t.jsxs)("span",{children:[e.toFixed(0),"ms"]})]}),C=e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch{}return t},S=({label:e,value:l})=>{let[a,s]=p.default.useState(!1),[r,i]=p.default.useState(!1),n=l?.toString()||"N/A",o=n.length>50?n.substring(0,50)+"...":n;return(0,t.jsx)("tr",{className:"hover:bg-gray-50",children:(0,t.jsx)("td",{className:"px-4 py-2 align-top",colSpan:2,children:(0,t.jsxs)("div",{className:"flex items-center justify-between group",children:[(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[(0,t.jsx)("button",{onClick:()=>s(!a),className:"text-gray-400 hover:text-gray-600 mr-2",children:a?"▼":"▶"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm text-gray-600",children:e}),(0,t.jsx)("pre",{className:"mt-1 text-sm font-mono text-gray-800 whitespace-pre-wrap",children:a?n:o})]})]}),(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(n),i(!0),setTimeout(()=>i(!1),2e3)},className:"opacity-0 group-hover:opacity-100 text-gray-400 hover:text-gray-600",children:(0,t.jsx)(N.ClipboardCopyIcon,{className:"h-4 w-4"})})]})})})},T=({response:e})=>{let l=null,a={},s={};try{if(e?.error)try{let t="string"==typeof e.error.message?JSON.parse(e.error.message):e.error.message;l={message:t?.message||"Unknown error",traceback:t?.traceback||"No traceback available",litellm_params:t?.litellm_cache_params||{},health_check_cache_params:t?.health_check_cache_params||{}},a=C(l.litellm_params)||{},s=C(l.health_check_cache_params)||{}}catch(t){console.warn("Error parsing error details:",t),l={message:String(e.error.message||"Unknown error"),traceback:"Error parsing details",litellm_params:{},health_check_cache_params:{}}}else a=C(e?.litellm_cache_params)||{},s=C(e?.health_check_cache_params)||{}}catch(e){console.warn("Error in response parsing:",e),a={},s={}}let r={redis_host:s?.redis_client?.connection_pool?.connection_kwargs?.host||s?.redis_async_client?.connection_pool?.connection_kwargs?.host||s?.connection_kwargs?.host||s?.host||"N/A",redis_port:s?.redis_client?.connection_pool?.connection_kwargs?.port||s?.redis_async_client?.connection_pool?.connection_kwargs?.port||s?.connection_kwargs?.port||s?.port||"N/A",redis_version:s?.redis_version||"N/A",startup_nodes:(()=>{try{if(s?.redis_kwargs?.startup_nodes)return JSON.stringify(s.redis_kwargs.startup_nodes);let e=s?.redis_client?.connection_pool?.connection_kwargs?.host||s?.redis_async_client?.connection_pool?.connection_kwargs?.host,t=s?.redis_client?.connection_pool?.connection_kwargs?.port||s?.redis_async_client?.connection_pool?.connection_kwargs?.port;return e&&t?JSON.stringify([{host:e,port:t}]):"N/A"}catch(e){return"N/A"}})(),namespace:s?.namespace||"N/A"};return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,t.jsxs)(u.TabGroup,{children:[(0,t.jsxs)(m.TabList,{className:"border-b border-gray-200 px-4",children:[(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Summary"}),(0,t.jsx)(d.Tab,{className:"px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-800",children:"Raw Response"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-6",children:[e?.status==="healthy"?(0,t.jsx)(w.CheckCircleIcon,{className:"h-5 w-5 text-green-500 mr-2"}):(0,t.jsx)(_.XCircleIcon,{className:"h-5 w-5 text-red-500 mr-2"}),(0,t.jsxs)(x.Text,{className:`text-sm font-medium ${e?.status==="healthy"?"text-green-500":"text-red-500"}`,children:["Cache Status: ",e?.status||"unhealthy"]})]}),(0,t.jsx)("table",{className:"w-full border-collapse",children:(0,t.jsxs)("tbody",{children:[l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold text-red-600",children:"Error Details"})}),(0,t.jsx)(S,{label:"Error Message",value:l.message}),(0,t.jsx)(S,{label:"Traceback",value:l.traceback})]}),(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Cache Details"})}),(0,t.jsx)(S,{label:"Cache Configuration",value:String(a?.type)}),(0,t.jsx)(S,{label:"Ping Response",value:String(e.ping_response)}),(0,t.jsx)(S,{label:"Set Cache Response",value:e.set_cache_response||"N/A"}),(0,t.jsx)(S,{label:"litellm_settings.cache_params",value:JSON.stringify(a,null,2)}),a?.type==="redis"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:2,className:"pt-4 pb-2 font-semibold",children:"Redis Details"})}),(0,t.jsx)(S,{label:"Redis Host",value:r.redis_host||"N/A"}),(0,t.jsx)(S,{label:"Redis Port",value:r.redis_port||"N/A"}),(0,t.jsx)(S,{label:"Redis Version",value:r.redis_version||"N/A"}),(0,t.jsx)(S,{label:"Startup Nodes",value:r.startup_nodes||"N/A"}),(0,t.jsx)(S,{label:"Namespace",value:r.namespace||"N/A"})]})]})})]})}),(0,t.jsx)(h.TabPanel,{className:"p-4",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded-md p-4 font-mono text-sm",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words overflow-auto max-h-[500px]",children:(()=>{try{let t={...e,litellm_cache_params:a,health_check_cache_params:s},l=JSON.parse(JSON.stringify(t,(e,t)=>{if("string"==typeof t)try{return JSON.parse(t)}catch{}return t}));return JSON.stringify(l,null,2)}catch(e){return"Error formatting JSON: "+e.message}})()})})})]})]})})},I=({accessToken:e,healthCheckResponse:l,runCachingHealthCheck:a,responseTimeMs:s})=>{let[r,i]=p.default.useState(null),[n,o]=p.default.useState(!1),c=async()=>{o(!0);let e=performance.now();await a(),i(performance.now()-e),o(!1)};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(v.Button,{onClick:c,disabled:n,className:"bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 text-white text-sm px-4 py-2 rounded-md",children:n?"Running Health Check...":"Run Health Check"}),(0,t.jsx)(k,{responseTimeMs:r})]}),l&&(0,t.jsx)(T,{response:l})]})};var E=e.i(677667),A=e.i(898667),P=e.i(130643),D=e.i(206929),M=e.i(35983);let B=({redisType:e,redisTypeDescriptions:l,onTypeChange:a})=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Redis Type"}),(0,t.jsxs)(D.Select,{value:e,onValueChange:a,children:[(0,t.jsx)(M.SelectItem,{value:"node",children:"Node (Single Instance)"}),(0,t.jsx)(M.SelectItem,{value:"cluster",children:"Cluster"}),(0,t.jsx)(M.SelectItem,{value:"sentinel",children:"Sentinel"}),(0,t.jsx)(M.SelectItem,{value:"semantic",children:"Semantic"})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:l[e]||"Select the type of Redis deployment you're using"})]});var O=e.i(135214),F=e.i(620250),R=e.i(779241),L=e.i(199133),z=e.i(689020),U=e.i(435451);let H=({field:e,currentValue:l})=>{let[a,s]=(0,p.useState)([]),[r,i]=(0,p.useState)(l||""),{accessToken:n}=(0,O.default)();if((0,p.useEffect)(()=>{n&&(async()=>{try{let e=await (0,z.fetchAvailableModels)(n);console.log("Fetched models for selector:",e),e.length>0&&s(e)}catch(e){console.error("Error fetching model info:",e)}})()},[n]),"Boolean"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("input",{type:"checkbox",name:e.field_name,defaultChecked:!0===l||"true"===l,className:"h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:e.field_description})]})]});if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(U.default,{name:e.field_name,type:"number",defaultValue:l,placeholder:e.field_description}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("List"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)("textarea",{name:e.field_name,defaultValue:"object"==typeof l?JSON.stringify(l,null,2):l,placeholder:e.field_description,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500",rows:4}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});if("Models_Select"===e.field_type){let l=a.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(L.Select,{value:r,onChange:i,showSearch:!0,placeholder:"Search and select a model...",options:l,style:{width:"100%"},className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())}),(0,t.jsx)("input",{type:"hidden",name:e.field_name,value:r}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})}if("Integer"===e.field_type||"Float"===e.field_type)return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(F.NumberInput,{name:e.field_name,defaultValue:l,placeholder:e.field_description,step:"Float"===e.field_type?.01:1}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]});let o="password"===e.field_name||e.field_name.includes("password")?"password":"text";return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:e.ui_field_name}),(0,t.jsx)(R.TextInput,{name:e.field_name,type:o,defaultValue:l,placeholder:e.field_description}),e.field_description&&(0,t.jsx)("p",{className:"text-xs text-gray-500",children:e.field_description})]})},V=(e,t)=>e.find(e=>e.field_name===t),$=(e,t)=>{let l={type:"redis"};return e.forEach(e=>{if("redis_type"===e.field_name||null!==e.redis_type&&void 0!==e.redis_type&&e.redis_type!==t)return;let a=e.field_name,s=null;if("Boolean"===e.field_type){let e=document.querySelector(`input[name="${a}"]`);e?.checked!==void 0&&(s=e.checked)}else if("List"===e.field_type){let e=document.querySelector(`textarea[name="${a}"]`);if(e?.value)try{s=JSON.parse(e.value)}catch(e){console.error(`Invalid JSON for ${a}:`,e)}}else{let t=document.querySelector(`input[name="${a}"]`);if(t?.value){let l=t.value.trim();if(""!==l)if("Integer"===e.field_type){let e=Number(l);isNaN(e)||(s=e)}else if("Float"===e.field_type){let e=Number(l);isNaN(e)||(s=e)}else s=l}}null!=s&&(l[a]=s)}),l},q=({accessToken:e,userRole:l,userID:a})=>{let s,r,i,n,o,[c,d]=(0,p.useState)({}),[u,m]=(0,p.useState)([]),[h,g]=(0,p.useState)({}),[x,b]=(0,p.useState)("node"),[y,w]=(0,p.useState)(!1),[_,N]=(0,p.useState)(!1),k=(0,p.useCallback)(async()=>{try{let t=await (0,j.getCacheSettingsCall)(e);console.log("cache settings from API",t),t.fields&&m(t.fields),t.current_values&&(d(t.current_values),t.current_values.redis_type&&b(t.current_values.redis_type)),t.redis_type_descriptions&&g(t.redis_type_descriptions)}catch(e){console.error("Failed to load cache settings:",e),f.default.fromBackend("Failed to load cache settings")}},[e]);(0,p.useEffect)(()=>{e&&k()},[e,k]);let C=async()=>{if(e){w(!0);try{let t=$(u,x),l=await (0,j.testCacheConnectionCall)(e,t);"success"===l.status?f.default.success("Cache connection test successful!"):f.default.fromBackend(`Connection test failed: ${l.message||l.error}`)}catch(e){console.error("Test connection error:",e),f.default.fromBackend(`Connection test failed: ${e.message||"Unknown error"}`)}finally{w(!1)}}},S=async()=>{if(e){N(!0);try{let t=$(u,x);"semantic"===x&&(t.type="redis-semantic"),await (0,j.updateCacheSettingsCall)(e,t),f.default.success("Cache settings updated successfully"),await k()}catch(e){console.error("Failed to save cache settings:",e),f.default.fromBackend("Failed to update cache settings")}finally{N(!1)}}};if(!e)return null;let{basicFields:T,sslFields:I,cacheManagementFields:D,gcpFields:M,clusterFields:O,sentinelFields:F,semanticFields:R}=(s=["host","port","password","username"].map(e=>V(u,e)).filter(Boolean),r=["ssl","ssl_cert_reqs","ssl_check_hostname"].map(e=>V(u,e)).filter(Boolean),i=["namespace","ttl","max_connections"].map(e=>V(u,e)).filter(Boolean),n=["gcp_service_account","gcp_ssl_ca_certs"].map(e=>V(u,e)).filter(Boolean),o=u.filter(e=>"cluster"===e.redis_type),{basicFields:s,sslFields:r,cacheManagementFields:i,gcpFields:n,clusterFields:o,sentinelFields:u.filter(e=>"sentinel"===e.redis_type),semanticFields:u.filter(e=>"semantic"===e.redis_type)});return(0,t.jsxs)("div",{className:"w-full space-y-8 py-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-900",children:"Cache Settings"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Configure Redis cache for LiteLLM"})]}),(0,t.jsx)(B,{redisType:x,redisTypeDescriptions:h,onTypeChange:b}),(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Connection Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:T.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"cluster"===x&&O.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Cluster Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6",children:O.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"sentinel"===x&&F.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Sentinel Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:F.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),"semantic"===x&&R.length>0&&(0,t.jsxs)("div",{className:"space-y-6 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900",children:"Semantic Configuration"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:R.map(e=>{let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),(0,t.jsxs)(E.Accordion,{className:"mt-4",children:[(0,t.jsx)(A.AccordionHeader,{children:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Advanced Settings"})}),(0,t.jsx)(P.AccordionBody,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[I.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"SSL Settings"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:I.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),D.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"Cache Management"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:D.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]}),M.length>0&&(0,t.jsxs)("div",{className:"space-y-4 pt-4 border-t border-gray-200",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700",children:"GCP Authentication"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:M.map(e=>{if(!e)return null;let l=c[e.field_name]??e.field_default??"";return(0,t.jsx)(H,{field:e,currentValue:l},e.field_name)})})]})]})})]})]}),(0,t.jsxs)("div",{className:"border-t border-gray-200 pt-6 flex justify-end gap-3",children:[(0,t.jsx)(v.Button,{variant:"secondary",size:"sm",onClick:C,disabled:y,className:"text-sm",children:y?"Testing...":"Test Connection"}),(0,t.jsx)(v.Button,{size:"sm",onClick:S,disabled:_,className:"text-sm font-medium",children:_?"Saving...":"Save Changes"})]})]})},K=e=>{if(e)return e.toISOString().split("T")[0]};function G(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}e.s(["default",0,({accessToken:e,token:v,userRole:w,userID:_,premiumUser:N})=>{let[k,C]=(0,p.useState)([]),[S,T]=(0,p.useState)([]),[E,A]=(0,p.useState)([]),[P,D]=(0,p.useState)([]),[M,B]=(0,p.useState)("0"),[O,F]=(0,p.useState)("0"),[R,L]=(0,p.useState)("0"),[z,U]=(0,p.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[H,V]=(0,p.useState)(""),[$,W]=(0,p.useState)("");(0,p.useEffect)(()=>{e&&z&&((async()=>{D(await (0,j.adminGlobalCacheActivity)(e,K(z.from),K(z.to)))})(),V(new Date().toLocaleString()))},[e]);let J=Array.from(new Set(P.map(e=>e?.api_key??""))),Y=Array.from(new Set(P.map(e=>e?.model??"")));Array.from(new Set(P.map(e=>e?.call_type??"")));let Q=async(t,l)=>{t&&l&&e&&D(await (0,j.adminGlobalCacheActivity)(e,K(t),K(l)))};(0,p.useEffect)(()=>{console.log("DATA IN CACHE DASHBOARD",P);let e=P;S.length>0&&(e=e.filter(e=>S.includes(e.api_key))),E.length>0&&(e=e.filter(e=>E.includes(e.model))),console.log("before processed data in cache dashboard",e);let t=0,l=0,a=0,s=e.reduce((e,s)=>{console.log("Processing item:",s),s.call_type||(console.log("Item has no call_type:",s),s.call_type="Unknown"),t+=(s.total_rows||0)-(s.cache_hit_true_rows||0),l+=s.cache_hit_true_rows||0,a+=s.cached_completion_tokens||0;let r=e.find(e=>e.name===s.call_type);return r?(r["LLM API requests"]+=(s.total_rows||0)-(s.cache_hit_true_rows||0),r["Cache hit"]+=s.cache_hit_true_rows||0,r["Cached Completion Tokens"]+=s.cached_completion_tokens||0,r["Generated Completion Tokens"]+=s.generated_completion_tokens||0):e.push({name:s.call_type,"LLM API requests":(s.total_rows||0)-(s.cache_hit_true_rows||0),"Cache hit":s.cache_hit_true_rows||0,"Cached Completion Tokens":s.cached_completion_tokens||0,"Generated Completion Tokens":s.generated_completion_tokens||0}),e},[]);B(G(l)),F(G(a));let r=l+t;r>0?L((l/r*100).toFixed(2)):L("0"),C(s),console.log("PROCESSED DATA IN CACHE DASHBOARD",s)},[S,E,z,P]);let X=async()=>{try{f.default.info("Running cache health check..."),W("");let t=await (0,j.cachingHealthCheckCall)(null!==e?e:"");console.log("CACHING HEALTH CHECK RESPONSE",t),W(t)}catch(t){let e;if(console.error("Error running health check:",t),t&&t.message)try{let l=JSON.parse(t.message);l.error&&(l=l.error),e=l}catch(l){e={message:t.message}}else e={message:"Unknown error occurred"};W({error:e})}};return(0,t.jsxs)(u.TabGroup,{className:"gap-2 p-8 h-full w-full mt-2 mb-8",children:[(0,t.jsxs)(m.TabList,{className:"flex justify-between mt-2 w-full items-center",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(d.Tab,{children:"Cache Analytics"}),(0,t.jsx)(d.Tab,{children:"Cache Health"}),(0,t.jsx)(d.Tab,{children:"Cache Settings"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[H&&(0,t.jsxs)(x.Text,{children:["Last Refreshed: ",H]}),(0,t.jsx)(i.Icon,{icon:y.RefreshIcon,variant:"shadow",size:"xs",className:"self-center",onClick:()=>{V(new Date().toLocaleString())}})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(a.Card,{children:[(0,t.jsxs)(r.Grid,{numItems:3,className:"gap-4 mt-4",children:[(0,t.jsx)(s.Col,{children:(0,t.jsx)(n.MultiSelect,{placeholder:"Select Virtual Keys",value:S,onValueChange:T,children:J.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(s.Col,{children:(0,t.jsx)(n.MultiSelect,{placeholder:"Select Models",value:E,onValueChange:A,children:Y.map(e=>(0,t.jsx)(o.MultiSelectItem,{value:e,children:e},e))})}),(0,t.jsx)(s.Col,{children:(0,t.jsx)(b.default,{value:z,onValueChange:e=>{U(e),Q(e.from,e.to)}})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-4",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hit Ratio"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsxs)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:[R,"%"]})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cache Hits"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:M})})]}),(0,t.jsxs)(a.Card,{children:[(0,t.jsx)("p",{className:"text-tremor-default font-medium text-tremor-content dark:text-dark-tremor-content",children:"Cached Tokens"}),(0,t.jsx)("div",{className:"mt-2 flex items-baseline space-x-2.5",children:(0,t.jsx)("p",{className:"text-tremor-metric font-semibold text-tremor-content-strong dark:text-dark-tremor-content-strong",children:O})})]})]}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cache Hits vs API Requests"}),(0,t.jsx)(l.BarChart,{title:"Cache Hits vs API Requests",data:k,stack:!0,index:"name",valueFormatter:G,categories:["LLM API requests","Cache hit"],colors:["sky","teal"],yAxisWidth:48}),(0,t.jsx)(c.Subtitle,{className:"mt-4",children:"Cached Completion Tokens vs Generated Completion Tokens"}),(0,t.jsx)(l.BarChart,{className:"mt-6",data:k,stack:!0,index:"name",valueFormatter:G,categories:["Generated Completion Tokens","Cached Completion Tokens"],colors:["sky","teal"],yAxisWidth:48})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(I,{accessToken:e,healthCheckResponse:$,runCachingHealthCheck:X})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsx)(q,{accessToken:e,userRole:w,userID:_})})]})]})}],559061)},601236,e=>{e.v(e=>Promise.resolve().then(()=>e(764205)))}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/42c127841d8c1bd3.js b/litellm/proxy/_experimental/out/_next/static/chunks/b7c135d847609948.js similarity index 57% rename from litellm/proxy/_experimental/out/_next/static/chunks/42c127841d8c1bd3.js rename to litellm/proxy/_experimental/out/_next/static/chunks/b7c135d847609948.js index e5791fc88af..9b7427b5da3 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/42c127841d8c1bd3.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/b7c135d847609948.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,916925,e=>{"use strict";var t,a=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let o={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},n="../ui/assets/logos/",i={"A2A Agent":`${n}a2a_agent.png`,Ai21:`${n}ai21.svg`,"Ai21 Chat":`${n}ai21.svg`,"AI/ML API":`${n}aiml_api.svg`,"Aiohttp Openai":`${n}openai_small.svg`,Anthropic:`${n}anthropic.svg`,"Anthropic Text":`${n}anthropic.svg`,AssemblyAI:`${n}assemblyai_small.png`,Azure:`${n}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${n}microsoft_azure.svg`,"Azure Text":`${n}microsoft_azure.svg`,Baseten:`${n}baseten.svg`,"Amazon Bedrock":`${n}bedrock.svg`,"Amazon Bedrock Mantle":`${n}bedrock.svg`,"AWS SageMaker":`${n}bedrock.svg`,Cerebras:`${n}cerebras.svg`,Cloudflare:`${n}cloudflare.svg`,Codestral:`${n}mistral.svg`,Cohere:`${n}cohere.svg`,"Cohere Chat":`${n}cohere.svg`,Cometapi:`${n}cometapi.svg`,Cursor:`${n}cursor.svg`,"Databricks (Qwen API)":`${n}databricks.svg`,Dashscope:`${n}dashscope.svg`,Deepseek:`${n}deepseek.svg`,Deepgram:`${n}deepgram.png`,DeepInfra:`${n}deepinfra.png`,ElevenLabs:`${n}elevenlabs.png`,"Fal AI":`${n}fal_ai.jpg`,"Featherless Ai":`${n}featherless.svg`,"Fireworks AI":`${n}fireworks.svg`,Friendliai:`${n}friendli.svg`,"Github Copilot":`${n}github_copilot.svg`,"Google AI Studio":`${n}google.svg`,GradientAI:`${n}gradientai.svg`,Groq:`${n}groq.svg`,vllm:`${n}vllm.png`,Huggingface:`${n}huggingface.svg`,Hyperbolic:`${n}hyperbolic.svg`,Infinity:`${n}infinity.png`,"Jina AI":`${n}jina.png`,"Lambda Ai":`${n}lambda.svg`,"Lm Studio":`${n}lmstudio.svg`,"Meta Llama":`${n}meta_llama.svg`,MiniMax:`${n}minimax.svg`,"Mistral AI":`${n}mistral.svg`,Moonshot:`${n}moonshot.svg`,Morph:`${n}morph.svg`,Nebius:`${n}nebius.svg`,Novita:`${n}novita.svg`,"Nvidia Nim":`${n}nvidia_nim.svg`,Ollama:`${n}ollama.svg`,"Ollama Chat":`${n}ollama.svg`,Oobabooga:`${n}openai_small.svg`,OpenAI:`${n}openai_small.svg`,"Openai Like":`${n}openai_small.svg`,"OpenAI Text Completion":`${n}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${n}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${n}openai_small.svg`,Openrouter:`${n}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${n}oracle.svg`,Perplexity:`${n}perplexity-ai.svg`,Recraft:`${n}recraft.svg`,Replicate:`${n}replicate.svg`,RunwayML:`${n}runwayml.png`,Sagemaker:`${n}bedrock.svg`,Sambanova:`${n}sambanova.svg`,"SAP Generative AI Hub":`${n}sap.png`,Snowflake:`${n}snowflake.svg`,"Text-Completion-Codestral":`${n}mistral.svg`,TogetherAI:`${n}togetherai.svg`,Topaz:`${n}topaz.svg`,Triton:`${n}nvidia_triton.png`,V0:`${n}v0.svg`,"Vercel Ai Gateway":`${n}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${n}google.svg`,"Vertex Ai Beta":`${n}google.svg`,Vllm:`${n}vllm.png`,VolcEngine:`${n}volcengine.png`,"Voyage AI":`${n}voyage.webp`,Watsonx:`${n}watsonx.svg`,"Watsonx Text":`${n}watsonx.svg`,xAI:`${n}xai.svg`,Xinference:`${n}xinference.svg`};e.s(["Providers",()=>a,"getPlaceholder",0,e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(o).find(t=>o[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=a[t];return{logo:i[n],displayName:n}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let a=o[e];console.log(`Provider mapped to: ${a}`);let n=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let o=t.litellm_provider;(o===a||"string"==typeof o&&o.includes(a))&&n.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&n.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&n.push(e)}))),n},"providerLogoMap",0,i,"provider_map",0,o])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},94629,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,a],94629)},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),o=e.i(343794),n=e.i(242064),i=e.i(763731),l=e.i(174428);let r=80*Math.PI,s=e=>{let{dotClassName:t,style:n,hasCircleCls:i}=e;return a.createElement("circle",{className:(0,o.default)(`${t}-circle`,{[`${t}-circle-bg`]:i}),r:40,cx:50,cy:50,strokeWidth:20,style:n})},c=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,i=`${n}-holder`,c=`${i}-hidden`,[d,u]=a.useState(!1);(0,l.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!d)return null;let p={strokeDashoffset:`${r/4}`,strokeDasharray:`${r*m/100} ${r*(100-m)/100}`};return a.createElement("span",{className:(0,o.default)(i,`${n}-progress`,m<=0&&c)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},a.createElement(s,{dotClassName:n,hasCircleCls:!0}),a.createElement(s,{dotClassName:n,style:p})))};function d(e){let{prefixCls:t,percent:n=0}=e,i=`${t}-dot`,l=`${i}-holder`,r=`${l}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,o.default)(l,n>0&&r)},a.createElement("span",{className:(0,o.default)(i,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(c,{prefixCls:t,percent:n}))}function u(e){var t;let{prefixCls:n,indicator:l,percent:r}=e,s=`${n}-dot`;return l&&a.isValidElement(l)?(0,i.cloneElement)(l,{className:(0,o.default)(null==(t=l.props)?void 0:t.className,s),percent:r}):a.createElement(d,{prefixCls:n,percent:r})}e.i(296059);var m=e.i(694758),p=e.i(183293),g=e.i(246422),f=e.i(838378);let v=new m.Keyframes("antSpinMove",{to:{opacity:1}}),h=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),A=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=e;return{[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:a(a(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:a(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:v,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:h,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),b=[[30,.05],[70,.03],[96,.01]];var y=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]]);return a};let I=e=>{var i;let{prefixCls:l,spinning:r=!0,delay:s=0,className:c,rootClassName:d,size:m="default",tip:p,wrapperClassName:g,style:f,children:v,fullscreen:h=!1,indicator:I,percent:O}=e,C=y(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:E,direction:$,className:S,style:x,indicator:w}=(0,n.useComponentConfig)("spin"),k=E("spin",l),[T,_,L]=A(k),[M,N]=a.useState(()=>r&&(!r||!s||!!Number.isNaN(Number(s)))),D=function(e,t){let[o,n]=a.useState(0),i=a.useRef(null),l="auto"===t;return a.useEffect(()=>(l&&e&&(n(0),i.current=setInterval(()=>{n(e=>{let t=100-e;for(let a=0;a{i.current&&(clearInterval(i.current),i.current=null)}),[l,e]),l?o:t}(M,O);a.useEffect(()=>{if(r){let e=function(e,t,a){var o,n=a||{},i=n.noTrailing,l=void 0!==i&&i,r=n.noLeading,s=void 0!==r&&r,c=n.debounceMode,d=void 0===c?void 0:c,u=!1,m=0;function p(){o&&clearTimeout(o)}function g(){for(var a=arguments.length,n=Array(a),i=0;ie?s?(m=Date.now(),l||(o=setTimeout(d?f:g,e))):g():!0!==l&&(o=setTimeout(d?f:g,void 0===d?e-c:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},g}(s,()=>{N(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}N(!1)},[s,r]);let R=a.useMemo(()=>void 0!==v&&!h,[v,h]),z=(0,o.default)(k,S,{[`${k}-sm`]:"small"===m,[`${k}-lg`]:"large"===m,[`${k}-spinning`]:M,[`${k}-show-text`]:!!p,[`${k}-rtl`]:"rtl"===$},c,!h&&d,_,L),P=(0,o.default)(`${k}-container`,{[`${k}-blur`]:M}),j=null!=(i=null!=I?I:w)?i:t,H=Object.assign(Object.assign({},x),f),B=a.createElement("div",Object.assign({},C,{style:H,className:z,"aria-live":"polite","aria-busy":M}),a.createElement(u,{prefixCls:k,indicator:j,percent:D}),p&&(R||h)?a.createElement("div",{className:`${k}-text`},p):null);return T(R?a.createElement("div",Object.assign({},C,{className:(0,o.default)(`${k}-nested-loading`,g,_,L)}),M&&a.createElement("div",{key:"loading"},B),a.createElement("div",{className:P,key:"container"},v)):h?a.createElement("div",{className:(0,o.default)(`${k}-fullscreen`,{[`${k}-fullscreen-show`]:M},d,_,L)},B):B)};I.setDefaultIndicator=e=>{t=e},e.s(["default",0,I],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},350967,46757,e=>{"use strict";var t=e.i(290571),a=e.i(444755),o=e.i(673706),n=e.i(271645);let i={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},l={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},r={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},s={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},c={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},d={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},u={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},m={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"};e.s(["colSpan",()=>c,"colSpanLg",()=>m,"colSpanMd",()=>u,"colSpanSm",()=>d,"gridCols",()=>i,"gridColsLg",()=>s,"gridColsMd",()=>r,"gridColsSm",()=>l],46757);let p=(0,o.makeClassName)("Grid"),g=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",f=n.default.forwardRef((e,o)=>{let{numItems:c=1,numItemsSm:d,numItemsMd:u,numItemsLg:m,children:f,className:v}=e,h=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),A=g(c,i),b=g(d,l),y=g(u,r),I=g(m,s),O=(0,a.tremorTwMerge)(A,b,y,I);return n.default.createElement("div",Object.assign({ref:o,className:(0,a.tremorTwMerge)(p("root"),"grid",O,v)},h),f)});f.displayName="Grid",e.s(["Grid",()=>f],350967)},530212,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,a],530212)},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:o}))});e.s(["MessageOutlined",0,i],264843)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,a]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;a(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),a=e.i(621482),o=e.i(243652),n=e.i(764205),i=e.i(135214);let l=(0,o.createQueryKeys)("infiniteKeyAliases");var r=e.i(56456),s=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:o,placeholder:u="Select a key alias",style:m,pageSize:p=50,allowClear:g=!0,disabled:f=!1})=>{let[v,h]=(0,d.useState)(""),[A,b]=(0,s.useDebouncedState)("",{wait:300}),{data:y,fetchNextPage:I,hasNextPage:O,isFetchingNextPage:C,isLoading:E}=((e=50,t)=>{let{accessToken:o}=(0,i.default)();return(0,a.useInfiniteQuery)({queryKey:l.list({filters:{size:e,...t&&{search:t}}}),queryFn:async({pageParam:a})=>await (0,n.keyAliasesCall)(o,a,e,t),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!y?.pages)return[];let e=new Set,t=[];for(let a of y.pages)for(let o of a.aliases)!o||e.has(o)||(e.add(o),t.push({label:o,value:o}));return t},[y]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{o?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:f,showSearch:!0,filterOption:!1,onSearch:e=>{h(e),b(e)},searchValue:v,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&O&&!C&&I()},loading:E,notFoundContent:E?(0,t.jsx)(r.LoadingOutlined,{spin:!0}):"No key aliases found",options:$,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,C&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(r.LoadingOutlined,{spin:!0})})]})})}],50882)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},782273,793916,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z"}}]},name:"sound",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:o}))});e.s(["SoundOutlined",0,i],782273);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};var r=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:l}))});e.s(["AudioOutlined",0,r],793916)},531245,657150,e=>{"use strict";let t=(0,e.i(475254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["default",()=>t],657150),e.s(["Bot",()=>t],531245)},608856,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),o=e.i(209428),n=e.i(392221),i=e.i(951160),l=e.i(174428),r=t.createContext(null),s=t.createContext({}),c=e.i(211577),d=e.i(931067),u=e.i(361275),m=e.i(404948),p=e.i(244009),g=e.i(703923),f=e.i(611935),v=["prefixCls","className","containerRef"];let h=function(e){var o=e.prefixCls,n=e.className,i=e.containerRef,l=(0,g.default)(e,v),r=t.useContext(s).panel,c=(0,f.useComposeRef)(r,i);return t.createElement("div",(0,d.default)({className:(0,a.default)("".concat(o,"-content"),n),role:"dialog",ref:c},(0,p.default)(e,{aria:!0}),{"aria-modal":"true"},l))};var A=e.i(883110);function b(e){return"string"==typeof e&&String(Number(e))===e?((0,A.default)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}e.i(654310);var y={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"},I=t.forwardRef(function(e,i){var l,s,g,f=e.prefixCls,v=e.open,A=e.placement,I=e.inline,O=e.push,C=e.forceRender,E=e.autoFocus,$=e.keyboard,S=e.classNames,x=e.rootClassName,w=e.rootStyle,k=e.zIndex,T=e.className,_=e.id,L=e.style,M=e.motion,N=e.width,D=e.height,R=e.children,z=e.mask,P=e.maskClosable,j=e.maskMotion,H=e.maskClassName,B=e.maskStyle,V=e.afterOpenChange,G=e.onClose,F=e.onMouseEnter,U=e.onMouseOver,X=e.onMouseLeave,W=e.onClick,K=e.onKeyDown,q=e.onKeyUp,Y=e.styles,Z=e.drawerRender,J=t.useRef(),Q=t.useRef(),ee=t.useRef();t.useImperativeHandle(i,function(){return J.current}),t.useEffect(function(){if(v&&E){var e;null==(e=J.current)||e.focus({preventScroll:!0})}},[v]);var et=t.useState(!1),ea=(0,n.default)(et,2),eo=ea[0],en=ea[1],ei=t.useContext(r),el=null!=(l=null!=(s=null==(g="boolean"==typeof O?O?{}:{distance:0}:O||{})?void 0:g.distance)?s:null==ei?void 0:ei.pushDistance)?l:180,er=t.useMemo(function(){return{pushDistance:el,push:function(){en(!0)},pull:function(){en(!1)}}},[el]);t.useEffect(function(){var e,t;v?null==ei||null==(e=ei.push)||e.call(ei):null==ei||null==(t=ei.pull)||t.call(ei)},[v]),t.useEffect(function(){return function(){var e;null==ei||null==(e=ei.pull)||e.call(ei)}},[]);var es=t.createElement(u.default,(0,d.default)({key:"mask"},j,{visible:z&&v}),function(e,n){var i=e.className,l=e.style;return t.createElement("div",{className:(0,a.default)("".concat(f,"-mask"),i,null==S?void 0:S.mask,H),style:(0,o.default)((0,o.default)((0,o.default)({},l),B),null==Y?void 0:Y.mask),onClick:P&&v?G:void 0,ref:n})}),ec="function"==typeof M?M(A):M,ed={};if(eo&&el)switch(A){case"top":ed.transform="translateY(".concat(el,"px)");break;case"bottom":ed.transform="translateY(".concat(-el,"px)");break;case"left":ed.transform="translateX(".concat(el,"px)");break;default:ed.transform="translateX(".concat(-el,"px)")}"left"===A||"right"===A?ed.width=b(N):ed.height=b(D);var eu={onMouseEnter:F,onMouseOver:U,onMouseLeave:X,onClick:W,onKeyDown:K,onKeyUp:q},em=t.createElement(u.default,(0,d.default)({key:"panel"},ec,{visible:v,forceRender:C,onVisibleChanged:function(e){null==V||V(e)},removeOnLeave:!1,leavedClassName:"".concat(f,"-content-wrapper-hidden")}),function(n,i){var l=n.className,r=n.style,s=t.createElement(h,(0,d.default)({id:_,containerRef:i,prefixCls:f,className:(0,a.default)(T,null==S?void 0:S.content),style:(0,o.default)((0,o.default)({},L),null==Y?void 0:Y.content)},(0,p.default)(e,{aria:!0}),eu),R);return t.createElement("div",(0,d.default)({className:(0,a.default)("".concat(f,"-content-wrapper"),null==S?void 0:S.wrapper,l),style:(0,o.default)((0,o.default)((0,o.default)({},ed),r),null==Y?void 0:Y.wrapper)},(0,p.default)(e,{data:!0})),Z?Z(s):s)}),ep=(0,o.default)({},w);return k&&(ep.zIndex=k),t.createElement(r.Provider,{value:er},t.createElement("div",{className:(0,a.default)(f,"".concat(f,"-").concat(A),x,(0,c.default)((0,c.default)({},"".concat(f,"-open"),v),"".concat(f,"-inline"),I)),style:ep,tabIndex:-1,ref:J,onKeyDown:function(e){var t,a,o=e.keyCode,n=e.shiftKey;switch(o){case m.default.TAB:o===m.default.TAB&&(n||document.activeElement!==ee.current?n&&document.activeElement===Q.current&&(null==(a=ee.current)||a.focus({preventScroll:!0})):null==(t=Q.current)||t.focus({preventScroll:!0}));break;case m.default.ESC:G&&$&&(e.stopPropagation(),G(e))}}},es,t.createElement("div",{tabIndex:0,ref:Q,style:y,"aria-hidden":"true","data-sentinel":"start"}),em,t.createElement("div",{tabIndex:0,ref:ee,style:y,"aria-hidden":"true","data-sentinel":"end"})))});let O=function(e){var a=e.open,r=e.prefixCls,c=e.placement,d=e.autoFocus,u=e.keyboard,m=e.width,p=e.mask,g=void 0===p||p,f=e.maskClosable,v=e.getContainer,h=e.forceRender,A=e.afterOpenChange,b=e.destroyOnClose,y=e.onMouseEnter,O=e.onMouseOver,C=e.onMouseLeave,E=e.onClick,$=e.onKeyDown,S=e.onKeyUp,x=e.panelRef,w=t.useState(!1),k=(0,n.default)(w,2),T=k[0],_=k[1],L=t.useState(!1),M=(0,n.default)(L,2),N=M[0],D=M[1];(0,l.default)(function(){D(!0)},[]);var R=!!N&&void 0!==a&&a,z=t.useRef(),P=t.useRef();(0,l.default)(function(){R&&(P.current=document.activeElement)},[R]);var j=t.useMemo(function(){return{panel:x}},[x]);if(!h&&!T&&!R&&b)return null;var H=(0,o.default)((0,o.default)({},e),{},{open:R,prefixCls:void 0===r?"rc-drawer":r,placement:void 0===c?"right":c,autoFocus:void 0===d||d,keyboard:void 0===u||u,width:void 0===m?378:m,mask:g,maskClosable:void 0===f||f,inline:!1===v,afterOpenChange:function(e){var t,a;_(e),null==A||A(e),e||!P.current||null!=(t=z.current)&&t.contains(P.current)||null==(a=P.current)||a.focus({preventScroll:!0})},ref:z},{onMouseEnter:y,onMouseOver:O,onMouseLeave:C,onClick:E,onKeyDown:$,onKeyUp:S});return t.createElement(s.Provider,{value:j},t.createElement(i.default,{open:R||h||T,autoDestroy:!1,getContainer:v,autoLock:g&&(R||T)},t.createElement(I,H)))};var C=e.i(981444),E=e.i(617206),$=e.i(122767),S=e.i(613541),x=e.i(340010),w=e.i(242064),k=e.i(922611),T=e.i(563113),_=e.i(185793);let L=e=>{var o,n,i,l;let r,{prefixCls:s,ariaId:c,title:d,footer:u,extra:m,closable:p,loading:g,onClose:f,headerStyle:v,bodyStyle:h,footerStyle:A,children:b,classNames:y,styles:I}=e,O=(0,w.useComponentConfig)("drawer");r=!1===p?void 0:void 0===p||!0===p?"start":(null==p?void 0:p.placement)==="end"?"end":"start";let C=t.useCallback(e=>t.createElement("button",{type:"button",onClick:f,className:(0,a.default)(`${s}-close`,{[`${s}-close-${r}`]:"end"===r})},e),[f,s,r]),[E,$]=(0,T.useClosable)((0,T.pickClosable)(e),(0,T.pickClosable)(O),{closable:!0,closeIconRender:C});return t.createElement(t.Fragment,null,d||E?t.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null==(i=O.styles)?void 0:i.header),v),null==I?void 0:I.header),className:(0,a.default)(`${s}-header`,{[`${s}-header-close-only`]:E&&!d&&!m},null==(l=O.classNames)?void 0:l.header,null==y?void 0:y.header)},t.createElement("div",{className:`${s}-header-title`},"start"===r&&$,d&&t.createElement("div",{className:`${s}-title`,id:c},d)),m&&t.createElement("div",{className:`${s}-extra`},m),"end"===r&&$):null,t.createElement("div",{className:(0,a.default)(`${s}-body`,null==y?void 0:y.body,null==(o=O.classNames)?void 0:o.body),style:Object.assign(Object.assign(Object.assign({},null==(n=O.styles)?void 0:n.body),h),null==I?void 0:I.body)},g?t.createElement(_.default,{active:!0,title:!1,paragraph:{rows:5},className:`${s}-body-skeleton`}):b),(()=>{var e,o;if(!u)return null;let n=`${s}-footer`;return t.createElement("div",{className:(0,a.default)(n,null==(e=O.classNames)?void 0:e.footer,null==y?void 0:y.footer),style:Object.assign(Object.assign(Object.assign({},null==(o=O.styles)?void 0:o.footer),A),null==I?void 0:I.footer)},u)})())};e.i(296059);var M=e.i(915654),N=e.i(183293),D=e.i(246422),R=e.i(838378);let z=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),P=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},z({opacity:e},{opacity:1})),j=(0,D.genStyleHooks)("Drawer",e=>{let t=(0,R.mergeToken)(e,{});return[(e=>{let{borderRadiusSM:t,componentCls:a,zIndexPopup:o,colorBgMask:n,colorBgElevated:i,motionDurationSlow:l,motionDurationMid:r,paddingXS:s,padding:c,paddingLG:d,fontSizeLG:u,lineHeightLG:m,lineWidth:p,lineType:g,colorSplit:f,marginXS:v,colorIcon:h,colorIconHover:A,colorBgTextHover:b,colorBgTextActive:y,colorText:I,fontWeightStrong:O,footerPaddingBlock:C,footerPaddingInline:E,calc:$}=e,S=`${a}-content-wrapper`;return{[a]:{position:"fixed",inset:0,zIndex:o,pointerEvents:"none",color:I,"&-pure":{position:"relative",background:i,display:"flex",flexDirection:"column",[`&${a}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${a}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${a}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${a}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${a}-mask`]:{position:"absolute",inset:0,zIndex:o,background:n,pointerEvents:"auto"},[S]:{position:"absolute",zIndex:o,maxWidth:"100vw",transition:`all ${l}`,"&-hidden":{display:"none"}},[`&-left > ${S}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${S}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${S}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${S}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${a}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:i,pointerEvents:"auto"},[`${a}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,M.unit)(c)} ${(0,M.unit)(d)}`,fontSize:u,lineHeight:m,borderBottom:`${(0,M.unit)(p)} ${g} ${f}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${a}-extra`]:{flex:"none"},[`${a}-close`]:Object.assign({display:"inline-flex",width:$(u).add(s).equal(),height:$(u).add(s).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:h,fontWeight:O,fontSize:u,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${r}`,textRendering:"auto",[`&${a}-close-end`]:{marginInlineStart:v},[`&:not(${a}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:A,backgroundColor:b,textDecoration:"none"},"&:active":{backgroundColor:y}},(0,N.genFocusStyle)(e)),[`${a}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:u,lineHeight:m},[`${a}-body`]:{flex:1,minWidth:0,minHeight:0,padding:d,overflow:"auto",[`${a}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${a}-footer`]:{flexShrink:0,padding:`${(0,M.unit)(C)} ${(0,M.unit)(E)}`,borderTop:`${(0,M.unit)(p)} ${g} ${f}`},"&-rtl":{direction:"rtl"}}}})(t),(e=>{let{componentCls:t,motionDurationSlow:a}=e;return{[t]:{[`${t}-mask-motion`]:P(0,a),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((e,t)=>{let o;return Object.assign(Object.assign({},e),{[`&-${t}`]:[P(.7,a),z({transform:(o="100%",({left:`translateX(-${o})`,right:`translateX(${o})`,top:`translateY(-${o})`,bottom:`translateY(${o})`})[t])},{transform:"none"})]})},{})}}})(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}));var H=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]]);return a};let B={distance:180},V=e=>{let{rootClassName:o,width:n,height:i,size:l="default",mask:r=!0,push:s=B,open:c,afterOpenChange:d,onClose:u,prefixCls:m,getContainer:p,panelRef:g=null,style:v,className:h,"aria-labelledby":A,visible:b,afterVisibleChange:y,maskStyle:I,drawerStyle:T,contentWrapperStyle:_,destroyOnClose:M,destroyOnHidden:N}=e,D=H(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),R=(0,C.default)(),z=D.title?R:void 0,{getPopupContainer:P,getPrefixCls:V,direction:G,className:F,style:U,classNames:X,styles:W}=(0,w.useComponentConfig)("drawer"),K=V("drawer",m),[q,Y,Z]=j(K),J=void 0===p&&P?()=>P(document.body):p,Q=(0,a.default)({"no-mask":!r,[`${K}-rtl`]:"rtl"===G},o,Y,Z),ee=t.useMemo(()=>null!=n?n:"large"===l?736:378,[n,l]),et=t.useMemo(()=>null!=i?i:"large"===l?736:378,[i,l]),ea={motionName:(0,S.getTransitionName)(K,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},eo=(0,k.usePanelRef)(),en=(0,f.composeRef)(g,eo),[ei,el]=(0,$.useZIndex)("Drawer",D.zIndex),{classNames:er={},styles:es={}}=D;return q(t.createElement(E.default,{form:!0,space:!0},t.createElement(x.default.Provider,{value:el},t.createElement(O,Object.assign({prefixCls:K,onClose:u,maskMotion:ea,motion:e=>({motionName:(0,S.getTransitionName)(K,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},D,{classNames:{mask:(0,a.default)(er.mask,X.mask),content:(0,a.default)(er.content,X.content),wrapper:(0,a.default)(er.wrapper,X.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},es.mask),I),W.mask),content:Object.assign(Object.assign(Object.assign({},es.content),T),W.content),wrapper:Object.assign(Object.assign(Object.assign({},es.wrapper),_),W.wrapper)},open:null!=c?c:b,mask:r,push:s,width:ee,height:et,style:Object.assign(Object.assign({},U),v),className:(0,a.default)(F,h),rootClassName:Q,getContainer:J,afterOpenChange:null!=d?d:y,panelRef:en,zIndex:ei,"aria-labelledby":null!=A?A:z,destroyOnClose:null!=N?N:M}),t.createElement(L,Object.assign({prefixCls:K},D,{ariaId:z,onClose:u}))))))};V._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:o,style:n,className:i,placement:l="right"}=e,r=H(e,["prefixCls","style","className","placement"]),{getPrefixCls:s}=t.useContext(w.ConfigContext),c=s("drawer",o),[d,u,m]=j(c),p=(0,a.default)(c,`${c}-pure`,`${c}-${l}`,u,m,i);return d(t.createElement("div",{className:p,style:n},t.createElement(L,Object.assign({prefixCls:c},r))))},e.s(["Drawer",0,V],608856)},799062,e=>{"use strict";var t=e.i(843476),a=e.i(936190),o=e.i(135214),n=e.i(214541);e.s(["default",0,()=>{let{accessToken:e,token:i,userRole:l,userId:r,premiumUser:s}=(0,o.default)(),{teams:c}=(0,n.default)();return(0,t.jsx)(a.default,{accessToken:e,token:i,userRole:l,userID:r,allTeams:c||[],premiumUser:s})}])},601236,e=>{e.v(e=>Promise.resolve().then(()=>e(764205)))}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,916925,e=>{"use strict";var t,a=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let o={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},n="../ui/assets/logos/",i={"A2A Agent":`${n}a2a_agent.png`,Ai21:`${n}ai21.svg`,"Ai21 Chat":`${n}ai21.svg`,"AI/ML API":`${n}aiml_api.svg`,"Aiohttp Openai":`${n}openai_small.svg`,Anthropic:`${n}anthropic.svg`,"Anthropic Text":`${n}anthropic.svg`,AssemblyAI:`${n}assemblyai_small.png`,Azure:`${n}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${n}microsoft_azure.svg`,"Azure Text":`${n}microsoft_azure.svg`,Baseten:`${n}baseten.svg`,"Amazon Bedrock":`${n}bedrock.svg`,"Amazon Bedrock Mantle":`${n}bedrock.svg`,"AWS SageMaker":`${n}bedrock.svg`,Cerebras:`${n}cerebras.svg`,Cloudflare:`${n}cloudflare.svg`,Codestral:`${n}mistral.svg`,Cohere:`${n}cohere.svg`,"Cohere Chat":`${n}cohere.svg`,Cometapi:`${n}cometapi.svg`,Cursor:`${n}cursor.svg`,"Databricks (Qwen API)":`${n}databricks.svg`,Dashscope:`${n}dashscope.svg`,Deepseek:`${n}deepseek.svg`,Deepgram:`${n}deepgram.png`,DeepInfra:`${n}deepinfra.png`,ElevenLabs:`${n}elevenlabs.png`,"Fal AI":`${n}fal_ai.jpg`,"Featherless Ai":`${n}featherless.svg`,"Fireworks AI":`${n}fireworks.svg`,Friendliai:`${n}friendli.svg`,"Github Copilot":`${n}github_copilot.svg`,"Google AI Studio":`${n}google.svg`,GradientAI:`${n}gradientai.svg`,Groq:`${n}groq.svg`,vllm:`${n}vllm.png`,Huggingface:`${n}huggingface.svg`,Hyperbolic:`${n}hyperbolic.svg`,Infinity:`${n}infinity.png`,"Jina AI":`${n}jina.png`,"Lambda Ai":`${n}lambda.svg`,"Lm Studio":`${n}lmstudio.svg`,"Meta Llama":`${n}meta_llama.svg`,MiniMax:`${n}minimax.svg`,"Mistral AI":`${n}mistral.svg`,Moonshot:`${n}moonshot.svg`,Morph:`${n}morph.svg`,Nebius:`${n}nebius.svg`,Novita:`${n}novita.svg`,"Nvidia Nim":`${n}nvidia_nim.svg`,Ollama:`${n}ollama.svg`,"Ollama Chat":`${n}ollama.svg`,Oobabooga:`${n}openai_small.svg`,OpenAI:`${n}openai_small.svg`,"Openai Like":`${n}openai_small.svg`,"OpenAI Text Completion":`${n}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${n}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${n}openai_small.svg`,Openrouter:`${n}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${n}oracle.svg`,Perplexity:`${n}perplexity-ai.svg`,Recraft:`${n}recraft.svg`,Replicate:`${n}replicate.svg`,RunwayML:`${n}runwayml.png`,Sagemaker:`${n}bedrock.svg`,Sambanova:`${n}sambanova.svg`,"SAP Generative AI Hub":`${n}sap.png`,Snowflake:`${n}snowflake.svg`,"Text-Completion-Codestral":`${n}mistral.svg`,TogetherAI:`${n}togetherai.svg`,Topaz:`${n}topaz.svg`,Triton:`${n}nvidia_triton.png`,V0:`${n}v0.svg`,"Vercel Ai Gateway":`${n}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${n}google.svg`,"Vertex Ai Beta":`${n}google.svg`,Vllm:`${n}vllm.png`,VolcEngine:`${n}volcengine.png`,"Voyage AI":`${n}voyage.webp`,Watsonx:`${n}watsonx.svg`,"Watsonx Text":`${n}watsonx.svg`,xAI:`${n}xai.svg`,Xinference:`${n}xinference.svg`};e.s(["Providers",()=>a,"getPlaceholder",0,e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(o).find(t=>o[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=a[t];return{logo:i[n],displayName:n}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let a=o[e];console.log(`Provider mapped to: ${a}`);let n=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let o=t.litellm_provider;(o===a||"string"==typeof o&&o.includes(a))&&n.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&n.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&n.push(e)}))),n},"providerLogoMap",0,i,"provider_map",0,o])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},94629,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.s(["SwitchVerticalIcon",0,a],94629)},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),o=e.i(343794),n=e.i(242064),i=e.i(763731),l=e.i(174428);let r=80*Math.PI,s=e=>{let{dotClassName:t,style:n,hasCircleCls:i}=e;return a.createElement("circle",{className:(0,o.default)(`${t}-circle`,{[`${t}-circle-bg`]:i}),r:40,cx:50,cy:50,strokeWidth:20,style:n})},c=({percent:e,prefixCls:t})=>{let n=`${t}-dot`,i=`${n}-holder`,c=`${i}-hidden`,[d,u]=a.useState(!1);(0,l.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!d)return null;let p={strokeDashoffset:`${r/4}`,strokeDasharray:`${r*m/100} ${r*(100-m)/100}`};return a.createElement("span",{className:(0,o.default)(i,`${n}-progress`,m<=0&&c)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},a.createElement(s,{dotClassName:n,hasCircleCls:!0}),a.createElement(s,{dotClassName:n,style:p})))};function d(e){let{prefixCls:t,percent:n=0}=e,i=`${t}-dot`,l=`${i}-holder`,r=`${l}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,o.default)(l,n>0&&r)},a.createElement("span",{className:(0,o.default)(i,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(c,{prefixCls:t,percent:n}))}function u(e){var t;let{prefixCls:n,indicator:l,percent:r}=e,s=`${n}-dot`;return l&&a.isValidElement(l)?(0,i.cloneElement)(l,{className:(0,o.default)(null==(t=l.props)?void 0:t.className,s),percent:r}):a.createElement(d,{prefixCls:n,percent:r})}e.i(296059);var m=e.i(694758),p=e.i(183293),g=e.i(246422),f=e.i(838378);let v=new m.Keyframes("antSpinMove",{to:{opacity:1}}),h=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),A=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=e;return{[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:a(a(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:a(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:v,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:h,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),b=[[30,.05],[70,.03],[96,.01]];var y=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]]);return a};let I=e=>{var i;let{prefixCls:l,spinning:r=!0,delay:s=0,className:c,rootClassName:d,size:m="default",tip:p,wrapperClassName:g,style:f,children:v,fullscreen:h=!1,indicator:I,percent:O}=e,C=y(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:E,direction:$,className:S,style:x,indicator:w}=(0,n.useComponentConfig)("spin"),k=E("spin",l),[T,_,L]=A(k),[M,N]=a.useState(()=>r&&(!r||!s||!!Number.isNaN(Number(s)))),D=function(e,t){let[o,n]=a.useState(0),i=a.useRef(null),l="auto"===t;return a.useEffect(()=>(l&&e&&(n(0),i.current=setInterval(()=>{n(e=>{let t=100-e;for(let a=0;a{i.current&&(clearInterval(i.current),i.current=null)}),[l,e]),l?o:t}(M,O);a.useEffect(()=>{if(r){let e=function(e,t,a){var o,n=a||{},i=n.noTrailing,l=void 0!==i&&i,r=n.noLeading,s=void 0!==r&&r,c=n.debounceMode,d=void 0===c?void 0:c,u=!1,m=0;function p(){o&&clearTimeout(o)}function g(){for(var a=arguments.length,n=Array(a),i=0;ie?s?(m=Date.now(),l||(o=setTimeout(d?f:g,e))):g():!0!==l&&(o=setTimeout(d?f:g,void 0===d?e-c:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;p(),u=!(void 0!==t&&t)},g}(s,()=>{N(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}N(!1)},[s,r]);let R=a.useMemo(()=>void 0!==v&&!h,[v,h]),z=(0,o.default)(k,S,{[`${k}-sm`]:"small"===m,[`${k}-lg`]:"large"===m,[`${k}-spinning`]:M,[`${k}-show-text`]:!!p,[`${k}-rtl`]:"rtl"===$},c,!h&&d,_,L),P=(0,o.default)(`${k}-container`,{[`${k}-blur`]:M}),j=null!=(i=null!=I?I:w)?i:t,H=Object.assign(Object.assign({},x),f),B=a.createElement("div",Object.assign({},C,{style:H,className:z,"aria-live":"polite","aria-busy":M}),a.createElement(u,{prefixCls:k,indicator:j,percent:D}),p&&(R||h)?a.createElement("div",{className:`${k}-text`},p):null);return T(R?a.createElement("div",Object.assign({},C,{className:(0,o.default)(`${k}-nested-loading`,g,_,L)}),M&&a.createElement("div",{key:"loading"},B),a.createElement("div",{className:P,key:"container"},v)):h?a.createElement("div",{className:(0,o.default)(`${k}-fullscreen`,{[`${k}-fullscreen-show`]:M},d,_,L)},B):B)};I.setDefaultIndicator=e=>{t=e},e.s(["default",0,I],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},350967,46757,e=>{"use strict";var t=e.i(290571),a=e.i(444755),o=e.i(673706),n=e.i(271645);let i={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},l={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},r={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},s={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},c={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},d={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},u={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},m={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"};e.s(["colSpan",()=>c,"colSpanLg",()=>m,"colSpanMd",()=>u,"colSpanSm",()=>d,"gridCols",()=>i,"gridColsLg",()=>s,"gridColsMd",()=>r,"gridColsSm",()=>l],46757);let p=(0,o.makeClassName)("Grid"),g=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",f=n.default.forwardRef((e,o)=>{let{numItems:c=1,numItemsSm:d,numItemsMd:u,numItemsLg:m,children:f,className:v}=e,h=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),A=g(c,i),b=g(d,l),y=g(u,r),I=g(m,s),O=(0,a.tremorTwMerge)(A,b,y,I);return n.default.createElement("div",Object.assign({ref:o,className:(0,a.tremorTwMerge)(p("root"),"grid",O,v)},h),f)});f.displayName="Grid",e.s(["Grid",()=>f],350967)},530212,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,a],530212)},264843,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:o}))});e.s(["MessageOutlined",0,i],264843)},700514,e=>{"use strict";var t=e.i(271645);e.s(["defaultPageSize",0,25,"useBaseUrl",0,()=>{let[e,a]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:t}=window.location;a(`${e}//${t}`)}},[]),e}])},50882,e=>{"use strict";var t=e.i(843476),a=e.i(621482),o=e.i(243652),n=e.i(764205),i=e.i(135214);let l=(0,o.createQueryKeys)("infiniteKeyAliases");var r=e.i(56456),s=e.i(152473),c=e.i(199133),d=e.i(271645);e.s(["PaginatedKeyAliasSelect",0,({value:e,onChange:o,placeholder:u="Select a key alias",style:m,pageSize:p=50,allowClear:g=!0,disabled:f=!1,allFilters:v})=>{let[h,A]=(0,d.useState)(""),[b,y]=(0,s.useDebouncedState)("",{wait:300}),{data:I,fetchNextPage:O,hasNextPage:C,isFetchingNextPage:E,isLoading:$}=((e=50,t,o)=>{let{accessToken:r}=(0,i.default)();return(0,a.useInfiniteQuery)({queryKey:l.list({filters:{size:e,...t&&{search:t},...o&&{team_id:o}}}),queryFn:async({pageParam:a})=>await (0,n.keyAliasesCall)(r,a,e,t,o),initialPageParam:1,getNextPageParam:e=>{if(e.current_page{if(!I?.pages)return[];let e=new Set,t=[];for(let a of I.pages)for(let o of a.aliases)!o||e.has(o)||(e.add(o),t.push({label:o,value:o}));return t},[I]);return(0,t.jsx)(c.Select,{value:e||void 0,onChange:e=>{o?.(e??"")},placeholder:u,style:{width:"100%",...m},allowClear:g,disabled:f,showSearch:!0,filterOption:!1,onSearch:e=>{A(e),y(e)},searchValue:h,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&C&&!E&&O()},loading:$,notFoundContent:$?(0,t.jsx)(r.LoadingOutlined,{spin:!0}):"No key aliases found",options:S,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,E&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(r.LoadingOutlined,{spin:!0})})]})})}],50882)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},149192,e=>{"use strict";var t=e.i(864517);e.s(["CloseOutlined",()=>t.default])},492030,e=>{"use strict";var t=e.i(121229);e.s(["CheckOutlined",()=>t.default])},782273,793916,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z"}}]},name:"sound",theme:"outlined"};var n=e.i(9583),i=a.forwardRef(function(e,i){return a.createElement(n.default,(0,t.default)({},e,{ref:i,icon:o}))});e.s(["SoundOutlined",0,i],782273);let l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};var r=a.forwardRef(function(e,o){return a.createElement(n.default,(0,t.default)({},e,{ref:o,icon:l}))});e.s(["AudioOutlined",0,r],793916)},531245,657150,e=>{"use strict";let t=(0,e.i(475254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["default",()=>t],657150),e.s(["Bot",()=>t],531245)},608856,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),o=e.i(209428),n=e.i(392221),i=e.i(951160),l=e.i(174428),r=t.createContext(null),s=t.createContext({}),c=e.i(211577),d=e.i(931067),u=e.i(361275),m=e.i(404948),p=e.i(244009),g=e.i(703923),f=e.i(611935),v=["prefixCls","className","containerRef"];let h=function(e){var o=e.prefixCls,n=e.className,i=e.containerRef,l=(0,g.default)(e,v),r=t.useContext(s).panel,c=(0,f.useComposeRef)(r,i);return t.createElement("div",(0,d.default)({className:(0,a.default)("".concat(o,"-content"),n),role:"dialog",ref:c},(0,p.default)(e,{aria:!0}),{"aria-modal":"true"},l))};var A=e.i(883110);function b(e){return"string"==typeof e&&String(Number(e))===e?((0,A.default)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}e.i(654310);var y={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"},I=t.forwardRef(function(e,i){var l,s,g,f=e.prefixCls,v=e.open,A=e.placement,I=e.inline,O=e.push,C=e.forceRender,E=e.autoFocus,$=e.keyboard,S=e.classNames,x=e.rootClassName,w=e.rootStyle,k=e.zIndex,T=e.className,_=e.id,L=e.style,M=e.motion,N=e.width,D=e.height,R=e.children,z=e.mask,P=e.maskClosable,j=e.maskMotion,H=e.maskClassName,B=e.maskStyle,V=e.afterOpenChange,G=e.onClose,F=e.onMouseEnter,U=e.onMouseOver,X=e.onMouseLeave,W=e.onClick,K=e.onKeyDown,q=e.onKeyUp,Y=e.styles,Z=e.drawerRender,J=t.useRef(),Q=t.useRef(),ee=t.useRef();t.useImperativeHandle(i,function(){return J.current}),t.useEffect(function(){if(v&&E){var e;null==(e=J.current)||e.focus({preventScroll:!0})}},[v]);var et=t.useState(!1),ea=(0,n.default)(et,2),eo=ea[0],en=ea[1],ei=t.useContext(r),el=null!=(l=null!=(s=null==(g="boolean"==typeof O?O?{}:{distance:0}:O||{})?void 0:g.distance)?s:null==ei?void 0:ei.pushDistance)?l:180,er=t.useMemo(function(){return{pushDistance:el,push:function(){en(!0)},pull:function(){en(!1)}}},[el]);t.useEffect(function(){var e,t;v?null==ei||null==(e=ei.push)||e.call(ei):null==ei||null==(t=ei.pull)||t.call(ei)},[v]),t.useEffect(function(){return function(){var e;null==ei||null==(e=ei.pull)||e.call(ei)}},[]);var es=t.createElement(u.default,(0,d.default)({key:"mask"},j,{visible:z&&v}),function(e,n){var i=e.className,l=e.style;return t.createElement("div",{className:(0,a.default)("".concat(f,"-mask"),i,null==S?void 0:S.mask,H),style:(0,o.default)((0,o.default)((0,o.default)({},l),B),null==Y?void 0:Y.mask),onClick:P&&v?G:void 0,ref:n})}),ec="function"==typeof M?M(A):M,ed={};if(eo&&el)switch(A){case"top":ed.transform="translateY(".concat(el,"px)");break;case"bottom":ed.transform="translateY(".concat(-el,"px)");break;case"left":ed.transform="translateX(".concat(el,"px)");break;default:ed.transform="translateX(".concat(-el,"px)")}"left"===A||"right"===A?ed.width=b(N):ed.height=b(D);var eu={onMouseEnter:F,onMouseOver:U,onMouseLeave:X,onClick:W,onKeyDown:K,onKeyUp:q},em=t.createElement(u.default,(0,d.default)({key:"panel"},ec,{visible:v,forceRender:C,onVisibleChanged:function(e){null==V||V(e)},removeOnLeave:!1,leavedClassName:"".concat(f,"-content-wrapper-hidden")}),function(n,i){var l=n.className,r=n.style,s=t.createElement(h,(0,d.default)({id:_,containerRef:i,prefixCls:f,className:(0,a.default)(T,null==S?void 0:S.content),style:(0,o.default)((0,o.default)({},L),null==Y?void 0:Y.content)},(0,p.default)(e,{aria:!0}),eu),R);return t.createElement("div",(0,d.default)({className:(0,a.default)("".concat(f,"-content-wrapper"),null==S?void 0:S.wrapper,l),style:(0,o.default)((0,o.default)((0,o.default)({},ed),r),null==Y?void 0:Y.wrapper)},(0,p.default)(e,{data:!0})),Z?Z(s):s)}),ep=(0,o.default)({},w);return k&&(ep.zIndex=k),t.createElement(r.Provider,{value:er},t.createElement("div",{className:(0,a.default)(f,"".concat(f,"-").concat(A),x,(0,c.default)((0,c.default)({},"".concat(f,"-open"),v),"".concat(f,"-inline"),I)),style:ep,tabIndex:-1,ref:J,onKeyDown:function(e){var t,a,o=e.keyCode,n=e.shiftKey;switch(o){case m.default.TAB:o===m.default.TAB&&(n||document.activeElement!==ee.current?n&&document.activeElement===Q.current&&(null==(a=ee.current)||a.focus({preventScroll:!0})):null==(t=Q.current)||t.focus({preventScroll:!0}));break;case m.default.ESC:G&&$&&(e.stopPropagation(),G(e))}}},es,t.createElement("div",{tabIndex:0,ref:Q,style:y,"aria-hidden":"true","data-sentinel":"start"}),em,t.createElement("div",{tabIndex:0,ref:ee,style:y,"aria-hidden":"true","data-sentinel":"end"})))});let O=function(e){var a=e.open,r=e.prefixCls,c=e.placement,d=e.autoFocus,u=e.keyboard,m=e.width,p=e.mask,g=void 0===p||p,f=e.maskClosable,v=e.getContainer,h=e.forceRender,A=e.afterOpenChange,b=e.destroyOnClose,y=e.onMouseEnter,O=e.onMouseOver,C=e.onMouseLeave,E=e.onClick,$=e.onKeyDown,S=e.onKeyUp,x=e.panelRef,w=t.useState(!1),k=(0,n.default)(w,2),T=k[0],_=k[1],L=t.useState(!1),M=(0,n.default)(L,2),N=M[0],D=M[1];(0,l.default)(function(){D(!0)},[]);var R=!!N&&void 0!==a&&a,z=t.useRef(),P=t.useRef();(0,l.default)(function(){R&&(P.current=document.activeElement)},[R]);var j=t.useMemo(function(){return{panel:x}},[x]);if(!h&&!T&&!R&&b)return null;var H=(0,o.default)((0,o.default)({},e),{},{open:R,prefixCls:void 0===r?"rc-drawer":r,placement:void 0===c?"right":c,autoFocus:void 0===d||d,keyboard:void 0===u||u,width:void 0===m?378:m,mask:g,maskClosable:void 0===f||f,inline:!1===v,afterOpenChange:function(e){var t,a;_(e),null==A||A(e),e||!P.current||null!=(t=z.current)&&t.contains(P.current)||null==(a=P.current)||a.focus({preventScroll:!0})},ref:z},{onMouseEnter:y,onMouseOver:O,onMouseLeave:C,onClick:E,onKeyDown:$,onKeyUp:S});return t.createElement(s.Provider,{value:j},t.createElement(i.default,{open:R||h||T,autoDestroy:!1,getContainer:v,autoLock:g&&(R||T)},t.createElement(I,H)))};var C=e.i(981444),E=e.i(617206),$=e.i(122767),S=e.i(613541),x=e.i(340010),w=e.i(242064),k=e.i(922611),T=e.i(563113),_=e.i(185793);let L=e=>{var o,n,i,l;let r,{prefixCls:s,ariaId:c,title:d,footer:u,extra:m,closable:p,loading:g,onClose:f,headerStyle:v,bodyStyle:h,footerStyle:A,children:b,classNames:y,styles:I}=e,O=(0,w.useComponentConfig)("drawer");r=!1===p?void 0:void 0===p||!0===p?"start":(null==p?void 0:p.placement)==="end"?"end":"start";let C=t.useCallback(e=>t.createElement("button",{type:"button",onClick:f,className:(0,a.default)(`${s}-close`,{[`${s}-close-${r}`]:"end"===r})},e),[f,s,r]),[E,$]=(0,T.useClosable)((0,T.pickClosable)(e),(0,T.pickClosable)(O),{closable:!0,closeIconRender:C});return t.createElement(t.Fragment,null,d||E?t.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null==(i=O.styles)?void 0:i.header),v),null==I?void 0:I.header),className:(0,a.default)(`${s}-header`,{[`${s}-header-close-only`]:E&&!d&&!m},null==(l=O.classNames)?void 0:l.header,null==y?void 0:y.header)},t.createElement("div",{className:`${s}-header-title`},"start"===r&&$,d&&t.createElement("div",{className:`${s}-title`,id:c},d)),m&&t.createElement("div",{className:`${s}-extra`},m),"end"===r&&$):null,t.createElement("div",{className:(0,a.default)(`${s}-body`,null==y?void 0:y.body,null==(o=O.classNames)?void 0:o.body),style:Object.assign(Object.assign(Object.assign({},null==(n=O.styles)?void 0:n.body),h),null==I?void 0:I.body)},g?t.createElement(_.default,{active:!0,title:!1,paragraph:{rows:5},className:`${s}-body-skeleton`}):b),(()=>{var e,o;if(!u)return null;let n=`${s}-footer`;return t.createElement("div",{className:(0,a.default)(n,null==(e=O.classNames)?void 0:e.footer,null==y?void 0:y.footer),style:Object.assign(Object.assign(Object.assign({},null==(o=O.styles)?void 0:o.footer),A),null==I?void 0:I.footer)},u)})())};e.i(296059);var M=e.i(915654),N=e.i(183293),D=e.i(246422),R=e.i(838378);let z=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),P=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},z({opacity:e},{opacity:1})),j=(0,D.genStyleHooks)("Drawer",e=>{let t=(0,R.mergeToken)(e,{});return[(e=>{let{borderRadiusSM:t,componentCls:a,zIndexPopup:o,colorBgMask:n,colorBgElevated:i,motionDurationSlow:l,motionDurationMid:r,paddingXS:s,padding:c,paddingLG:d,fontSizeLG:u,lineHeightLG:m,lineWidth:p,lineType:g,colorSplit:f,marginXS:v,colorIcon:h,colorIconHover:A,colorBgTextHover:b,colorBgTextActive:y,colorText:I,fontWeightStrong:O,footerPaddingBlock:C,footerPaddingInline:E,calc:$}=e,S=`${a}-content-wrapper`;return{[a]:{position:"fixed",inset:0,zIndex:o,pointerEvents:"none",color:I,"&-pure":{position:"relative",background:i,display:"flex",flexDirection:"column",[`&${a}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${a}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${a}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${a}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${a}-mask`]:{position:"absolute",inset:0,zIndex:o,background:n,pointerEvents:"auto"},[S]:{position:"absolute",zIndex:o,maxWidth:"100vw",transition:`all ${l}`,"&-hidden":{display:"none"}},[`&-left > ${S}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${S}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${S}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${S}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${a}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:i,pointerEvents:"auto"},[`${a}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${(0,M.unit)(c)} ${(0,M.unit)(d)}`,fontSize:u,lineHeight:m,borderBottom:`${(0,M.unit)(p)} ${g} ${f}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${a}-extra`]:{flex:"none"},[`${a}-close`]:Object.assign({display:"inline-flex",width:$(u).add(s).equal(),height:$(u).add(s).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:h,fontWeight:O,fontSize:u,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${r}`,textRendering:"auto",[`&${a}-close-end`]:{marginInlineStart:v},[`&:not(${a}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:A,backgroundColor:b,textDecoration:"none"},"&:active":{backgroundColor:y}},(0,N.genFocusStyle)(e)),[`${a}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:u,lineHeight:m},[`${a}-body`]:{flex:1,minWidth:0,minHeight:0,padding:d,overflow:"auto",[`${a}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${a}-footer`]:{flexShrink:0,padding:`${(0,M.unit)(C)} ${(0,M.unit)(E)}`,borderTop:`${(0,M.unit)(p)} ${g} ${f}`},"&-rtl":{direction:"rtl"}}}})(t),(e=>{let{componentCls:t,motionDurationSlow:a}=e;return{[t]:{[`${t}-mask-motion`]:P(0,a),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((e,t)=>{let o;return Object.assign(Object.assign({},e),{[`&-${t}`]:[P(.7,a),z({transform:(o="100%",({left:`translateX(-${o})`,right:`translateX(${o})`,top:`translateY(-${o})`,bottom:`translateY(${o})`})[t])},{transform:"none"})]})},{})}}})(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}));var H=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]]);return a};let B={distance:180},V=e=>{let{rootClassName:o,width:n,height:i,size:l="default",mask:r=!0,push:s=B,open:c,afterOpenChange:d,onClose:u,prefixCls:m,getContainer:p,panelRef:g=null,style:v,className:h,"aria-labelledby":A,visible:b,afterVisibleChange:y,maskStyle:I,drawerStyle:T,contentWrapperStyle:_,destroyOnClose:M,destroyOnHidden:N}=e,D=H(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),R=(0,C.default)(),z=D.title?R:void 0,{getPopupContainer:P,getPrefixCls:V,direction:G,className:F,style:U,classNames:X,styles:W}=(0,w.useComponentConfig)("drawer"),K=V("drawer",m),[q,Y,Z]=j(K),J=void 0===p&&P?()=>P(document.body):p,Q=(0,a.default)({"no-mask":!r,[`${K}-rtl`]:"rtl"===G},o,Y,Z),ee=t.useMemo(()=>null!=n?n:"large"===l?736:378,[n,l]),et=t.useMemo(()=>null!=i?i:"large"===l?736:378,[i,l]),ea={motionName:(0,S.getTransitionName)(K,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},eo=(0,k.usePanelRef)(),en=(0,f.composeRef)(g,eo),[ei,el]=(0,$.useZIndex)("Drawer",D.zIndex),{classNames:er={},styles:es={}}=D;return q(t.createElement(E.default,{form:!0,space:!0},t.createElement(x.default.Provider,{value:el},t.createElement(O,Object.assign({prefixCls:K,onClose:u,maskMotion:ea,motion:e=>({motionName:(0,S.getTransitionName)(K,`panel-motion-${e}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},D,{classNames:{mask:(0,a.default)(er.mask,X.mask),content:(0,a.default)(er.content,X.content),wrapper:(0,a.default)(er.wrapper,X.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},es.mask),I),W.mask),content:Object.assign(Object.assign(Object.assign({},es.content),T),W.content),wrapper:Object.assign(Object.assign(Object.assign({},es.wrapper),_),W.wrapper)},open:null!=c?c:b,mask:r,push:s,width:ee,height:et,style:Object.assign(Object.assign({},U),v),className:(0,a.default)(F,h),rootClassName:Q,getContainer:J,afterOpenChange:null!=d?d:y,panelRef:en,zIndex:ei,"aria-labelledby":null!=A?A:z,destroyOnClose:null!=N?N:M}),t.createElement(L,Object.assign({prefixCls:K},D,{ariaId:z,onClose:u}))))))};V._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:o,style:n,className:i,placement:l="right"}=e,r=H(e,["prefixCls","style","className","placement"]),{getPrefixCls:s}=t.useContext(w.ConfigContext),c=s("drawer",o),[d,u,m]=j(c),p=(0,a.default)(c,`${c}-pure`,`${c}-${l}`,u,m,i);return d(t.createElement("div",{className:p,style:n},t.createElement(L,Object.assign({prefixCls:c},r))))},e.s(["Drawer",0,V],608856)},799062,e=>{"use strict";var t=e.i(843476),a=e.i(936190),o=e.i(135214),n=e.i(214541);e.s(["default",0,()=>{let{accessToken:e,token:i,userRole:l,userId:r,premiumUser:s}=(0,o.default)(),{teams:c}=(0,n.default)();return(0,t.jsx)(a.default,{accessToken:e,token:i,userRole:l,userID:r,allTeams:c||[],premiumUser:s})}])},601236,e=>{e.v(e=>Promise.resolve().then(()=>e(764205)))}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/8a6de9a16d49b44f.js b/litellm/proxy/_experimental/out/_next/static/chunks/be2cb00f03cf83ec.js similarity index 53% rename from litellm/proxy/_experimental/out/_next/static/chunks/8a6de9a16d49b44f.js rename to litellm/proxy/_experimental/out/_next/static/chunks/be2cb00f03cf83ec.js index 004fd5ec5d4..2bd86832748 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/8a6de9a16d49b44f.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/be2cb00f03cf83ec.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,289793,952840,617885,286718,23371,487147,498610,785952,193523,260573,e=>{"use strict";var t=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(708347),l=e.i(135214);let i=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&r.all_admin_roles.includes(a||"")})}],289793);let n=(0,a.createQueryKeys)("customers");e.s(["useCustomers",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.allEndUsersCall)(e),enabled:!!e&&r.all_admin_roles.includes(a)})}],952840);var o=e.i(621482);let c=(0,a.createQueryKeys)("infiniteUsers"),d=50;e.s(["useInfiniteUsers",0,(e=d,s)=>{let{accessToken:a,userRole:i}=(0,l.default)();return(0,o.useInfiniteQuery)({queryKey:c.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:r})=>await (0,t.userListCall)(a,null,r,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.pagee&&t&&t.length?(0,u.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,u.jsx)("p",{className:"text-tremor-content-strong",children:s}),t.map(e=>{let t=e.dataKey?.toString();if(!t||!e.payload)return null;let s=((e,t)=>{let s=t.substring(t.indexOf(".")+1);if(e.metrics&&s in e.metrics)return e.metrics[s]})(e.payload,t),a=t.includes("spend"),r=void 0!==s?a?`$${s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:s.toLocaleString():"N/A",l=b[e.color]||e.color;return(0,u.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:l}}),(0,u.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:t.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]}),(0,u.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:r})]},t)})]}):null,v=({categories:e,colors:t})=>(0,u.jsx)("div",{className:"flex items-center justify-end space-x-4",children:e.map((e,s)=>{let a=b[t[s]]||t[s];return(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:a}}),(0,u.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]},e)})});e.s(["CustomLegend",0,v,"CustomTooltip",0,k],286718);var N=e.i(291542),T=e.i(271645);let C=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,u.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,u.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],w=({topModels:e})=>{let[t,s]=(0,T.useState)("table");return 0===e.length?null:(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,u.jsx)(_.Title,{children:"Model Usage"}),(0,u.jsxs)("div",{className:"flex space-x-2",children:[(0,u.jsx)("button",{onClick:()=>s("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table"}),(0,u.jsx)("button",{onClick:()=>s("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart"})]})]}),"chart"===t?(0,u.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,u.jsx)(p.BarChart,{style:{height:40*e.length},data:e.map(e=>({key:e.model,spend:e.spend})),index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,u.jsx)(N.Table,{columns:C,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})]})};function q(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function S(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}e.s(["valueFormatter",()=>q,"valueFormatterSpend",()=>S],23371);let L=({modelName:e,metrics:t,hidePromptCachingMetrics:s=!1})=>(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:t.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:t.total_tokens.toLocaleString()}),(0,u.jsxs)(j.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend,2)]}),(0,u.jsxs)(j.Text,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsx)(_.Title,{children:"Top Virtual Keys by Spend"}),(0,u.jsx)("div",{className:"mt-3",children:(0,u.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,u.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,u.jsxs)("div",{className:"text-right",children:[(0,u.jsxs)(j.Text,{className:"font-medium",children:["$",(0,m.formatNumberWithCommas)(e.spend,2)]}),(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:[e.requests.toLocaleString()," requests | ",e.tokens.toLocaleString()," tokens"]})]})]},e.api_key))})})]}),t.top_models&&t.top_models.length>0&&(0,u.jsx)(w,{topModels:t.top_models}),(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Spend per day"}),(0,u.jsx)(v,{categories:["metrics.spend"],colors:["green"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:q,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Requests per day"}),(0,u.jsx)(v,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:q,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Success vs Failed Requests"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:q,customTooltip:k,showLegend:!1})]}),!s&&(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Prompt Caching Metrics"}),(0,u.jsx)(v,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)(j.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,u.jsxs)(j.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"],valueFormatter:q,customTooltip:k,showLegend:!1})]})]})]});e.s(["ActivityMetrics",0,({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let s=Object.keys(e).sort((t,s)=>""===t?1:""===s?-1:e[s].total_spend-e[t].total_spend),a={total_requests:0,total_successful_requests:0,total_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,daily_data:{}};Object.values(e).forEach(e=>{a.total_requests+=e.total_requests,a.total_successful_requests+=e.total_successful_requests,a.total_tokens+=e.total_tokens,a.total_spend+=e.total_spend,a.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,a.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{a.daily_data[e.date]||(a.daily_data[e.date]={prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,spend:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0}),a.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,a.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,a.daily_data[e.date].total_tokens+=e.metrics.total_tokens,a.daily_data[e.date].api_requests+=e.metrics.api_requests,a.daily_data[e.date].spend+=e.metrics.spend,a.daily_data[e.date].successful_requests+=e.metrics.successful_requests,a.daily_data[e.date].failed_requests+=e.metrics.failed_requests,a.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,a.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(a.daily_data).map(([e,t])=>({date:e,metrics:t})).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,u.jsx)(_.Title,{children:"Overall Usage"}),(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:a.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:a.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:a.total_tokens.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(a.total_spend,2)]})]})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens Over Time"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:q,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Requests Over Time"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:k,showLegend:!1})]})]})]}),(0,u.jsx)(y.Collapse,{defaultActiveKey:s[0],children:s.map(s=>(0,u.jsx)(y.Collapse.Panel,{header:(0,u.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,u.jsx)(_.Title,{children:e[s].label||"Unknown Item"}),(0,u.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,u.jsxs)("span",{children:["$",(0,m.formatNumberWithCommas)(e[s].total_spend,2)]}),(0,u.jsxs)("span",{children:[e[s].total_requests.toLocaleString()," requests"]})]})]}),children:(0,u.jsx)(L,{modelName:s||"Unknown Model",metrics:e[s],hidePromptCachingMetrics:t})},s))})]})},"processActivityData",0,(e,t,s=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[t]||{}).forEach(([r,l])=>{a[r]||(a[r]={label:"api_keys"===t?((e,t,s)=>{let a=e.metadata.key_alias||`key-hash-${t}`,r=e.metadata.team_id;if(r){let e=(0,x.resolveTeamAliasFromTeamID)(r,s);return e?`${a} (team: ${e})`:`${a} (team_id: ${r})`}return a})(l,r,s):"entities"===t&&(l.metadata?.agent_name||l.metadata?.team_alias)||r,total_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0,prompt_tokens:0,completion_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,top_api_keys:[],top_models:[],daily_data:[]}),a[r].total_requests+=l.metrics.api_requests,a[r].prompt_tokens+=l.metrics.prompt_tokens,a[r].completion_tokens+=l.metrics.completion_tokens,a[r].total_tokens+=l.metrics.total_tokens,a[r].total_spend+=l.metrics.spend,a[r].total_successful_requests+=l.metrics.successful_requests,a[r].total_failed_requests+=l.metrics.failed_requests,a[r].total_cache_read_input_tokens+=l.metrics.cache_read_input_tokens||0,a[r].total_cache_creation_input_tokens+=l.metrics.cache_creation_input_tokens||0,a[r].daily_data.push({date:e.date,metrics:{prompt_tokens:l.metrics.prompt_tokens,completion_tokens:l.metrics.completion_tokens,total_tokens:l.metrics.total_tokens,api_requests:l.metrics.api_requests,spend:l.metrics.spend,successful_requests:l.metrics.successful_requests,failed_requests:l.metrics.failed_requests,cache_read_input_tokens:l.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:l.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==t&&Object.entries(a).forEach(([s,r])=>{let l={};e.results.forEach(e=>{let a=e.breakdown[t]?.[s];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,t])=>{l[e]||(l[e]={api_key:e,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),l[e].spend+=t.metrics.spend,l[e].requests+=t.metrics.api_requests,l[e].tokens+=t.metrics.total_tokens})}),a[s].top_api_keys=Object.values(l).sort((e,t)=>t.spend-e.spend).slice(0,5)}),"api_keys"===t&&Object.entries(a).forEach(([t,s])=>{let r={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,s])=>{if(s&&"api_key_breakdown"in s){let a=s.api_key_breakdown?.[t];a&&(r[e]||(r[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),r[e].spend+=a.metrics.spend,r[e].requests+=a.metrics.api_requests,r[e].successful_requests+=a.metrics.successful_requests||0,r[e].failed_requests+=a.metrics.failed_requests||0,r[e].tokens+=a.metrics.total_tokens)}})}),a[t].top_models=Object.values(r).sort((e,t)=>t.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())}),a}],487147);var D=e.i(994388),A=e.i(366283),M=e.i(779241),E=e.i(212931),O=e.i(808613),F=e.i(482725),$=e.i(199133),U=e.i(727749);e.s(["default",0,({isOpen:e,onClose:s,accessToken:a})=>{let[r]=O.Form.useForm(),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(null),[c,d]=(0,T.useState)(!1),[m,x]=(0,T.useState)("cloudzero"),[h,p]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e&&a&&g()},[e,a]);let g=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let t=await e.json();o(t),r.setFieldsValue({connection_id:t.connection_id})}else if(404!==e.status){let t=await e.json();U.default.fromBackend(`Failed to load existing settings: ${t.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),U.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},f=async e=>{if(!a)return void U.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",r=n?"PUT":"POST",l={...e,timezone:"UTC"},i=await fetch(s,{method:r,headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await i.json();if(i.ok)return U.default.success(c.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return U.default.fromBackend(c.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),U.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},_=async()=>{if(!a)return void U.default.fromBackend("No access token available");p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),r=await e.json();e.ok?(U.default.success(r.message||"Export to CloudZero completed successfully"),s()):U.default.fromBackend(r.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),U.default.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},y=async()=>{p(!0);try{U.default.info("CSV export functionality coming soon!"),s()}catch(e){console.error("Error exporting CSV:",e),U.default.fromBackend("Failed to export CSV")}finally{p(!1)}},b=async()=>{if("cloudzero"===m){if(!n){let e=await r.validateFields();if(!await f(e))return}await _()}else await y()},k=()=>{r.resetFields(),x("cloudzero"),o(null),s()},v=[{value:"cloudzero",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,u.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,u.jsx)("span",{children:"Export to CSV"})]})}];return(0,u.jsx)(E.Modal,{title:"Export Data",open:e,onCancel:k,footer:null,width:600,destroyOnHidden:!0,children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,u.jsx)($.Select,{value:m,onChange:x,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,u.jsx)("div",{children:c?(0,u.jsx)("div",{className:"flex justify-center py-8",children:(0,u.jsx)(F.Spin,{size:"large"})}):(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(A.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),color:"green",className:"mb-4",children:(0,u.jsxs)(j.Text,{children:["API Key: ",n.api_key_masked,(0,u.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,u.jsxs)(O.Form,{form:r,layout:"vertical",children:[(0,u.jsx)(O.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,u.jsx)(M.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,u.jsx)(O.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,u.jsx)(M.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,u.jsx)(A.Callout,{title:"CSV Export",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,u.jsx)(j.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,u.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,u.jsx)(D.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,u.jsx)(D.Button,{onClick:b,loading:l||h,disabled:l||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})}],498610);var P=e.i(785242),R=e.i(464571),V=e.i(981339);let z=({value:e,onChange:t})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,u.jsx)($.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),I=({dateRange:e,selectedFilters:t})=>(0,u.jsxs)("div",{className:"text-sm text-gray-500",children:[e.from?.toLocaleDateString()," - ",e.to?.toLocaleDateString(),t.length>0&&` \xb7 ${t.length} filter${t.length>1?"s":""}`]});var B=e.i(91739);let W=({value:e,onChange:t,entityType:s})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,u.jsx)(B.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s," and key"]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s,", split by API key"]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",s," and model"]}),(0,u.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var K=e.i(59935);let Y=e=>{if(!e)return null;for(let t of Object.values(e)){let e=t?.metadata?.team_id;if(e)return e}return null},H=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],G=e=>{let t=e.entities;return t&&Object.keys(t).length>0?t:(e=>{let t=e.api_keys;if(!t||0===Object.keys(t).length)return{};let s={};for(let[e,a]of Object.entries(t)){let t=a?.metadata?.team_id||"Unassigned";s[t]||(s[t]={metrics:Object.fromEntries(H.map(e=>[e,0])),api_key_breakdown:{}});let r=s[t].metrics,l=a?.metrics||{};for(let e of H)r[e]+=l[e]||0;s[t].api_key_breakdown[e]=a}return s})(e)},Z=(e,t,s,a={})=>{switch(t){case"daily":default:return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([r,l])=>{let i=Y(l.api_key_breakdown),n=i&&s[i]||null;a.push({Date:e.date,[t]:n||"-",[`${t} ID`]:i||"-","Spend ($)":(0,m.formatNumberWithCommas)(l.metrics.spend,4),Requests:l.metrics.api_requests,"Successful Requests":l.metrics.successful_requests,"Failed Requests":l.metrics.failed_requests,"Total Tokens":l.metrics.total_tokens,"Prompt Tokens":l.metrics.prompt_tokens||0,"Completion Tokens":l.metrics.completion_tokens||0})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_keys":return((e,t,s={})=>{let a={};return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([t,r])=>{Object.entries(r.api_key_breakdown||{}).forEach(([r,l])=>{let i=l?.metadata?.key_alias||null,n=l?.metadata?.team_id||t,o=n&&s[n]||null,c=`${e.date}_${n}_${r}`;a[c]?(a[c].metrics.spend+=l.metrics?.spend||0,a[c].metrics.api_requests+=l.metrics?.api_requests||0,a[c].metrics.successful_requests+=l.metrics?.successful_requests||0,a[c].metrics.failed_requests+=l.metrics?.failed_requests||0,a[c].metrics.total_tokens+=l.metrics?.total_tokens||0,a[c].metrics.prompt_tokens+=l.metrics?.prompt_tokens||0,a[c].metrics.completion_tokens+=l.metrics?.completion_tokens||0):a[c]={Date:e.date,teamId:n,teamAlias:o,keyId:r,keyAlias:i,metrics:{spend:l.metrics?.spend||0,api_requests:l.metrics?.api_requests||0,successful_requests:l.metrics?.successful_requests||0,failed_requests:l.metrics?.failed_requests||0,total_tokens:l.metrics?.total_tokens||0,prompt_tokens:l.metrics?.prompt_tokens||0,completion_tokens:l.metrics?.completion_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[t]:e.teamAlias||"-",[`${t} ID`]:e.teamId||"-","Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,m.formatNumberWithCommas)(e.metrics.spend,4),Requests:e.metrics.api_requests,"Successful Requests":e.metrics.successful_requests,"Failed Requests":e.metrics.failed_requests,"Total Tokens":e.metrics.total_tokens,"Prompt Tokens":e.metrics.prompt_tokens,"Completion Tokens":e.metrics.completion_tokens})).sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_models":return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{let r={};Object.entries(G(e.breakdown)).forEach(([t,s])=>{r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{Object.entries(s.api_key_breakdown||{}).forEach(([s,a])=>{r[t][e]||(r[t][e]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][e].spend+=a.metrics.spend||0,r[t][e].requests+=a.metrics.api_requests||0,r[t][e].successful+=a.metrics.successful_requests||0,r[t][e].failed+=a.metrics.failed_requests||0,r[t][e].tokens+=a.metrics.total_tokens||0})})}),Object.entries(r).forEach(([r,l])=>{let i=G(e.breakdown)[r],n=Y(i?.api_key_breakdown),o=n&&s[n]||null;Object.entries(l).forEach(([s,r])=>{a.push({Date:e.date,[t]:o||"-",[`${t} ID`]:n||"-",Model:s,"Spend ($)":(0,m.formatNumberWithCommas)(r.spend,4),Requests:r.requests,Successful:r.successful,Failed:r.failed,"Total Tokens":r.tokens})})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a)}},J=({isOpen:e,onClose:t,entityType:s,spendData:a,dateRange:r,selectedFilters:l,customTitle:i})=>{let[n,o]=(0,T.useState)("csv"),[c,d]=(0,T.useState)("daily"),[m,h]=(0,T.useState)(!1),{data:p,isLoading:g}=(0,P.useTeams)(),f=s.charAt(0).toUpperCase()+s.slice(1),j=i||`Export ${f} Usage`,_=(0,T.useMemo)(()=>(0,x.createTeamAliasMap)(p),[p]),y=async e=>{let i=e||n;h(!0);try{"csv"===i?(((e,t,s,a,r={})=>{let l=Z(e,t,s,r),i=new Blob([K.default.unparse(l)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)})(a,c,f,s,_),U.default.success(`${f} usage data exported successfully as CSV`)):(((e,t,s,a,r,l,i={})=>{let n=Z(e,t,s,i),o={export_date:new Date().toISOString(),entity_type:a,date_range:{from:r.from?.toISOString(),to:r.to?.toISOString()},filters_applied:l.length>0?l:"None",export_scope:t,summary:{total_spend:e.metadata.total_spend,total_requests:e.metadata.total_api_requests,successful_requests:e.metadata.total_successful_requests,failed_requests:e.metadata.total_failed_requests,total_tokens:e.metadata.total_tokens}},c=new Blob([JSON.stringify({metadata:o,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)})(a,c,f,s,r,l,_),U.default.success(`${f} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),U.default.fromBackend("Failed to export data")}finally{h(!1)}};return(0,u.jsx)(E.Modal,{title:(0,u.jsx)("span",{className:"text-base font-semibold",children:j}),open:e,onCancel:t,footer:null,width:480,children:(0,u.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,u.jsx)(V.Skeleton,{active:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(I,{dateRange:r,selectedFilters:l}),(0,u.jsx)(W,{value:c,onChange:d,entityType:s}),(0,u.jsx)(z,{value:n,onChange:o})]}),g?(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(V.Skeleton.Button,{active:!0}),(0,u.jsx)(V.Skeleton.Button,{active:!0})]}):(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(R.Button,{variant:"outlined",onClick:t,disabled:m,children:"Cancel"}),(0,u.jsx)(R.Button,{onClick:()=>y(),loading:m||g,disabled:m||g,type:"primary",children:m?"Exporting...":`Export ${n.toUpperCase()}`})]})]})})};e.s(["default",0,J],785952),e.s(["default",0,({dateValue:e,entityType:t,spendData:s,showFilters:a=!1,filterLabel:r,filterPlaceholder:l,selectedFilters:i=[],onFiltersChange:n,filterOptions:o=[],filterMode:c="multiple",customTitle:d,compactLayout:m=!1,teams:x=[]})=>{let[h,p]=(0,T.useState)(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mb-4",children:(0,u.jsxs)("div",{className:`grid ${a&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[a&&o.length>0&&(0,u.jsxs)("div",{children:[r&&(0,u.jsx)(j.Text,{className:"mb-2",children:r}),(0,u.jsx)($.Select,{mode:"single"===c?void 0:"multiple",style:{width:"100%"},placeholder:l,value:"single"===c?i[0]??void 0:i,onChange:e=>{"single"===c?n?.(e?[e]:[]):n?.(e)},options:o,allowClear:!0})]}),(0,u.jsx)("div",{className:"justify-self-end",children:(0,u.jsx)(D.Button,{onClick:()=>p(!0),icon:()=>(0,u.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})})]})}),(0,u.jsx)(J,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:s,dateRange:e,selectedFilters:i,customTitle:d,teams:x})]})}],193523),e.s([],260573)},973706,e=>{"use strict";var t=e.i(843476),s=e.i(72713),a=e.i(637235),r=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:c,label:d="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(e),[g,f]=(0,n.useState)(null),[j,_]=(0,n.useState)(""),[y,b]=(0,n.useState)(""),k=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let s=t.getValue(),a=(0,i.default)(e.from).isSame((0,i.default)(s.from),"day"),r=(0,i.default)(e.to).isSame((0,i.default)(s.to),"day");if(a&&r)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{f(v(e))},[e,v]);let N=(0,n.useCallback)(()=>{if(!j||!y)return{isValid:!0,error:""};let e=(0,i.default)(j,"YYYY-MM-DD"),t=(0,i.default)(y,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[j,y])();(0,n.useEffect)(()=>{e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let T=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let s=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${s(e)} - ${s(t)}`},[]),C=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let s={...e},a=new Date(e.from);return t=new Date(e.to?e.to:e.from),a.toDateString()===t.toDateString(),a.setHours(0,0,0,0),t.setHours(23,59,59,999),s.from=a,s.to=t,s},[]),w=(0,n.useCallback)(()=>{try{if(j&&y&&N.isValid){let e=(0,i.default)(j,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let s={from:e.toDate(),to:t.toDate()};p(s);let a=v(s);f(a)}}}catch(e){console.warn("Invalid date format:",e)}},[j,y,N.isValid,v]);return(0,n.useEffect)(()=>{w()},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:d}),(0,t.jsxs)("div",{className:"relative",ref:k,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>x(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:T(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-[9999] min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:o.map(e=>{let s=g===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:s}=e.getValue();p({from:t,to:s}),f(e.shortLabel),_((0,i.default)(t).format("YYYY-MM-DD")),b((0,i.default)(s).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${s?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${s?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:j,onChange:e=>_(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:y,onChange:e=>b(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!N.isValid&&N.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:N.error})]})}),h.from&&h.to&&N.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,i.default)(h.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,i.default)(h.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),f(v(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:()=>{h.from&&h.to&&N.isValid&&(c(h),requestIdleCallback(()=>{c(C(h))},{timeout:100}),x(!1))},disabled:!h.from||!h.to||!N.isValid,children:"Apply"})]})})]})]})})]})]})}])},797305,497650,e=>{"use strict";var t=e.i(843476),s=e.i(755151),a=e.i(872934),r=e.i(827252),l=e.i(56456),i=e.i(240647),n=e.i(152473),o=e.i(584935),c=e.i(304967),d=e.i(309426),u=e.i(350967),m=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),f=e.i(599724),j=e.i(629569),_=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),N=e.i(898586),T=e.i(271645),C=e.i(289793),w=e.i(952840),q=e.i(135214),S=e.i(738014),L=e.i(617885),D=e.i(500330),A=e.i(708347),M=e.i(487147),E=e.i(498610);e.i(260573);var O=e.i(785952),F=e.i(764205),$=e.i(973706),U=e.i(571303);let P=({isDateChanging:e=!1})=>(0,t.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)(U.UiLoadingSpinner,{className:"size-5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,t.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var R=e.i(290571),V=e.i(95779),z=e.i(444755),I=e.i(673706);let B=T.default.forwardRef((e,t)=>{let{color:s,children:a,className:r}=e,l=(0,R.__rest)(e,["color","children","className"]);return T.default.createElement("p",Object.assign({ref:t,className:(0,z.tremorTwMerge)("font-semibold text-tremor-metric",s?(0,I.getColorClassNames)(s,V.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",r)},l),a)});B.displayName="Metric";var W=e.i(37091),K=e.i(269200),Y=e.i(427612),H=e.i(496020),G=e.i(64848),Z=e.i(942232),J=e.i(977572),Q=e.i(994388);let X=({accessToken:e,selectedTags:s,formatAbbreviatedNumber:a})=>{let r,l,i,n,[c,d]=(0,T.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[u,_]=(0,T.useState)(!1),[y,b]=(0,T.useState)(1),k=async()=>{if(e){_(!0);try{let t=await (0,F.perUserAnalyticsCall)(e,y,50,s.length>0?s:void 0);d(t)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{_(!1)}}};return(0,T.useEffect)(()=>{k()},[e,s,y]),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"Per User Usage"}),(0,t.jsx)(W.Subtitle,{children:"Individual developer usage metrics"}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"User Details"}),(0,t.jsx)(m.Tab,{children:"Usage Distribution"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"User ID"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Email"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Agent"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,t.jsx)(Z.TableBody,{children:c.results.slice(0,10).map((e,s)=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{className:"font-medium",children:e.user_id})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_email||"N/A"})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_agent||"Unknown"})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.successful_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.total_tokens)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.failed_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsxs)(f.Text,{children:["$",a(e.spend,4)]})})]},s))})]}),c.results.length>10&&(0,t.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,t.jsxs)(f.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y>1&&b(y-1)},disabled:1===y,children:"Previous"}),(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y=c.total_pages,children:"Next"})]})]})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,t.jsx)(W.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,t.jsx)(o.BarChart,{data:(r=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";r.set(t,(r.get(t)||0)+1)}),l=Array.from(r.entries()).sort(([,e],[,t])=>t-e).slice(0,8).map(([e])=>e),i={"1-9 requests":{range:[1,9],agents:{}},"10-99 requests":{range:[10,99],agents:{}},"100-999 requests":{range:[100,999],agents:{}},"1K-9.9K requests":{range:[1e3,9999],agents:{}},"10K-99.9K requests":{range:[1e4,99999],agents:{}},"100K+ requests":{range:[1e5,1/0],agents:{}}},c.results.forEach(e=>{let t=e.successful_requests,s=e.user_agent||"Unknown";l.includes(s)&&Object.entries(i).forEach(([e,a])=>{t>=a.range[0]&&t<=a.range[1]&&(a.agents[s]||(a.agents[s]=0),a.agents[s]++)})}),Object.entries(i).map(([e,t])=>{let s={category:e};return l.forEach(e=>{s[e]=t.agents[e]||0}),s})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";n.set(t,(n.get(t)||0)+1)}),Array.from(n.entries()).sort(([,e],[,t])=>t-e).slice(0,8).map(([e])=>e)),colors:["blue","green","orange","red","purple","yellow","pink","indigo"],valueFormatter:e=>`${e} users`,yAxisWidth:80,showLegend:!0,stack:!0})]})]})]})]})},ee=({accessToken:e,userRole:s,dateValue:a,onDateChange:r})=>{let[l,i]=(0,T.useState)({results:[]}),[n,d]=(0,T.useState)({results:[]}),[_,y]=(0,T.useState)({results:[]}),[b,N]=(0,T.useState)({results:[]}),[C,w]=(0,T.useState)(""),[q,S]=(0,T.useState)([]),[L,D]=(0,T.useState)([]),[A,M]=(0,T.useState)(!1),[E,O]=(0,T.useState)(!1),[$,U]=(0,T.useState)(!1),[R,V]=(0,T.useState)(!1),[z,I]=(0,T.useState)(!1),K=new Date,Y=async()=>{if(e){M(!0);try{let t=await (0,F.tagDistinctCall)(e);S(t.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{M(!1)}}},H=async()=>{if(e){O(!0);try{let t=await (0,F.tagDauCall)(e,K,C||void 0,L.length>0?L:void 0);i(t)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{O(!1)}}},G=async()=>{if(e){U(!0);try{let t=await (0,F.tagWauCall)(e,K,C||void 0,L.length>0?L:void 0);d(t)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{U(!1)}}},Z=async()=>{if(e){V(!0);try{let t=await (0,F.tagMauCall)(e,K,C||void 0,L.length>0?L:void 0);y(t)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},J=async()=>{if(e&&a.from&&a.to){I(!0);try{let t=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);N(t)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{I(!1)}}};(0,T.useEffect)(()=>{Y()},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{H(),G(),Z()},50);return()=>clearTimeout(t)},[e,C,L]),(0,T.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{J()},50);return()=>clearTimeout(e)},[e,a,L]);let Q=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,ee=e=>Object.entries(e.reduce((e,t)=>(e[t.tag]=(e[t.tag]||0)+t.active_users,e),{})).sort(([,e],[,t])=>t-e).map(([e])=>e),et=ee(l.results).slice(0,10),es=ee(n.results).slice(0,10),ea=ee(_.results).slice(0,10),er=(()=>{let e=[],t=new Date;for(let s=6;s>=0;s--){let a=new Date(t);a.setDate(a.getDate()-s);let r={date:a.toISOString().split("T")[0]};et.forEach(e=>{r[Q(e)]=0}),e.push(r)}return l.results.forEach(t=>{let s=Q(t.tag),a=e.find(e=>e.date===t.date);a&&(a[s]=t.active_users)}),e})(),el=(()=>{let e=[];for(let t=1;t<=7;t++){let s={week:`Week ${t}`};es.forEach(e=>{s[Q(e)]=0}),e.push(s)}return n.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Week (\d+)/);if(a){let r=`Week ${a[1]}`,l=e.find(e=>e.week===r);l&&(l[s]=t.active_users)}}),e})(),ei=(()=>{let e=[];for(let t=1;t<=7;t++){let s={month:`Month ${t}`};ea.forEach(e=>{s[Q(e)]=0}),e.push(s)}return _.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Month (\d+)/);if(a){let r=`Month ${a[1]}`,l=e.find(e=>e.month===r);l&&(l[s]=t.active_users)}}),e})(),en=(e,t=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(t)+"M";if(e>=1e6)return(e/1e6).toFixed(t)+"M";if(e>=1e4)return(e/1e3).toFixed(t)+"K";if(e>=1e3)return(e/1e3).toFixed(t)+"K";else return e.toFixed(t)};return(0,t.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:"Summary by User Agent"}),(0,t.jsx)(W.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,t.jsxs)("div",{className:"w-96",children:[(0,t.jsx)(f.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:A,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:q.map(e=>{let s=Q(e),a=s.length>50?`${s.substring(0,50)}...`:s;return(0,t.jsx)(k.Select.Option,{value:e,label:a,title:s,children:a},e)})})]})]}),z?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4",children:[(b.results||[]).slice(0,4).map((e,s)=>{let a=Q(e.tag),r=a.length>15?a.substring(0,15)+"...":a;return(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,t.jsx)(j.Title,{className:"truncate",children:r})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(B,{className:"text-lg",children:en(e.successful_requests)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(B,{className:"text-lg",children:en(e.total_tokens)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsxs)(B,{className:"text-lg",children:["$",en(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(b.results||[]).length)}).map((e,s)=>(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"No Data"}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]})]})]},`empty-${s}`))]})]})}),(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU/WAU/MAU"}),(0,t.jsx)(m.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,t.jsx)(W.Subtitle,{children:"Active users across different time periods"})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU"}),(0,t.jsx)(m.Tab,{children:"WAU"}),(0,t.jsx)(m.Tab,{children:"MAU"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),E?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:er,index:"date",categories:et.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),$?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:el,index:"week",categories:es.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),R?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:ei,index:"month",categories:ea.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(X,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:en})})]})]})})]})};var et=e.i(617802);let es=["total_spend","total_prompt_tokens","total_completion_tokens","total_tokens","total_api_requests","total_successful_requests","total_failed_requests","total_cache_read_input_tokens","total_cache_creation_input_tokens"],ea={results:[],metadata:{total_spend:0,total_prompt_tokens:0,total_completion_tokens:0,total_tokens:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,total_pages:1,has_more:!1,page:1}};function er({fetchFn:e,args:t,enabled:s}){let[a,r]=(0,T.useState)(ea),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),[c,d]=(0,T.useState)({currentPage:0,totalPages:0}),[u,m]=(0,T.useState)(!1),x=(0,T.useRef)(0),h=(0,T.useRef)(!1),p=(0,T.useRef)(null),g=(0,T.useRef)(t);g.current=t;let f=JSON.stringify(t),j=(0,T.useCallback)(()=>{h.current=!0,m(!0),o(!1),null!==p.current&&(clearTimeout(p.current),p.current=null)},[]);return(0,T.useEffect)(()=>{if(!s){r(ea),i(!1),o(!1),d({currentPage:0,totalPages:0}),m(!1);return}let t=++x.current;h.current=!1,m(!1);let a=()=>x.current!==t||h.current,l=e=>new Promise(t=>{p.current=setTimeout(()=>{p.current=null,t()},e)});return(async()=>{let t=g.current;i(!0),o(!1),d({currentPage:1,totalPages:1});try{let s=[...t.slice(0,3),1,...t.slice(3)],n=await e(...s);if(a())return;r(n);let c=n.metadata?.total_pages||1;if(d({currentPage:1,totalPages:c}),c<=1)return void i(!1);i(!1),o(!0);let u=[...n.results],m={...n.metadata};for(let s=2;s<=c;s++){if(a()||(await l(300),a()))return;let i=[...t.slice(0,3),s,...t.slice(3)],n=await e(...i);if(a())return;u=[...u,...n.results],(m=function(e,t){let s={...e};for(let a of es)s[a]=(e[a]||0)+(t[a]||0);return s}(m,n.metadata)).total_pages=c,m.has_more=s{x.current++,null!==p.current&&(clearTimeout(p.current),p.current=null)}},[s,e,f]),{data:a,loading:l,isFetchingMore:n,progress:c,cancelled:u,cancel:j}}var el=e.i(23371),ei=e.i(286718);let en=({endpointData:e})=>{let s=e||{},a=T.default.useMemo(()=>Object.entries(s).map(([e,t])=>({endpoint:e,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}})),[s]);return(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(j.Title,{children:"Success vs Failed Requests by Endpoint"}),(0,t.jsx)(ei.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,t.jsx)(o.BarChart,{className:"mt-4",data:a,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:ei.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})]})};var eo=e.i(731195),ec=e.i(883966),ed=e.i(555706),eu=e.i(785183),em=e.i(93230),ex=e.i(844171),eh=(0,ec.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:ed.Line,axisComponents:[{axisType:"xAxis",AxisComp:eu.XAxis},{axisType:"yAxis",AxisComp:em.YAxis}],formatAxisMap:ex.formatAxisMap}),ep=e.i(872526),eg=e.i(800494),ef=e.i(234239),ej=e.i(559559),e_=e.i(238279),ey=e.i(114887),eb=e.i(933303),ek=e.i(628781),ev=e.i(472007),eN=e.i(480731);let eT=T.default.forwardRef((e,t)=>{let{data:s=[],categories:a=[],index:r,colors:l=V.themeColorRange,valueFormatter:i=I.defaultValueFormatter,startEndOnly:n=!1,showXAxis:o=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:u="equidistantPreserveStart",animationDuration:m=900,showAnimation:x=!1,showTooltip:h=!0,showLegend:p=!0,showGridLines:g=!0,autoMinValue:f=!1,curveType:j="linear",minValue:_,maxValue:y,connectNulls:b=!1,allowDecimals:k=!0,noDataText:v,className:N,onValueChange:C,enableLegendSlider:w=!1,customTooltip:q,rotateLabelX:S,padding:L=o||c?{left:20,right:20}:{left:0,right:0},tickGap:D=5,xAxisLabel:A,yAxisLabel:M}=e,E=(0,R.__rest)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[O,F]=(0,T.useState)(60),[$,U]=(0,T.useState)(void 0),[P,B]=(0,T.useState)(void 0),W=(0,ev.constructCategoryColors)(a,l),K=(0,ev.getYAxisDomain)(f,_,y),Y=!!C;function H(e){Y&&(e===P&&!$||(0,ev.hasOnlyOneValueForThisKey)(s,e)&&$&&$.dataKey===e?(B(void 0),null==C||C(null)):(B(e),null==C||C({eventType:"category",categoryClicked:e})),U(void 0))}return T.default.createElement("div",Object.assign({ref:t,className:(0,z.tremorTwMerge)("w-full h-80",N)},E),T.default.createElement(eo.ResponsiveContainer,{className:"h-full w-full"},(null==s?void 0:s.length)?T.default.createElement(eh,{data:s,onClick:Y&&(P||$)?()=>{U(void 0),B(void 0),null==C||C(null)}:void 0,margin:{bottom:A?30:void 0,left:M?20:void 0,right:M?5:void 0,top:5}},g?T.default.createElement(ep.CartesianGrid,{className:(0,z.tremorTwMerge)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,T.default.createElement(eu.XAxis,{padding:L,hide:!o,dataKey:r,interval:n?"preserveStartEnd":u,tick:{transform:"translate(0, 6)"},ticks:n?[s[0][r],s[s.length-1][r]]:void 0,fill:"",stroke:"",className:(0,z.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:D,angle:null==S?void 0:S.angle,dy:null==S?void 0:S.verticalShift,height:null==S?void 0:S.xAxisHeight},A&&T.default.createElement(eg.Label,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},A)),T.default.createElement(em.YAxis,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:K,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,z.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:i,allowDecimals:k},M&&T.default.createElement(eg.Label,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},M)),T.default.createElement(ef.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:h?({active:e,payload:t,label:s})=>q?T.default.createElement(q,{payload:null==t?void 0:t.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!=(t=W.get(e.dataKey))?t:eN.BaseColors.Gray})}),active:e,label:s}):T.default.createElement(eb.default,{active:e,payload:t,label:s,valueFormatter:i,categoryColors:W}):T.default.createElement(T.default.Fragment,null),position:{y:0}}),p?T.default.createElement(ej.Legend,{verticalAlign:"top",height:O,content:({payload:e})=>(0,ey.default)({payload:e},W,F,P,Y?e=>H(e):void 0,w)}):null,a.map(e=>{var t;return T.default.createElement(ed.Line,{className:(0,z.tremorTwMerge)((0,I.getColorClassNames)(null!=(t=W.get(e))?t:eN.BaseColors.Gray,V.colorPalette.text).strokeColor),strokeOpacity:$||P&&P!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,dataKey:c}=e;return T.default.createElement(e_.Dot,{className:(0,z.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,I.getColorClassNames)(null!=(t=W.get(c))?t:eN.BaseColors.Gray,V.colorPalette.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,onClick:(t,a)=>{a.stopPropagation(),Y&&(e.index===(null==$?void 0:$.index)&&e.dataKey===(null==$?void 0:$.dataKey)||(0,ev.hasOnlyOneValueForThisKey)(s,e.dataKey)&&P&&P===e.dataKey?(B(void 0),U(void 0),null==C||C(null)):(B(e.dataKey),U({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,cx:o,cy:c,dataKey:d,index:u}=t;return(0,ev.hasOnlyOneValueForThisKey)(s,e)&&!($||P&&P!==e)||(null==$?void 0:$.index)===u&&(null==$?void 0:$.dataKey)===e?T.default.createElement(e_.Dot,{key:u,cx:o,cy:c,r:5,stroke:r,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,className:(0,z.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,I.getColorClassNames)(null!=(a=W.get(d))?a:eN.BaseColors.Gray,V.colorPalette.text).fillColor)}):T.default.createElement(T.Fragment,{key:u})},key:e,name:e,type:j,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:x,animationDuration:m,connectNulls:b})}),C?a.map(e=>T.default.createElement(ed.Line,{className:(0,z.tremorTwMerge)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:j,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:b,onClick:(e,t)=>{t.stopPropagation();let{name:s}=e;H(s)}})):null):T.default.createElement(ek.default,{noDataText:v})))});eT.displayName="LineChart";let eC=function({dailyData:e,endpointData:s}){let a=(0,T.useMemo)(()=>{var t;let s,a;return e?.results&&0!==e.results.length?(t=e.results,s=[],a=new Set,t.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),t.forEach(e=>{let t={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(s=>{let a=e.breakdown.endpoints?.[s];t[s]=a?.metrics.api_requests||0}),s.push(t)}),s.reverse()):[]},[e]),r=(0,T.useMemo)(()=>0===a.length?[]:Object.keys(a[0]).filter(e=>"date"!==e),[a]);return(0,t.jsxs)(c.Card,{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)(j.Title,{children:"Endpoint Usage Trends"})}),(0,t.jsx)(eT,{className:"h-80",data:a,index:"date",categories:r,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,r.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})};var ew=e.i(291542),eq=e.i(309821);e.s(["Progress",()=>eq.default],497650);var eq=eq;let eS=({endpointData:e})=>{let s=Object.entries(e).map(([e,t])=>{var s,a;return{key:e,endpoint:e,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,api_requests:t.metrics.api_requests,total_tokens:t.metrics.total_tokens,spend:t.metrics.spend,successRate:(s=t.metrics.successful_requests,0===(a=t.metrics.api_requests)?0:s/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let a=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return a>0&&a<100&&(l[`${a}%`]="#22c55e",l[`${a+.01}%`]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)(eq.default,{percent:a+r,size:"small",strokeColor:l,showInfo:!1})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,t.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,t.jsx)("span",{className:"text-gray-400",children:"/"}),(0,t.jsx)("span",{className:"text-red-600 font-medium",children:s.failed_requests.toLocaleString()})]})]})}},{title:"Total Request",dataIndex:"api_requests",key:"api_requests",render:e=>e.toLocaleString()},{title:"Success Rate",dataIndex:"successRate",key:"successRate",render:e=>{let s=e.toFixed(2);return(0,t.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`}];return(0,t.jsx)(ew.Table,{columns:a,dataSource:s,pagination:!1})},eL=({userSpendData:e})=>{let s=(0,T.useMemo)(()=>{let t={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,s])=>{t[e]||(t[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:s.metadata||{},api_key_breakdown:{}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,t[e].metrics.completion_tokens+=s.metrics.completion_tokens,t[e].metrics.total_tokens+=s.metrics.total_tokens,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests||0,t[e].metrics.failed_requests+=s.metrics.failed_requests||0,t[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,t[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),t},[e]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eS,{endpointData:s}),(0,t.jsx)(en,{endpointData:s}),(0,t.jsx)(eC,{dailyData:e,endpointData:s})]})};var eD=e.i(214541),eA=e.i(413990),eM=e.i(193523),eM=eM,eE=e.i(916925),eO=e.i(1023),eF=e.i(149121);function e$({topModels:e,topModelsLimit:s,setTopModelsLimit:a}){let[r,l]=(0,T.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return`$${(0,D.formatNumberWithCommas)(t,2)}`}},{header:"Successful",accessorKey:"successful_requests",cell:e=>(0,t.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",cell:e=>(0,t.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:s,onChange:e=>a(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>l("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>l("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===r?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(o.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,s)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(eF.DataTable,{columns:i,data:n,renderSubComponent:()=>(0,t.jsx)(t.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}let eU={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},eP=({accessToken:e,entityType:s,entityId:r,entityList:i,dateValue:n})=>{let b,k,v,{teams:N}=(0,eD.default)(),[C,w]=(0,T.useState)([]),[q,S]=(0,T.useState)(5),[L,A]=(0,T.useState)(5),[E,O]=(0,T.useState)(5),$=(0,T.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),U=(0,T.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,T.useMemo)(()=>"user"===s?C.length>0?C[0]:null:C.length>0?C:null,[s,C]),R=eU[s],V=!!e&&!!$&&!!U,{data:z,isFetchingMore:I,progress:B,cancelled:Q,cancel:X}=er({fetchFn:R,args:[e,$,U,P],enabled:V}),{data:ee,isFetchingMore:et,progress:es,cancelled:ea,cancel:ei}=er({fetchFn:F.agentDailyActivityCall,args:[e,$,U,null],enabled:V&&"team"===s}),en=(0,M.processActivityData)(z,"models",N||[]),eo=(0,M.processActivityData)(z,"api_keys",N||[]),ec="team"===s?(0,M.processActivityData)(ee,"entities",N||[]):{},ed=()=>{let e={};return z.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=s.metrics.spend,e[t].requests+=s.metrics.api_requests,e[t].successful_requests+=s.metrics.successful_requests,e[t].failed_requests+=s.metrics.failed_requests,e[t].tokens+=s.metrics.total_tokens}catch(e){console.error(`Error processing provider ${t}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,t)=>t.spend-e.spend)},eu=(e,t)=>{if(i){let t=i.find(t=>t.value===e);if(t)return t.label}return t?.team_alias?t.team_alias:e},em=()=>{var e;let t={};return z.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{t[e]||(t[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{alias:eu(e,s.metadata),id:e}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests,t[e].metrics.failed_requests+=s.metrics.failed_requests,t[e].metrics.total_tokens+=s.metrics.total_tokens})}),e=Object.values(t).sort((e,t)=>t.metrics.spend-e.metrics.spend),0===C.length?e:e.filter(e=>C.includes(e.metadata.id))},ex=s.charAt(0).toUpperCase()+s.slice(1);return(0,t.jsxs)("div",{style:{width:"100%"},className:"relative",children:[I&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",B.currentPage," / ",B.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:X,children:"Stop"})]})}),Q&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",B.currentPage,"/",B.totalPages," pages loaded)"]})}),et&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching agent data: fetched ",es.currentPage," / ",es.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:ei,children:"Stop"})]})}),ea&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),(0,t.jsx)(eM.default,{dateValue:n,entityType:s,spendData:z,showFilters:null!==i&&i.length>0,filterLabel:`Filter by ${s}`,filterPlaceholder:`Select ${s} to filter...`,selectedFilters:C,onFiltersChange:w,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===s?"single":"multiple",teams:N||[]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"agent"===s?"Request / Token Consumption":"Model Activity"}),"team"===s?(0,t.jsx)(m.Tab,{children:"Agent Activity"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)(j.Title,{children:[ex," Spend Overview"]}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Spend"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)(z.metadata.total_spend,2)]})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:z.metadata.total_api_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:z.metadata.total_successful_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:z.metadata.total_failed_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:z.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),(0,t.jsx)(o.BarChart,{data:[...z.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload,r=Object.keys(a.breakdown.entities||{}).length;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total ",ex,"s: ",r]}),(0,t.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,t.jsxs)("p",{className:"font-semibold",children:["Spend by ",ex,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,t])=>{let s=e.metrics.spend;return t.metrics.spend-s}).slice(0,5).map(([e,s])=>(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:[eu(e,s.metadata),": $",(0,D.formatNumberWithCommas)(s.metrics.spend,2)]},e)),r>5&&(0,t.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",r-5," more"]})]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsxs)(j.Title,{children:["Spend Per ",ex]}),(0,t.jsx)(W.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,t.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,t.jsxs)("span",{children:["Get Started by Tracking cost per ",ex," "]}),(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/enterprise#spend-tracking",className:"text-blue-500 hover:text-blue-700 ml-1",children:"here"})]})]}),(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-6",children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(o.BarChart,{className:"mt-4 h-52",data:em().slice(0,5).map(e=>({...e,metadata:{...e.metadata,alias_display:e.metadata.alias&&e.metadata.alias.length>15?`${e.metadata.alias.slice(0,15)}...`:e.metadata.alias}})),index:"metadata.alias_display",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:ex}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:em().filter(e=>e.metrics.spend>0).map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:e.metadata.alias}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.metrics.spend,4)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eO.default,{topKeys:(console.log("debugTags",{spendData:z}),b={},z.results.forEach(e=>{let{breakdown:t}=e,{entities:s}=t;console.log("debugTags",{entities:s});let a=Object.keys(s).reduce((e,t)=>{let{api_key_breakdown:a}=s[t];return Object.keys(a).forEach(s=>{let r={tag:t,usage:a[s].metrics.spend};e[s]?e[s].push(r):e[s]=[r]}),e},{});console.log("debugTags",{tagDictionary:a}),Object.entries(e.breakdown.api_keys||{}).forEach(([e,t])=>{b[e]||(b[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:t.metadata.key_alias,team_id:t.metadata.team_id||null,tags:a[e]||[]}},console.log("debugTags",{keySpend:b})),b[e].metrics.spend+=t.metrics.spend,b[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,b[e].metrics.completion_tokens+=t.metrics.completion_tokens,b[e].metrics.total_tokens+=t.metrics.total_tokens,b[e].metrics.api_requests+=t.metrics.api_requests,b[e].metrics.successful_requests+=t.metrics.successful_requests,b[e].metrics.failed_requests+=t.metrics.failed_requests,b[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,b[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(b).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,q)),teams:null,showTags:"tag"===s,topKeysLimit:q,setTopKeysLimit:S})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"agent"===s?"Top Agents":"Top Models"}),(0,t.jsx)(e$,{topModels:(k={},z.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{k[e].spend+=t.metrics.spend}catch(s){console.error(`Error adding spend for ${e}: ${s}, got metrics: ${JSON.stringify(t)}`)}k[e].requests+=t.metrics.api_requests,k[e].successful_requests+=t.metrics.successful_requests,k[e].failed_requests+=t.metrics.failed_requests,k[e].tokens+=t.metrics.total_tokens})}),Object.entries(k).map(([e,t])=>({key:e,...t})).sort((e,t)=>t.spend-e.spend).slice(0,L)),topModelsLimit:L,setTopModelsLimit:A})]})}),"team"===s&&(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,t.jsx)(e$,{topModels:(v={},ee.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{v[e]||(v[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:t.metadata?.agent_name||e}),v[e].spend+=t.metrics.spend,v[e].requests+=t.metrics.api_requests,v[e].successful_requests+=t.metrics.successful_requests,v[e].failed_requests+=t.metrics.failed_requests,v[e].tokens+=t.metrics.total_tokens})}),Object.entries(v).map(([e,t])=>({key:t.agent_name,...t})).sort((e,t)=>t.spend-e.spend).slice(0,E)),topModelsLimit:E,setTopModelsLimit:O})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsx)(j.Title,{children:"Provider Usage"}),(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:ed(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:ed().map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)("img",{src:(0,eE.getProviderLogoAndName)(e.provider).logo,alt:`${e.provider} logo`,className:"w-4 h-4",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.provider?.charAt(0)||"-",a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:en,hidePromptCachingMetrics:"agent"===s})}),"team"===s?(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:ec})}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:eo,hidePromptCachingMetrics:"agent"===s})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:z})})]})]})]})};var eR=e.i(793130),eV=e.i(418371);let ez=({loading:e,isDateChanging:s,providerSpend:a})=>{let[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),m=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!l||e.spend>0);return(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Spend by Provider"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,t.jsx)(eR.Switch,{checked:l,onChange:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,t.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(eR.Switch,{checked:n,onChange:o})]})]})]}),e?(0,t.jsx)(P,{isDateChanging:s}):(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:m,index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:m.map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)(eV.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var eI=e.i(311451),eB=e.i(482725),eW=e.i(918789);let{TextArea:eK}=eI.Input,eY={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},eH=({step:e})=>{let s=eY[e.tool_name]||"🔧",a=e.arguments,r=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",l=a.team_ids||a.tags||a.user_id||"";return(0,t.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-gray-100 border border-gray-200 text-xs",children:[(0,t.jsx)("span",{className:"flex-shrink-0 mt-0.5",children:"running"===e.status?(0,t.jsx)(eB.Spin,{size:"small"}):"error"===e.status?(0,t.jsx)("span",{className:"text-red-500",children:"✗"}):(0,t.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"font-medium text-gray-700",children:[s," ",e.tool_label]}),r&&(0,t.jsx)("div",{className:"text-gray-500 mt-0.5",children:r}),l&&(0,t.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",l]}),"error"===e.status&&e.error&&(0,t.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},eG=({content:e})=>(0,t.jsx)(eW.default,{components:{p:({children:e})=>(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,t.jsx)("li",{children:e}),h1:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:s})=>s?.includes("language-")?(0,t.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto text-xs",children:(0,t.jsx)("code",{children:e})}):(0,t.jsx)("code",{className:"px-1 py-0.5 rounded bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,t.jsx)("div",{className:"overflow-x-auto my-2",children:(0,t.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,t.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,t.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),eZ=({open:e,onClose:s,accessToken:a})=>{let[r,l]=(0,T.useState)([]),[i,n]=(0,T.useState)(""),[o,c]=(0,T.useState)(!1),[d,u]=(0,T.useState)(void 0),[m,x]=(0,T.useState)([]),[h,p]=(0,T.useState)(!1),[g,f]=(0,T.useState)(""),[j,_]=(0,T.useState)(null),[b,v]=(0,T.useState)([]),N=(0,T.useRef)(null),C=(0,T.useRef)(null);(0,T.useEffect)(()=>{e&&0===m.length&&w()},[e]),(0,T.useEffect)(()=>{"function"==typeof N.current?.scrollIntoView&&N.current.scrollIntoView({behavior:"smooth"})},[r,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let t=e.data.map(e=>e.model_group).sort();x(t)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},q=async()=>{if(!a||!i.trim()||o)return;let e=[...r,{role:"user",content:i.trim()}];l(e),n(""),c(!0),f(""),_(null),v([]);let t=new AbortController;C.current=t;let s="",u=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{_(null),s+=e,f(s)},()=>{_(null),v([]),l(e=>[...e,{role:"assistant",content:s,toolCalls:u.length>0?[...u]:void 0}]),f("")},e=>{_(null),v([]),l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")},e=>{_(e)},e=>{let t=u.findIndex(t=>t.tool_name===e.tool_name);t>=0?u[t]={...e}:u.push({...e}),v([...u])},t.signal)}catch(s){if(s?.name==="AbortError"||t.signal.aborted)return;let e=s?.message||"Failed to get response. Please try again.";l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")}finally{c(!1),C.current=null}};return(0,t.jsxs)("div",{"data-testid":"usage-ai-chat-panel",className:`fixed top-0 right-0 h-full bg-white border-l border-gray-200 shadow-2xl z-50 flex flex-col transition-transform duration-300 ease-in-out ${e?"translate-x-0":"translate-x-full"}`,style:{width:420},children:[(0,t.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,t.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),s()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,t.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 flex-shrink-0",children:(0,t.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>u(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:m.map(e=>({label:e,value:e})),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===r.length&&!g&&!o&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),r.map((e,s)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("div",{className:"max-w-[88%] rounded-xl px-3.5 py-2 text-sm leading-relaxed bg-blue-600 text-white",children:e.content})}):(0,t.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,s)=>(0,t.jsx)(eH,{step:e},s))}),(0,t.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,t.jsx)(eG,{content:e.content})})]})},s)),o&&b.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:b.map((e,s)=>(0,t.jsx)(eH,{step:e},s))}),o&&!g&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,t.jsx)(eB.Spin,{size:"small"}),(0,t.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,t.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,t.jsx)(eG,{content:g})}),(0,t.jsx)("div",{ref:N})]}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(eK,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),q())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:o}),(0,t.jsx)(y.Button,{type:"primary",onClick:q,disabled:!i.trim()||o,loading:o,children:"Send"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,t.jsx)("button",{onClick:()=>{l([]),f(""),v([]),_(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===r.length,children:"Clear chat"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};var eJ=e.i(299251),eQ=e.i(153702);e.i(247167);var eX=e.i(931067);let e0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var e1=e.i(9583),e2=T.forwardRef(function(e,t){return T.createElement(e1.default,(0,eX.default)({},e,{ref:t,icon:e0}))}),e4=e.i(777579),e5=e.i(983561);let e3={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"};var e6=T.forwardRef(function(e,t){return T.createElement(e1.default,(0,eX.default)({},e,{ref:t,icon:e3}))}),e7=e.i(232164),e9=e.i(645526),e8=e.i(771674),te=e.i(906579);let tt=[{value:"global",label:"Global Usage",showForAdmin:"Global Usage",showForNonAdmin:"Your Usage",description:"View usage across all resources",descriptionForAdmin:"View usage across all resources",descriptionForNonAdmin:"View your usage",icon:(0,t.jsx)(e2,{style:{fontSize:"16px"}})},{value:"organization",label:"Organization Usage",showForAdmin:"Organization Usage",showForNonAdmin:"Your Organization Usage",description:"View organization-level usage",descriptionForAdmin:"View usage across all organizations",descriptionForNonAdmin:"View your organization's usage",icon:(0,t.jsx)(eJ.BankOutlined,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,t.jsx)(e9.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,t.jsx)(e6,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,t.jsx)(e7.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,t.jsx)(e5.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,t.jsx)(e8.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,t.jsx)(e4.LineChartOutlined,{style:{fontSize:"16px"}}),adminOnly:!0}],ts=({value:e,onChange:s,isAdmin:a,title:r="Usage View",description:l="Select the usage data you want to view","data-id":i})=>{let n=tt.filter(e=>!e.adminOnly||!!a).map(e=>{let t=e.label,s=e.description;return e.showForAdmin&&e.showForNonAdmin&&(t=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(s=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:t,description:s,icon:e.icon,badgeText:e.badgeText}});return(0,t.jsx)("div",{className:"w-full","data-id":i,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,t.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,t.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,t.jsx)(eQ.BarChartOutlined,{style:{fontSize:"32px"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:l})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(k.Select,{value:e,onChange:s,className:"w-54 sm:w-64 md:w-72",size:"large",options:n.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,t.jsx)("div",{className:"items-center",children:(0,t.jsx)(te.Badge,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:s.icon}),(0,t.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};e.s(["default",0,({teams:e,organizations:U})=>{let R,{accessToken:V,userRole:z,userId:I,premiumUser:B}=(0,q.default)(),[W,K]=(0,T.useState)(null),[Y,H]=(0,T.useState)(!1),[G,Z]=(0,T.useState)(!1),[J,Q]=(0,T.useState)(!1),X=(0,T.useMemo)(()=>new Date(Date.now()-6048e5),[]),es=(0,T.useMemo)(()=>new Date,[]),[ea,ei]=(0,T.useState)({from:X,to:es}),[en,eo]=(0,T.useState)([]),{data:ec=[]}=(0,w.useCustomers)(),{data:ed}=(0,C.useAgents)(),{data:eu}=(0,S.useCurrentUser)();console.log(`currentUser: ${JSON.stringify(eu)}`),console.log(`currentUser max budget: ${eu?.max_budget}`);let em=A.all_admin_roles.includes(z||""),[ex,eh]=(0,T.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:300}),{data:ef,fetchNextPage:ej,hasNextPage:e_,isFetchingNextPage:ey,isLoading:eb}=(0,L.useInfiniteUsers)(50,ep||void 0),ek=(0,T.useMemo)(()=>{if(!ef?.pages)return[];let e=new Set,t=[];for(let s of ef.pages)for(let a of s.users)e.has(a.user_id)||(e.add(a.user_id),t.push({value:a.user_id,label:a.user_alias?`${a.user_alias} (${a.user_id})`:a.user_email?`${a.user_email} (${a.user_id})`:a.user_id}));return t},[ef]),[ev,eN]=(0,T.useState)(em?null:I||null),[eT,eC]=(0,T.useState)("groups"),[ew,eq]=(0,T.useState)(!1),[eS,eD]=(0,T.useState)(!1),[eA,eM]=(0,T.useState)(!1),[eE,eF]=(0,T.useState)("global"),[e$,eU]=(0,T.useState)(!0),[eR,eV]=(0,T.useState)(5),[eI,eB]=(0,T.useState)(5),[eW,eK]=(0,T.useState)(!1),eY=async()=>{V&&eo(Object.values(await (0,F.tagListCall)(V)).map(e=>({label:e.name,value:e.name})))};(0,T.useEffect)(()=>{eY()},[V]),(0,T.useEffect)(()=>{!em&&I&&eN(I)},[em,I]);let eH=em?ev:I||null,eG=(0,T.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),eJ=(0,T.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]),eQ=(0,T.useRef)(0);(0,T.useEffect)(()=>{if(!V||!eG||!eJ)return;let e=++eQ.current;Z(!0),H(!1),K(null),(0,F.userDailyActivityAggregatedCall)(V,eG,eJ,eH).then(t=>{eQ.current===e&&(K(t),Z(!1),Q(!1))}).catch(()=>{eQ.current===e&&(H(!0),Z(!1))})},[V,eG,eJ,eH]);let eX=er({fetchFn:F.userDailyActivityCall,args:[V,eG,eJ,eH],enabled:Y&&!!V&&!!eG&&!!eJ}),e0=(0,T.useMemo)(()=>W||(Y?eX.data:{results:[],metadata:{}}),[W,Y,eX.data]),e1=G||eX.loading;(0,T.useEffect)(()=>{Y&&!eX.loading&&eX.data.results.length>0&&Q(!1)},[Y,eX.loading,eX.data.results.length]);let e2=(0,T.useCallback)(e=>{Q(!0),ei(e)},[]),e4=e0.metadata?.total_spend||0,e5=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.models||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eI)},[e0.results,eI]),e3=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.model_groups||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eI)},[e0.results,eI]),e6=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({provider:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}))},[e0.results]),e7=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.api_keys||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:s.metadata.key_alias,team_id:null,tags:s.metadata.tags||[]}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests,e[t].metrics.failed_requests+=s.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,eR)},[e0.results,eR]),e9=(0,T.useMemo)(()=>[...e0.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),[e0.results]),e8=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"models",e),[e0,e]),te=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"api_keys",e),[e0,e]),tt=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"mcp_servers",e),[e0,e]);return(0,t.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,t.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,t.jsx)(ts,{value:eE,onChange:e=>eF(e),isAdmin:em}),(0,t.jsx)($.default,{value:ea,onValueChange:e2})]}),eX.isFetchingMore&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",eX.progress.currentPage," /"," ",eX.progress.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:eX.cancel,children:"Stop"})]})}),eX.cancelled&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",eX.progress.currentPage,"/",eX.progress.totalPages," ","pages loaded)"]})}),"global"===eE&&(0,t.jsxs)(t.Fragment,{children:[em&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by user"}),(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:ev,onChange:e=>eN(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&e_&&!ey&&ej()},loading:eb,notFoundContent:eb?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No users found",options:ek,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,ey&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]})})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"Model Activity"}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"MCP Server Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>eM(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),children:"Ask AI"}),(0,t.jsx)(y.Button,{onClick:()=>eD(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsxs)(d.Col,{numColSpan:2,children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,t.jsxs)(f.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,t.jsxs)(t.Fragment,{children:[ea.from.toLocaleDateString("en-US",{month:"short",day:"numeric",year:ea.from.getFullYear()!==ea.to.getFullYear()?"numeric":void 0})," - ",ea.to.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]})}),(0,t.jsx)(et.default,{userSpend:e4,selectedTeam:null,userMaxBudget:eu?.max_budget||null})]}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Usage Metrics"}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(v.Tooltip,{title:"Includes requests that failed to route to a provider, tool usage failures, and other request errors where the provider cannot be determined.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e0.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Average Cost per Request"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)((e4||0)/(e0.metadata?.total_api_requests||1),4)]})]}),(0,t.jsxs)(c.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eK(!eW),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),eW?(0,t.jsx)(s.DownOutlined,{className:"text-gray-400 text-xs"}):(0,t.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_tokens?.toLocaleString()||0})]})]}),eW&&(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Input Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:e0.metadata?.total_prompt_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Output Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e0.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e0.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)(o.BarChart,{data:e9,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eO.default,{topKeys:e7,teams:null,topKeysLimit:eR,setTopKeysLimit:eV})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"groups"===eT?"Top Public Model Names":"Top Litellm Models"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eI,onChange:e=>eB(e)}),(0,t.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"groups"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("groups"),children:"Public Model Name"}),(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"individual"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("individual"),children:"Litellm Model Name"})]})]}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(R="groups"===eT?e3:e5,(0,t.jsx)(o.BarChart,{className:"mt-4",style:{height:52*Math.min(R.length,eI)},data:R,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.key}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(ez,{loading:e1,isDateChanging:J,providerSpend:e6})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:e8})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:te})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:tt})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:e0})})]})]})]}),"organization"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"organization",userID:I,userRole:z,dateValue:ea,entityList:U?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:B}),"team"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"team",userID:I,userRole:z,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:B,dateValue:ea}),"customer"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"customer",userID:I,userRole:z,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:B,dateValue:ea}),"tag"===eE&&(0,t.jsxs)(t.Fragment,{children:[e$&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,t.jsxs)(N.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,t.jsx)(N.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>eU(!1),className:"mb-5"}),(0,t.jsx)(eP,{accessToken:V,entityType:"tag",userID:I,userRole:z,entityList:en,premiumUser:B,dateValue:ea})]}),"agent"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"agent",userID:I,userRole:z,entityList:ed?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:B,dateValue:ea}),"user"===eE&&(0,t.jsx)(eP,{accessToken:V,entityType:"user",userID:I,userRole:z,entityList:ek.length>0?ek:null,premiumUser:B,dateValue:ea}),"user-agent-activity"===eE&&(0,t.jsx)(ee,{accessToken:V,userRole:z,dateValue:ea})]})}),(0,t.jsx)(E.default,{isOpen:ew,onClose:()=>eq(!1),accessToken:V}),(0,t.jsx)(O.default,{isOpen:eS,onClose:()=>eD(!1),entityType:"team",spendData:{results:e0.results,metadata:e0.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,t.jsx)(eZ,{open:eA,onClose:()=>eM(!1),accessToken:V})]})}],797305)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,289793,952840,617885,286718,23371,487147,498610,785952,193523,260573,e=>{"use strict";var t=e.i(764205),s=e.i(266027),a=e.i(243652),r=e.i(708347),l=e.i(135214);let i=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&r.all_admin_roles.includes(a||"")})}],289793);let n=(0,a.createQueryKeys)("customers");e.s(["useCustomers",0,()=>{let{accessToken:e,userRole:a}=(0,l.default)();return(0,s.useQuery)({queryKey:n.list({}),queryFn:async()=>await (0,t.allEndUsersCall)(e),enabled:!!e&&r.all_admin_roles.includes(a)})}],952840);var o=e.i(621482);let c=(0,a.createQueryKeys)("infiniteUsers"),d=50;e.s(["useInfiniteUsers",0,(e=d,s)=>{let{accessToken:a,userRole:i}=(0,l.default)();return(0,o.useInfiniteQuery)({queryKey:c.list({filters:{pageSize:e,...s&&{searchEmail:s}}}),queryFn:async({pageParam:r})=>await (0,t.userListCall)(a,null,r,e,s||null),initialPageParam:1,getNextPageParam:e=>{if(e.pagee&&t&&t.length?(0,u.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,u.jsx)("p",{className:"text-tremor-content-strong",children:s}),t.map(e=>{let t=e.dataKey?.toString();if(!t||!e.payload)return null;let s=((e,t)=>{let s=t.substring(t.indexOf(".")+1);if(e.metrics&&s in e.metrics)return e.metrics[s]})(e.payload,t),a=t.includes("spend"),r=void 0!==s?a?`$${s.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:s.toLocaleString():"N/A",l=b[e.color]||e.color;return(0,u.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:l}}),(0,u.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:t.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]}),(0,u.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:r})]},t)})]}):null,v=({categories:e,colors:t})=>(0,u.jsx)("div",{className:"flex items-center justify-end space-x-4",children:e.map((e,s)=>{let a=b[t[s]]||t[s];return(0,u.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,u.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:a}}),(0,u.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")})]},e)})});e.s(["CustomLegend",0,v,"CustomTooltip",0,k],286718);var N=e.i(291542),T=e.i(271645);let C=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,u.jsx)("span",{className:"text-green-600",children:e?.toLocaleString()||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,u.jsx)("span",{className:"text-red-600",children:e?.toLocaleString()||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>e?.toLocaleString()||0}],w=({topModels:e})=>{let[t,s]=(0,T.useState)("table");return 0===e.length?null:(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,u.jsx)(_.Title,{children:"Model Usage"}),(0,u.jsxs)("div",{className:"flex space-x-2",children:[(0,u.jsx)("button",{onClick:()=>s("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table"}),(0,u.jsx)("button",{onClick:()=>s("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart"})]})]}),"chart"===t?(0,u.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,u.jsx)(p.BarChart,{style:{height:40*e.length},data:e.map(e=>({key:e.model,spend:e.spend})),index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,u.jsx)(N.Table,{columns:C,dataSource:e,rowKey:"model",size:"small",pagination:!1,scroll:e.length>5?{y:195}:void 0})]})};function S(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function q(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}e.s(["valueFormatter",()=>S,"valueFormatterSpend",()=>q],23371);let L=({modelName:e,metrics:t,hidePromptCachingMetrics:s=!1})=>(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:t.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:t.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:t.total_tokens.toLocaleString()}),(0,u.jsxs)(j.Text,{children:[Math.round(t.total_tokens/t.total_successful_requests)," avg per successful request"]})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend,2)]}),(0,u.jsxs)(j.Text,{children:["$",(0,m.formatNumberWithCommas)(t.total_spend/t.total_successful_requests,3)," per successful request"]})]})]}),t.top_api_keys&&t.top_api_keys.length>0&&(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsx)(_.Title,{children:"Top Virtual Keys by Spend"}),(0,u.jsx)("div",{className:"mt-3",children:(0,u.jsx)("div",{className:"grid grid-cols-1 gap-2",children:t.top_api_keys.map((e,t)=>(0,u.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium",children:e.key_alias||`${e.api_key.substring(0,10)}...`}),e.team_id&&(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,u.jsxs)("div",{className:"text-right",children:[(0,u.jsxs)(j.Text,{className:"font-medium",children:["$",(0,m.formatNumberWithCommas)(e.spend,2)]}),(0,u.jsxs)(j.Text,{className:"text-xs text-gray-500",children:[e.requests.toLocaleString()," requests | ",e.tokens.toLocaleString()," tokens"]})]})]},e.api_key))})})]}),t.top_models&&t.top_models.length>0&&(0,u.jsx)(w,{topModels:t.top_models}),(0,u.jsxs)(g.Card,{className:"mt-4",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Spend per day"}),(0,u.jsx)(v,{categories:["metrics.spend"],colors:["green"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>`$${(0,m.formatNumberWithCommas)(e,2,!0)}`,yAxisWidth:72})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4 mt-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Requests per day"}),(0,u.jsx)(v,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,u.jsx)(p.BarChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Success vs Failed Requests"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),!s&&(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Prompt Caching Metrics"}),(0,u.jsx)(v,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,u.jsxs)("div",{className:"mb-2",children:[(0,u.jsxs)(j.Text,{children:["Cache Read: ",t.total_cache_read_input_tokens?.toLocaleString()||0," tokens"]}),(0,u.jsxs)(j.Text,{children:["Cache Creation: ",t.total_cache_creation_input_tokens?.toLocaleString()||0," tokens"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:t.daily_data,index:"date",categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"],valueFormatter:S,customTooltip:k,showLegend:!1})]})]})]});e.s(["ActivityMetrics",0,({modelMetrics:e,hidePromptCachingMetrics:t=!1})=>{let s=Object.keys(e).sort((t,s)=>""===t?1:""===s?-1:e[s].total_spend-e[t].total_spend),a={total_requests:0,total_successful_requests:0,total_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,daily_data:{}};Object.values(e).forEach(e=>{a.total_requests+=e.total_requests,a.total_successful_requests+=e.total_successful_requests,a.total_tokens+=e.total_tokens,a.total_spend+=e.total_spend,a.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,a.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{a.daily_data[e.date]||(a.daily_data[e.date]={prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,spend:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0}),a.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,a.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,a.daily_data[e.date].total_tokens+=e.metrics.total_tokens,a.daily_data[e.date].api_requests+=e.metrics.api_requests,a.daily_data[e.date].spend+=e.metrics.spend,a.daily_data[e.date].successful_requests+=e.metrics.successful_requests,a.daily_data[e.date].failed_requests+=e.metrics.failed_requests,a.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,a.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let r=Object.entries(a.daily_data).map(([e,t])=>({date:e,metrics:t})).sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime());return(0,u.jsxs)("div",{className:"space-y-8",children:[(0,u.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,u.jsx)(_.Title,{children:"Overall Usage"}),(0,u.jsxs)(f.Grid,{numItems:4,className:"gap-4 mb-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Requests"}),(0,u.jsx)(_.Title,{children:a.total_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Successful Requests"}),(0,u.jsx)(_.Title,{children:a.total_successful_requests.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Tokens"}),(0,u.jsx)(_.Title,{children:a.total_tokens.toLocaleString()})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsx)(j.Text,{children:"Total Spend"}),(0,u.jsxs)(_.Title,{children:["$",(0,m.formatNumberWithCommas)(a.total_spend,2)]})]})]}),(0,u.jsxs)(f.Grid,{numItems:2,className:"gap-4",children:[(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Tokens Over Time"}),(0,u.jsx)(v,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:S,customTooltip:k,showLegend:!1})]}),(0,u.jsxs)(g.Card,{children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)(_.Title,{children:"Total Requests Over Time"}),(0,u.jsx)(v,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,u.jsx)(h.AreaChart,{className:"mt-4",data:r,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:k,showLegend:!1})]})]})]}),(0,u.jsx)(y.Collapse,{defaultActiveKey:s[0],children:s.map(s=>(0,u.jsx)(y.Collapse.Panel,{header:(0,u.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,u.jsx)(_.Title,{children:e[s].label||"Unknown Item"}),(0,u.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,u.jsxs)("span",{children:["$",(0,m.formatNumberWithCommas)(e[s].total_spend,2)]}),(0,u.jsxs)("span",{children:[e[s].total_requests.toLocaleString()," requests"]})]})]}),children:(0,u.jsx)(L,{modelName:s||"Unknown Model",metrics:e[s],hidePromptCachingMetrics:t})},s))})]})},"processActivityData",0,(e,t,s=[])=>{let a={};return e.results.forEach(e=>{Object.entries(e.breakdown[t]||{}).forEach(([r,l])=>{a[r]||(a[r]={label:"api_keys"===t?((e,t,s)=>{let a=e.metadata.key_alias||`key-hash-${t}`,r=e.metadata.team_id;if(r){let e=(0,x.resolveTeamAliasFromTeamID)(r,s);return e?`${a} (team: ${e})`:`${a} (team_id: ${r})`}return a})(l,r,s):"entities"===t&&(l.metadata?.agent_name||l.metadata?.team_alias)||r,total_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0,prompt_tokens:0,completion_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,top_api_keys:[],top_models:[],daily_data:[]}),a[r].total_requests+=l.metrics.api_requests,a[r].prompt_tokens+=l.metrics.prompt_tokens,a[r].completion_tokens+=l.metrics.completion_tokens,a[r].total_tokens+=l.metrics.total_tokens,a[r].total_spend+=l.metrics.spend,a[r].total_successful_requests+=l.metrics.successful_requests,a[r].total_failed_requests+=l.metrics.failed_requests,a[r].total_cache_read_input_tokens+=l.metrics.cache_read_input_tokens||0,a[r].total_cache_creation_input_tokens+=l.metrics.cache_creation_input_tokens||0,a[r].daily_data.push({date:e.date,metrics:{prompt_tokens:l.metrics.prompt_tokens,completion_tokens:l.metrics.completion_tokens,total_tokens:l.metrics.total_tokens,api_requests:l.metrics.api_requests,spend:l.metrics.spend,successful_requests:l.metrics.successful_requests,failed_requests:l.metrics.failed_requests,cache_read_input_tokens:l.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:l.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==t&&Object.entries(a).forEach(([s,r])=>{let l={};e.results.forEach(e=>{let a=e.breakdown[t]?.[s];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(([e,t])=>{l[e]||(l[e]={api_key:e,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),l[e].spend+=t.metrics.spend,l[e].requests+=t.metrics.api_requests,l[e].tokens+=t.metrics.total_tokens})}),a[s].top_api_keys=Object.values(l).sort((e,t)=>t.spend-e.spend).slice(0,5)}),"api_keys"===t&&Object.entries(a).forEach(([t,s])=>{let r={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,s])=>{if(s&&"api_key_breakdown"in s){let a=s.api_key_breakdown?.[t];a&&(r[e]||(r[e]={model:e,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),r[e].spend+=a.metrics.spend,r[e].requests+=a.metrics.api_requests,r[e].successful_requests+=a.metrics.successful_requests||0,r[e].failed_requests+=a.metrics.failed_requests||0,r[e].tokens+=a.metrics.total_tokens)}})}),a[t].top_models=Object.values(r).sort((e,t)=>t.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())}),a}],487147);var D=e.i(994388),A=e.i(366283),M=e.i(779241),E=e.i(212931),O=e.i(808613),F=e.i(482725),$=e.i(199133),U=e.i(727749);e.s(["default",0,({isOpen:e,onClose:s,accessToken:a})=>{let[r]=O.Form.useForm(),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(null),[c,d]=(0,T.useState)(!1),[m,x]=(0,T.useState)("cloudzero"),[h,p]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e&&a&&g()},[e,a]);let g=async()=>{d(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"}});if(e.ok){let t=await e.json();o(t),r.setFieldsValue({connection_id:t.connection_id})}else if(404!==e.status){let t=await e.json();U.default.fromBackend(`Failed to load existing settings: ${t.error||"Unknown error"}`)}}catch(e){console.error("Error loading CloudZero settings:",e),U.default.fromBackend("Failed to load existing settings")}finally{d(!1)}},f=async e=>{if(!a)return void U.default.fromBackend("No access token available");i(!0);try{let s=n?"/cloudzero/settings":"/cloudzero/init",r=n?"PUT":"POST",l={...e,timezone:"UTC"},i=await fetch(s,{method:r,headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await i.json();if(i.ok)return U.default.success(c.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return U.default.fromBackend(c.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),U.default.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},_=async()=>{if(!a)return void U.default.fromBackend("No access token available");p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),r=await e.json();e.ok?(U.default.success(r.message||"Export to CloudZero completed successfully"),s()):U.default.fromBackend(r.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),U.default.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},y=async()=>{p(!0);try{U.default.info("CSV export functionality coming soon!"),s()}catch(e){console.error("Error exporting CSV:",e),U.default.fromBackend("Failed to export CSV")}finally{p(!1)}},b=async()=>{if("cloudzero"===m){if(!n){let e=await r.validateFields();if(!await f(e))return}await _()}else await y()},k=()=>{r.resetFields(),x("cloudzero"),o(null),s()},v=[{value:"cloudzero",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,u.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,u.jsxs)("div",{className:"flex items-center gap-2",children:[(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,u.jsx)("span",{children:"Export to CSV"})]})}];return(0,u.jsx)(E.Modal,{title:"Export Data",open:e,onCancel:k,footer:null,width:600,destroyOnHidden:!0,children:(0,u.jsxs)("div",{className:"space-y-4",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(j.Text,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,u.jsx)($.Select,{value:m,onChange:x,options:v,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,u.jsx)("div",{children:c?(0,u.jsx)("div",{className:"flex justify-center py-8",children:(0,u.jsx)(F.Spin,{size:"large"})}):(0,u.jsxs)(u.Fragment,{children:[n&&(0,u.jsx)(A.Callout,{title:"Existing CloudZero Configuration",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),color:"green",className:"mb-4",children:(0,u.jsxs)(j.Text,{children:["API Key: ",n.api_key_masked,(0,u.jsx)("br",{}),"Connection ID: ",n.connection_id]})}),!n&&(0,u.jsxs)(O.Form,{form:r,layout:"vertical",children:[(0,u.jsx)(O.Form.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,u.jsx)(M.TextInput,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,u.jsx)(O.Form.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,u.jsx)(M.TextInput,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,u.jsx)(A.Callout,{title:"CSV Export",icon:()=>(0,u.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,u.jsx)(j.Text,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,u.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,u.jsx)(D.Button,{variant:"secondary",onClick:k,children:"Cancel"}),(0,u.jsx)(D.Button,{onClick:b,loading:l||h,disabled:l||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})}],498610);var P=e.i(785242),R=e.i(464571),V=e.i(981339);let z=({value:e,onChange:t})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,u.jsx)($.Select,{value:e,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]}),I=({dateRange:e,selectedFilters:t})=>(0,u.jsxs)("div",{className:"text-sm text-gray-500",children:[e.from?.toLocaleDateString()," - ",e.to?.toLocaleDateString(),t.length>0&&` \xb7 ${t.length} filter${t.length>1?"s":""}`]});var B=e.i(91739);let W=({value:e,onChange:t,entityType:s})=>(0,u.jsxs)("div",{children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,u.jsx)(B.Radio.Group,{value:e,onChange:e=>t(e.target.value),className:"w-full",children:(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily_with_keys",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",s," and key"]}),(0,u.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",s,", split by API key"]})]})]}),(0,u.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,u.jsx)(B.Radio,{value:"daily_with_models",className:"mt-0.5"}),(0,u.jsxs)("div",{className:"ml-3 flex-1",children:[(0,u.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",s," and model"]}),(0,u.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]});var K=e.i(59935);let Y=e=>{if(!e)return null;for(let t of Object.values(e)){let e=t?.metadata?.team_id;if(e)return e}return null},H=["spend","api_requests","successful_requests","failed_requests","total_tokens","prompt_tokens","completion_tokens","cache_read_input_tokens","cache_creation_input_tokens"],G=e=>{let t=e.entities;return t&&Object.keys(t).length>0?t:(e=>{let t=e.api_keys;if(!t||0===Object.keys(t).length)return{};let s={};for(let[e,a]of Object.entries(t)){let t=a?.metadata?.team_id||"Unassigned";s[t]||(s[t]={metrics:Object.fromEntries(H.map(e=>[e,0])),api_key_breakdown:{}});let r=s[t].metrics,l=a?.metrics||{};for(let e of H)r[e]+=l[e]||0;s[t].api_key_breakdown[e]=a}return s})(e)},Z=(e,t,s,a={})=>{switch(t){case"daily":default:return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([r,l])=>{let i=Y(l.api_key_breakdown),n=i&&s[i]||null;a.push({Date:e.date,[t]:n||"-",[`${t} ID`]:i||"-","Spend ($)":(0,m.formatNumberWithCommas)(l.metrics.spend,4),Requests:l.metrics.api_requests,"Successful Requests":l.metrics.successful_requests,"Failed Requests":l.metrics.failed_requests,"Total Tokens":l.metrics.total_tokens,"Prompt Tokens":l.metrics.prompt_tokens||0,"Completion Tokens":l.metrics.completion_tokens||0})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_keys":return((e,t,s={})=>{let a={};return e.results.forEach(e=>{Object.entries(G(e.breakdown)).forEach(([t,r])=>{Object.entries(r.api_key_breakdown||{}).forEach(([r,l])=>{let i=l?.metadata?.key_alias||null,n=l?.metadata?.team_id||t,o=n&&s[n]||null,c=`${e.date}_${n}_${r}`;a[c]?(a[c].metrics.spend+=l.metrics?.spend||0,a[c].metrics.api_requests+=l.metrics?.api_requests||0,a[c].metrics.successful_requests+=l.metrics?.successful_requests||0,a[c].metrics.failed_requests+=l.metrics?.failed_requests||0,a[c].metrics.total_tokens+=l.metrics?.total_tokens||0,a[c].metrics.prompt_tokens+=l.metrics?.prompt_tokens||0,a[c].metrics.completion_tokens+=l.metrics?.completion_tokens||0):a[c]={Date:e.date,teamId:n,teamAlias:o,keyId:r,keyAlias:i,metrics:{spend:l.metrics?.spend||0,api_requests:l.metrics?.api_requests||0,successful_requests:l.metrics?.successful_requests||0,failed_requests:l.metrics?.failed_requests||0,total_tokens:l.metrics?.total_tokens||0,prompt_tokens:l.metrics?.prompt_tokens||0,completion_tokens:l.metrics?.completion_tokens||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[t]:e.teamAlias||"-",[`${t} ID`]:e.teamId||"-","Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,m.formatNumberWithCommas)(e.metrics.spend,4),Requests:e.metrics.api_requests,"Successful Requests":e.metrics.successful_requests,"Failed Requests":e.metrics.failed_requests,"Total Tokens":e.metrics.total_tokens,"Prompt Tokens":e.metrics.prompt_tokens,"Completion Tokens":e.metrics.completion_tokens})).sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a);case"daily_with_models":return((e,t,s={})=>{let a=[];return e.results.forEach(e=>{let r={};Object.entries(G(e.breakdown)).forEach(([t,s])=>{r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(([e,a])=>{Object.entries(s.api_key_breakdown||{}).forEach(([s,a])=>{r[t][e]||(r[t][e]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][e].spend+=a.metrics.spend||0,r[t][e].requests+=a.metrics.api_requests||0,r[t][e].successful+=a.metrics.successful_requests||0,r[t][e].failed+=a.metrics.failed_requests||0,r[t][e].tokens+=a.metrics.total_tokens||0})})}),Object.entries(r).forEach(([r,l])=>{let i=G(e.breakdown)[r],n=Y(i?.api_key_breakdown),o=n&&s[n]||null;Object.entries(l).forEach(([s,r])=>{a.push({Date:e.date,[t]:o||"-",[`${t} ID`]:n||"-",Model:s,"Spend ($)":(0,m.formatNumberWithCommas)(r.spend,4),Requests:r.requests,Successful:r.successful,Failed:r.failed,"Total Tokens":r.tokens})})})}),a.sort((e,t)=>new Date(e.Date).getTime()-new Date(t.Date).getTime())})(e,s,a)}},J=({isOpen:e,onClose:t,entityType:s,spendData:a,dateRange:r,selectedFilters:l,customTitle:i})=>{let[n,o]=(0,T.useState)("csv"),[c,d]=(0,T.useState)("daily"),[m,h]=(0,T.useState)(!1),{data:p,isLoading:g}=(0,P.useTeams)(),f=s.charAt(0).toUpperCase()+s.slice(1),j=i||`Export ${f} Usage`,_=(0,T.useMemo)(()=>(0,x.createTeamAliasMap)(p),[p]),y=async e=>{let i=e||n;h(!0);try{"csv"===i?(((e,t,s,a,r={})=>{let l=Z(e,t,s,r),i=new Blob([K.default.unparse(l)],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(i),o=document.createElement("a");o.href=n,o.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)})(a,c,f,s,_),U.default.success(`${f} usage data exported successfully as CSV`)):(((e,t,s,a,r,l,i={})=>{let n=Z(e,t,s,i),o={export_date:new Date().toISOString(),entity_type:a,date_range:{from:r.from?.toISOString(),to:r.to?.toISOString()},filters_applied:l.length>0?l:"None",export_scope:t,summary:{total_spend:e.metadata.total_spend,total_requests:e.metadata.total_api_requests,successful_requests:e.metadata.total_successful_requests,failed_requests:e.metadata.total_failed_requests,total_tokens:e.metadata.total_tokens}},c=new Blob([JSON.stringify({metadata:o,data:n},null,2)],{type:"application/json"}),d=window.URL.createObjectURL(c),u=document.createElement("a");u.href=d,u.download=`${a}_usage_${t}_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(u),u.click(),document.body.removeChild(u),window.URL.revokeObjectURL(d)})(a,c,f,s,r,l,_),U.default.success(`${f} usage data exported successfully as JSON`)),t()}catch(e){console.error("Error exporting data:",e),U.default.fromBackend("Failed to export data")}finally{h(!1)}};return(0,u.jsx)(E.Modal,{title:(0,u.jsx)("span",{className:"text-base font-semibold",children:j}),open:e,onCancel:t,footer:null,width:480,children:(0,u.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,u.jsx)(V.Skeleton,{active:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(I,{dateRange:r,selectedFilters:l}),(0,u.jsx)(W,{value:c,onChange:d,entityType:s}),(0,u.jsx)(z,{value:n,onChange:o})]}),g?(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(V.Skeleton.Button,{active:!0}),(0,u.jsx)(V.Skeleton.Button,{active:!0})]}):(0,u.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,u.jsx)(R.Button,{variant:"outlined",onClick:t,disabled:m,children:"Cancel"}),(0,u.jsx)(R.Button,{onClick:()=>y(),loading:m||g,disabled:m||g,type:"primary",children:m?"Exporting...":`Export ${n.toUpperCase()}`})]})]})})};e.s(["default",0,J],785952),e.s(["default",0,({dateValue:e,entityType:t,spendData:s,showFilters:a=!1,filterLabel:r,filterPlaceholder:l,selectedFilters:i=[],onFiltersChange:n,filterOptions:o=[],filterMode:c="multiple",customTitle:d,compactLayout:m=!1,teams:x=[]})=>{let[h,p]=(0,T.useState)(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mb-4",children:(0,u.jsxs)("div",{className:`grid ${a&&o.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"} items-end gap-4`,children:[a&&o.length>0&&(0,u.jsxs)("div",{children:[r&&(0,u.jsx)(j.Text,{className:"mb-2",children:r}),(0,u.jsx)($.Select,{mode:"single"===c?void 0:"multiple",style:{width:"100%"},placeholder:l,value:"single"===c?i[0]??void 0:i,onChange:e=>{"single"===c?n?.(e?[e]:[]):n?.(e)},options:o,allowClear:!0})]}),(0,u.jsx)("div",{className:"justify-self-end",children:(0,u.jsx)(D.Button,{onClick:()=>p(!0),icon:()=>(0,u.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})})]})}),(0,u.jsx)(J,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:s,dateRange:e,selectedFilters:i,customTitle:d,teams:x})]})}],193523),e.s([],260573)},973706,e=>{"use strict";var t=e.i(843476),s=e.i(72713),a=e.i(637235),r=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:c,label:d="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(e),[g,f]=(0,n.useState)(null),[j,_]=(0,n.useState)(""),[y,b]=(0,n.useState)(""),k=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let s=t.getValue(),a=(0,i.default)(e.from).isSame((0,i.default)(s.from),"day"),r=(0,i.default)(e.to).isSame((0,i.default)(s.to),"day");if(a&&r)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{f(v(e))},[e,v]);let N=(0,n.useCallback)(()=>{if(!j||!y)return{isValid:!0,error:""};let e=(0,i.default)(j,"YYYY-MM-DD"),t=(0,i.default)(y,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[j,y])();(0,n.useEffect)(()=>{e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{k.current&&!k.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let T=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let s=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${s(e)} - ${s(t)}`},[]),C=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let s={...e},a=new Date(e.from);return t=new Date(e.to?e.to:e.from),a.toDateString()===t.toDateString(),a.setHours(0,0,0,0),t.setHours(23,59,59,999),s.from=a,s.to=t,s},[]),w=(0,n.useCallback)(()=>{try{if(j&&y&&N.isValid){let e=(0,i.default)(j,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let s={from:e.toDate(),to:t.toDate()};p(s);let a=v(s);f(a)}}}catch(e){console.warn("Invalid date format:",e)}},[j,y,N.isValid,v]);return(0,n.useEffect)(()=>{w()},[w]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:d}),(0,t.jsxs)("div",{className:"relative",ref:k,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>x(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:T(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-[9999] min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:o.map(e=>{let s=g===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:s}=e.getValue();p({from:t,to:s}),f(e.shortLabel),_((0,i.default)(t).format("YYYY-MM-DD")),b((0,i.default)(s).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${s?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${s?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:j,onChange:e=>_(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:y,onChange:e=>b(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!N.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!N.isValid&&N.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:N.error})]})}),h.from&&h.to&&N.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,i.default)(h.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,i.default)(h.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&_((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&b((0,i.default)(e.to).format("YYYY-MM-DD")),f(v(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:()=>{h.from&&h.to&&N.isValid&&(c(h),requestIdleCallback(()=>{c(C(h))},{timeout:100}),x(!1))},disabled:!h.from||!h.to||!N.isValid,children:"Apply"})]})})]})]})})]})]})}])},797305,497650,e=>{"use strict";var t=e.i(843476),s=e.i(755151),a=e.i(872934),r=e.i(827252),l=e.i(56456),i=e.i(240647),n=e.i(152473),o=e.i(584935),c=e.i(304967),d=e.i(309426),u=e.i(350967),m=e.i(197647),x=e.i(653824),h=e.i(881073),p=e.i(404206),g=e.i(723731),f=e.i(599724),j=e.i(629569),_=e.i(560445),y=e.i(464571),b=e.i(560025),k=e.i(199133),v=e.i(592968),N=e.i(898586),T=e.i(271645),C=e.i(289793),w=e.i(952840),S=e.i(135214),q=e.i(738014),L=e.i(617885),D=e.i(500330),A=e.i(708347),M=e.i(487147),E=e.i(498610);e.i(260573);var O=e.i(785952),F=e.i(764205),$=e.i(973706),U=e.i(571303);let P=({isDateChanging:e=!1})=>(0,t.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)(U.UiLoadingSpinner,{className:"size-5"}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:e?"Processing date selection...":"Loading chart data..."}),(0,t.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:e?"This will only take a moment":"Fetching your data"})]})]})});var R=e.i(290571),V=e.i(95779),z=e.i(444755),I=e.i(673706);let B=T.default.forwardRef((e,t)=>{let{color:s,children:a,className:r}=e,l=(0,R.__rest)(e,["color","children","className"]);return T.default.createElement("p",Object.assign({ref:t,className:(0,z.tremorTwMerge)("font-semibold text-tremor-metric",s?(0,I.getColorClassNames)(s,V.colorPalette.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",r)},l),a)});B.displayName="Metric";var W=e.i(37091),K=e.i(269200),Y=e.i(427612),H=e.i(496020),G=e.i(64848),Z=e.i(942232),J=e.i(977572),Q=e.i(994388);let X=({accessToken:e,selectedTags:s,formatAbbreviatedNumber:a})=>{let r,l,i,n,[c,d]=(0,T.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[u,_]=(0,T.useState)(!1),[y,b]=(0,T.useState)(1),k=async()=>{if(e){_(!0);try{let t=await (0,F.perUserAnalyticsCall)(e,y,50,s.length>0?s:void 0);d(t)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{_(!1)}}};return(0,T.useEffect)(()=>{k()},[e,s,y]),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"Per User Usage"}),(0,t.jsx)(W.Subtitle,{children:"Individual developer usage metrics"}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"User Details"}),(0,t.jsx)(m.Tab,{children:"Usage Distribution"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"User ID"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Email"}),(0,t.jsx)(G.TableHeaderCell,{children:"User Agent"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Success Generations"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Tokens"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Failed Requests"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-right",children:"Total Cost"})]})}),(0,t.jsx)(Z.TableBody,{children:c.results.slice(0,10).map((e,s)=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{className:"font-medium",children:e.user_id})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_email||"N/A"})}),(0,t.jsx)(J.TableCell,{children:(0,t.jsx)(f.Text,{children:e.user_agent||"Unknown"})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.successful_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.total_tokens)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsx)(f.Text,{children:a(e.failed_requests)})}),(0,t.jsx)(J.TableCell,{className:"text-right",children:(0,t.jsxs)(f.Text,{children:["$",a(e.spend,4)]})})]},s))})]}),c.results.length>10&&(0,t.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,t.jsxs)(f.Text,{className:"text-sm text-gray-500",children:["Showing 10 of ",c.total_count," results"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y>1&&b(y-1)},disabled:1===y,children:"Previous"}),(0,t.jsx)(Q.Button,{size:"sm",variant:"secondary",onClick:()=>{y=c.total_pages,children:"Next"})]})]})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(j.Title,{className:"text-lg",children:"User Usage Distribution"}),(0,t.jsx)(W.Subtitle,{children:"Number of users by successful request frequency"})]}),(0,t.jsx)(o.BarChart,{data:(r=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";r.set(t,(r.get(t)||0)+1)}),l=Array.from(r.entries()).sort(([,e],[,t])=>t-e).slice(0,8).map(([e])=>e),i={"1-9 requests":{range:[1,9],agents:{}},"10-99 requests":{range:[10,99],agents:{}},"100-999 requests":{range:[100,999],agents:{}},"1K-9.9K requests":{range:[1e3,9999],agents:{}},"10K-99.9K requests":{range:[1e4,99999],agents:{}},"100K+ requests":{range:[1e5,1/0],agents:{}}},c.results.forEach(e=>{let t=e.successful_requests,s=e.user_agent||"Unknown";l.includes(s)&&Object.entries(i).forEach(([e,a])=>{t>=a.range[0]&&t<=a.range[1]&&(a.agents[s]||(a.agents[s]=0),a.agents[s]++)})}),Object.entries(i).map(([e,t])=>{let s={category:e};return l.forEach(e=>{s[e]=t.agents[e]||0}),s})),index:"category",categories:(n=new Map,c.results.forEach(e=>{let t=e.user_agent||"Unknown";n.set(t,(n.get(t)||0)+1)}),Array.from(n.entries()).sort(([,e],[,t])=>t-e).slice(0,8).map(([e])=>e)),colors:["blue","green","orange","red","purple","yellow","pink","indigo"],valueFormatter:e=>`${e} users`,yAxisWidth:80,showLegend:!0,stack:!0})]})]})]})]})},ee=({accessToken:e,userRole:s,dateValue:a,onDateChange:r})=>{let[l,i]=(0,T.useState)({results:[]}),[n,d]=(0,T.useState)({results:[]}),[_,y]=(0,T.useState)({results:[]}),[b,N]=(0,T.useState)({results:[]}),[C,w]=(0,T.useState)(""),[S,q]=(0,T.useState)([]),[L,D]=(0,T.useState)([]),[A,M]=(0,T.useState)(!1),[E,O]=(0,T.useState)(!1),[$,U]=(0,T.useState)(!1),[R,V]=(0,T.useState)(!1),[z,I]=(0,T.useState)(!1),K=new Date,Y=async()=>{if(e){M(!0);try{let t=await (0,F.tagDistinctCall)(e);q(t.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{M(!1)}}},H=async()=>{if(e){O(!0);try{let t=await (0,F.tagDauCall)(e,K,C||void 0,L.length>0?L:void 0);i(t)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{O(!1)}}},G=async()=>{if(e){U(!0);try{let t=await (0,F.tagWauCall)(e,K,C||void 0,L.length>0?L:void 0);d(t)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{U(!1)}}},Z=async()=>{if(e){V(!0);try{let t=await (0,F.tagMauCall)(e,K,C||void 0,L.length>0?L:void 0);y(t)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},J=async()=>{if(e&&a.from&&a.to){I(!0);try{let t=await (0,F.userAgentSummaryCall)(e,a.from,a.to,L.length>0?L:void 0);N(t)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{I(!1)}}};(0,T.useEffect)(()=>{Y()},[e]),(0,T.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{H(),G(),Z()},50);return()=>clearTimeout(t)},[e,C,L]),(0,T.useEffect)(()=>{if(!a.from||!a.to)return;let e=setTimeout(()=>{J()},50);return()=>clearTimeout(e)},[e,a,L]);let Q=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,ee=e=>Object.entries(e.reduce((e,t)=>(e[t.tag]=(e[t.tag]||0)+t.active_users,e),{})).sort(([,e],[,t])=>t-e).map(([e])=>e),et=ee(l.results).slice(0,10),es=ee(n.results).slice(0,10),ea=ee(_.results).slice(0,10),er=(()=>{let e=[],t=new Date;for(let s=6;s>=0;s--){let a=new Date(t);a.setDate(a.getDate()-s);let r={date:a.toISOString().split("T")[0]};et.forEach(e=>{r[Q(e)]=0}),e.push(r)}return l.results.forEach(t=>{let s=Q(t.tag),a=e.find(e=>e.date===t.date);a&&(a[s]=t.active_users)}),e})(),el=(()=>{let e=[];for(let t=1;t<=7;t++){let s={week:`Week ${t}`};es.forEach(e=>{s[Q(e)]=0}),e.push(s)}return n.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Week (\d+)/);if(a){let r=`Week ${a[1]}`,l=e.find(e=>e.week===r);l&&(l[s]=t.active_users)}}),e})(),ei=(()=>{let e=[];for(let t=1;t<=7;t++){let s={month:`Month ${t}`};ea.forEach(e=>{s[Q(e)]=0}),e.push(s)}return _.results.forEach(t=>{let s=Q(t.tag),a=t.date.match(/Month (\d+)/);if(a){let r=`Month ${a[1]}`,l=e.find(e=>e.month===r);l&&(l[s]=t.active_users)}}),e})(),en=(e,t=0)=>{if(e>=1e8||e>=1e7)return(e/1e6).toFixed(t)+"M";if(e>=1e6)return(e/1e6).toFixed(t)+"M";if(e>=1e4)return(e/1e3).toFixed(t)+"K";if(e>=1e3)return(e/1e3).toFixed(t)+"K";else return e.toFixed(t)};return(0,t.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(j.Title,{children:"Summary by User Agent"}),(0,t.jsx)(W.Subtitle,{children:"Performance metrics for different user agents"})]}),(0,t.jsxs)("div",{className:"w-96",children:[(0,t.jsx)(f.Text,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,t.jsx)(k.Select,{mode:"multiple",placeholder:"All User Agents",value:L,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:A,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:S.map(e=>{let s=Q(e),a=s.length>50?`${s.substring(0,50)}...`:s;return(0,t.jsx)(k.Select.Option,{value:e,label:a,title:s,children:a},e)})})]})]}),z?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4",children:[(b.results||[]).slice(0,4).map((e,s)=>{let a=Q(e.tag),r=a.length>15?a.substring(0,15)+"...":a;return(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(v.Tooltip,{title:a,placement:"top",children:(0,t.jsx)(j.Title,{className:"truncate",children:r})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(B,{className:"text-lg",children:en(e.successful_requests)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(B,{className:"text-lg",children:en(e.total_tokens)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsxs)(B,{className:"text-lg",children:["$",en(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(b.results||[]).length)}).map((e,s)=>(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"No Data"}),(0,t.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.Text,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,t.jsx)(B,{className:"text-lg",children:"-"})]})]})]},`empty-${s}`))]})]})}),(0,t.jsx)(c.Card,{children:(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU/WAU/MAU"}),(0,t.jsx)(m.Tab,{children:"Per User Usage (Last 30 Days)"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(j.Title,{children:"DAU, WAU & MAU per Agent"}),(0,t.jsx)(W.Subtitle,{children:"Active users across different time periods"})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{className:"mb-6",children:[(0,t.jsx)(m.Tab,{children:"DAU"}),(0,t.jsx)(m.Tab,{children:"WAU"}),(0,t.jsx)(m.Tab,{children:"MAU"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),E?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:er,index:"date",categories:et.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),$?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:el,index:"week",categories:es.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,t.jsxs)(p.TabPanel,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(j.Title,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),R?(0,t.jsx)(P,{isDateChanging:!1}):(0,t.jsx)(o.BarChart,{data:ei,index:"month",categories:ea.map(Q),valueFormatter:e=>en(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(X,{accessToken:e,selectedTags:L,formatAbbreviatedNumber:en})})]})]})})]})};var et=e.i(617802);let es=["total_spend","total_prompt_tokens","total_completion_tokens","total_tokens","total_api_requests","total_successful_requests","total_failed_requests","total_cache_read_input_tokens","total_cache_creation_input_tokens"],ea={results:[],metadata:{total_spend:0,total_prompt_tokens:0,total_completion_tokens:0,total_tokens:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,total_pages:1,has_more:!1,page:1}};function er({fetchFn:e,args:t,enabled:s}){let[a,r]=(0,T.useState)(ea),[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),[c,d]=(0,T.useState)({currentPage:0,totalPages:0}),[u,m]=(0,T.useState)(!1),x=(0,T.useRef)(0),h=(0,T.useRef)(!1),p=(0,T.useRef)(null),g=(0,T.useRef)(t);g.current=t;let f=JSON.stringify(t),j=(0,T.useCallback)(()=>{h.current=!0,m(!0),o(!1),null!==p.current&&(clearTimeout(p.current),p.current=null)},[]);return(0,T.useEffect)(()=>{if(!s){r(ea),i(!1),o(!1),d({currentPage:0,totalPages:0}),m(!1);return}let t=++x.current;h.current=!1,m(!1);let a=()=>x.current!==t||h.current,l=e=>new Promise(t=>{p.current=setTimeout(()=>{p.current=null,t()},e)});return(async()=>{let t=g.current;i(!0),o(!1),d({currentPage:1,totalPages:1});try{let s=[...t.slice(0,3),1,...t.slice(3)],n=await e(...s);if(a())return;r(n);let c=n.metadata?.total_pages||1;if(d({currentPage:1,totalPages:c}),c<=1)return void i(!1);i(!1),o(!0);let u=[...n.results],m={...n.metadata};for(let s=2;s<=c;s++){if(a()||(await l(300),a()))return;let i=[...t.slice(0,3),s,...t.slice(3)],n=await e(...i);if(a())return;u=[...u,...n.results],(m=function(e,t){let s={...e};for(let a of es)s[a]=(e[a]||0)+(t[a]||0);return s}(m,n.metadata)).total_pages=c,m.has_more=s{x.current++,null!==p.current&&(clearTimeout(p.current),p.current=null)}},[s,e,f]),{data:a,loading:l,isFetchingMore:n,progress:c,cancelled:u,cancel:j}}var el=e.i(23371),ei=e.i(286718);let en=({endpointData:e})=>{let s=e||{},a=T.default.useMemo(()=>Object.entries(s).map(([e,t])=>({endpoint:e,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}})),[s]);return(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)(j.Title,{children:"Success vs Failed Requests by Endpoint"}),(0,t.jsx)(ei.CustomLegend,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,t.jsx)(o.BarChart,{className:"mt-4",data:a,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:ei.CustomTooltip,showLegend:!1,stack:!0,yAxisWidth:60})]})};var eo=e.i(731195),ec=e.i(883966),ed=e.i(555706),eu=e.i(785183),em=e.i(93230),ex=e.i(844171),eh=(0,ec.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:ed.Line,axisComponents:[{axisType:"xAxis",AxisComp:eu.XAxis},{axisType:"yAxis",AxisComp:em.YAxis}],formatAxisMap:ex.formatAxisMap}),ep=e.i(872526),eg=e.i(800494),ef=e.i(234239),ej=e.i(559559),e_=e.i(238279),ey=e.i(114887),eb=e.i(933303),ek=e.i(628781),ev=e.i(472007),eN=e.i(480731);let eT=T.default.forwardRef((e,t)=>{let{data:s=[],categories:a=[],index:r,colors:l=V.themeColorRange,valueFormatter:i=I.defaultValueFormatter,startEndOnly:n=!1,showXAxis:o=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:u="equidistantPreserveStart",animationDuration:m=900,showAnimation:x=!1,showTooltip:h=!0,showLegend:p=!0,showGridLines:g=!0,autoMinValue:f=!1,curveType:j="linear",minValue:_,maxValue:y,connectNulls:b=!1,allowDecimals:k=!0,noDataText:v,className:N,onValueChange:C,enableLegendSlider:w=!1,customTooltip:S,rotateLabelX:q,padding:L=o||c?{left:20,right:20}:{left:0,right:0},tickGap:D=5,xAxisLabel:A,yAxisLabel:M}=e,E=(0,R.__rest)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[O,F]=(0,T.useState)(60),[$,U]=(0,T.useState)(void 0),[P,B]=(0,T.useState)(void 0),W=(0,ev.constructCategoryColors)(a,l),K=(0,ev.getYAxisDomain)(f,_,y),Y=!!C;function H(e){Y&&(e===P&&!$||(0,ev.hasOnlyOneValueForThisKey)(s,e)&&$&&$.dataKey===e?(B(void 0),null==C||C(null)):(B(e),null==C||C({eventType:"category",categoryClicked:e})),U(void 0))}return T.default.createElement("div",Object.assign({ref:t,className:(0,z.tremorTwMerge)("w-full h-80",N)},E),T.default.createElement(eo.ResponsiveContainer,{className:"h-full w-full"},(null==s?void 0:s.length)?T.default.createElement(eh,{data:s,onClick:Y&&(P||$)?()=>{U(void 0),B(void 0),null==C||C(null)}:void 0,margin:{bottom:A?30:void 0,left:M?20:void 0,right:M?5:void 0,top:5}},g?T.default.createElement(ep.CartesianGrid,{className:(0,z.tremorTwMerge)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,T.default.createElement(eu.XAxis,{padding:L,hide:!o,dataKey:r,interval:n?"preserveStartEnd":u,tick:{transform:"translate(0, 6)"},ticks:n?[s[0][r],s[s.length-1][r]]:void 0,fill:"",stroke:"",className:(0,z.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:D,angle:null==q?void 0:q.angle,dy:null==q?void 0:q.verticalShift,height:null==q?void 0:q.xAxisHeight},A&&T.default.createElement(eg.Label,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},A)),T.default.createElement(em.YAxis,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:K,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,z.tremorTwMerge)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:i,allowDecimals:k},M&&T.default.createElement(eg.Label,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},M)),T.default.createElement(ef.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:h?({active:e,payload:t,label:s})=>S?T.default.createElement(S,{payload:null==t?void 0:t.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!=(t=W.get(e.dataKey))?t:eN.BaseColors.Gray})}),active:e,label:s}):T.default.createElement(eb.default,{active:e,payload:t,label:s,valueFormatter:i,categoryColors:W}):T.default.createElement(T.default.Fragment,null),position:{y:0}}),p?T.default.createElement(ej.Legend,{verticalAlign:"top",height:O,content:({payload:e})=>(0,ey.default)({payload:e},W,F,P,Y?e=>H(e):void 0,w)}):null,a.map(e=>{var t;return T.default.createElement(ed.Line,{className:(0,z.tremorTwMerge)((0,I.getColorClassNames)(null!=(t=W.get(e))?t:eN.BaseColors.Gray,V.colorPalette.text).strokeColor),strokeOpacity:$||P&&P!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,dataKey:c}=e;return T.default.createElement(e_.Dot,{className:(0,z.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,I.getColorClassNames)(null!=(t=W.get(c))?t:eN.BaseColors.Gray,V.colorPalette.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:n,strokeWidth:o,onClick:(t,a)=>{a.stopPropagation(),Y&&(e.index===(null==$?void 0:$.index)&&e.dataKey===(null==$?void 0:$.dataKey)||(0,ev.hasOnlyOneValueForThisKey)(s,e.dataKey)&&P&&P===e.dataKey?(B(void 0),U(void 0),null==C||C(null)):(B(e.dataKey),U({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,cx:o,cy:c,dataKey:d,index:u}=t;return(0,ev.hasOnlyOneValueForThisKey)(s,e)&&!($||P&&P!==e)||(null==$?void 0:$.index)===u&&(null==$?void 0:$.dataKey)===e?T.default.createElement(e_.Dot,{key:u,cx:o,cy:c,r:5,stroke:r,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:n,className:(0,z.tremorTwMerge)("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",(0,I.getColorClassNames)(null!=(a=W.get(d))?a:eN.BaseColors.Gray,V.colorPalette.text).fillColor)}):T.default.createElement(T.Fragment,{key:u})},key:e,name:e,type:j,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:x,animationDuration:m,connectNulls:b})}),C?a.map(e=>T.default.createElement(ed.Line,{className:(0,z.tremorTwMerge)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:j,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:b,onClick:(e,t)=>{t.stopPropagation();let{name:s}=e;H(s)}})):null):T.default.createElement(ek.default,{noDataText:v})))});eT.displayName="LineChart";let eC=function({dailyData:e,endpointData:s}){let a=(0,T.useMemo)(()=>{var t;let s,a;return e?.results&&0!==e.results.length?(t=e.results,s=[],a=new Set,t.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>a.add(e))}),t.forEach(e=>{let t={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};a.forEach(s=>{let a=e.breakdown.endpoints?.[s];t[s]=a?.metrics.api_requests||0}),s.push(t)}),s.reverse()):[]},[e]),r=(0,T.useMemo)(()=>0===a.length?[]:Object.keys(a[0]).filter(e=>"date"!==e),[a]);return(0,t.jsxs)(c.Card,{className:"mb-6",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)(j.Title,{children:"Endpoint Usage Trends"})}),(0,t.jsx)(eT,{className:"h-80",data:a,index:"date",categories:r,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,r.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})};var ew=e.i(291542),eS=e.i(309821);e.s(["Progress",()=>eS.default],497650);var eS=eS;let eq=({endpointData:e})=>{let s=Object.entries(e).map(([e,t])=>{var s,a;return{key:e,endpoint:e,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,api_requests:t.metrics.api_requests,total_tokens:t.metrics.total_tokens,spend:t.metrics.spend,successRate:(s=t.metrics.successful_requests,0===(a=t.metrics.api_requests)?0:s/a*100)}}),a=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,t.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let a=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return a>0&&a<100&&(l[`${a}%`]="#22c55e",l[`${a+.01}%`]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex-1 relative",children:(0,t.jsx)(eS.default,{percent:a+r,size:"small",strokeColor:l,showInfo:!1})}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,t.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,t.jsx)("span",{className:"text-gray-400",children:"/"}),(0,t.jsx)("span",{className:"text-red-600 font-medium",children:s.failed_requests.toLocaleString()})]})]})}},{title:"Total Request",dataIndex:"api_requests",key:"api_requests",render:e=>e.toLocaleString()},{title:"Success Rate",dataIndex:"successRate",key:"successRate",render:e=>{let s=e.toFixed(2);return(0,t.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`}];return(0,t.jsx)(ew.Table,{columns:a,dataSource:s,pagination:!1})},eL=({userSpendData:e})=>{let s=(0,T.useMemo)(()=>{let t={};return e?.results&&e.results.forEach(e=>{Object.entries(e.breakdown.endpoints||{}).forEach(([e,s])=>{t[e]||(t[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:s.metadata||{},api_key_breakdown:{}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.prompt_tokens+=s.metrics.prompt_tokens,t[e].metrics.completion_tokens+=s.metrics.completion_tokens,t[e].metrics.total_tokens+=s.metrics.total_tokens,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests||0,t[e].metrics.failed_requests+=s.metrics.failed_requests||0,t[e].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,t[e].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),t},[e]);return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(eq,{endpointData:s}),(0,t.jsx)(en,{endpointData:s}),(0,t.jsx)(eC,{dailyData:e,endpointData:s})]})};var eD=e.i(214541),eA=e.i(413990),eM=e.i(785242);let{Text:eE}=N.Typography,eO=({value:e=[],onChange:s,disabled:a,organizationId:r,pageSize:i=20,placeholder:o="Search teams by alias..."})=>{let[c,d]=(0,T.useState)(""),[u,m]=(0,n.useDebouncedState)("",{wait:300}),{data:x,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:g,isLoading:f}=(0,eM.useInfiniteTeams)(i,u||void 0,r),j=(0,T.useMemo)(()=>{if(!x?.pages)return[];let e=new Set,t=[];for(let s of x.pages)for(let a of s.teams)e.has(a.team_id)||(e.add(a.team_id),t.push(a));return t},[x]);return(0,t.jsx)(k.Select,{mode:"multiple",showSearch:!0,placeholder:o,value:e,onChange:e=>s?.(e),disabled:a,allowClear:!0,filterOption:!1,onSearch:e=>{d(e),m(e)},searchValue:c,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!g&&h()},loading:f,notFoundContent:f?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No teams found",style:{width:"100%"},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]}),children:j.map(e=>(0,t.jsxs)(k.Select.Option,{value:e.team_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,t.jsxs)(eE,{type:"secondary",children:["(",e.team_id,")"]})]},e.team_id))})};var eF=e.i(193523),eF=eF,e$=e.i(916925),eU=e.i(1023),eP=e.i(149121);function eR({topModels:e,topModelsLimit:s,setTopModelsLimit:a}){let[r,l]=(0,T.useState)("table"),i=[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return`$${(0,D.formatNumberWithCommas)(t,2)}`}},{header:"Successful",accessorKey:"successful_requests",cell:e=>(0,t.jsx)("span",{className:"text-green-600",children:e.getValue()?.toLocaleString()||0})},{header:"Failed",accessorKey:"failed_requests",cell:e=>(0,t.jsx)("span",{className:"text-red-600",children:e.getValue()?.toLocaleString()||0})},{header:"Tokens",accessorKey:"tokens",cell:e=>e.getValue()?.toLocaleString()||0}],n=e.slice(0,s);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:s,onChange:e=>a(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>l("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>l("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===r?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===r?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(o.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(n.length,s)},data:n,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(eP.DataTable,{columns:i,data:n,renderSubComponent:()=>(0,t.jsx)(t.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}let eV={tag:F.tagDailyActivityCall,team:F.teamDailyActivityCall,organization:F.organizationDailyActivityCall,customer:F.customerDailyActivityCall,agent:F.agentDailyActivityCall,user:F.userDailyActivityCall},ez=({accessToken:e,entityType:s,entityId:r,entityList:i,dateValue:n})=>{let b,k,v,{teams:N}=(0,eD.default)(),[C,w]=(0,T.useState)([]),[S,q]=(0,T.useState)(5),[L,A]=(0,T.useState)(5),[E,O]=(0,T.useState)(5),$=(0,T.useMemo)(()=>n.from?new Date(n.from):null,[n.from]),U=(0,T.useMemo)(()=>n.to?new Date(n.to):null,[n.to]),P=(0,T.useMemo)(()=>"user"===s?C.length>0?C[0]:null:C.length>0?C:null,[s,C]),R=eV[s],V=!!e&&!!$&&!!U,{data:z,isFetchingMore:I,progress:B,cancelled:Q,cancel:X}=er({fetchFn:R,args:[e,$,U,P],enabled:V}),{data:ee,isFetchingMore:et,progress:es,cancelled:ea,cancel:ei}=er({fetchFn:F.agentDailyActivityCall,args:[e,$,U,null],enabled:V&&"team"===s}),en=(0,M.processActivityData)(z,"models",N||[]),eo=(0,M.processActivityData)(z,"api_keys",N||[]),ec="team"===s?(0,M.processActivityData)(ee,"entities",N||[]):{},ed=()=>{let e={};return z.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=s.metrics.spend,e[t].requests+=s.metrics.api_requests,e[t].successful_requests+=s.metrics.successful_requests,e[t].failed_requests+=s.metrics.failed_requests,e[t].tokens+=s.metrics.total_tokens}catch(e){console.error(`Error processing provider ${t}: ${e}`)}})}),Object.values(e).filter(e=>e.spend>0).sort((e,t)=>t.spend-e.spend)},eu=(e,t)=>{if(i){let t=i.find(t=>t.value===e);if(t)return t.label}return t?.team_alias?t.team_alias:e},em=()=>{var e;let t={};return z.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,s])=>{t[e]||(t[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{alias:eu(e,s.metadata),id:e}}),t[e].metrics.spend+=s.metrics.spend,t[e].metrics.api_requests+=s.metrics.api_requests,t[e].metrics.successful_requests+=s.metrics.successful_requests,t[e].metrics.failed_requests+=s.metrics.failed_requests,t[e].metrics.total_tokens+=s.metrics.total_tokens})}),e=Object.values(t).sort((e,t)=>t.metrics.spend-e.metrics.spend),0===C.length?e:e.filter(e=>C.includes(e.metadata.id))},ex=s.charAt(0).toUpperCase()+s.slice(1);return(0,t.jsxs)("div",{style:{width:"100%"},className:"relative",children:[I&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",B.currentPage," / ",B.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:X,children:"Stop"})]})}),Q&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",B.currentPage,"/",B.totalPages," pages loaded)"]})}),et&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching agent data: fetched ",es.currentPage," / ",es.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:ei,children:"Stop"})]})}),ea&&"team"===s&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial agent data (",es.currentPage,"/",es.totalPages," pages loaded)"]})}),"team"===s&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by team"}),(0,t.jsx)(eO,{value:C,onChange:w})]}),(0,t.jsx)(eF.default,{dateValue:n,entityType:s,spendData:z,showFilters:"team"!==s&&null!==i&&i.length>0,filterLabel:`Filter by ${s}`,filterPlaceholder:`Select ${s} to filter...`,selectedFilters:C,onFiltersChange:w,filterOptions:(()=>{if(i)return i})()||void 0,filterMode:"user"===s?"single":"multiple",teams:N||[]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"agent"===s?"Request / Token Consumption":"Model Activity"}),"team"===s?(0,t.jsx)(m.Tab,{children:"Agent Activity"}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)(j.Title,{children:[ex," Spend Overview"]}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Spend"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)(z.metadata.total_spend,2)]})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:z.metadata.total_api_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:z.metadata.total_successful_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:z.metadata.total_failed_requests.toLocaleString()})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:z.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),(0,t.jsx)(o.BarChart,{data:[...z.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload,r=Object.keys(a.breakdown.entities||{}).length;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",a.metrics.total_tokens]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total ",ex,"s: ",r]}),(0,t.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,t.jsxs)("p",{className:"font-semibold",children:["Spend by ",ex,":"]}),Object.entries(a.breakdown.entities||{}).sort(([,e],[,t])=>{let s=e.metrics.spend;return t.metrics.spend-s}).slice(0,5).map(([e,s])=>(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:[eu(e,s.metadata),": $",(0,D.formatNumberWithCommas)(s.metrics.spend,2)]},e)),r>5&&(0,t.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",r-5," more"]})]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,t.jsxs)(j.Title,{children:["Spend Per ",ex]}),(0,t.jsx)(W.Subtitle,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,t.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,t.jsxs)("span",{children:["Get Started by Tracking cost per ",ex," "]}),(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/enterprise#spend-tracking",className:"text-blue-500 hover:text-blue-700 ml-1",children:"here"})]})]}),(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-6",children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(o.BarChart,{className:"mt-4 h-52",data:em().slice(0,5).map(e=>({...e,metadata:{...e.metadata,alias_display:e.metadata.alias&&e.metadata.alias.length>15?`${e.metadata.alias.slice(0,15)}...`:e.metadata.alias}})),index:"metadata.alias_display",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.metadata.alias}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,4)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.metrics.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.metrics.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens.toLocaleString()]})]})}})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:ex}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:em().filter(e=>e.metrics.spend>0).map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:e.metadata.alias}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.metrics.spend,4)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:(console.log("debugTags",{spendData:z}),b={},z.results.forEach(e=>{let{breakdown:t}=e,{entities:s}=t;console.log("debugTags",{entities:s});let a=Object.keys(s).reduce((e,t)=>{let{api_key_breakdown:a}=s[t];return Object.keys(a).forEach(s=>{let r={tag:t,usage:a[s].metrics.spend};e[s]?e[s].push(r):e[s]=[r]}),e},{});console.log("debugTags",{tagDictionary:a}),Object.entries(e.breakdown.api_keys||{}).forEach(([e,t])=>{b[e]||(b[e]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:t.metadata.key_alias,team_id:t.metadata.team_id||null,tags:a[e]||[]}},console.log("debugTags",{keySpend:b})),b[e].metrics.spend+=t.metrics.spend,b[e].metrics.prompt_tokens+=t.metrics.prompt_tokens,b[e].metrics.completion_tokens+=t.metrics.completion_tokens,b[e].metrics.total_tokens+=t.metrics.total_tokens,b[e].metrics.api_requests+=t.metrics.api_requests,b[e].metrics.successful_requests+=t.metrics.successful_requests,b[e].metrics.failed_requests+=t.metrics.failed_requests,b[e].metrics.cache_read_input_tokens+=t.metrics.cache_read_input_tokens||0,b[e].metrics.cache_creation_input_tokens+=t.metrics.cache_creation_input_tokens||0})}),Object.entries(b).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,S)),teams:null,showTags:"tag"===s,topKeysLimit:S,setTopKeysLimit:q})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"agent"===s?"Top Agents":"Top Models"}),(0,t.jsx)(eR,{topModels:(k={},z.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(([e,t])=>{k[e]||(k[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{k[e].spend+=t.metrics.spend}catch(s){console.error(`Error adding spend for ${e}: ${s}, got metrics: ${JSON.stringify(t)}`)}k[e].requests+=t.metrics.api_requests,k[e].successful_requests+=t.metrics.successful_requests,k[e].failed_requests+=t.metrics.failed_requests,k[e].tokens+=t.metrics.total_tokens})}),Object.entries(k).map(([e,t])=>({key:e,...t})).sort((e,t)=>t.spend-e.spend).slice(0,L)),topModelsLimit:L,setTopModelsLimit:A})]})}),"team"===s&&(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Top Agents Driving Spend"}),(0,t.jsx)(eR,{topModels:(v={},ee.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(([e,t])=>{v[e]||(v[e]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0,agent_name:t.metadata?.agent_name||e}),v[e].spend+=t.metrics.spend,v[e].requests+=t.metrics.api_requests,v[e].successful_requests+=t.metrics.successful_requests,v[e].failed_requests+=t.metrics.failed_requests,v[e].tokens+=t.metrics.total_tokens})}),Object.entries(v).map(([e,t])=>({key:t.agent_name,...t})).sort((e,t)=>t.spend-e.spend).slice(0,E)),topModelsLimit:E,setTopModelsLimit:O})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(c.Card,{children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsx)(j.Title,{children:"Provider Usage"}),(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:ed(),index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan","blue","indigo","violet","purple"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:ed().map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)("img",{src:(0,e$.getProviderLogoAndName)(e.provider).logo,alt:`${e.provider} logo`,className:"w-4 h-4",onError:t=>{let s=t.target,a=s.parentElement;if(a){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.provider?.charAt(0)||"-",a.replaceChild(t,s)}}}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:en,hidePromptCachingMetrics:"agent"===s})}),"team"===s?(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:ec})}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:eo,hidePromptCachingMetrics:"agent"===s})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:z})})]})]})]})};var eI=e.i(793130),eB=e.i(418371);let eW=({loading:e,isDateChanging:s,providerSpend:a})=>{let[l,i]=(0,T.useState)(!1),[n,o]=(0,T.useState)(!1),m=a.filter(e=>e.provider?.toLowerCase()==="unknown"?n:!!l||e.spend>0);return(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Spend by Provider"}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Zero Spend"}),(0,t.jsx)(eI.Switch,{checked:l,onChange:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("label",{className:"text-sm text-gray-700",children:"Show Unknown"}),(0,t.jsx)(v.Tooltip,{title:"Requests that failed to route to a provider",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(eI.Switch,{checked:n,onChange:o})]})]})]}),e?(0,t.jsx)(P,{isDateChanging:s}):(0,t.jsxs)(u.Grid,{numItems:2,children:[(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsx)(eA.DonutChart,{className:"mt-4 h-40",data:m,index:"provider",category:"spend",valueFormatter:e=>`$${(0,D.formatNumberWithCommas)(e,2)}`,colors:["cyan"]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(K.Table,{children:[(0,t.jsx)(Y.TableHead,{children:(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(G.TableHeaderCell,{children:"Provider"}),(0,t.jsx)(G.TableHeaderCell,{children:"Spend"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-green-600",children:"Successful"}),(0,t.jsx)(G.TableHeaderCell,{className:"text-red-600",children:"Failed"}),(0,t.jsx)(G.TableHeaderCell,{children:"Tokens"})]})}),(0,t.jsx)(Z.TableBody,{children:m.map(e=>(0,t.jsxs)(H.TableRow,{children:[(0,t.jsx)(J.TableCell,{children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,t.jsx)(eB.ProviderLogo,{provider:e.provider,className:"w-4 h-4"}),(0,t.jsx)("span",{children:e.provider})]})}),(0,t.jsxs)(J.TableCell,{children:["$",(0,D.formatNumberWithCommas)(e.spend,2)]}),(0,t.jsx)(J.TableCell,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,t.jsx)(J.TableCell,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})};var eK=e.i(311451),eY=e.i(482725),eH=e.i(918789);let{TextArea:eG}=eK.Input,eZ={get_usage_data:"📊",get_team_usage_data:"👥",get_tag_usage_data:"🏷️"},eJ=({step:e})=>{let s=eZ[e.tool_name]||"🔧",a=e.arguments,r=a.start_date&&a.end_date?`${a.start_date} → ${a.end_date}`:"",l=a.team_ids||a.tags||a.user_id||"";return(0,t.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-gray-100 border border-gray-200 text-xs",children:[(0,t.jsx)("span",{className:"flex-shrink-0 mt-0.5",children:"running"===e.status?(0,t.jsx)(eY.Spin,{size:"small"}):"error"===e.status?(0,t.jsx)("span",{className:"text-red-500",children:"✗"}):(0,t.jsx)("span",{className:"text-green-600",children:"✓"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"font-medium text-gray-700",children:[s," ",e.tool_label]}),r&&(0,t.jsx)("div",{className:"text-gray-500 mt-0.5",children:r}),l&&(0,t.jsxs)("div",{className:"text-gray-500 mt-0.5",children:["Filter: ",l]}),"error"===e.status&&e.error&&(0,t.jsx)("div",{className:"text-red-600 mt-0.5",children:e.error})]})]})},eQ=({content:e})=>(0,t.jsx)(eH.default,{components:{p:({children:e})=>(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:e}),strong:({children:e})=>(0,t.jsx)("strong",{className:"font-semibold",children:e}),ul:({children:e})=>(0,t.jsx)("ul",{className:"list-disc pl-4 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,t.jsx)("ol",{className:"list-decimal pl-4 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,t.jsx)("li",{children:e}),h1:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h2:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),h3:({children:e})=>(0,t.jsx)("h4",{className:"font-semibold text-sm mt-2 mb-1",children:e}),code:({children:e,className:s})=>s?.includes("language-")?(0,t.jsx)("pre",{className:"bg-gray-100 rounded p-2 my-1 overflow-x-auto text-xs",children:(0,t.jsx)("code",{children:e})}):(0,t.jsx)("code",{className:"px-1 py-0.5 rounded bg-gray-100 text-xs font-mono",children:e}),table:({children:e})=>(0,t.jsx)("div",{className:"overflow-x-auto my-2",children:(0,t.jsx)("table",{className:"text-xs border-collapse w-full",children:e})}),th:({children:e})=>(0,t.jsx)("th",{className:"border border-gray-200 px-2 py-1 bg-gray-50 font-medium text-left",children:e}),td:({children:e})=>(0,t.jsx)("td",{className:"border border-gray-200 px-2 py-1",children:e})},children:e}),eX=({open:e,onClose:s,accessToken:a})=>{let[r,l]=(0,T.useState)([]),[i,n]=(0,T.useState)(""),[o,c]=(0,T.useState)(!1),[d,u]=(0,T.useState)(void 0),[m,x]=(0,T.useState)([]),[h,p]=(0,T.useState)(!1),[g,f]=(0,T.useState)(""),[j,_]=(0,T.useState)(null),[b,v]=(0,T.useState)([]),N=(0,T.useRef)(null),C=(0,T.useRef)(null);(0,T.useEffect)(()=>{e&&0===m.length&&w()},[e]),(0,T.useEffect)(()=>{"function"==typeof N.current?.scrollIntoView&&N.current.scrollIntoView({behavior:"smooth"})},[r,g,b,j]);let w=async()=>{if(a){p(!0);try{let e=await (0,F.modelHubCall)(a);if(e?.data?.length>0){let t=e.data.map(e=>e.model_group).sort();x(t)}}catch(e){console.error("Failed to load models:",e)}finally{p(!1)}}},S=async()=>{if(!a||!i.trim()||o)return;let e=[...r,{role:"user",content:i.trim()}];l(e),n(""),c(!0),f(""),_(null),v([]);let t=new AbortController;C.current=t;let s="",u=[];try{await (0,F.usageAiChatStream)(a,e.slice(-20).map(e=>({role:e.role,content:e.content})),d||"",e=>{_(null),s+=e,f(s)},()=>{_(null),v([]),l(e=>[...e,{role:"assistant",content:s,toolCalls:u.length>0?[...u]:void 0}]),f("")},e=>{_(null),v([]),l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")},e=>{_(e)},e=>{let t=u.findIndex(t=>t.tool_name===e.tool_name);t>=0?u[t]={...e}:u.push({...e}),v([...u])},t.signal)}catch(s){if(s?.name==="AbortError"||t.signal.aborted)return;let e=s?.message||"Failed to get response. Please try again.";l(t=>[...t,{role:"assistant",content:`Error: ${e}`}]),f("")}finally{c(!1),C.current=null}};return(0,t.jsxs)("div",{"data-testid":"usage-ai-chat-panel",className:`fixed top-0 right-0 h-full bg-white border-l border-gray-200 shadow-2xl z-50 flex flex-col transition-transform duration-300 ease-in-out ${e?"translate-x-0":"translate-x-full"}`,style:{width:420},children:[(0,t.jsxs)("div",{className:"px-5 pt-5 pb-3 border-b border-gray-100 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-5 h-5 text-blue-600",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:"Ask AI"})]}),(0,t.jsx)("button",{onClick:()=>{C.current&&C.current.abort(),s()},className:"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Ask about your spend, models, keys, and trends"})]}),(0,t.jsx)("div",{className:"px-5 py-3 border-b border-gray-100 flex-shrink-0",children:(0,t.jsx)(k.Select,{placeholder:"Select a model (optional, defaults to gpt-4o-mini)",value:d,onChange:e=>u(e),loading:h,showSearch:!0,allowClear:!0,size:"small",className:"w-full",options:m.map(e=>({label:e,value:e})),filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())})}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50",children:[0===r.length&&!g&&!o&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400",children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})}),(0,t.jsx)("p",{className:"text-sm font-medium",children:"Ask a question about your usage"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:'e.g. "Which model costs me the most?"'})]}),r.map((e,s)=>(0,t.jsx)("div",{children:"user"===e.role?(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)("div",{className:"max-w-[88%] rounded-xl px-3.5 py-2 text-sm leading-relaxed bg-blue-600 text-white",children:e.content})}):(0,t.jsxs)("div",{className:"space-y-2",children:[e.toolCalls&&e.toolCalls.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:e.toolCalls.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),(0,t.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,t.jsx)(eQ,{content:e.content})})]})},s)),o&&b.length>0&&(0,t.jsx)("div",{className:"space-y-1.5",children:b.map((e,s)=>(0,t.jsx)(eJ,{step:e},s))}),o&&!g&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-gray-500",children:[(0,t.jsx)(eY.Spin,{size:"small"}),(0,t.jsx)("span",{className:"italic",children:j||"Thinking..."})]}),g&&(0,t.jsx)("div",{className:"max-w-[95%] rounded-xl px-3.5 py-2.5 text-sm leading-relaxed bg-white border border-gray-200 text-gray-800",children:(0,t.jsx)(eQ,{content:g})}),(0,t.jsx)("div",{ref:N})]}),(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-gray-200 bg-white flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(eG,{value:i,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),S())},placeholder:"Ask about your usage...",autoSize:{minRows:1,maxRows:3},className:"flex-1",disabled:o}),(0,t.jsx)(y.Button,{type:"primary",onClick:S,disabled:!i.trim()||o,loading:o,children:"Send"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,t.jsx)("button",{onClick:()=>{l([]),f(""),v([]),_(null)},className:"text-xs text-gray-400 hover:text-gray-600 transition-colors",disabled:0===r.length,children:"Clear chat"}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enter to send"})]})]})]})};var e0=e.i(299251),e1=e.i(153702);e.i(247167);var e2=e.i(931067);let e4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var e5=e.i(9583),e3=T.forwardRef(function(e,t){return T.createElement(e5.default,(0,e2.default)({},e,{ref:t,icon:e4}))}),e6=e.i(777579),e7=e.i(983561);let e9={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"};var e8=T.forwardRef(function(e,t){return T.createElement(e5.default,(0,e2.default)({},e,{ref:t,icon:e9}))}),te=e.i(232164),tt=e.i(645526),ts=e.i(771674),ta=e.i(906579);let tr=[{value:"global",label:"Global Usage",showForAdmin:"Global Usage",showForNonAdmin:"Your Usage",description:"View usage across all resources",descriptionForAdmin:"View usage across all resources",descriptionForNonAdmin:"View your usage",icon:(0,t.jsx)(e3,{style:{fontSize:"16px"}})},{value:"organization",label:"Organization Usage",showForAdmin:"Organization Usage",showForNonAdmin:"Your Organization Usage",description:"View organization-level usage",descriptionForAdmin:"View usage across all organizations",descriptionForNonAdmin:"View your organization's usage",icon:(0,t.jsx)(e0.BankOutlined,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,t.jsx)(tt.TeamOutlined,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,t.jsx)(e8,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,t.jsx)(te.TagsOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,t.jsx)(e7.RobotOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user",label:"User Usage",description:"View usage by individual users",icon:(0,t.jsx)(ts.UserOutlined,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,t.jsx)(e6.LineChartOutlined,{style:{fontSize:"16px"}}),adminOnly:!0}],tl=({value:e,onChange:s,isAdmin:a,title:r="Usage View",description:l="Select the usage data you want to view","data-id":i})=>{let n=tr.filter(e=>!e.adminOnly||!!a).map(e=>{let t=e.label,s=e.description;return e.showForAdmin&&e.showForNonAdmin&&(t=a?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(s=a?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:t,description:s,icon:e.icon,badgeText:e.badgeText}});return(0,t.jsx)("div",{className:"w-full","data-id":i,children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,t.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,t.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,t.jsx)(e1.BarChartOutlined,{style:{fontSize:"32px"}})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:r}),(0,t.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:l})]})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(k.Select,{value:e,onChange:s,className:"w-54 sm:w-64 md:w-72",size:"large",options:n.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,t.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,t.jsx)("div",{className:"items-center",children:(0,t.jsx)(ta.Badge,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=n.find(t=>t.value===e.value);return s?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:s.icon}),(0,t.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};e.s(["default",0,({teams:e,organizations:U})=>{let R,{accessToken:V,userRole:z,userId:I,premiumUser:B}=(0,S.default)(),[W,K]=(0,T.useState)(null),[Y,H]=(0,T.useState)(!1),[G,Z]=(0,T.useState)(!1),[J,Q]=(0,T.useState)(!1),X=(0,T.useMemo)(()=>new Date(Date.now()-6048e5),[]),es=(0,T.useMemo)(()=>new Date,[]),[ea,ei]=(0,T.useState)({from:X,to:es}),[en,eo]=(0,T.useState)([]),{data:ec=[]}=(0,w.useCustomers)(),{data:ed}=(0,C.useAgents)(),{data:eu}=(0,q.useCurrentUser)();console.log(`currentUser: ${JSON.stringify(eu)}`),console.log(`currentUser max budget: ${eu?.max_budget}`);let em=A.all_admin_roles.includes(z||""),[ex,eh]=(0,T.useState)(""),[ep,eg]=(0,n.useDebouncedState)("",{wait:300}),{data:ef,fetchNextPage:ej,hasNextPage:e_,isFetchingNextPage:ey,isLoading:eb}=(0,L.useInfiniteUsers)(50,ep||void 0),ek=(0,T.useMemo)(()=>{if(!ef?.pages)return[];let e=new Set,t=[];for(let s of ef.pages)for(let a of s.users)e.has(a.user_id)||(e.add(a.user_id),t.push({value:a.user_id,label:a.user_alias?`${a.user_alias} (${a.user_id})`:a.user_email?`${a.user_email} (${a.user_id})`:a.user_id}));return t},[ef]),[ev,eN]=(0,T.useState)(em?null:I||null),[eT,eC]=(0,T.useState)("groups"),[ew,eS]=(0,T.useState)(!1),[eq,eD]=(0,T.useState)(!1),[eA,eM]=(0,T.useState)(!1),[eE,eO]=(0,T.useState)("global"),[eF,e$]=(0,T.useState)(!0),[eP,eR]=(0,T.useState)(5),[eV,eI]=(0,T.useState)(5),[eB,eK]=(0,T.useState)(!1),eY=async()=>{V&&eo(Object.values(await (0,F.tagListCall)(V)).map(e=>({label:e.name,value:e.name})))};(0,T.useEffect)(()=>{eY()},[V]),(0,T.useEffect)(()=>{!em&&I&&eN(I)},[em,I]);let eH=em?ev:I||null,eG=(0,T.useMemo)(()=>ea.from?new Date(ea.from):null,[ea.from]),eZ=(0,T.useMemo)(()=>ea.to?new Date(ea.to):null,[ea.to]),eJ=(0,T.useRef)(0);(0,T.useEffect)(()=>{if(!V||!eG||!eZ)return;let e=++eJ.current;Z(!0),H(!1),K(null),(0,F.userDailyActivityAggregatedCall)(V,eG,eZ,eH).then(t=>{eJ.current===e&&(K(t),Z(!1),Q(!1))}).catch(()=>{eJ.current===e&&(H(!0),Z(!1))})},[V,eG,eZ,eH]);let eQ=er({fetchFn:F.userDailyActivityCall,args:[V,eG,eZ,eH],enabled:Y&&!!V&&!!eG&&!!eZ}),e0=(0,T.useMemo)(()=>W||(Y?eQ.data:{results:[],metadata:{}}),[W,Y,eQ.data]),e1=G||eQ.loading;(0,T.useEffect)(()=>{Y&&!eQ.loading&&eQ.data.results.length>0&&Q(!1)},[Y,eQ.loading,eQ.data.results.length]);let e2=(0,T.useCallback)(e=>{Q(!0),ei(e)},[]),e4=e0.metadata?.total_spend||0,e5=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.models||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e3=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.model_groups||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({key:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens})).sort((e,t)=>t.spend-e.spend).slice(0,eV)},[e0.results,eV]),e6=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.providers||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests||0,e[t].metrics.failed_requests+=s.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({provider:e,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}))},[e0.results]),e7=(0,T.useMemo)(()=>{let e={};return e0.results.forEach(t=>{Object.entries(t.breakdown.api_keys||{}).forEach(([t,s])=>{e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:s.metadata.key_alias,team_id:null,tags:s.metadata.tags||[]}}),e[t].metrics.spend+=s.metrics.spend,e[t].metrics.prompt_tokens+=s.metrics.prompt_tokens,e[t].metrics.completion_tokens+=s.metrics.completion_tokens,e[t].metrics.total_tokens+=s.metrics.total_tokens,e[t].metrics.api_requests+=s.metrics.api_requests,e[t].metrics.successful_requests+=s.metrics.successful_requests,e[t].metrics.failed_requests+=s.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=s.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=s.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(([e,t])=>({api_key:e,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend})).sort((e,t)=>t.spend-e.spend).slice(0,eP)},[e0.results,eP]),e9=(0,T.useMemo)(()=>[...e0.results].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),[e0.results]),e8=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"models",e),[e0,e]),te=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"api_keys",e),[e0,e]),tt=(0,T.useMemo)(()=>(0,M.processActivityData)(e0,"mcp_servers",e),[e0,e]);return(0,t.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,t.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,t.jsx)(tl,{value:eE,onChange:e=>eO(e),isAdmin:em}),(0,t.jsx)($.default,{value:ea,onValueChange:e2})]}),eQ.isFetchingMore&&(0,t.jsx)(_.Alert,{banner:!0,type:"warning",className:"mb-2",message:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{children:[(0,t.jsx)(l.LoadingOutlined,{spin:!0,className:"mr-2"}),"Currently fetching spend data: fetched ",eQ.progress.currentPage," /"," ",eQ.progress.totalPages," pages. Charts will update periodically as data loads. Moving off of this page will stop and reset this. To continue using the UI in the meantime,"," ",(0,t.jsxs)("a",{href:window.location.href,target:"_blank",rel:"noopener noreferrer",children:["open a new tab ",(0,t.jsx)(a.ExportOutlined,{})]}),"."]}),(0,t.jsx)(y.Button,{type:"primary",danger:!0,onClick:eQ.cancel,children:"Stop"})]})}),eQ.cancelled&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",className:"mb-2",message:(0,t.jsxs)("span",{children:["Showing partial data (",eQ.progress.currentPage,"/",eQ.progress.totalPages," ","pages loaded)"]})}),"global"===eE&&(0,t.jsxs)(t.Fragment,{children:[em&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(f.Text,{className:"mb-2",children:"Filter by user"}),(0,t.jsx)(k.Select,{showSearch:!0,allowClear:!0,style:{width:"100%"},placeholder:"Select user to filter...",value:ev,onChange:e=>eN(e??null),filterOption:!1,onSearch:e=>{eh(e),eg(e)},searchValue:ex,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&e_&&!ey&&ej()},loading:eb,notFoundContent:eb?(0,t.jsx)(l.LoadingOutlined,{spin:!0}):"No users found",options:ek,popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,ey&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(l.LoadingOutlined,{spin:!0})})]})})]}),(0,t.jsxs)(x.TabGroup,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)(h.TabList,{variant:"solid",className:"mt-1",children:[(0,t.jsx)(m.Tab,{children:"Cost"}),(0,t.jsx)(m.Tab,{children:"Model Activity"}),(0,t.jsx)(m.Tab,{children:"Key Activity"}),(0,t.jsx)(m.Tab,{children:"MCP Server Activity"}),(0,t.jsx)(m.Tab,{children:"Endpoint Activity"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>eM(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 1l1.5 3.5L13 6l-3.5 1.5L8 11 6.5 7.5 3 6l3.5-1.5L8 1zm4 7l.75 1.75L14.5 10.5l-1.75.75L12 13l-.75-1.75L9.5 10.5l1.75-.75L12 8zM4 9l.75 1.75L6.5 11.5l-1.75.75L4 14l-.75-1.75L1.5 11.5l1.75-.75L4 9z"})}),children:"Ask AI"}),(0,t.jsx)(y.Button,{onClick:()=>eD(!0),icon:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]})]}),(0,t.jsxs)(g.TabPanels,{children:[(0,t.jsx)(p.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:2,className:"gap-2 w-full",children:[(0,t.jsxs)(d.Col,{numColSpan:2,children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mt-2 mb-2",children:(0,t.jsxs)(f.Text,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content text-lg",children:["Project Spend"," ",ea.from&&ea.to&&(0,t.jsxs)(t.Fragment,{children:[ea.from.toLocaleDateString("en-US",{month:"short",day:"numeric",year:ea.from.getFullYear()!==ea.to.getFullYear()?"numeric":void 0})," - ",ea.to.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]})}),(0,t.jsx)(et.default,{userSpend:e4,selectedTeam:null,userMaxBudget:eu?.max_budget||null})]}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Usage Metrics"}),(0,t.jsxs)(u.Grid,{numItems:5,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Total Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_api_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Successful Requests"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_successful_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Failed Requests"}),(0,t.jsx)(v.Tooltip,{title:"Includes requests that failed to route to a provider, tool usage failures, and other request errors where the provider cannot be determined.",children:(0,t.jsx)(r.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-600"})})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-red-600",children:e0.metadata?.total_failed_requests?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Average Cost per Request"}),(0,t.jsxs)(f.Text,{className:"text-2xl font-bold mt-2",children:["$",(0,D.formatNumberWithCommas)((e4||0)/(e0.metadata?.total_api_requests||1),4)]})]}),(0,t.jsxs)(c.Card,{className:"cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>eK(!eB),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Title,{children:"Total Tokens"}),eB?(0,t.jsx)(s.DownOutlined,{className:"text-gray-400 text-xs"}):(0,t.jsx)(i.RightOutlined,{className:"text-gray-400 text-xs"})]}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2",children:e0.metadata?.total_tokens?.toLocaleString()||0})]})]}),eB&&(0,t.jsxs)(u.Grid,{numItems:4,className:"gap-4 mt-4",children:[(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Input Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-blue-600",children:e0.metadata?.total_prompt_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Output Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-cyan-600",children:e0.metadata?.total_completion_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Read Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-green-600",children:e0.metadata?.total_cache_read_input_tokens?.toLocaleString()||0})]}),(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Cache Write Tokens"}),(0,t.jsx)(f.Text,{className:"text-2xl font-bold mt-2 text-purple-600",children:e0.metadata?.total_cache_creation_input_tokens?.toLocaleString()||0})]})]})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsxs)(c.Card,{children:[(0,t.jsx)(j.Title,{children:"Daily Spend"}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)(o.BarChart,{data:e9,index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,yAxisWidth:100,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.date}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.metrics.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Requests: ",a.metrics.api_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Successful: ",a.metrics.successful_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Failed: ",a.metrics.failed_requests]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.metrics.total_tokens]})]})}})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"Top Virtual Keys"}),(0,t.jsx)(eU.default,{topKeys:e7,teams:null,topKeysLimit:eP,setTopKeysLimit:eR})]})}),(0,t.jsx)(d.Col,{numColSpan:1,children:(0,t.jsxs)(c.Card,{className:"h-full",children:[(0,t.jsx)(j.Title,{children:"groups"===eT?"Top Public Model Names":"Top Litellm Models"}),(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(b.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eV,onChange:e=>eI(e)}),(0,t.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"groups"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("groups"),children:"Public Model Name"}),(0,t.jsx)("button",{className:`px-3 py-1 text-sm rounded-md transition-colors ${"individual"===eT?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"}`,onClick:()=>eC("individual"),children:"Litellm Model Name"})]})]}),e1?(0,t.jsx)(P,{isDateChanging:J}):(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(R="groups"===eT?e3:e5,(0,t.jsx)(o.BarChart,{className:"mt-4",style:{height:52*Math.min(R.length,eV)},data:R,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:el.valueFormatterSpend,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:({payload:e,active:s})=>{if(!s||!e?.[0])return null;let a=e[0].payload;return(0,t.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,t.jsx)("p",{className:"font-bold",children:a.key}),(0,t.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,D.formatNumberWithCommas)(a.spend,2)]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",a.requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-green-600",children:["Successful: ",a.successful_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-red-600",children:["Failed: ",a.failed_requests.toLocaleString()]}),(0,t.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",a.tokens.toLocaleString()]})]})}}))})]})}),(0,t.jsx)(d.Col,{numColSpan:2,children:(0,t.jsx)(eW,{loading:e1,isDateChanging:J,providerSpend:e6})})]})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:e8})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:te})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(M.ActivityMetrics,{modelMetrics:tt})}),(0,t.jsx)(p.TabPanel,{children:(0,t.jsx)(eL,{userSpendData:e0})})]})]})]}),"organization"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"organization",userID:I,userRole:z,dateValue:ea,entityList:U?.map(e=>({label:e.organization_alias,value:e.organization_id}))||null,premiumUser:B}),"team"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"team",userID:I,userRole:z,entityList:e?.map(e=>({label:e.team_alias,value:e.team_id}))||null,premiumUser:B,dateValue:ea}),"customer"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"customer",userID:I,userRole:z,entityList:ec?.map(e=>({label:e.alias||e.user_id,value:e.user_id}))||null,premiumUser:B,dateValue:ea}),"tag"===eE&&(0,t.jsxs)(t.Fragment,{children:[eF&&(0,t.jsx)(_.Alert,{banner:!0,type:"info",message:"Reusable credentials are automatically tracked as tags",description:(0,t.jsxs)(N.Typography.Text,{children:["When a reusable credential is used, it will appear as a tag prefixed with"," ",(0,t.jsx)(N.Typography.Text,{code:!0,children:"Credential: "}),"in this view."]}),closable:!0,onClose:()=>e$(!1),className:"mb-5"}),(0,t.jsx)(ez,{accessToken:V,entityType:"tag",userID:I,userRole:z,entityList:en,premiumUser:B,dateValue:ea})]}),"agent"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"agent",userID:I,userRole:z,entityList:ed?.agents?.map(e=>({label:e.agent_name,value:e.agent_id}))||null,premiumUser:B,dateValue:ea}),"user"===eE&&(0,t.jsx)(ez,{accessToken:V,entityType:"user",userID:I,userRole:z,entityList:ek.length>0?ek:null,premiumUser:B,dateValue:ea}),"user-agent-activity"===eE&&(0,t.jsx)(ee,{accessToken:V,userRole:z,dateValue:ea})]})}),(0,t.jsx)(E.default,{isOpen:ew,onClose:()=>eS(!1),accessToken:V}),(0,t.jsx)(O.default,{isOpen:eq,onClose:()=>eD(!1),entityType:"team",spendData:{results:e0.results,metadata:e0.metadata},dateRange:ea,selectedFilters:[],customTitle:"Export Usage Data"}),(0,t.jsx)(eX,{open:eA,onClose:()=>eM(!1),accessToken:V})]})}],797305)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ea80fa81416a4ac8.js b/litellm/proxy/_experimental/out/_next/static/chunks/be6ec8af98853ec3.js similarity index 53% rename from litellm/proxy/_experimental/out/_next/static/chunks/ea80fa81416a4ac8.js rename to litellm/proxy/_experimental/out/_next/static/chunks/be6ec8af98853ec3.js index d52c7ed905c..d4e3bf10a6f 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/ea80fa81416a4ac8.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/be6ec8af98853ec3.js @@ -1,3 +1,3 @@ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,517442,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(592968);let l=e=>e>=.8?"text-green-600":"text-yellow-600",r=({entities:e})=>{let[a,r]=(0,s.useState)(!0),[i,n]=(0,s.useState)({});return e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 cursor-pointer",onClick:()=>r(!a),children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h4",{className:"font-medium",children:["Detected Entities (",e.length,")"]})]}),a&&(0,t.jsx)("div",{className:"space-y-2",children:e.map((e,s)=>{let a=i[s]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>{n(e=>({...e,[s]:!e[s]}))},children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${a?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsx)("span",{className:"font-medium mr-2",children:e.entity_type}),(0,t.jsxs)("span",{className:`font-mono ${l(e.score)}`,children:["Score: ",e.score.toFixed(2)]})]}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Entity Type:"}),(0,t.jsx)("span",{children:e.entity_type})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Position:"}),(0,t.jsxs)("span",{children:["Characters ",e.start,"-",e.end]})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Confidence:"}),(0,t.jsx)("span",{className:l(e.score),children:e.score.toFixed(2)})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[e.recognition_metadata&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Recognizer:"}),(0,t.jsx)("span",{children:e.recognition_metadata.recognizer_name})]}),(0,t.jsxs)("div",{className:"flex overflow-hidden",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Identifier:"}),(0,t.jsx)("span",{className:"truncate text-xs font-mono",children:e.recognition_metadata.recognizer_identifier})]})]}),e.analysis_explanation&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Explanation:"}),(0,t.jsx)("span",{children:e.analysis_explanation})]})]})]})})]},s)})})]}):null},i=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),n=e=>e?i("detected","red"):i("not detected","slate"),o=({title:e,count:a,defaultOpen:l=!0,right:r,children:i})=>{let[n,o]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>o(e=>!e),children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${n?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{children:r})]}),n&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:i})]})},d=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),c=()=>(0,t.jsx)("div",{className:"my-3 border-t"}),m=({response:e})=>{if(!e)return null;let s=e.outputs??e.output??[],a="GUARDRAIL_INTERVENED"===e.action?"red":"green",l=(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.guardrailCoverage?.textCharacters&&i(`text guarded ${e.guardrailCoverage.textCharacters.guarded??0}/${e.guardrailCoverage.textCharacters.total??0}`,"blue"),e.guardrailCoverage?.images&&i(`images guarded ${e.guardrailCoverage.images.guarded??0}/${e.guardrailCoverage.images.total??0}`,"blue")]}),r=e.usage&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)});return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Action:",children:i(e.action??"N/A",a)}),e.actionReason&&(0,t.jsx)(d,{label:"Action Reason:",children:e.actionReason}),e.blockedResponse&&(0,t.jsx)(d,{label:"Blocked Response:",children:(0,t.jsx)("span",{className:"italic",children:e.blockedResponse})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Coverage:",children:l}),(0,t.jsx)(d,{label:"Usage:",children:r})]})]}),s.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c,{}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Outputs"}),(0,t.jsx)("div",{className:"space-y-2",children:s.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:e.text??(0,t.jsx)("em",{children:"(non-text output)"})})},s))})]})]}),e.assessments?.length?(0,t.jsx)("div",{className:"space-y-3",children:e.assessments.map((e,s)=>{let a=(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&i("word","slate"),e.contentPolicy&&i("content","slate"),e.topicPolicy&&i("topic","slate"),e.sensitiveInformationPolicy&&i("sensitive-info","slate"),e.contextualGroundingPolicy&&i("contextual-grounding","slate"),e.automatedReasoningPolicy&&i("automated-reasoning","slate")]});return(0,t.jsxs)(o,{title:`Assessment #${s+1}`,defaultOpen:!0,right:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[e.invocationMetrics?.guardrailProcessingLatency!=null&&i(`${e.invocationMetrics.guardrailProcessingLatency} ms`,"amber"),a]}),children:[e.wordPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Word Policy"}),(e.wordPolicy.customWords?.length??0)>0&&(0,t.jsx)(o,{title:"Custom Words",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.customWords.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.wordPolicy.managedWordLists?.length??0)>0&&(0,t.jsx)(o,{title:"Managed Word Lists",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.wordPolicy.managedWordLists.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&i(e.type,"slate")]}),n(e.detected)]},s))})})]}),e.contentPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Content Policy"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Strength"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Confidence"})]})}),(0,t.jsx)("tbody",{children:e.contentPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.filterStrength??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.confidence??"—"})]},s))})]})})]}):null,e.contextualGroundingPolicy?.filters?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Contextual Grounding"}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"min-w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,t.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Score"}),(0,t.jsx)("th",{className:"py-1 pr-4",children:"Threshold"})]})}),(0,t.jsx)("tbody",{children:e.contextualGroundingPolicy.filters.map((e,s)=>(0,t.jsxs)("tr",{className:"border-t",children:[(0,t.jsx)("td",{className:"py-1 pr-4",children:e.type??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:i(e.action??"—",e.detected?"red":"slate")}),(0,t.jsx)("td",{className:"py-1 pr-4",children:n(e.detected)}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.score??"—"}),(0,t.jsx)("td",{className:"py-1 pr-4",children:e.threshold??"—"})]},s))})]})})]}):null,e.sensitiveInformationPolicy&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Sensitive Information"}),(e.sensitiveInformationPolicy.piiEntities?.length??0)>0&&(0,t.jsx)(o,{title:"PII Entities",defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.piiEntities.map((e,s)=>(0,t.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),e.type&&i(e.type,"slate"),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),n(e.detected)]},s))})}),(e.sensitiveInformationPolicy.regexes?.length??0)>0&&(0,t.jsx)(o,{title:"Custom Regexes",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.regexes.map((e,s)=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-2 bg-gray-50 rounded gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"regex"}),(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.regex})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[n(e.detected),e.match&&(0,t.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]})]},s))})})]}),e.topicPolicy?.topics?.length?(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h6",{className:"font-medium mb-2",children:"Topic Policy"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.topicPolicy.topics.map((e,s)=>(0,t.jsx)("div",{className:"px-3 py-1.5 bg-gray-50 rounded-md text-xs",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[i(e.action??"N/A",e.detected?"red":"slate"),(0,t.jsx)("span",{className:"font-medium",children:e.name??"topic"}),e.type&&i(e.type,"slate"),n(e.detected)]})},s))})]}):null,e.invocationMetrics&&(0,t.jsx)(o,{title:"Invocation Metrics",defaultOpen:!1,children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(d,{label:"Latency (ms)",children:e.invocationMetrics.guardrailProcessingLatency??"—"}),(0,t.jsx)(d,{label:"Coverage:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.invocationMetrics.guardrailCoverage?.textCharacters&&i(`text ${e.invocationMetrics.guardrailCoverage.textCharacters.guarded??0}/${e.invocationMetrics.guardrailCoverage.textCharacters.total??0}`,"blue"),e.invocationMetrics.guardrailCoverage?.images&&i(`images ${e.invocationMetrics.guardrailCoverage.images.guarded??0}/${e.invocationMetrics.guardrailCoverage.images.total??0}`,"blue")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(d,{label:"Usage:",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.invocationMetrics.usage&&Object.entries(e.invocationMetrics.usage).map(([e,s])=>"number"==typeof s?(0,t.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[e,": ",s]},e):null)})})})]})}),e.automatedReasoningPolicy?.findings?.length?(0,t.jsx)(o,{title:"Automated Reasoning Findings",defaultOpen:!1,children:(0,t.jsx)("div",{className:"space-y-2",children:e.automatedReasoningPolicy.findings.map((e,s)=>(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,t.jsx)(o,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})},x=(e,s="slate")=>(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block ${{green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]}`,children:e}),u=({title:e,count:a,defaultOpen:l=!0,children:r})=>{let[i,n]=(0,s.useState)(l);return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>n(e=>!e),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("h5",{className:"font-medium",children:[e," ","number"==typeof a&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",a,")"]})]})]})}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},p=({label:e,children:s,mono:a})=>(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:e}),(0,t.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:s})]}),h=({response:e})=>{if(!e||"string"==typeof e)return"string"==typeof e&&e?(0,t.jsx)("div",{className:"bg-white rounded-lg border border-red-200 p-4",children:(0,t.jsxs)("div",{className:"text-red-800",children:[(0,t.jsx)("h5",{className:"font-medium mb-2",children:"Error"}),(0,t.jsx)("p",{className:"text-sm",children:e})]})}):null;let s=Array.isArray(e)?e:[];if(0===s.length)return(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsx)("div",{className:"text-gray-600 text-sm",children:"No detections found"})});let a=s.filter(e=>"pattern"===e.type),l=s.filter(e=>"blocked_word"===e.type),r=s.filter(e=>"category_keyword"===e.type),i=s.filter(e=>"BLOCK"===e.action).length,n=s.filter(e=>"MASK"===e.action).length,o=s.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p,{label:"Total Detections:",children:(0,t.jsx)("span",{className:"font-semibold",children:o})}),(0,t.jsx)(p,{label:"Actions:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&x(`${i} blocked`,"red"),n>0&&x(`${n} masked`,"blue"),0===i&&0===n&&x("passed","green")]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)(p,{label:"By Type:",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&x(`${a.length} patterns`,"slate"),l.length>0&&x(`${l.length} keywords`,"slate"),r.length>0&&x(`${r.length} categories`,"slate")]})})})]})}),a.length>0&&(0,t.jsx)(u,{title:"Patterns Matched",count:a.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:a.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,t.jsx)(u,{title:"Blocked Words Detected",count:l.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:l.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,t.jsx)(p,{label:"Description:",children:e.description})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,t.jsx)(u,{title:"Category Keywords Detected",count:r.length,defaultOpen:!0,children:(0,t.jsx)("div",{className:"space-y-2",children:r.map((e,s)=>(0,t.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(p,{label:"Category:",children:e.category||"unknown"}),(0,t.jsx)(p,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,t.jsx)(p,{label:"Severity:",children:x(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,t.jsx)("div",{className:"space-y-1",children:(0,t.jsx)(p,{label:"Action:",children:x(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,t.jsx)(u,{title:"Raw Detection Data",defaultOpen:!1,children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})};var g=e.i(764205);let f=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M5 8l2 2 4-4",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),y=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M6 6l4 4M10 6l-4 4",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),j=()=>(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"animate-spin",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"#D1D5DB",strokeWidth:"2"}),(0,t.jsx)("path",{d:"M8 2a6 6 0 0 1 6 6",stroke:"#6366F1",strokeWidth:"2",strokeLinecap:"round"})]}),b=({title:e,data:l,loading:r,error:i})=>{let[n,o]=(0,s.useState)(!1);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>o(!n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,t.jsx)(j,{}):i?(0,t.jsx)(a.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"text-gray-400 text-sm",children:"--"})}):l?.compliant?(0,t.jsx)(f,{}):(0,t.jsx)(y,{}),(0,t.jsx)("span",{className:"font-medium text-sm text-gray-900",children:e})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!r&&!i&&l&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase ${l.compliant?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:l.compliant?"COMPLIANT":"NON-COMPLIANT"}),i&&(0,t.jsx)("span",{className:"px-2 py-0.5 rounded text-[11px] font-medium bg-gray-100 text-gray-500 border border-gray-200",children:"UNAVAILABLE"}),(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${n?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[r&&(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Checking compliance..."}),i&&(0,t.jsx)("p",{className:"text-sm text-red-600",children:i}),l&&(0,t.jsx)("div",{className:"space-y-2",children:l.checks.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:e.passed?(0,t.jsx)(f,{}):(0,t.jsx)(y,{})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:e.check_name}),(0,t.jsx)("span",{className:"text-[10px] font-mono text-gray-400",children:e.article})]}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:e.detail})]})]},s))})]})]})},v=({accessToken:e,logEntry:a})=>{let[l,r]=(0,s.useState)(null),[i,n]=(0,s.useState)(null),[o,d]=(0,s.useState)(!1),[c,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(null),[p,h]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e||!a.request_id)return;let t={request_id:a.request_id,user_id:a.user,model:a.model,timestamp:a.startTime,guardrail_information:a.metadata?.guardrail_information};d(!0),u(null),(0,g.checkEuAiActCompliance)(e,t).then(r).catch(e=>u(e.message||"Failed to check EU AI Act compliance")).finally(()=>d(!1)),m(!0),h(null),(0,g.checkGdprCompliance)(e,t).then(n).catch(e=>h(e.message||"Failed to check GDPR compliance")).finally(()=>m(!1))},[e,a]),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Regulatory Compliance"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(b,{title:"EU AI Act",data:l,loading:o,error:x}),(0,t.jsx)(b,{title:"GDPR",data:i,loading:c,error:p})]})]})},_=new Set(["presidio","bedrock","litellm_content_filter"]),N=(e,t)=>{if(null==e)return!1;if("string"==typeof e)return e===t;if(Array.isArray(e))return e.includes(t);if("object"==typeof e&&"default"in e){let s=e.default;if("string"==typeof s)return s===t;if(Array.isArray(s))return s.some(e=>"string"==typeof e&&e===t)}return!1},w=e=>Object.values(e.masked_entity_count||{}).reduce((e,t)=>e+("number"==typeof t?t:0),0),S=e=>"success"===(e.guardrail_status??"").toLowerCase(),k=e=>e.policy_template||e.guardrail_name,C=()=>(0,t.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,t.jsx)("circle",{cx:"20",cy:"20",r:"20",fill:"#EEF2FF"}),(0,t.jsx)("path",{d:"M20 10l8 4v6c0 5.25-3.4 10.15-8 11.5C15.4 30.15 12 25.25 12 20v-6l8-4z",stroke:"#6366F1",strokeWidth:"1.5",fill:"none"}),(0,t.jsx)("path",{d:"M16 20l3 3 5-6",stroke:"#6366F1",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}),T=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#16A34A",strokeWidth:"1.5",fill:"#F0FDF4"}),(0,t.jsx)("path",{d:"M7 11l3 3 5-6",stroke:"#16A34A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),L=({className:e})=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",className:e,children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#DC2626",strokeWidth:"1.5",fill:"#FEF2F2"}),(0,t.jsx)("path",{d:"M8 8l6 6M14 8l-6 6",stroke:"#DC2626",strokeWidth:"1.5",strokeLinecap:"round"})]}),M=()=>(0,t.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[(0,t.jsx)("circle",{cx:"11",cy:"11",r:"10",stroke:"#3B82F6",strokeWidth:"1.5",fill:"#EFF6FF"}),(0,t.jsx)("path",{d:"M9 7.5l6 3.5-6 3.5V7.5z",fill:"#3B82F6"})]}),A=()=>(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:(0,t.jsx)("circle",{cx:"11",cy:"11",r:"5",fill:"#9CA3AF"})}),E=({expanded:e})=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:`transition-transform ${e?"rotate-180":""}`,children:(0,t.jsx)("path",{d:"M6 8l4 4 4-4",stroke:"#6B7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),D=()=>(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M8 2v8m0 0l-3-3m3 3l3-3M3 12h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),I=({matchDetails:e})=>e&&0!==e.length?(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("h5",{className:"text-sm font-medium mb-2 text-gray-700",children:["Match Details (",e.length,")"]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-left text-gray-500",children:[(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Type"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Method"}),(0,t.jsx)("th",{className:"pb-2 pr-4 font-medium",children:"Action"}),(0,t.jsx)("th",{className:"pb-2 font-medium",children:"Detail"})]})}),(0,t.jsx)("tbody",{children:e.map((e,s)=>(0,t.jsxs)("tr",{className:"border-b border-gray-100",children:[(0,t.jsx)("td",{className:"py-2 pr-4",children:e.type}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-700 rounded text-xs",children:e.detection_method??"-"})}),(0,t.jsx)("td",{className:"py-2 pr-4",children:(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${"BLOCK"===e.action_taken?"bg-red-100 text-red-800":"bg-blue-50 text-blue-700"}`,children:e.action_taken??"-"})}),(0,t.jsxs)("td",{className:"py-2 font-mono text-xs text-gray-600 break-all",children:[e.category?`[${e.category}] `:"",e.snippet??"-"]})]},s))})]})})]}):null,O=({response:e})=>{let[a,l]=(0,s.useState)(!1);return(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>l(!a),children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(E,{expanded:a}),(0,t.jsx)("h5",{className:"font-medium text-sm ml-1",children:"Raw Guardrail Response"})]})}),a&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:(0,t.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})})]})})},z=({entries:e})=>{let a=(0,s.useMemo)(()=>[...e].sort((e,t)=>(e.start_time??0)-(t.start_time??0)),[e]),l=(0,s.useMemo)(()=>{if(0===a.length)return[];let e=a[0].start_time,t=[];t.push({type:"request",label:"Request received",offsetMs:0});let s=a.filter(e=>N(e.guardrail_mode,"pre_call")),l=a.filter(e=>N(e.guardrail_mode,"post_call")||N(e.guardrail_mode,"logging_only")),r=a.filter(e=>N(e.guardrail_mode,"during_call"));for(let a of s){let s=Math.round((a.end_time-e)*1e3);t.push({type:"guardrail",label:`Pre-call guardrail: ${k(a)}`,offsetMs:s,status:S(a)?"PASSED":"FAILED",isSuccess:S(a)})}let i=s.length>0?Math.max(...s.map(e=>e.end_time)):e,n=Math.round((((l.length>0?Math.min(...l.map(e=>e.start_time)):void 0)??i+1)-e)*1e3);for(let s of(t.push({type:"llm",label:"LLM call",offsetMs:n}),r)){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`During-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}for(let s of l){let a=Math.round((s.end_time-e)*1e3);t.push({type:"guardrail",label:`Post-call guardrail: ${k(s)}`,offsetMs:a,status:S(s)?"PASSED":"FAILED",isSuccess:S(s)})}let o=Math.round((Math.max(...a.map(e=>e.end_time))-e)*1e3)+1;return t.push({type:"response",label:"Response returned",offsetMs:o}),t},[a]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Request Lifecycle"}),(0,t.jsx)("div",{className:"relative",children:l.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-start gap-3 relative",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:"request"===e.type||"response"===e.type?(0,t.jsx)(A,{}):"llm"===e.type?(0,t.jsx)(M,{}):e.isSuccess?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),s{let l,i,[n,o]=(0,s.useState)(!1),d=S(e),c=w(e),x=k(e),u=(l=Math.round(1e3*e.duration),`${l}ms`),p=null==(i=(e=>{if(null==e)return null;if("string"==typeof e)return e;if(Array.isArray(e)){let t=e[0];return"string"==typeof t?t:null}if("object"==typeof e&&"default"in e){let t=e.default;if("string"==typeof t)return t;if(Array.isArray(t)){let e=t[0];return"string"==typeof e?e:null}}return null})(e.guardrail_mode))||""===i?"—":i.replace(/_/g,"-").toUpperCase(),g=(e=>{if(!S(e))return null;if(null!=e.risk_score)return e.risk_score;let t=w(e),s=e.patterns_checked??0,a=e.confidence_score??0;if(0===s&&0===a)return 0;let l=7*(s>0?t/s:0)+3*a;return t>0&&l<2&&(l=2),Math.min(10,Math.round(10*l)/10)})(e),f=e.guardrail_provider??"presidio",y=e.guardrail_response,j=Array.isArray(y)?y:[],b="bedrock"!==f||null===y||"object"!=typeof y||Array.isArray(y)?void 0:y,v=null!=e.patterns_checked?`${c}/${e.patterns_checked} matched`:c>0?`${c} matched`:null;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>o(!n),children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:d?(0,t.jsx)(T,{}):(0,t.jsx)(L,{})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"font-semibold text-gray-900 text-sm truncate",children:x}),(0,t.jsx)("span",{className:"px-2 py-0.5 border border-blue-200 bg-blue-50 text-blue-700 rounded text-[11px] font-semibold uppercase flex-shrink-0",children:p}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-semibold uppercase flex-shrink-0 ${d?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"}`,children:d?"PASSED":"FAILED"}),v&&(0,t.jsx)("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium flex-shrink-0 ${0===c?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:v}),null!=e.confidence_score&&(0,t.jsxs)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium flex-shrink-0",children:[(100*e.confidence_score).toFixed(0),"% conf"]}),null!=g&&d&&(0,t.jsx)(a.Tooltip,{title:`Risk score: ${g}/10`,children:(0,t.jsxs)("span",{className:`px-2 py-0.5 border rounded text-[11px] font-semibold flex-shrink-0 ${g<=3?"text-green-600 bg-green-50 border-green-200":g<=6?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200"}`,children:["Risk ",g,"/10"]})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500 font-mono",children:u}),e.detection_method&&(0,t.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 border border-gray-200 rounded text-[11px] font-medium",children:e.detection_method.split(",")[0].trim()}),(0,t.jsx)(E,{expanded:n})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-gray-100 px-4 py-3",children:[e.classification&&(0,t.jsxs)("div",{className:"mb-3 bg-gray-50 rounded-lg p-3 space-y-1",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Classification"}),e.classification.category&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Category:"}),(0,t.jsx)("span",{children:e.classification.category})]}),e.classification.article_reference&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reference:"}),(0,t.jsx)("span",{className:"font-mono",children:e.classification.article_reference})]}),null!=e.classification.confidence&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Confidence:"}),(0,t.jsxs)("span",{children:[(100*e.classification.confidence).toFixed(0),"%"]})]}),e.classification.reason&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"font-medium w-1/3 text-gray-500",children:"Reason:"}),(0,t.jsx)("span",{children:e.classification.reason})]})]}),e.match_details&&e.match_details.length>0&&(0,t.jsx)(I,{matchDetails:e.match_details}),c>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("h5",{className:"text-sm font-medium text-gray-700 mb-2",children:"Masked Entities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(e.masked_entity_count||{}).map(([e,s])=>(0,t.jsxs)("span",{className:"px-2 py-1 bg-blue-50 text-blue-700 rounded text-xs font-medium",children:[e,": ",s]},e))})]}),"presidio"===f&&j.length>0&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(r,{entities:j})}),"bedrock"===f&&b&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(m,{response:b})}),"litellm_content_filter"===f&&y&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h,{response:y})}),f&&!_.has(f)&&y&&(0,t.jsx)(O,{response:y})]})]})};e.s(["default",0,({data:e,accessToken:a,logEntry:l})=>{let r=(0,s.useMemo)(()=>Array.isArray(e)?e.filter(e=>!!e):e?[e]:[],[e]),i=r.filter(S).length,n=i===r.length,o=(0,s.useMemo)(()=>Math.round(1e3*r.reduce((e,t)=>e+(t.duration??0),0)),[r]);return((0,s.useMemo)(()=>Array.from(new Set(r.map(e=>e.policy_template).filter(Boolean))),[r]),0===r.length)?null:(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm w-full max-w-full overflow-hidden mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(C,{}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Guardrails & Policy Compliance"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-500",children:[r.length," guardrail",1!==r.length?"s":""," evaluated"]}),(0,t.jsx)("span",{className:"text-gray-300",children:"|"}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold ${n?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:[n?(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M3 6l2.5 2.5L9 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,i," Passed"]})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsx)("div",{className:"text-right",children:(0,t.jsxs)("div",{className:"text-sm font-medium text-gray-900",children:["Total: ",o,"ms overhead"]})}),(0,t.jsxs)("button",{onClick:()=>{let e=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=`guardrail-compliance-log-${new Date().toISOString().slice(0,10)}.json`,s.click(),URL.revokeObjectURL(t)},className:"inline-flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors",children:[(0,t.jsx)(D,{}),"Export Compliance Log"]})]})]}),a&&l&&(0,t.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,t.jsx)(v,{accessToken:a,logEntry:l})}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("div",{className:"w-[340px] flex-shrink-0 border-r border-gray-100 px-6 py-5",children:(0,t.jsx)(z,{entries:r})}),(0,t.jsxs)("div",{className:"flex-1 px-6 py-5 min-w-0",children:[(0,t.jsx)("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-4",children:"Evaluation Details"}),(0,t.jsx)("div",{className:"space-y-3",children:r.map((e,s)=>(0,t.jsx)(R,{entry:e},`${e.guardrail_name??"guardrail"}-${s}`))})]})]})]})}],517442)},93648,245767,291950,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(207082),l=e.i(500330),r=e.i(871943),i=e.i(360820),n=e.i(94629),o=e.i(152990),d=e.i(682830),c=e.i(269200),m=e.i(942232),x=e.i(977572),u=e.i(427612),p=e.i(64848),h=e.i(496020),g=e.i(592968);function f({keys:e,totalCount:a,isLoading:f,isFetching:y,pageIndex:j,pageSize:b,onPageChange:v}){let[_,N]=(0,s.useState)([{id:"deleted_at",desc:!0}]),[w,S]=(0,s.useState)({pageIndex:j,pageSize:b});s.default.useEffect(()=>{S({pageIndex:j,pageSize:b})},[j,b]);let k=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:s??"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,t.jsx)("span",{className:"block max-w-[140px]",children:(0,l.formatNumberWithCommas)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":`$${(0,l.formatNumberWithCommas)(s)}`})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:s??"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],C=(0,o.useReactTable)({data:e,columns:k,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:_,pagination:w},onSortingChange:N,onPaginationChange:e=>{let t="function"==typeof e?e(w):e;S(t),v(t.pageIndex)},getCoreRowModel:(0,d.getCoreRowModel)(),getSortedRowModel:(0,d.getSortedRowModel)(),getPaginationRowModel:(0,d.getPaginationRowModel)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(a/b)}),{pageIndex:T}=C.getState().pagination,L=T*b+1,M=Math.min((T+1)*b,a),A=`${L} - ${M}`;return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[f||y?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",A," of ",a," results"]}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[f||y?(0,t.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",T+1," of ",C.getPageCount()]}),(0,t.jsx)("button",{onClick:()=>C.previousPage(),disabled:f||y||!C.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>C.nextPage(),disabled:f||y||!C.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:C.getCenterTotalSize()},children:[(0,t.jsx)(u.TableHead,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(h.TableRow,{children:e.headers.map(e=>(0,t.jsx)(p.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,o.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(r.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${C.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(m.TableBody,{children:f||y?(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading keys..."})})})}):e.length>0?C.getRowModel().rows.map(e=>(0,t.jsx)(h.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(x.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,o.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:k.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function y(){let[e,l]=(0,s.useState)(0),[r]=(0,s.useState)(50),{data:i,isPending:n,isFetching:o}=(0,a.useDeletedKeys)(e+1,r);return(0,t.jsx)(f,{keys:i?.keys||[],totalCount:i?.total_count||0,isLoading:n,isFetching:o,pageIndex:e,pageSize:r,onPageChange:l})}e.s(["default",()=>y],93648);var j=e.i(785242),b=e.i(389083),v=e.i(599724),_=e.i(355619);function N({teams:e,isLoading:a,isFetching:f}){let[y,j]=(0,s.useState)([{id:"deleted_at",desc:!0}]),N=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,l.formatNumberWithCommas)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,t.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":`$${(0,l.formatNumberWithCommas)(s)}`})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,t.jsx)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})},s):(0,t.jsx)(b.Badge,{size:"xs",color:"blue",children:(0,t.jsx)(v.Text,{children:e.length>30?`${(0,_.getModelDisplayName)(e).slice(0,30)}...`:(0,_.getModelDisplayName)(e)})},s)),s.length>3&&(0,t.jsx)(b.Badge,{size:"xs",color:"gray",children:(0,t.jsxs)(v.Text,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,t.jsx)(b.Badge,{size:"xs",color:"red",children:(0,t.jsx)(v.Text,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,t.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,t.jsx)(g.Tooltip,{title:s||void 0,children:(0,t.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],w=(0,o.useReactTable)({data:e,columns:N,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:y},onSortingChange:j,getCoreRowModel:(0,d.getCoreRowModel)(),getSortedRowModel:(0,d.getSortedRowModel)(),enableSorting:!0,manualSorting:!1});return(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:a||f?(0,t.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",e.length," ",1===e.length?"team":"teams"]})}),(0,t.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(c.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:w.getCenterTotalSize()},children:[(0,t.jsx)(u.TableHead,{children:w.getHeaderGroups().map(e=>(0,t.jsx)(h.TableRow,{children:e.headers.map(e=>(0,t.jsx)(p.TableHeaderCell,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&(t.style.opacity="0.5")},onMouseLeave:()=>{let t=document.querySelector(`[data-header-id="${e.id}"] .resizer`);t&&!e.column.getIsResizing()&&(t.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,o.flexRender)(e.column.columnDef.header,e.getContext())}),(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(i.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(r.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(n.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})}),(0,t.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`resizer ${w.options.columnResizeDirection} ${e.column.getIsResizing()?"isResizing":""}`,style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:+!!e.column.getIsResizing()}})]})},e.id))},e.id))}),(0,t.jsx)(m.TableBody,{children:a||f?(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:N.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading teams..."})})})}):e.length>0?w.getRowModel().rows.map(e=>(0,t.jsx)(h.TableRow,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(x.TableCell,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,o.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(h.TableRow,{children:(0,t.jsx)(x.TableCell,{colSpan:N.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function w(){let{data:e,isPending:s,isFetching:a}=(0,j.useDeletedTeams)(1,100);return(0,t.jsx)(N,{teams:e||[],isLoading:s,isFetching:a})}e.s(["default",()=>w],245767);var S=e.i(625901),k=e.i(56456),C=e.i(152473),T=e.i(199133),L=e.i(770914);let{Text:M}=e.i(898586).Typography;e.s(["PaginatedModelSelect",0,({value:e,onChange:a,placeholder:l="Select a model",style:r,pageSize:i=50,allowClear:n=!0,disabled:o=!1})=>{let[d,c]=(0,s.useState)(""),[m,x]=(0,C.useDebouncedState)("",{wait:300}),{data:u,fetchNextPage:p,hasNextPage:h,isFetchingNextPage:g,isLoading:f}=(0,S.useInfiniteModelInfo)(i,m||void 0),y=(0,s.useMemo)(()=>{if(!u?.pages)return[];let e=new Set,t=[];for(let s of u.pages)for(let a of s.data){let s=a.model_info?.id??"",l=a.model_name??"";!s||e.has(s)||(e.add(s),t.push({label:l?`${l} (${s})`:s,value:s,modelName:l,modelId:s}))}return t},[u]);return(0,t.jsx)(T.Select,{value:e||void 0,onChange:e=>{let t="string"==typeof e?e:Array.isArray(e)?e[0]??"":"";a?.(t)},placeholder:l,style:{width:"100%",...r},allowClear:n,disabled:o,showSearch:!0,filterOption:!1,onSearch:e=>{c(e),x(e)},searchValue:d,onPopupScroll:e=>{let t=e.currentTarget;(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&h&&!g&&p()},loading:f,notFoundContent:f?(0,t.jsx)(k.LoadingOutlined,{spin:!0}):"No models found",options:y,optionRender:e=>{let{modelName:s,modelId:a}=e.data;return(0,t.jsx)(t.Fragment,{children:s?(0,t.jsxs)(L.Space,{direction:"vertical",children:[(0,t.jsxs)(L.Space,{direction:"horizontal",children:[(0,t.jsx)(M,{strong:!0,children:"Model name:"}),(0,t.jsx)(M,{ellipsis:!0,children:s})]}),(0,t.jsxs)(M,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})]}):(0,t.jsxs)(M,{ellipsis:!0,type:"secondary",children:["Model ID: ",a]})})},popupRender:e=>(0,t.jsxs)(t.Fragment,{children:[e,g&&(0,t.jsx)("div",{style:{textAlign:"center",padding:8},children:(0,t.jsx)(k.LoadingOutlined,{spin:!0})})]})})}],291950)},95684,e=>{"use strict";var t=e.i(165370);e.s(["Pagination",()=>t.default])},942161,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(266027),l=e.i(619273),r=e.i(291542),i=e.i(262218),n=e.i(311451),o=e.i(199133),d=e.i(464571),c=e.i(95684),m=e.i(482725),x=e.i(91979),u=e.i(56456),p=e.i(166540),h=e.i(764205),g=e.i(608856),f=e.i(898586),y=e.i(149192),j=e.i(166406),b=e.i(492030),v=e.i(304911);let{Text:_}=f.Typography,N={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},w={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function S({label:e,value:a}){let[l,r]=(0,s.useState)(!1),i=(0,s.useCallback)(async()=>{try{let e=JSON.stringify(a,null,2);if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),document.body.removeChild(t)}r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error("Copy failed:",e)}},[a]);return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-3 py-2 border-b bg-gray-50",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e}),(0,t.jsx)("button",{onClick:i,className:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:"Copy JSON",children:l?(0,t.jsx)(b.CheckOutlined,{className:"text-green-600"}):(0,t.jsx)(j.CopyOutlined,{})})]}),(0,t.jsx)("pre",{className:"p-3 bg-white text-xs font-mono overflow-auto max-h-96 whitespace-pre-wrap break-all m-0",children:JSON.stringify(a,null,2)})]})}function k({label:e,value:s}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 w-36 shrink-0",children:e}),(0,t.jsx)("span",{className:"text-xs text-gray-900 break-all",children:s})]})}function C({log:e}){let{action:s,table_name:a,before_value:l,updated_values:r}=e,i="LiteLLM_VerificationToken"===a,n="updated"===s||"rotated"===s,o=l,d=r;if(n&&l&&r){let e={},t={};new Set([...Object.keys(l),...Object.keys(r)]).forEach(s=>{JSON.stringify(l[s])!==JSON.stringify(r[s])&&(s in l&&(e[s]=l[s]),s in r&&(t[s]=r[s]))}),Object.keys(l).forEach(s=>{s in r||s in e||(e[s]=l[s],t[s]=void 0)}),Object.keys(r).forEach(s=>{s in l||s in t||(t[s]=r[s],e[s]=void 0)}),o=Object.keys(e).length>0?e:{note:"No differing fields detected"},d=Object.keys(t).length>0?t:{note:"No differing fields detected"}}let c=(e,s)=>{if(!s||0===Object.keys(s).length)return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsx)("p",{className:"px-3 py-3 text-xs text-gray-400 italic m-0",children:"N/A"})]});if(i&&n){let a=["token","spend","max_budget"];if(Object.keys(s).every(e=>a.includes(e))&&!("note"in s))return(0,t.jsxs)("div",{className:"bg-white rounded border overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center px-3 py-2 border-b bg-gray-50",children:(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-600",children:e})}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-1 text-xs",children:[void 0!==s.token&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Token:"})," ",s.token??"N/A"]}),void 0!==s.spend&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Spend:"})," $",Number(s.spend).toFixed(6)]}),void 0!==s.max_budget&&(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-gray-500",children:"Max Budget:"})," $",Number(s.max_budget).toFixed(6)]})]})]})}return(0,t.jsx)(S,{label:e,value:s})};return(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[c("Before",o),c("After",d)]})}function T({open:e,onClose:s,log:a}){if(!a)return null;let l=N[a.table_name]??a.table_name,r=w[a.action]??"default";return(0,t.jsxs)(g.Drawer,{placement:"right",width:"60%",open:e,onClose:s,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,display:"flex",flexDirection:"column"},header:{display:"none"}},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b bg-white shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(i.Tag,{color:r,className:"capitalize m-0",children:a.action}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:p.default.utc(a.updated_at).local().format("MMM D, YYYY HH:mm:ss")})]}),(0,t.jsx)("button",{onClick:s,className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,t.jsx)(y.CloseOutlined,{})})]}),(0,t.jsxs)("div",{className:"px-6 py-5",children:[(0,t.jsxs)("div",{className:"bg-gray-50 border rounded-lg p-4 mb-5",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-gray-700 mb-2 uppercase tracking-wide",children:"Details"}),(0,t.jsx)(k,{label:"Table",value:l}),(0,t.jsx)(k,{label:"Object ID",value:(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs",children:a.object_id})}),(0,t.jsx)(k,{label:"Changed By",value:(0,t.jsx)(v.default,{userId:a.changed_by})}),(0,t.jsx)(k,{label:"API Key (Hash)",value:a.changed_by_api_key?(0,t.jsx)(_,{copyable:!0,className:"font-mono text-xs break-all",children:a.changed_by_api_key}):"—"})]}),(0,t.jsx)(C,{log:a})]})]})}let{Search:L}=n.Input,M={LiteLLM_VerificationToken:"Keys",LiteLLM_TeamTable:"Teams",LiteLLM_UserTable:"Users",LiteLLM_OrganizationTable:"Organizations",LiteLLM_ProxyModelTable:"Models"},A={created:"green",updated:"blue",deleted:"red",rotated:"orange"};function E({userID:e,userRole:n,token:g,accessToken:f,isActive:y,premiumUser:j}){let[b,_]=(0,s.useState)(1),[N,w]=(0,s.useState)(""),[S,k]=(0,s.useState)(""),[C,E]=(0,s.useState)(""),[D,I]=(0,s.useState)(""),[O,z]=(0,s.useState)(void 0),[R,P]=(0,s.useState)(void 0),[B,F]=(0,s.useState)(null),[q,H]=(0,s.useState)(!1),$=(0,a.useQuery)({queryKey:["audit_logs",b,50,N,S,C,D,O,R],queryFn:async()=>f&&g&&n&&e?(0,h.uiAuditLogsCall)({accessToken:f,page:b,page_size:50,params:{object_id:N||void 0,changed_by:S||void 0,object_key_hash:C||void 0,object_team_id:D||void 0,action:O||void 0,table_name:R||void 0,sort_by:"updated_at",sort_order:"desc"}}):{audit_logs:[],total:0,page:1,page_size:50,total_pages:0},enabled:!!f&&!!g&&!!n&&!!e&&y,placeholderData:l.keepPreviousData}),Y=[{title:"Timestamp",dataIndex:"updated_at",key:"updated_at",width:200,render:e=>(0,t.jsx)("span",{className:"font-mono text-xs whitespace-nowrap",children:p.default.utc(e).local().format("MMM D, YYYY HH:mm:ss")})},{title:"Action",dataIndex:"action",key:"action",width:100,render:e=>(0,t.jsx)(i.Tag,{color:A[e]??"default",className:"capitalize",children:e})},{title:"Table",dataIndex:"table_name",key:"table_name",width:130,render:e=>M[e]??e},{title:"Object ID",dataIndex:"object_id",key:"object_id",render:e=>(0,t.jsx)("span",{className:"font-mono text-xs",children:e})},{title:"Changed By",dataIndex:"changed_by",key:"changed_by",width:200,render:e=>(0,t.jsx)(v.default,{userId:e})},{title:"API Key (Hash)",dataIndex:"changed_by_api_key",key:"changed_by_api_key",width:140,render:e=>e?(0,t.jsxs)("span",{className:"font-mono text-xs",children:[e.slice(0,12),"…"]}):"—"}];if(!j)return(0,t.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,t.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)("p",{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,t.jsx)("img",{src:"../ui/assets/audit-logs-preview.png",alt:"Audit Logs Preview",style:{maxWidth:"100%",maxHeight:"700px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",margin:"0 auto"},onError:e=>{e.target.style.display="none"}})]});let K=$.data?.audit_logs??[],V=$.data?.total??0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Audit Logs"})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(L,{placeholder:"Object ID",allowClear:!0,style:{width:200},onSearch:e=>{w(e),_(1)},onChange:e=>{e.target.value||(w(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Changed By",allowClear:!0,style:{width:180},onSearch:e=>{k(e),_(1)},onChange:e=>{e.target.value||(k(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Team ID",allowClear:!0,style:{width:180},onSearch:e=>{I(e),_(1)},onChange:e=>{e.target.value||(I(""),_(1))}}),(0,t.jsx)(L,{placeholder:"Key Hash",allowClear:!0,style:{width:180},onSearch:e=>{E(e),_(1)},onChange:e=>{e.target.value||(E(""),_(1))}}),(0,t.jsx)(o.Select,{placeholder:"All Actions",allowClear:!0,style:{width:140},options:[{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}],onChange:e=>{z(e),_(1)}}),(0,t.jsx)(o.Select,{placeholder:"All Tables",allowClear:!0,style:{width:150},options:[{label:"Keys",value:"LiteLLM_VerificationToken"},{label:"Teams",value:"LiteLLM_TeamTable"},{label:"Users",value:"LiteLLM_UserTable"},{label:"Organizations",value:"LiteLLM_OrganizationTable"},{label:"Models",value:"LiteLLM_ProxyModelTable"}],onChange:e=>{P(e),_(1)}}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(d.Button,{icon:(0,t.jsx)(x.ReloadOutlined,{spin:$.isFetching}),onClick:()=>$.refetch(),disabled:$.isFetching}),(0,t.jsx)(c.Pagination,{current:b,pageSize:50,total:V,showTotal:e=>`${e} total`,showSizeChanger:!1,size:"small",onChange:e=>_(e)})]})]})]}),(0,t.jsx)(r.Table,{columns:Y,dataSource:K,rowKey:"id",loading:{spinning:$.isLoading,indicator:(0,t.jsx)(m.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0}),size:"small"})},size:"small",pagination:!1,onRow:e=>({onClick:()=>{F(e),H(!0)},style:{cursor:"pointer"}})})]}),(0,t.jsx)(T,{open:q,onClose:()=>H(!1),log:B})]})}e.s(["default",()=>E],942161)},307582,e=>{"use strict";var t=e.i(843476);e.s(["TimeCell",0,({utcTime:e})=>(0,t.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:(e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}})(e)})])},97859,e=>{"use strict";e.s(["AGENT_CALL_TYPES",0,["asend_message"],"ERROR_CODE_OPTIONS",0,[{label:"400 - Bad Request",value:"400"},{label:"401 - Invalid Authentication",value:"401"},{label:"403 - Permission Denied",value:"403"},{label:"404 - Not Found",value:"404"},{label:"408 - Request Timeout",value:"408"},{label:"422 - Unprocessable Entity",value:"422"},{label:"429 - Rate Limited",value:"429"},{label:"500 - Internal Server Error",value:"500"},{label:"502 - Bad Gateway",value:"502"},{label:"503 - Service Unavailable",value:"503"},{label:"529 - Overloaded",value:"529"}],"MCP_CALL_TYPES",0,["call_mcp_tool","list_mcp_tools"],"QUICK_SELECT_OPTIONS",0,[{label:"Last 15 Minutes",value:15,unit:"minutes"},{label:"Last Hour",value:1,unit:"hours"},{label:"Last 4 Hours",value:4,unit:"hours"},{label:"Last 24 Hours",value:24,unit:"hours"},{label:"Last 7 Days",value:7,unit:"days"}]])},245099,e=>{"use strict";var t=e.i(843476),s=e.i(500330),a=(e.i(389083),e.i(994388)),l=e.i(592968);e.i(271645);var r=e.i(916925),i=e.i(446891),n=e.i(307582),o=e.i(97859);let d=({size:e=12})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-gray-400",children:(0,t.jsx)("path",{d:"M12 3l1.912 5.813a2 2 0 0 0 1.275 1.275L21 12l-5.813 1.912a2 2 0 0 0-1.275 1.275L12 21l-1.912-5.813a2 2 0 0 0-1.275-1.275L3 12l5.813-1.912a2 2 0 0 0 1.275-1.275L12 3z"})}),c=({size:e=10})=>(0,t.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:(0,t.jsx)("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),m=({size:e=12})=>(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0",children:[(0,t.jsx)("path",{d:"M12 8V4H8"}),(0,t.jsx)("rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}),(0,t.jsx)("path",{d:"M2 14h2"}),(0,t.jsx)("path",{d:"M20 14h2"}),(0,t.jsx)("path",{d:"M15 13v2"}),(0,t.jsx)("path",{d:"M9 13v2"})]}),x=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),null!=e?e:"LLM"]}),u=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(c,{}),null!=e?e:"MCP"]}),p=({count:e})=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-violet-50 text-violet-700 border border-violet-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(m,{}),null!=e?e:"Agent"]}),h=({label:e,field:s,sortBy:a,sortOrder:l,onSortChange:r})=>(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.TableHeaderSortDropdown,{sortState:a===s&&l,onSortChange:e=>{!1===e?r("startTime","desc"):r(s,e)}})]}),g=e=>[{header:e?()=>(0,t.jsx)(h,{label:"Time",field:"startTime",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Time",accessorKey:"startTime",cell:e=>(0,t.jsx)(n.TimeCell,{utcTime:e.getValue()})},{header:"Type",id:"type",cell:e=>{let s=e.row.original,a=s.session_total_count||1,r=o.MCP_CALL_TYPES.includes(s.call_type),i=o.AGENT_CALL_TYPES.includes(s.call_type),n=s.session_llm_count??(r||i?0:a),h=s.session_agent_count??(i?a:0),g=s.session_mcp_count??(r?a:0);if(r)return(0,t.jsx)(u,{});if(i&&a<=1)return(0,t.jsx)(p,{});if(a<=1)return(0,t.jsx)(x,{});let f=(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-blue-700 border border-blue-200 rounded-full text-[11px] font-medium whitespace-nowrap",children:[(0,t.jsx)(d,{}),(0,t.jsx)("span",{children:a}),h>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(m,{size:10})]}),g>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-blue-300",children:"·"}),(0,t.jsx)(c,{})]})]}),y=[n>0&&`${n} LLM`,h>0&&`${h} Agent`,g>0&&`${g} MCP`].filter(Boolean);return(0,t.jsx)(l.Tooltip,{title:y.join(" • "),children:f})}},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,t.jsx)("span",{className:`px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ${s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),r=e.row.original.onSessionClick;return(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)(a.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>r?.(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||""),children:(0,t.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:e?()=>(0,t.jsx)(h,{label:"Cost",field:"spend",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Cost",accessorKey:"spend",cell:e=>{let a=e.row.original,r=a.mcp_tool_call_count||0,i=a.mcp_tool_call_spend||0;return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)(l.Tooltip,{title:`$${String(e.getValue()||0)}`,children:(0,t.jsx)("span",{children:(0,s.getSpendString)(e.getValue()||0)})}),r>0&&i>0&&(0,t.jsxs)("span",{className:"text-[10px] text-amber-600",children:["incl. ",(0,s.getSpendString)(i)," from ",r," MCP"]})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Duration (s)",field:"request_duration_ms",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Duration (s)",accessorKey:"request_duration_ms",cell:e=>{let s=e.getValue();if(null==s)return(0,t.jsx)("span",{children:"-"});let a=(s/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${s}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})}},{header:"TTFT (s)",accessorKey:"completionStartTime",cell:e=>{let s=e.row.original,a=e.getValue();if(!a||a===s.endTime)return(0,t.jsx)("span",{children:"-"});let r=new Date(a).getTime()-new Date(s.startTime).getTime();if(r<=0)return(0,t.jsx)("span",{children:"-"});let i=(r/1e3).toFixed(2);return(0,t.jsx)(l.Tooltip,{title:`${r}ms`,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})}},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),a=e.row.original.onKeyHashClick;return(0,t.jsx)(l.Tooltip,{title:s,children:(0,t.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>a?.(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Model",accessorKey:"model",cell:e=>{let s=e.row.original,a=s.custom_llm_provider,i=String(e.getValue()||"");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:s.metadata?.mcp_tool_call_metadata?.mcp_server_logo_url?s.metadata.mcp_tool_call_metadata.mcp_server_logo_url:a?(0,r.getProviderLogoAndName)(a).logo:"",alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)(l.Tooltip,{title:i,children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:i})})]})}},{header:e?()=>(0,t.jsx)(h,{label:"Tokens",field:"total_tokens",sortBy:e.sortBy,sortOrder:e.sortOrder,onSortChange:e.onSortChange}):"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,t.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,t.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,t.jsx)(l.Tooltip,{title:String(e.getValue()||"-"),children:(0,t.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let a=Object.entries(s),r=a[0],i=a.slice(1);return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,t.jsx)(l.Tooltip,{title:(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(([e,s])=>(0,t.jsxs)("span",{children:[e,": ",String(s)]},e))}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[r[0],": ",String(r[1]),i.length>0&&` +${i.length}`]})})})}}];g(),e.s(["createColumns",0,g],245099)},70969,e=>{"use strict";var t=e.i(843476);e.s(["ConfigInfoMessage",0,({show:e,onOpenSettings:s})=>e?(0,t.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start",children:[(0,t.jsx)("div",{className:"text-blue-500 mr-3 flex-shrink-0 mt-0.5",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,t.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Request/Response Data Not Available"}),(0,t.jsxs)("p",{className:"text-sm text-blue-700 mt-1",children:["To view request and response details, enable prompt storage in your LiteLLM configuration by adding the following to your ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded",children:"proxy_config.yaml"})," file",s&&(0,t.jsxs)(t.Fragment,{children:[" or"," ",(0,t.jsx)("button",{onClick:s,className:"text-blue-600 hover:text-blue-800 underline font-medium",children:"open the settings"})," ","to configure this directly."]})]}),(0,t.jsx)("pre",{className:"mt-2 bg-white p-3 rounded border border-blue-200 text-xs font-mono overflow-auto",children:`general_settings: store_model_in_db: true - store_prompts_in_spend_logs: true`}),(0,t.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o})=>{let d=o?.toLowerCase()==="true",c=void 0!==i||void 0!==n,m=e?.input_cost!==void 0||e?.output_cost!==void 0,x=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(m||c||x||e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount||void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount)))return null;let u=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),p=e&&(void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount),h=d?0:e?.input_cost,g=d?0:e?.output_cost,f=d?0:e?.original_cost,y=d?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Cost Breakdown"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mr-4",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Total:"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[l(a),d&&" (Cached)"]})]})]}),children:(0,t.jsxs)("div",{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2 max-w-2xl",children:[(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(h),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.toLocaleString()," prompt tokens)"]})]})]}),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Output Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(g),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.toLocaleString()," completion tokens)"]})]})]}),e?.tool_usage_cost!==void 0&&e.tool_usage_cost>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Tool Usage Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(e.tool_usage_cost)})]}),e?.additional_costs&&Object.entries(e.additional_costs).filter(([,e])=>null!=e&&0!==e).map(([e,s])=>(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-600 font-medium w-1/3",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-900",children:l(s)})]},e))]}),!d&&(0,t.jsx)("div",{className:"pt-2 border-t border-gray-100 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex text-sm font-semibold",children:[(0,t.jsx)("span",{className:"text-gray-900 w-1/3",children:"Original LLM Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(f)})]})}),(u||p)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[u&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.discount_percent&&0!==e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Discount (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]}),void 0!==e.discount_amount&&void 0===e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Discount Amount:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]})]}),p&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.margin_percent&&0!==e.margin_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Margin (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((e.margin_total_amount||0)-(e.margin_fixed_amount||0))]})]}),void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Margin:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l(e.margin_fixed_amount)]})]})]})]}),(0,t.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"font-bold text-sm text-gray-900 w-1/3",children:"Final Calculated Cost:"}),(0,t.jsxs)("span",{className:"text-sm font-bold text-gray-900",children:[l(y),d&&" (Cached)"]})]})})]})}]})})}])},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",m="Model",x="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[m]:"",[x]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[E,D]=(0,t.useState)({data:[],total:0,page:1,page_size:50,total_pages:0}),I=(0,t.useRef)(0),O=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[x]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[m]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&s.data&&D(s)}catch(e){console.error("Error searching users:",e)}},[y,j,b,_,v,k,C]),z=(0,t.useMemo)(()=>(0,i.default)((e,t)=>O(e,t),300),[O]);(0,t.useEffect)(()=>()=>z.cancel(),[z]);let R=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[x]||M[u]||M[g]||M[f]||M[m]),[M]);(0,t.useEffect)(()=>{R&&y&&(z.cancel(),O(M,T))},[k,C,T,j,b,_]);let P=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:50,total_pages:0};if(R)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[m]&&(t=t.filter(e=>e.model_id===M[m])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,R]),B=(0,t.useMemo)(()=>R?E&&E.data?E:e||{data:[],total:0,page:1,page_size:50,total_pages:0}:P,[R,E,P,e]),{data:F}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y});return{filters:M,filteredLogs:B,hasBackendFilters:R,allTeams:F,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),z(s,1)),s})},handleFilterReset:()=>{A(L),D({data:[],total:0,page:1,page_size:50,total_pages:0}),z(L,1)}}}e.s(["useLogFilterLogic",()=>y],504809)},894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.default)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",()=>a],283086);let l=(0,s.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",()=>l],195116)},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,m=e.i(755151),x=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(m.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,x.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,x.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),m=e.i(195116),x=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(70635),M=e.i(70969),A=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,t.jsx)("div",{className:"p-4",children:e.map((e,s)=>{var i,n;return(0,t.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,t.jsx)("span",{className:"font-mono",children:e.query})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,t.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,t.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:a}=(0,A.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,t.jsx)("span",{children:r(e.start_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,t.jsx)("span",{children:r(e.end_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,t.jsx)("span",{children:(i=e.start_time,n=e.end_time,`${((n-i)*1e3).toFixed(2)}ms`)})]})]})]})}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,t.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>{let e;return e=`${s}-${r}`,void l(t=>({...t,[e]:!t[e]}))},children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+1]}),(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,t.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var D=e.i(592968),I=e.i(207066);let{Text:O}=g.Typography;function z({value:e,maxWidth:s=I.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(D.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:I.FONT_FAMILY_MONO,fontSize:I.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:R}=g.Typography;function P({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(R,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let B=e=>!!e&&e instanceof Date,F=e=>"object"==typeof e&&null!==e,q=e=>!!e&&e instanceof Object&&"function"==typeof e;function H(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function $(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:m,outerRef:x,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},H(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!x.current)return;let s=x.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=x.current)?void 0:e.querySelector('[role=button][tabindex="0"]');s&&(s.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,s.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},(0,s.createElement)("span",{className:j,onClick:S,onKeyDown:w,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?y:void 0,ref:f,tabIndex:0===o?0:-1}),(t||""===t)&&(m?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},H(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},H(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(W,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function Y(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function K(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=B(l)?l.toISOString():q(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},H(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function W(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(K,Object.assign({},e)):!F(t)||B(t)||q(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(Y,Object.assign({},e))}let U={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},G=()=>!0,J=e=>{let{data:t,style:a=U,shouldExpandNode:l=G,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&F(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(W,{key:t,field:t,value:n,style:{...U,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(W,{value:t,style:{...U,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>J,"defaultStyles",()=>U],867612);let{Text:Q}=g.Typography;function X({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:I.JSON_MAX_HEIGHT,overflow:"auto",background:I.COLOR_BG_LIGHT,padding:I.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(J,{data:e,style:U,clickToExpandNode:!0})})}):(0,t.jsx)(Q,{type:"secondary",children:"No data"})}function Z(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function ee(e){return Array.isArray(e)?e:e?[e]:[]}function et(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var es=e.i(366308),ea=e.i(755151),el=e.i(291542);let{Text:er}=g.Typography;function ei({tool:e}){let s=Object.entries(e.parameters?.properties||{}).map(([t,s])=>({key:t,name:t,type:s.type||"any",description:s.description||"-",required:e.parameters?.required?.includes(t)||!1})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(er,{code:!0,children:[e,s.required&&(0,t.jsx)(er,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(er,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(er,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(er,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(el.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,t.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,t.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.callData.arguments,null,2)})})]})]})}function en({tool:e}){let s={type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}};return(0,t.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(s,null,2)})}let{Text:eo}=g.Typography;function ed({tool:e}){let[a,l]=(0,s.useState)("formatted");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,t.jsx)(eo,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(ei,{tool:e}):(0,t.jsx)(en,{tool:e})]})}let{Text:ec}=g.Typography;function em({tool:e}){let[a,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(es.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ec,{style:{fontSize:14},children:[e.index,". ",e.name]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(j.Tag,{color:e.called?"blue":"default",children:e.called?"called":"not called"}),a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ed,{tool:e})})]})}let{Text:ex}=g.Typography;function eu({log:e}){let s=function(e){let t,s=!(t=et(e.proxy_server_request||e.messages))||Array.isArray(t)?[]:"object"==typeof t&&t.tools&&Array.isArray(t.tools)?t.tools:[];if(0===s.length)return[];let a=function(e){let t=et(e.response);if(!t||"object"!=typeof t)return[];let s=t.choices;if(Array.isArray(s)&&s.length>0){let e=s[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}if(Array.isArray(t.content)){let e=t.content.filter(e=>"tool_use"===e.type);if(e.length>0)return e.map(e=>({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}}))}if(Array.isArray(t.tool_calls))return t.tool_calls;if(Array.isArray(t.results)){let e=[];for(let s of t.results)if("response.done"===s.type&&s.response?.output)for(let t of s.response.output)"function_call"===t.type&&e.push({id:t.call_id||"",type:"function",function:{name:t.name||"",arguments:t.arguments||"{}"}});if(e.length>0)return e}return[]}(e),l=new Set(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.set(t,{id:e.id,name:t,arguments:function(e){try{return JSON.parse(e)}catch{return{}}}(e.function?.arguments||"{}")})}),s.map((e,t)=>{let s=e.function?.name||e.name||`Tool ${t+1}`;return{index:t+1,name:s,description:e.function?.description||e.description||"",parameters:e.function?.parameters||e.input_schema||{},called:l.has(s),callData:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let ep=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eh=e.i(888259),eg=e.i(264843),ef=e.i(624001);let{Text:ey}=g.Typography;function ej({type:e,tokens:s,cost:l,onCopy:r,isCollapsed:n,onToggleCollapse:o,turnCount:d}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:n?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:o?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{o&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[o&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:n?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ey,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(D.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:eb}=g.Typography;function ev({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(eb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(eb,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(0,t.jsx)("div",{style:{maxHeight:r?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!r},children:(0,t.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:e_}=g.Typography;function eN({tool:e,compact:s=!1}){return(0,t.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:s?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,t.jsx)(e_,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:e.name}),Object.keys(e.arguments).length>0&&(0,t.jsx)("div",{children:Object.entries(e.arguments).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:2},children:[(0,t.jsxs)(e_,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(e_,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:ew}=g.Typography;function eS({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(ew,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(eN,{tool:e,compact:l},e.id||s))})]}):null}let{Text:ek}=g.Typography;function eC({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",e.length," message",1!==e.length?"s":"",")"]})]}),(0,t.jsx)("div",{style:{maxHeight:a?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!a},children:(0,t.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(eS,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eT({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=e.find(e=>"system"===e.role),o=e.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,c=o.slice(0,-1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eh.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(ev,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eC,{messages:c}),d&&(0,t.jsx)(eS,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eL}=g.Typography;function eM({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eh.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eS,{label:"ASSISTANT",content:e.content,toolCalls:e.toolCalls})})})]}):(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eL,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eA=e.i(782273),eE=e.i(313603),eD=e.i(793916);let{Text:eI}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(ez,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eR,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.length&&(0,t.jsx)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"16px",color:"#8c8c8c",fontStyle:"italic",fontSize:13},children:"No recognized realtime events found"})]})}function ez({session:e,turnCount:a}){let[l,r]=(0,s.useState)(!0);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)("div",{onClick:()=>r(!l),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:l?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:l?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(eI,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(eI,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eA.SoundOutlined,{})," ",e.voice]}),e.modalities&&(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.modalities.map(e=>(0,t.jsxs)(j.Tag,{style:{margin:0},children:["audio"===e?(0,t.jsx)(eD.AudioOutlined,{}):(0,t.jsx)(eg.MessageOutlined,{})," ",e]},e))})]})}),(0,t.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!l},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 24px",fontSize:13},children:[(0,t.jsx)(eq,{label:"Model",value:e.model}),(0,t.jsx)(eq,{label:"Voice",value:e.voice}),(0,t.jsx)(eq,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eq,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eq,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eq,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eq,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eq,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:4},children:"Instructions"}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"#595959",background:"#fafafa",padding:"8px 12px",borderRadius:4,border:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:120,overflowY:"auto"},children:e.instructions})]})]})})]})}function eR({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:l?.completion_tokens??n,cost:l?.output_cost,onCopy:()=>{let t=e.flatMap(e=>(e.output||[]).flatMap(e=>(e.content||[]).map(t=>`${e.role}: ${t.transcript||t.text||""}`))).join("\n");navigator.clipboard.writeText(t)},isCollapsed:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eP,{response:e,index:s},e.id||s))})})]})}function eP({response:e,index:s}){let a=e.output||[],l=e.usage;return(0,t.jsxs)("div",{style:{marginBottom:12,paddingBottom:12,borderBottom:"1px solid #f5f5f5"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)(j.Tag,{color:"completed"===e.status?"green":"orange",style:{margin:0},children:e.status||"unknown"}),l&&(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(D.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eB,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eF,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eF,{label:"Output",details:l.output_token_details})]})}function eB({output:e}){let s=e.content||[];return s.some(e=>e.transcript||e.text)?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eD.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})]},s):null})]}):null}function eF({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:[e," Token Breakdown"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:4},children:a.map(([e,s])=>"number"==typeof s?(0,t.jsxs)(j.Tag,{style:{margin:0},children:[e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),": ",s.toLocaleString()]},e):null)})]})}function eq({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function eH({request:e,response:s,metrics:a}){let l,r,i;if(s&&s.results&&Array.isArray(s.results)&&0!==s.results.length&&s.results.some(e=>"session.created"===e.type||"session.updated"===e.type||"response.done"===e.type))return(0,t.jsx)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{let t;l.push({role:e.role||"user",content:"string"==typeof(t=e.content)?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(t),toolCallId:e.tool_call_id})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:ep(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eT,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eM,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:e$}=g.Typography;function eY({logEntry:e,onOpenSettings:s,isLoadingDetails:a=!1,accessToken:l}){var r,i;let n=e.metadata||{},o="failure"===n.status,d=o?n.error_information:null,c=!!(r=e.messages)&&(Array.isArray(r)?r.length>0:"object"==typeof r&&Object.keys(r).length>0),m=!!(i=e.response)&&Object.keys(Z(i)).length>0,x=!c&&!m&&!o&&!a,u=n?.guardrail_information,p=ee(u),h=p.length>0,g=p.reduce((e,t)=>{let s=t?.masked_entity_count;return s?e+Object.values(s).reduce((e,t)=>"number"==typeof t?e+t:e,0):e},0),j=0===p.length?"-":1===p.length?p[0]?.guardrail_name??"-":`${p.length} guardrails`,b=n.vector_store_request_metadata&&Array.isArray(n.vector_store_request_metadata)&&n.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${I.DRAWER_CONTENT_PADDING} ${I.DRAWER_CONTENT_PADDING} 0`},children:[o&&d&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eK,{errorInfo:d}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(z,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(z,{value:e.api_base,maxWidth:I.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),h&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eW,{label:j,maskedCount:g})})]})})}),(0,t.jsx)(eU,{logEntry:e,metadata:n}),(0,t.jsx)(L.CostBreakdownViewer,{costBreakdown:n?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit}),(0,t.jsx)(eu,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(M.ConfigInfoMessage,{show:x,onOpenSettings:s})}),a?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eG,{hasResponse:m,hasError:o,getRawRequest:()=>Z(e.proxy_server_request||e.messages),getFormattedResponse:()=>o&&d?{error:{message:d.error_message||"An error occurred",type:d.error_class||"error",code:d.error_code||"unknown",param:null}}:Z(e.response),logEntry:e}),h&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:u,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),b&&(0,t.jsx)(E,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eQ,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:I.DRAWER_CONTENT_PADDING}})]})}function eK({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(e$,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:I.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eW({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:I.SPACING_MEDIUM,children:[(0,t.jsx)("a",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{cursor:"pointer"},children:e}),s>0&&(0,t.jsxs)(j.Tag,{color:"blue",children:[s," masked"]})]})}function eU({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default";return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(P,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.Descriptions.Item,{label:"Duration",children:[null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):"-"," s"]}),null!=l&&l>0&&(0,t.jsxs)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.Descriptions.Item,{label:"Retries",children:s?.attempted_retries!==void 0&&s?.attempted_retries!==null?s.attempted_retries>0?(0,t.jsxs)(t.Fragment,{children:[s.attempted_retries,void 0!==s.max_retries&&null!==s.max_retries?` / ${s.max_retries}`:""]}):(0,t.jsx)(j.Tag,{color:"green",children:"None"}):"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eG({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(I.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),m=i.spend??0,x=i.prompt_tokens||0,u=i.completion_tokens||0,p=x+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?m*x/p:0,y=g?h.output_cost??0:p>0?m*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(eH,{request:l(),response:r(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(n===I.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===I.TAB_RESPONSE&&!e&&!a}),items:[{key:I.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:(0,t.jsx)(X,{data:l(),mode:"formatted"})})},{key:I.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:e||a?(0,t.jsx)(X,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eJ({guardrailEntries:e}){let s=e.every(e=>{let t=e?.guardrail_status||e?.status;return"pass"===t||"passed"===t||"success"===t});return(0,t.jsx)("div",{style:{textAlign:"left",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:16,cursor:"pointer",fontSize:13,fontWeight:500,backgroundColor:s?"#f0fdf4":"#fef2f2",color:s?"#15803d":"#b91c1c",border:`1px solid ${s?"#bbf7d0":"#fecaca"}`},children:[s?"✓":"✗"," ",e.length," guardrail",1!==e.length?"s":""," evaluated",(0,t.jsx)("span",{style:{fontSize:11,opacity:.7},children:"↓"})]})})}function eQ({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:I.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:I.FONT_SIZE_SMALL,fontFamily:I.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eX=e.i(764205),eZ=e.i(266027),e0=e.i(135214);function e1({row:e,isSelected:s,onClick:a}){let l=x.MCP_CALL_TYPES.includes(e.call_type),r=x.AGENT_CALL_TYPES.includes(e.call_type),i=null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):e.startTime&&e.endTime?((Date.parse(e.endTime)-Date.parse(e.startTime))/1e3).toFixed(3):"-";return(0,t.jsxs)("button",{type:"button",className:`w-full text-left pl-8 pr-2 py-1 transition-colors ${s?"bg-blue-50":"hover:bg-slate-100"}`,onClick:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(m.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(0,t.jsxs)("div",{className:"text-[10px] text-slate-500 mt-0 flex items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{children:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.getSpendString)(e.spend)})]}):null,e.total_tokens?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[e.total_tokens," tok"]})]}):null]})]})}function e2({open:e,onClose:d,logEntry:c,sessionId:m,accessToken:u,onOpenSettings:g,allLogs:f=[],onSelectLog:y,startTime:j}){let b=!!m,[v,_]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),{data:T=[]}=(0,eZ.useQuery)({queryKey:["sessionLogs",m],queryFn:async()=>{if(!m||!u)return[];let e=await (0,eX.sessionSpendLogsCall)(u,m);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!x.MCP_CALL_TYPES.includes(e.call_type),a=+!!x.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&b&&m&&u)}),L=(0,s.useMemo)(()=>b?T.length?v?T.find(e=>e.request_id===v)||T[0]:c?.request_id&&T.find(e=>e.request_id===c.request_id)||T[0]:null:c,[b,c,v,T]);(0,s.useEffect)(()=>{b&&T.length&&(v&&T.some(e=>e.request_id===v)||_(c?.request_id&&T.some(e=>e.request_id===c.request_id)?c.request_id:T[0].request_id))},[b,c,v,T]),(0,s.useEffect)(()=>{e?w(!1):(b&&_(null),k(!1))},[e,b]);let{selectNextLog:M,selectPreviousLog:A}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:L,allLogs:b?T:f,onClose:d,onSelectLog:e=>{b&&_(e.request_id),y?.(e)}}),E=((e,t,s)=>{let{accessToken:a}=(0,e0.default)();return(0,eZ.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eX.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(L?.request_id,j,e&&!!L?.request_id),D=E.data,O=E.isLoading,z=(0,s.useMemo)(()=>L?{...L,messages:D?.messages||L.messages,response:D?.response||L.response,proxy_server_request:D?.proxy_server_request||L.proxy_server_request}:null,[L,D]),R=L?.metadata||{},P="failure"===R.status?"Failure":"Success",B="failure"===R.status?"error":"success",F=R?.user_api_key_team_alias||"default",q=T.reduce((e,t)=>e+(t.spend||0),0),H=T.length>0?new Date(Math.min(...T.map(e=>new Date(e.startTime).getTime()))):null,$=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&$?(($.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,W=T.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length,U=b?T:L?[L]:[],G=b?m||"":L?.request_id||"",J=G.length>14?`${G.slice(0,11)}...`:G,Q=async()=>{if(G)try{await navigator.clipboard.writeText(G),k(!0),setTimeout(()=>k(!1),1200)}catch{}};return L&&z?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:I.DRAWER_WIDTH,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:(0,t.jsxs)("div",{style:{height:"100%"},className:"flex relative",children:[N?(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>w(!1),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Expand trace sidebar"}):(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>w(!0),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Collapse trace sidebar"}),!N&&(0,t.jsxs)("div",{className:"border-r border-slate-200 bg-slate-50 flex flex-col",style:{width:224},children:[(0,t.jsxs)("div",{className:"pl-12 pr-3 py-2 border-b border-slate-200 bg-white",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:b?"Session":"Trace"}),(0,t.jsxs)("div",{className:"font-mono text-[12px] text-slate-900 leading-tight flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:J}),(0,t.jsx)("button",{type:"button",onClick:Q,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:S?(0,t.jsx)(r.CheckOutlined,{className:"text-[11px]"}):(0,t.jsx)(i.CopyOutlined,{className:"text-[11px]"})})]})]})}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500 font-mono",children:[U.length," req",[b?K:U.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?V:U.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?W:U.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),b?(0,C.getSpendString)(q):(0,C.getSpendString)(L.spend||0),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[ee(R?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eJ,{guardrailEntries:ee(R?.guardrail_information)})}),b?(0,t.jsx)("div",{className:"py-1",children:(0,t.jsxs)("div",{className:"relative pl-2",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1 bottom-1 border-l border-slate-300"}),U.map((e,s)=>{let a=s===U.length-1;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute left-4 top-3 w-3 border-t border-slate-300"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>{_(e.request_id),y?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:U.map(e=>(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>y?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:L,onClose:d,onPrevious:A,onNext:M,statusLabel:P,statusColor:B,environment:F}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eY,{logEntry:z,onOpenSettings:g,isLoadingDetails:O,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e2],502626),e.s([],3565)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(313603),o=e.i(772345),d=e.i(793130),c=e.i(197647),m=e.i(653824),x=e.i(881073),u=e.i(404206),p=e.i(723731),h=e.i(464571),g=e.i(708347),f=e.i(93648),y=e.i(245767),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var C=e.i(504809);e.i(3565);var T=e.i(502626),L=e.i(727749);e.i(867612);var M=e.i(153472),A=e.i(954616),E=e.i(135214);let D=async(e,t)=>{let s=(0,_.getProxyBaseUrl)(),a=s?`${s}/config/update`:"/config/update",l=await fetch(a,{method:"POST",headers:{[(0,_.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await l.json()};var I=e.i(190702),O=e.i(637235),z=e.i(808613),R=e.i(311451),P=e.i(212931),B=e.i(981339),F=e.i(770914),q=e.i(790848),H=e.i(898586);let $=({isVisible:e,onCancel:s,onSuccess:a})=>{let[l]=z.Form.useForm(),{mutateAsync:r,isPending:n}=(()=>{let{accessToken:e}=(0,E.default)();return(0,A.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await D(e,t)}})})(),{mutateAsync:o,isPending:d}=(0,M.useDeleteProxyConfigField)(),{data:c,isLoading:m,refetch:x}=(0,M.useProxyConfig)(M.ConfigType.GENERAL_SETTINGS),u=z.Form.useWatch("store_prompts_in_spend_logs",l);(0,i.useEffect)(()=>{e&&x()},[e,x]);let p=(0,i.useMemo)(()=>{if(!c)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=c.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=c.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[c]),g=async e=>{try{let t=e.maximum_spend_logs_retention_period;if(!t||"string"==typeof t&&""===t.trim())try{await o({config_type:M.ConfigType.GENERAL_SETTINGS,field_name:M.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let s={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...t&&"string"==typeof t&&""!==t.trim()&&{maximum_spend_logs_retention_period:t}};await r(s,{onSuccess:()=>{L.default.success("Spend logs settings updated successfully"),x(),a?.()},onError:e=>{L.default.fromBackend("Failed to save spend logs settings: "+(0,I.parseErrorMessage)(e))}})}catch(e){L.default.fromBackend("Failed to save spend logs settings: "+(0,I.parseErrorMessage)(e))}},f=()=>{l.resetFields(),s()};return(0,t.jsx)(P.Modal,{title:(0,t.jsx)(H.Typography.Title,{level:5,children:"Spend Logs Settings"}),open:e,footer:(0,t.jsxs)(F.Space,{children:[(0,t.jsx)(h.Button,{onClick:f,disabled:n||d||m,children:"Cancel"}),(0,t.jsx)(h.Button,{type:"primary",loading:n||d,disabled:m,onClick:()=>l.submit(),children:n||d?"Saving...":"Save Settings"})]}),onCancel:f,children:(0,t.jsxs)(z.Form,{form:l,layout:"horizontal",onFinish:g,initialValues:p,children:[(0,t.jsx)(z.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:c?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,t.jsx)("div",{children:m?(0,t.jsx)(B.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(q.Switch,{checked:u??!1,onChange:e=>l.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,t.jsx)(z.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:c?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:m?(0,t.jsx)(B.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(R.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(O.ClockCircleOutlined,{})})})]},c?JSON.stringify(p):"loading")})};var Y=e.i(149121);function K({accessToken:e,token:L,userRole:M,userID:A,allTeams:E,premiumUser:D}){let[I,O]=(0,i.useState)(""),[z,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),K=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),[U,G]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(null),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(""),[eb,ev]=(0,i.useState)(M&&g.internalUserRoles.includes(M)),[e_,eN]=(0,i.useState)("request logs"),[ew,eS]=(0,i.useState)(null),[ek,eC]=(0,i.useState)(!1),[eT,eL]=(0,i.useState)(null),[eM,eA]=(0,i.useState)(!1),[eE,eD]=(0,i.useState)("startTime"),[eI,eO]=(0,i.useState)("desc"),[ez,eR]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eP,eB]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eP))},[eP]);let[eF,eq]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{ep&&e&&eu({...(await (0,_.keyInfoV1Call)(e,ep)).info,token:ep,api_key:ep})})()},[ep,e]),(0,i.useEffect)(()=>{function e(e){K.current&&!K.current.contains(e.target)&&B(!1),V.current&&!V.current.contains(e.target)&&R(!1),W.current&&!W.current.contains(e.target)&&et(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{M&&g.internalUserRoles.includes(M)&&ev(!0)},[M]);let eH=(0,a.useQuery)({queryKey:["logs","table",F,H,U,J,ei,eo,eb?A:null,eg,ec,eE,eI],queryFn:async()=>{if(!e||!L||!M||!A)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=X?(0,r.default)(J).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:eo||void 0,team_id:ei||void 0,user_id:eb?A??void 0:void 0,end_user:ey||void 0,status_filter:eg||void 0,model_id:ec||void 0,sort_by:eE,sort_order:eI}})},enabled:!!e&&!!L&&!!M&&!!A&&"request logs"===e_&&ez,refetchInterval:!!eP&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),e$=(0,i.useDeferredValue)(eH.isFetching),eY=eH.isFetching||e$,eK=eH.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eV,filteredLogs:eW,hasBackendFilters:eU,allTeams:eG,handleFilterChange:eJ,handleFilterReset:eQ}=(0,C.useLogFilterLogic)({logs:eK,accessToken:e,startTime:U,endTime:J,pageSize:H,isCustomDate:X,setCurrentPage:q,userID:A,userRole:M,sortBy:eE,sortOrder:eI,currentPage:F}),eX=(0,i.useCallback)(()=>{eQ(),G((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),Z(!1),eq({value:24,unit:"hours"}),q(1)},[eQ]);if((0,i.useEffect)(()=>{eR(!eU)},[eU]),(0,i.useEffect)(()=>{e&&(eV["Team ID"]?en(eV["Team ID"]):en(""),ef(eV.Status||""),em(eV.Model||""),ej(eV["End User"]||""),ed(eV["Key Hash"]||""))},[eV,e]),!e||!L||!M||!A)return null;let eZ=eW.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),e0=eZ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),e1=new Map;for(let e of eZ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=e1.get(e.session_id);s&&(!s.isMcp||t)||e1.set(e.session_id,{requestId:e.request_id,isMcp:t})}let e2=eZ.map(e=>{let t=e.session_id?e0[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eh(e),onSessionClick:t=>{t&&(eL(t),eS(e),eC(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||e1.get(e.session_id)?.requestId===e.request_id)||[],e5=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>E&&0!==E.length?E.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e4=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eF.value&&e.unit===eF.unit),e6=X?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"minutes");if(i>=0&&i<2)return"Last 1 Minute";if(i>=2&&i<16)return"Last 15 Minutes";if(i>=16&&i<61)return"Last Hour";let n=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(X,U,J):e4?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(m.TabGroup,{defaultIndex:0,onIndexChange:e=>eN(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(c.Tab,{children:"Request Logs"}),(0,t.jsx)(c.Tab,{children:"Audit Logs"}),(0,t.jsx)(c.Tab,{children:"Deleted Keys"}),(0,t.jsx)(c.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsxs)(u.TabPanel,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"}),(0,t.jsx)(h.Button,{icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>eA(!0),title:"Spend Logs Settings"})]}),ex&&ep&&ex.api_key===ep?(0,t.jsx)(N.default,{keyId:ep,keyData:ex,teams:E,onClose:()=>eh(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e5,onApplyFilters:eJ,onResetFilters:eX}),(0,t.jsx)($,{isVisible:eM,onCancel:()=>eA(!1),onSuccess:()=>eA(!1)}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>O(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:W,children:[(0,t.jsxs)("button",{onClick:()=>et(!ee),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e6]}),ee&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e6===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),G((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eq({value:e.value,unit:e.unit}),Z(!1),et(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${X?"bg-blue-50 text-blue-600":""}`,onClick:()=>Z(!X),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(d.Switch,{color:"green",checked:eP,defaultChecked:!0,onChange:eB})]}),{}),(0,t.jsx)(h.Button,{type:"default",icon:(0,t.jsx)(o.SyncOutlined,{spin:eY}),onClick:()=>{eH.refetch()},disabled:eY,title:"Fetch data",children:eY?"Fetching":"Fetch"})]}),X&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:J,onChange:e=>{Q(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eH.isLoading?"...":eW?(F-1)*H+1:0," -"," ",eH.isLoading?"...":eW?Math.min(F*H,eW.total):0," ","of ",eH.isLoading?"...":eW?eW.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eH.isLoading?"...":F," of"," ",eH.isLoading?"...":eW?eW.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eH.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(eW.total_pages||1,e+1)),disabled:eH.isLoading||F===(eW.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eP&&1===F&&ez&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eB(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(Y.DataTable,{columns:(0,S.createColumns)({sortBy:eE,sortOrder:eI,onSortChange:(e,t)=>{eD(e),eO(t),q(1)}}),data:e2,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eL(e.session_id),eS(e),eC(!0);return}eL(null),eS(e),eC(!0)},isLoading:eH.isLoading})]})]})]}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(w.default,{userID:A,userRole:M,token:L,accessToken:e,isActive:"audit logs"===e_,premiumUser:D})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(f.default,{})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(y.default,{})})]})]}),(0,t.jsx)(T.LogDetailsDrawer,{open:ek,onClose:()=>{eC(!1),eL(null)},logEntry:ew,sessionId:eT,accessToken:e,onOpenSettings:()=>eA(!0),allLogs:e2,onSelectLog:e=>{eS(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>K],936190)}]); \ No newline at end of file + store_prompts_in_spend_logs: true`}),(0,t.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null])},70635,e=>{"use strict";var t=e.i(843476),s=e.i(362024),a=e.i(500330);let l=e=>null==e?"-":`$${(0,a.formatNumberWithCommas)(e,8)}`,r=e=>null==e?"-":`${(100*e).toFixed(2)}%`;e.s(["CostBreakdownViewer",0,({costBreakdown:e,totalSpend:a,promptTokens:i,completionTokens:n,cacheHit:o})=>{let d=o?.toLowerCase()==="true",c=void 0!==i||void 0!==n,m=e?.input_cost!==void 0||e?.output_cost!==void 0,x=e?.additional_costs&&Object.entries(e.additional_costs).some(([,e])=>null!=e&&0!==e);if(!(m||c||x||e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount||void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount)))return null;let u=e&&(void 0!==e.discount_percent&&0!==e.discount_percent||void 0!==e.discount_amount&&0!==e.discount_amount),p=e&&(void 0!==e.margin_percent&&0!==e.margin_percent||void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount||void 0!==e.margin_total_amount&&0!==e.margin_total_amount),h=d?0:e?.input_cost,g=d?0:e?.output_cost,f=d?0:e?.original_cost,y=d?0:e?.total_cost??a;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(s.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Cost Breakdown"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 mr-4",children:[(0,t.jsx)("span",{className:"text-sm text-gray-500",children:"Total:"}),(0,t.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[l(a),d&&" (Cached)"]})]})]}),children:(0,t.jsxs)("div",{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2 max-w-2xl",children:[(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(h),void 0!==i&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",i.toLocaleString()," prompt tokens)"]})]})]}),(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Output Cost:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:[l(g),void 0!==n&&(0,t.jsxs)("span",{className:"text-gray-500 font-normal ml-1",children:["(",n.toLocaleString()," completion tokens)"]})]})]}),e?.tool_usage_cost!==void 0&&e.tool_usage_cost>0&&(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Tool Usage Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(e.tool_usage_cost)})]}),e?.additional_costs&&Object.entries(e.additional_costs).filter(([,e])=>null!=e&&0!==e).map(([e,s])=>(0,t.jsxs)("div",{className:"flex text-sm",children:[(0,t.jsxs)("span",{className:"text-gray-600 font-medium w-1/3",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-900",children:l(s)})]},e))]}),!d&&(0,t.jsx)("div",{className:"pt-2 border-t border-gray-100 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex text-sm font-semibold",children:[(0,t.jsx)("span",{className:"text-gray-900 w-1/3",children:"Original LLM Cost:"}),(0,t.jsx)("span",{className:"text-gray-900",children:l(f)})]})}),(u||p)&&(0,t.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[u&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.discount_percent&&0!==e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Discount (",r(e.discount_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]}),void 0!==e.discount_amount&&void 0===e.discount_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Discount Amount:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["-",l(e.discount_amount)]})]})]}),p&&(0,t.jsxs)("div",{className:"space-y-2",children:[void 0!==e.margin_percent&&0!==e.margin_percent&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsxs)("span",{className:"font-medium w-1/3",children:["Margin (",r(e.margin_percent),"):"]}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l((e.margin_total_amount||0)-(e.margin_fixed_amount||0))]})]}),void 0!==e.margin_fixed_amount&&0!==e.margin_fixed_amount&&(0,t.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Margin:"}),(0,t.jsxs)("span",{className:"text-gray-900",children:["+",l(e.margin_fixed_amount)]})]})]})]}),(0,t.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 max-w-2xl",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"font-bold text-sm text-gray-900 w-1/3",children:"Final Calculated Cost:"}),(0,t.jsxs)("span",{className:"text-sm font-bold text-gray-900",children:[l(y),d&&" (Cached)"]})]})})]})}]})})}])},339086,504809,e=>{"use strict";e.i(843476);var t=e.i(271645);e.s([],339086);var s=e.i(166540),a=e.i(764205),l=e.i(266027),r=e.i(633627),i=e.i(374009),n=e.i(700514);let o="Team ID",d="Key Hash",c="Request ID",m="Model",x="User ID",u="End User",p="Status",h="Key Alias",g="Error Code",f="Error Message";function y({logs:e,accessToken:y,startTime:j,endTime:b,pageSize:v=n.defaultPageSize,isCustomDate:_,setCurrentPage:N,userID:w,userRole:S,sortBy:k="startTime",sortOrder:C="desc",currentPage:T=1}){let L=(0,t.useMemo)(()=>({[o]:"",[d]:"",[c]:"",[m]:"",[x]:"",[u]:"",[p]:"",[h]:"",[g]:"",[f]:""}),[]),[M,A]=(0,t.useState)(L),[E,D]=(0,t.useState)(null),I=(0,t.useRef)(0),O=(0,t.useCallback)(async(e,t=1)=>{if(!y)return;console.log("Filters being sent to API:",e);let l=Date.now();I.current=l;let r=(0,s.default)(j).utc().format("YYYY-MM-DD HH:mm:ss"),i=_?(0,s.default)(b).utc().format("YYYY-MM-DD HH:mm:ss"):(0,s.default)().utc().format("YYYY-MM-DD HH:mm:ss");try{let s=await (0,a.uiSpendLogsCall)({accessToken:y,start_date:r,end_date:i,page:t,page_size:v,params:{api_key:e[d]||void 0,team_id:e[o]||void 0,request_id:e[c]||void 0,user_id:e[x]||void 0,end_user:e[u]||void 0,status_filter:e[p]||void 0,model_id:e[m]||void 0,key_alias:e[h]||void 0,error_code:e[g]||void 0,error_message:e[f]||void 0,sort_by:k,sort_order:C}});l===I.current&&D({...s,data:s.data??[]})}catch(e){console.error("Error searching users:",e),D({data:[],total:0,page:1,page_size:v,total_pages:0})}},[y,j,b,_,v,k,C]),z=(0,t.useMemo)(()=>(0,i.default)((e,t)=>O(e,t),300),[O]);(0,t.useEffect)(()=>()=>z.cancel(),[z]);let R=(0,t.useMemo)(()=>!!(M[h]||M[d]||M[c]||M[x]||M[u]||M[g]||M[f]||M[m]),[M]);(0,t.useEffect)(()=>{R&&y&&(z.cancel(),O(M,T))},[k,C,T,j,b,_]);let P=(0,t.useMemo)(()=>{if(!e||!e.data)return{data:[],total:0,page:1,page_size:v,total_pages:0};if(R)return e;let t=[...e.data];return M[o]&&(t=t.filter(e=>e.team_id===M[o])),M[p]&&(t=t.filter(e=>"success"===M[p]?!e.status||"success"===e.status:e.status===M[p])),M[m]&&(t=t.filter(e=>e.model_id===M[m])),M[d]&&(t=t.filter(e=>e.api_key===M[d])),M[u]&&(t=t.filter(e=>e.end_user===M[u])),M[g]&&(t=t.filter(e=>{let t=(e.metadata||{}).error_information;return t&&t.error_code===M[g]})),{data:t,total:e.total,page:e.page,page_size:e.page_size,total_pages:e.total_pages}},[e,M,R]),B=(0,t.useMemo)(()=>R?null!==E?E:{data:[],total:0,page:1,page_size:v,total_pages:0}:P,[R,E,P]),{data:F}=(0,l.useQuery)({queryKey:["allTeamsForLogFilters",y],queryFn:async()=>y&&await (0,r.fetchAllTeams)(y)||[],enabled:!!y});return{filters:M,filteredLogs:B,hasBackendFilters:R,allTeams:F,handleFilterChange:e=>{A(t=>{let s={...t,...e};for(let e of Object.keys(L))e in s||(s[e]=L[e]);return JSON.stringify(s)!==JSON.stringify(t)&&(N(1),D(null),z(s,1)),s})},handleFilterReset:()=>{A(L),D(null),z.cancel(),N(1)}}}e.s(["useLogFilterLogic",()=>y],504809)},894660,283086,195116,e=>{"use strict";var t=e.i(801312);e.s(["LeftOutlined",()=>t.default],894660);var s=e.i(475254);let a=(0,s.default)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);e.s(["Sparkles",()=>a],283086);let l=(0,s.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",()=>l],195116)},257486,624001,207066,337767,237062,e=>{"use strict";var t=e.i(97859);function s(e,s){let a=(s||"").trim();if(t.MCP_CALL_TYPES.includes(e))return a.replace(/^mcp:\s*/i,"").split("/").pop()||a||"mcp_tool";let l=(a.split("/").pop()||a).replace(/-20\d{6}.*$/i,"").replace(/:.*$/,""),r=l.match(/claude-[a-z0-9-]+/i);return r?r[0]:l||"llm_call"}e.s(["getEventDisplayName",()=>s],257486);var a=e.i(843476),l=e.i(464571),r=e.i(770914),i=e.i(262218),n=e.i(592968),o=e.i(898586),d=e.i(149192),c=e.i(536591);e.s(["UpOutlined",()=>c.default],624001);var c=c,m=e.i(755151),x=e.i(166540),u=e.i(916925);let p="16px 24px",h="Escape",g="monospace",f="#f0f0f0",y="#fff";e.s(["API_BASE_MAX_WIDTH",0,200,"COLOR_BACKGROUND",0,y,"COLOR_BG_LIGHT",0,"#fafafa","COLOR_BORDER",0,f,"DEFAULT_MAX_WIDTH",0,180,"DRAWER_CONTENT_PADDING",0,"24px","DRAWER_HEADER_PADDING",0,p,"DRAWER_WIDTH",0,"60%","FONT_FAMILY_MONO",0,g,"FONT_SIZE_HEADER",0,16,"FONT_SIZE_MEDIUM",0,13,"FONT_SIZE_SMALL",0,12,"JSON_MAX_HEIGHT",0,400,"KEY_ESCAPE",0,h,"KEY_J_LOWER",0,"j","KEY_J_UPPER",0,"J","KEY_K_LOWER",0,"k","KEY_K_UPPER",0,"K","METADATA_MAX_HEIGHT",0,300,"SPACING_LARGE",0,12,"SPACING_MEDIUM",0,8,"SPACING_SMALL",0,4,"SPACING_XLARGE",0,16,"TAB_REQUEST",0,"request","TAB_RESPONSE",0,"response"],207066);let{Text:j}=o.Typography;function b({log:e,onClose:t,onPrevious:s,onNext:l,statusLabel:r,statusColor:i,environment:n}){let o=e.custom_llm_provider||"",d=o?(0,u.getProviderLogoAndName)(o):null;return(0,a.jsxs)("div",{style:{padding:p,borderBottom:`1px solid ${f}`,backgroundColor:y,position:"sticky",top:0,zIndex:10},children:[(0,a.jsx)(v,{model:e.model,providerLogo:d?.logo,providerName:d?.displayName}),(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,a.jsx)(_,{requestId:e.request_id}),(0,a.jsx)(N,{onPrevious:s,onNext:l,onClose:t})]}),(0,a.jsx)(w,{log:e,statusLabel:r,statusColor:i,environment:n})]})}function v({model:e,providerLogo:t,providerName:s}){return(0,a.jsxs)(r.Space,{size:8,style:{marginBottom:8},children:[t&&(0,a.jsx)("img",{src:t,alt:s||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,a.jsxs)(r.Space,{size:8,direction:"horizontal",children:[(0,a.jsx)(j,{strong:!0,style:{fontSize:14},children:e}),s&&(0,a.jsx)(j,{type:"secondary",style:{fontSize:12},children:s})]})]})}function _({requestId:e}){return(0,a.jsx)("div",{style:{flex:1,minWidth:0},children:(0,a.jsx)(n.Tooltip,{title:e,children:(0,a.jsx)(j,{strong:!0,copyable:{text:e,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:g,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})})})}function N({onPrevious:e,onNext:t,onClose:s}){let i={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,a.jsxs)(r.Space,{size:4,split:(0,a.jsx)("div",{style:{width:1,height:20,background:f}}),children:[(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:e,children:[(0,a.jsx)(c.default,{}),(0,a.jsx)("span",{style:i,children:"K"})]}),(0,a.jsxs)(l.Button,{type:"text",size:"small",onClick:t,children:[(0,a.jsx)(m.DownOutlined,{}),(0,a.jsx)("span",{style:i,children:"J"})]}),(0,a.jsx)(n.Tooltip,{title:"ESC to close",children:(0,a.jsx)(l.Button,{type:"text",icon:(0,a.jsx)(d.CloseOutlined,{}),onClick:s})})]})}function w({log:e,statusLabel:t,statusColor:s,environment:l}){return(0,a.jsxs)(r.Space,{size:12,children:[(0,a.jsx)(i.Tag,{color:s,children:t}),(0,a.jsxs)(i.Tag,{children:["Env: ",l]}),(0,a.jsxs)(r.Space,{size:8,children:[(0,a.jsx)(j,{type:"secondary",style:{fontSize:13},children:(0,x.default)(e.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,a.jsxs)(j,{type:"secondary",style:{fontSize:13},children:["(",(0,x.default)(e.startTime).fromNow(),")"]})]})]})}e.s(["DrawerHeader",()=>b],337767);var S=e.i(271645);function k({isOpen:e,currentLog:t,allLogs:s,onClose:a,onSelectLog:l}){(0,S.useEffect)(()=>{let t=t=>{var s;if(!((s=t.target)instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&e)switch(t.key){case h:a();break;case"j":case"J":r();break;case"k":case"K":i()}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,t,s]);let r=()=>{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e{if(!t||!s.length||!l)return;let e=s.findIndex(e=>e.request_id===t.request_id);e>0&&l(s[e-1])};return{selectNextLog:r,selectPreviousLog:i}}e.s(["useKeyboardNavigation",()=>k],237062)},3565,331052,867612,502626,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(464571),l=e.i(608856),r=e.i(492030),i=e.i(166406),n=e.i(894660),o=e.i(240647),d=e.i(531245),c=e.i(283086),m=e.i(195116),x=e.i(97859),u=e.i(257486),p=e.i(337767),h=e.i(237062),g=e.i(898586),f=e.i(869216),y=e.i(175712),j=e.i(262218),b=e.i(653496),v=e.i(560445),_=e.i(362024),N=e.i(91739),w=e.i(770914),S=e.i(482725),k=e.i(166540),C=e.i(500330),T=e.i(517442),L=e.i(70635),M=e.i(70969),A=e.i(916925);function E({data:e}){let[a,l]=(0,s.useState)({});if(!e||0===e.length)return null;let r=e=>new Date(1e3*e).toLocaleString();return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,t.jsx)("div",{className:"p-4",children:e.map((e,s)=>{var i,n;return(0,t.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,t.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,t.jsx)("span",{className:"font-mono",children:e.query})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,t.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,t.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:a}=(0,A.getProviderLogoAndName)(e.custom_llm_provider);return(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)("img",{src:s,alt:`${a} logo`,className:"h-5 w-5 mr-2"}),a]})})()})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,t.jsx)("span",{children:r(e.start_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,t.jsx)("span",{children:r(e.end_time)})]}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,t.jsx)("span",{children:(i=e.start_time,n=e.end_time,`${((n-i)*1e3).toFixed(2)}ms`)})]})]})]})}),(0,t.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,t.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>{let e;return e=`${s}-${r}`,void l(t=>({...t,[e]:!t[e]}))},children:[(0,t.jsx)("svg",{className:`w-5 h-5 mr-2 transition-transform ${i?"transform rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("span",{className:"font-medium mr-2",children:["Result ",r+1]}),(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,t.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),i&&(0,t.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,t.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded",children:e.text})]},s))})]},r)})})]},s)})})}]})})}e.s(["VectorStoreViewer",()=>E],331052);var D=e.i(592968),I=e.i(207066);let{Text:O}=g.Typography;function z({value:e,maxWidth:s=I.DEFAULT_MAX_WIDTH}){return e?(0,t.jsx)(D.Tooltip,{title:e,children:(0,t.jsx)(O,{copyable:{text:e,tooltips:["Copy","Copied!"]},style:{maxWidth:s,display:"inline-block",verticalAlign:"bottom",fontFamily:I.FONT_FAMILY_MONO,fontSize:I.FONT_SIZE_SMALL},ellipsis:!0,children:e})}):(0,t.jsx)(O,{type:"secondary",children:"-"})}let{Text:R}=g.Typography;function P({prompt:e=0,completion:s=0,total:a=0}){return(0,t.jsxs)(R,{children:[a.toLocaleString()," (",e.toLocaleString()," prompt tokens + ",s.toLocaleString()," completion tokens)"]})}let B=e=>!!e&&e instanceof Date,F=e=>"object"==typeof e&&null!==e,q=e=>!!e&&e instanceof Object&&"function"==typeof e;function H(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function $(e){let{field:t,value:a,data:l,lastElement:r,openBracket:i,closeBracket:n,level:o,style:d,shouldExpandNode:c,clickToExpandNode:m,outerRef:x,beforeExpandChange:u}=e,p=(0,s.useRef)(!1),[h,g]=(0,s.useState)(()=>c(o,a,t)),f=(0,s.useRef)(null);(0,s.useEffect)(()=>{p.current?g(c(o,a,t)):p.current=!0},[c]);let y=(0,s.useId)();if(0===l.length)return function(e){let{field:t,openBracket:a,closeBracket:l,lastElement:r,style:i}=e;return(0,s.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,s.createElement)("span",{className:i.label},H(t,i.quotesForFieldNames),":"),(0,s.createElement)("span",{className:i.punctuation},a),(0,s.createElement)("span",{className:i.punctuation},l),!r&&(0,s.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:n,lastElement:r,style:d});let j=h?d.collapseIcon:d.expandIcon,b=h?d.ariaLables.collapseJson:d.ariaLables.expandJson,v=o+1,_=l.length-1,N=e=>{h!==e&&(!u||u({level:o,value:a,field:t,newExpandValue:e}))&&g(e)},w=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),N("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!x.current)return;let s=x.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;N(!h);let t=f.current;if(!t)return;let s=null==(e=x.current)?void 0:e.querySelector('[role=button][tabindex="0"]');s&&(s.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,s.createElement)("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":h,"aria-selected":void 0},(0,s.createElement)("span",{className:j,onClick:S,onKeyDown:w,role:"button","aria-label":b,"aria-expanded":h,"aria-controls":h?y:void 0,ref:f,tabIndex:0===o?0:-1}),(t||""===t)&&(m?(0,s.createElement)("span",{className:d.clickableLabel,onClick:S,onKeyDown:w},H(t,d.quotesForFieldNames),":"):(0,s.createElement)("span",{className:d.label},H(t,d.quotesForFieldNames),":")),(0,s.createElement)("span",{className:d.punctuation},i),h?(0,s.createElement)("ul",{id:y,role:"group",className:d.childFieldsContainer},l.map((e,t)=>(0,s.createElement)(W,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:v,shouldExpandNode:c,clickToExpandNode:m,beforeExpandChange:u,outerRef:x}))):(0,s.createElement)("span",{className:d.collapsedContent,onClick:S,onKeyDown:w}),(0,s.createElement)("span",{className:d.punctuation},n),!r&&(0,s.createElement)("span",{className:d.punctuation},","))}function Y(e){let{field:t,value:s,style:a,lastElement:l,shouldExpandNode:r,clickToExpandNode:i,level:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:n,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:i,data:Object.keys(s).map(e=>[e,s[e]]),outerRef:o,beforeExpandChange:d})}function K(e){let{field:t,value:s,style:a,lastElement:l,level:r,shouldExpandNode:i,clickToExpandNode:n,outerRef:o,beforeExpandChange:d}=e;return $({field:t,value:s,lastElement:l||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:i,clickToExpandNode:n,data:s.map(e=>[void 0,e]),outerRef:o,beforeExpandChange:d})}function V(e){let t,{field:a,value:l,style:r,lastElement:i}=e,n=r.otherValue;if(null===l)t="null",n=r.nullValue;else if(void 0===l)t="undefined",n=r.undefinedValue;else if("string"==typeof l||l instanceof String){var o;o=!r.noQuotesForStringValues,t=r.stringifyStringValues?JSON.stringify(l):o?`"${l}"`:l,n=r.stringValue}else if("boolean"==typeof l||l instanceof Boolean)t=l?"true":"false",n=r.booleanValue;else if("number"==typeof l||l instanceof Number)t=l.toString(),n=r.numberValue;else"bigint"==typeof l||l instanceof BigInt?(t=`${l.toString()}n`,n=r.numberValue):t=B(l)?l.toISOString():q(l)?"function() { }":l.toString();return(0,s.createElement)("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(a||""===a)&&(0,s.createElement)("span",{className:r.label},H(a,r.quotesForFieldNames),":"),(0,s.createElement)("span",{className:n},t),!i&&(0,s.createElement)("span",{className:r.punctuation},","))}function W(e){let t=e.value;return Array.isArray(t)?(0,s.createElement)(K,Object.assign({},e)):!F(t)||B(t)||q(t)?(0,s.createElement)(V,Object.assign({},e)):(0,s.createElement)(Y,Object.assign({},e))}let U={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},G=()=>!0,J=e=>{let{data:t,style:a=U,shouldExpandNode:l=G,clickToExpandNode:r=!1,beforeExpandChange:i,compactTopLevel:n,...o}=e,d=(0,s.useRef)(null);return(0,s.createElement)("div",Object.assign({"aria-label":"JSON view"},o,{className:a.container,ref:d,role:"tree"}),n&&F(t)?Object.entries(t).map(e=>{let[t,n]=e;return(0,s.createElement)(W,{key:t,field:t,value:n,style:{...U,...a},lastElement:!0,level:1,shouldExpandNode:l,clickToExpandNode:r,beforeExpandChange:i,outerRef:d})}):(0,s.createElement)(W,{value:t,style:{...U,...a},lastElement:!0,level:0,shouldExpandNode:l,clickToExpandNode:r,outerRef:d,beforeExpandChange:i}))};e.s(["JsonView",()=>J,"defaultStyles",()=>U],867612);let{Text:Q}=g.Typography;function X({data:e}){return e?(0,t.jsx)("div",{style:{maxHeight:I.JSON_MAX_HEIGHT,overflow:"auto",background:I.COLOR_BG_LIGHT,padding:I.SPACING_LARGE,borderRadius:4},children:(0,t.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,t.jsx)(J,{data:e,style:U,clickToExpandNode:!0})})}):(0,t.jsx)(Q,{type:"secondary",children:"No data"})}function Z(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function ee(e){return Array.isArray(e)?e:e?[e]:[]}function et(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}var es=e.i(366308),ea=e.i(755151),el=e.i(291542);let{Text:er}=g.Typography;function ei({tool:e}){let s=Object.entries(e.parameters?.properties||{}).map(([t,s])=>({key:t,name:t,type:s.type||"any",description:s.description||"-",required:e.parameters?.required?.includes(t)||!1})),a=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,t.jsxs)(er,{code:!0,children:[e,s.required&&(0,t.jsx)(er,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,t.jsx)(er,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,t.jsx)(er,{type:"secondary",children:e})}];return(0,t.jsxs)("div",{children:[e.description&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(er,{style:{lineHeight:1.6,whiteSpace:"pre-wrap"},children:e.description})}),s.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,t.jsx)(el.Table,{dataSource:s,columns:a,pagination:!1,size:"small",bordered:!0})]}),e.called&&e.callData&&(0,t.jsxs)("div",{style:{marginTop:16},children:[(0,t.jsx)(er,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,t.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,t.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.callData.arguments,null,2)})})]})]})}function en({tool:e}){let s={type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}};return(0,t.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(s,null,2)})}let{Text:eo}=g.Typography;function ed({tool:e}){let[a,l]=(0,s.useState)("formatted");return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,t.jsx)(eo,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:a,onChange:e=>l(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"formatted",children:"Formatted"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),"formatted"===a?(0,t.jsx)(ei,{tool:e}):(0,t.jsx)(en,{tool:e})]})}let{Text:ec}=g.Typography;function em({tool:e}){let[a,l]=(0,s.useState)(!1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:a?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)(es.ToolOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsxs)(ec,{style:{fontSize:14},children:[e.index,". ",e.name]})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(j.Tag,{color:e.called?"blue":"default",children:e.called?"called":"not called"}),a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:12,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),a&&(0,t.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,t.jsx)(ed,{tool:e})})]})}let{Text:ex}=g.Typography;function eu({log:e}){let s=function(e){let t,s=!(t=et(e.proxy_server_request||e.messages))||Array.isArray(t)?[]:"object"==typeof t&&t.tools&&Array.isArray(t.tools)?t.tools:[];if(0===s.length)return[];let a=function(e){let t=et(e.response);if(!t||"object"!=typeof t)return[];let s=t.choices;if(Array.isArray(s)&&s.length>0){let e=s[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}if(Array.isArray(t.content)){let e=t.content.filter(e=>"tool_use"===e.type);if(e.length>0)return e.map(e=>({id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input||{})}}))}if(Array.isArray(t.tool_calls))return t.tool_calls;if(Array.isArray(t.results)){let e=[];for(let s of t.results)if("response.done"===s.type&&s.response?.output)for(let t of s.response.output)"function_call"===t.type&&e.push({id:t.call_id||"",type:"function",function:{name:t.name||"",arguments:t.arguments||"{}"}});if(e.length>0)return e}return[]}(e),l=new Set(a.map(e=>e.function?.name).filter(Boolean)),r=new Map;return a.forEach(e=>{let t=e.function?.name;t&&r.set(t,{id:e.id,name:t,arguments:function(e){try{return JSON.parse(e)}catch{return{}}}(e.function?.arguments||"{}")})}),s.map((e,t)=>{let s=e.function?.name||e.name||`Tool ${t+1}`;return{index:t+1,name:s,description:e.function?.description||e.description||"",parameters:e.function?.parameters||e.input_schema||{},called:l.has(s),callData:r.get(s)}})}(e);if(0===s.length)return null;let a=s.length,l=s.filter(e=>e.called).length,r=s.slice(0,2).map(e=>e.name).join(", "),i=s.length>2;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,t.jsxs)(ex,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(e=>(0,t.jsx)(em,{tool:e},e.name))})}]})})}let ep=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch{return{raw:e}}return e};var eh=e.i(888259),eg=e.i(264843),ef=e.i(624001);let{Text:ey}=g.Typography;function ej({type:e,tokens:s,cost:l,onCopy:r,isCollapsed:n,onToggleCollapse:o,turnCount:d}){return(0,t.jsxs)("div",{onClick:o,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:n?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:o?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{o&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[o&&(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:n?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===e?(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:14}}):(0,t.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,t.jsx)(ey,{style:{fontWeight:500,fontSize:14},children:"input"===e?"Input":"Output"})]}),void 0!==s&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Tokens: ",s.toLocaleString()]}),void 0!==l&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Cost: $",l.toFixed(6)]}),void 0!==d&&d>0&&(0,t.jsxs)(ey,{type:"secondary",style:{fontSize:12},children:["Turns: ",d]})]}),(0,t.jsx)(D.Tooltip,{title:"Copy",children:(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(i.CopyOutlined,{}),onClick:e=>{e.stopPropagation(),r()}})})]})}let{Text:eb}=g.Typography;function ev({label:e,content:a,defaultExpanded:l=!1}){let[r,i]=(0,s.useState)(l),[n,d]=(0,s.useState)(!1),c=a?.length||0;return a&&0!==c?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>i(!r),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:n?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!r},children:[r?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsx)(eb,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:e}),(0,t.jsxs)(eb,{type:"secondary",style:{fontSize:10},children:["(",c.toLocaleString()," chars)"]})]}),(0,t.jsx)("div",{style:{maxHeight:r?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!r},children:(0,t.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})})]}):null}let{Text:e_}=g.Typography;function eN({tool:e,compact:s=!1}){return(0,t.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:s?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,t.jsx)(e_,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:e.name}),Object.keys(e.arguments).length>0&&(0,t.jsx)("div",{children:Object.entries(e.arguments).map(([e,s])=>(0,t.jsxs)("div",{style:{marginBottom:2},children:[(0,t.jsxs)(e_,{type:"secondary",style:{fontSize:12},children:[e,":"," "]}),(0,t.jsx)(e_,{style:{fontSize:12},children:JSON.stringify(s)})]},e))})]})}let{Text:ew}=g.Typography;function eS({label:e,content:s,toolCalls:a,isCompact:l=!1}){let r=s&&"null"!==s&&s.length>0?s:null,i=a&&a.length>0;return r||i?(0,t.jsxs)("div",{style:{marginBottom:8*!!l},children:[(0,t.jsx)(ew,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e}),r&&(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:6*!!i},children:r}),i&&(0,t.jsx)("div",{children:a.map((e,s)=>(0,t.jsx)(eN,{tool:e,compact:l},e.id||s))})]}):null}let{Text:ek}=g.Typography;function eC({messages:e}){let[a,l]=(0,s.useState)(!1),[r,i]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsxs)("div",{onClick:()=>l(!a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:r?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:4*!!a},children:[a?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(o.RightOutlined,{style:{fontSize:10,color:"#8c8c8c"}}),(0,t.jsxs)(ek,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",e.length," message",1!==e.length?"s":"",")"]})]}),(0,t.jsx)("div",{style:{maxHeight:a?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:+!!a},children:(0,t.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:e.map((e,s)=>(0,t.jsx)(eS,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function eT({messages:e,promptTokens:a,inputCost:l}){let[r,i]=(0,s.useState)(!1);if(0===e.length)return null;let n=e.find(e=>"system"===e.role),o=e.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,c=o.slice(0,-1);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"input",tokens:a,cost:l,onCopy:()=>{let e=d?.content||"";navigator.clipboard.writeText(e),eh.default.success("Input copied")},isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[n&&(0,t.jsx)(ev,{label:"SYSTEM",content:n.content,defaultExpanded:!!(n.content&&n.content.length<200)}),c.length>0&&(0,t.jsx)(eC,{messages:c}),d&&(0,t.jsx)(eS,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:eL}=g.Typography;function eM({message:e,completionTokens:a,outputCost:l}){let[r,i]=(0,s.useState)(!1),n=()=>{if(!e)return;let t=e.content||"";navigator.clipboard.writeText(t),eh.default.success("Output copied")};return e?(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eS,{label:"ASSISTANT",content:e.content,toolCalls:e.toolCalls})})})]}):(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:a,cost:l,onCopy:n,isCollapsed:r,onToggleCollapse:()=>i(!r)}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:(0,t.jsx)(eL,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}var eA=e.i(782273),eE=e.i(313603),eD=e.i(793916);let{Text:eI}=g.Typography;function eO({response:e,metrics:s}){let a=e?.results||[],l=e?.usage,r=a.find(e=>"session.created"===e.type||"session.updated"===e.type),i=a.filter(e=>"response.done"===e.type);return(0,t.jsxs)("div",{children:[r?.session&&(0,t.jsx)(ez,{session:r.session,turnCount:i.length}),i.length>0&&(0,t.jsx)(eR,{responses:i.map(e=>e.response).filter(Boolean),totalUsage:l,metrics:s}),!r&&0===i.length&&(0,t.jsx)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"16px",color:"#8c8c8c",fontStyle:"italic",fontSize:13},children:"No recognized realtime events found"})]})}function ez({session:e,turnCount:a}){let[l,r]=(0,s.useState)(!0);return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,t.jsx)("div",{onClick:()=>r(!l),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:l?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:"pointer",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center"},children:l?(0,t.jsx)(ea.DownOutlined,{style:{fontSize:10,color:"#8c8c8c"}}):(0,t.jsx)(ef.UpOutlined,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)(eE.SettingOutlined,{style:{color:"#8c8c8c",fontSize:14}}),(0,t.jsx)(eI,{style:{fontWeight:500,fontSize:14},children:"Session"})]}),(0,t.jsx)(eI,{type:"secondary",style:{fontSize:12},children:e.model}),a>0&&(0,t.jsxs)(j.Tag,{color:"purple",style:{margin:0,fontWeight:500},children:[a," ",1===a?"turn":"turns"]}),e.voice&&(0,t.jsxs)(j.Tag,{color:"blue",style:{margin:0},children:[(0,t.jsx)(eA.SoundOutlined,{})," ",e.voice]}),e.modalities&&(0,t.jsx)("div",{style:{display:"flex",gap:4},children:e.modalities.map(e=>(0,t.jsxs)(j.Tag,{style:{margin:0},children:["audio"===e?(0,t.jsx)(eD.AudioOutlined,{}):(0,t.jsx)(eg.MessageOutlined,{})," ",e]},e))})]})}),(0,t.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!l},children:(0,t.jsxs)("div",{style:{padding:"12px 16px"},children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px 24px",fontSize:13},children:[(0,t.jsx)(eq,{label:"Model",value:e.model}),(0,t.jsx)(eq,{label:"Voice",value:e.voice}),(0,t.jsx)(eq,{label:"Temperature",value:e.temperature}),(0,t.jsx)(eq,{label:"Max Output Tokens",value:e.max_response_output_tokens}),(0,t.jsx)(eq,{label:"Input Audio Format",value:e.input_audio_format}),(0,t.jsx)(eq,{label:"Output Audio Format",value:e.output_audio_format}),e.turn_detection&&(0,t.jsx)(eq,{label:"Turn Detection",value:e.turn_detection.type}),e.tools&&e.tools.length>0&&(0,t.jsx)(eq,{label:"Tools",value:`${e.tools.length} tool(s)`})]}),e.instructions&&(0,t.jsxs)("div",{style:{marginTop:12},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:4},children:"Instructions"}),(0,t.jsx)("div",{style:{fontSize:12,lineHeight:1.6,color:"#595959",background:"#fafafa",padding:"8px 12px",borderRadius:4,border:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:120,overflowY:"auto"},children:e.instructions})]})]})})]})}function eR({responses:e,totalUsage:a,metrics:l}){let[r,i]=(0,s.useState)(!1),n=a?.total_tokens,o=e.length;return(0,t.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,t.jsx)(ej,{type:"output",tokens:l?.completion_tokens??n,cost:l?.output_cost,onCopy:()=>{let t=e.flatMap(e=>(e.output||[]).flatMap(e=>(e.content||[]).map(t=>`${e.role}: ${t.transcript||t.text||""}`))).join("\n");navigator.clipboard.writeText(t)},isCollapsed:r,onToggleCollapse:()=>i(!r),turnCount:o}),(0,t.jsx)("div",{style:{maxHeight:r?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:+!r},children:(0,t.jsx)("div",{style:{padding:"12px 16px"},children:e.map((e,s)=>(0,t.jsx)(eP,{response:e,index:s},e.id||s))})})]})}function eP({response:e,index:s}){let a=e.output||[],l=e.usage;return(0,t.jsxs)("div",{style:{marginBottom:12,paddingBottom:12,borderBottom:"1px solid #f5f5f5"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,t.jsx)(j.Tag,{color:"completed"===e.status?"green":"orange",style:{margin:0},children:e.status||"unknown"}),l&&(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11},children:[l.input_tokens??0," in / ",l.output_tokens??0," out tokens"]}),e.conversation_id&&(0,t.jsx)(D.Tooltip,{title:e.conversation_id,children:(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:11,cursor:"help"},children:["conv: ",e.conversation_id.slice(0,12),"..."]})})]}),a.map((e,s)=>(0,t.jsx)(eB,{output:e},e.id||s)),l?.input_token_details&&(0,t.jsx)(eF,{label:"Input",details:l.input_token_details}),l?.output_token_details&&(0,t.jsx)(eF,{label:"Output",details:l.output_token_details})]})}function eB({output:e}){let s=e.content||[];return s.some(e=>e.transcript||e.text)?(0,t.jsxs)("div",{style:{marginBottom:8},children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:e.role?.toUpperCase()||"ASSISTANT"}),s.map((e,s)=>{let a=e.transcript||e.text;return a?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4},children:["audio"===e.type&&(0,t.jsx)(eD.AudioOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),"text"===e.type&&(0,t.jsx)(eg.MessageOutlined,{style:{color:"#8c8c8c",fontSize:12,marginTop:3,flexShrink:0}}),(0,t.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a})]},s):null})]}):null}function eF({label:e,details:s}){let a=Object.entries(s).filter(([,e])=>"number"==typeof e||"object"==typeof e&&null!==e);return 0===a.length?null:(0,t.jsxs)("div",{style:{marginTop:4},children:[(0,t.jsxs)(eI,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:[e," Token Breakdown"]}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:4},children:a.map(([e,s])=>"number"==typeof s?(0,t.jsxs)(j.Tag,{style:{margin:0},children:[e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),": ",s.toLocaleString()]},e):null)})]})}function eq({label:e,value:s}){return null==s?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(eI,{type:"secondary",style:{fontSize:11},children:e}),(0,t.jsx)("div",{style:{fontSize:13,color:"#262626"},children:String(s)})]})}function eH({request:e,response:s,metrics:a}){let l,r,i;if(s&&s.results&&Array.isArray(s.results)&&0!==s.results.length&&s.results.some(e=>"session.created"===e.type||"session.updated"===e.type||"response.done"===e.type))return(0,t.jsx)(eO,{response:s,metrics:a});let{requestMessages:n,responseMessage:o}=(l=[],e?.messages&&Array.isArray(e.messages)&&e.messages.forEach(e=>{let t;l.push({role:e.role||"user",content:"string"==typeof(t=e.content)?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(t),toolCallId:e.tool_call_id})}),r=null,(i=s?.choices?.[0]?.message)&&(r={role:i.role||"assistant",content:i.content||"",toolCalls:(e=>{if(e&&Array.isArray(e))return e.map(e=>({id:e.id||"",name:e.function?.name||"unknown",arguments:ep(e.function?.arguments)}))})(i.tool_calls)}),{requestMessages:l,responseMessage:r});return(0,t.jsxs)("div",{children:[(0,t.jsx)(eT,{messages:n,promptTokens:a?.prompt_tokens,inputCost:a?.input_cost}),(0,t.jsx)(eM,{message:o,completionTokens:a?.completion_tokens,outputCost:a?.output_cost})]})}let{Text:e$}=g.Typography;function eY({logEntry:e,onOpenSettings:s,isLoadingDetails:a=!1,accessToken:l}){var r,i;let n=e.metadata||{},o="failure"===n.status,d=o?n.error_information:null,c=!!(r=e.messages)&&(Array.isArray(r)?r.length>0:"object"==typeof r&&Object.keys(r).length>0),m=!!(i=e.response)&&Object.keys(Z(i)).length>0,x=!c&&!m&&!o&&!a,u=n?.guardrail_information,p=ee(u),h=p.length>0,g=p.reduce((e,t)=>{let s=t?.masked_entity_count;return s?e+Object.values(s).reduce((e,t)=>"number"==typeof t?e+t:e,0):e},0),j=0===p.length?"-":1===p.length?p[0]?.guardrail_name??"-":`${p.length} guardrails`,b=n.vector_store_request_metadata&&Array.isArray(n.vector_store_request_metadata)&&n.vector_store_request_metadata.length>0;return(0,t.jsxs)("div",{style:{padding:`${I.DRAWER_CONTENT_PADDING} ${I.DRAWER_CONTENT_PADDING} 0`},children:[o&&d&&(0,t.jsx)(v.Alert,{type:"error",showIcon:!0,message:"Request Failed",description:(0,t.jsx)(eK,{errorInfo:d}),className:"mb-6"}),e.request_tags&&Object.keys(e.request_tags).length>0&&(0,t.jsx)(eV,{tags:e.request_tags}),(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Model",children:e.model}),(0,t.jsx)(f.Descriptions.Item,{label:"Provider",children:e.custom_llm_provider||"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Call Type",children:e.call_type}),(0,t.jsx)(f.Descriptions.Item,{label:"Model ID",children:(0,t.jsx)(z,{value:e.model_id})}),(0,t.jsx)(f.Descriptions.Item,{label:"API Base",children:(0,t.jsx)(z,{value:e.api_base,maxWidth:I.API_BASE_MAX_WIDTH})}),e.requester_ip_address&&(0,t.jsx)(f.Descriptions.Item,{label:"IP Address",children:e.requester_ip_address}),h&&(0,t.jsx)(f.Descriptions.Item,{label:"Guardrail",children:(0,t.jsx)(eW,{label:j,maskedCount:g})})]})})}),(0,t.jsx)(eU,{logEntry:e,metadata:n}),(0,t.jsx)(L.CostBreakdownViewer,{costBreakdown:n?.cost_breakdown,totalSpend:e.spend??0,promptTokens:e.prompt_tokens,completionTokens:e.completion_tokens,cacheHit:e.cache_hit}),(0,t.jsx)(eu,{log:e}),x&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(M.ConfigInfoMessage,{show:x,onOpenSettings:s})}),a?(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6 p-8 text-center",children:[(0,t.jsx)(S.Spin,{size:"default"}),(0,t.jsx)("div",{style:{marginTop:8,color:"#999"},children:"Loading request & response data..."})]}):(0,t.jsx)(eG,{hasResponse:m,hasError:o,getRawRequest:()=>Z(e.proxy_server_request||e.messages),getFormattedResponse:()=>o&&d?{error:{message:d.error_message||"An error occurred",type:d.error_class||"error",code:d.error_code||"unknown",param:null}}:Z(e.response),logEntry:e}),h&&(0,t.jsx)("div",{id:"guardrail-section",children:(0,t.jsx)(T.default,{data:u,accessToken:l??null,logEntry:{request_id:e.request_id,user:e.user,model:e.model,startTime:e.startTime,metadata:e.metadata}})}),b&&(0,t.jsx)(E,{data:n.vector_store_request_metadata}),e.metadata&&Object.keys(e.metadata).length>0&&(0,t.jsx)(eQ,{metadata:e.metadata}),(0,t.jsx)("div",{style:{height:I.DRAWER_CONTENT_PADDING}})]})}function eK({errorInfo:e}){return(0,t.jsxs)("div",{children:[e.error_code&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Error Code:"})," ",e.error_code]}),e.error_message&&(0,t.jsxs)("div",{children:[(0,t.jsx)(e$,{strong:!0,children:"Message:"})," ",e.error_message]})]})}function eV({tags:e}){return(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,t.jsx)(e$,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,t.jsx)(w.Space,{size:I.SPACING_MEDIUM,wrap:!0,children:Object.entries(e).map(([e,s])=>(0,t.jsxs)(j.Tag,{children:[e,": ",String(s)]},e))})]})}function eW({label:e,maskedCount:s}){return(0,t.jsxs)(w.Space,{size:I.SPACING_MEDIUM,children:[(0,t.jsx)("a",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{cursor:"pointer"},children:e}),s>0&&(0,t.jsxs)(j.Tag,{color:"blue",children:[s," masked"]})]})}function eU({logEntry:e,metadata:s}){let a=e.completionStartTime,l=a&&a!==e.endTime?new Date(a).getTime()-new Date(e.startTime).getTime():null,r=e.cache_hit||s?.additional_usage_values?.cache_read_input_tokens&&s.additional_usage_values.cache_read_input_tokens>0,i=String(e.cache_hit??"None"),n="true"===i.toLowerCase()?"green":"false"===i.toLowerCase()?"red":"default";return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(y.Card,{title:"Metrics",size:"small",style:{marginBottom:0},children:(0,t.jsxs)(f.Descriptions,{column:2,size:"small",children:[(0,t.jsx)(f.Descriptions.Item,{label:"Tokens",children:(0,t.jsx)(P,{prompt:e.prompt_tokens,completion:e.completion_tokens,total:e.total_tokens})}),(0,t.jsxs)(f.Descriptions.Item,{label:"Cost",children:["$",(0,C.formatNumberWithCommas)(e.spend||0,8)]}),(0,t.jsxs)(f.Descriptions.Item,{label:"Duration",children:[null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):"-"," s"]}),null!=l&&l>0&&(0,t.jsxs)(f.Descriptions.Item,{label:"Time to First Token",children:[(l/1e3).toFixed(3)," s"]}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Descriptions.Item,{label:"Cache Hit",children:(0,t.jsx)(j.Tag,{color:n,children:i})}),s?.additional_usage_values?.cache_read_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Read Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_read_input_tokens)}),s?.additional_usage_values?.cache_creation_input_tokens>0&&(0,t.jsx)(f.Descriptions.Item,{label:"Cache Creation Tokens",children:(0,C.formatNumberWithCommas)(s.additional_usage_values.cache_creation_input_tokens)})]}),s?.litellm_overhead_time_ms!==void 0&&null!==s.litellm_overhead_time_ms&&(0,t.jsxs)(f.Descriptions.Item,{label:"LiteLLM Overhead",children:[s.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,t.jsx)(f.Descriptions.Item,{label:"Retries",children:s?.attempted_retries!==void 0&&s?.attempted_retries!==null?s.attempted_retries>0?(0,t.jsxs)(t.Fragment,{children:[s.attempted_retries,void 0!==s.max_retries&&null!==s.max_retries?` / ${s.max_retries}`:""]}):(0,t.jsx)(j.Tag,{color:"green",children:"None"}):"-"}),(0,t.jsx)(f.Descriptions.Item,{label:"Start Time",children:(0,k.default)(e.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,t.jsx)(f.Descriptions.Item,{label:"End Time",children:(0,k.default)(e.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function eG({hasResponse:e,hasError:a,getRawRequest:l,getFormattedResponse:r,logEntry:i}){let[n,o]=(0,s.useState)(I.TAB_REQUEST),[d,c]=(0,s.useState)("pretty"),m=i.spend??0,x=i.prompt_tokens||0,u=i.completion_tokens||0,p=x+u,h=i.metadata?.cost_breakdown,g=h?.input_cost!==void 0&&h?.output_cost!==void 0,f=g?h.input_cost??0:p>0?m*x/p:0,y=g?h.output_cost??0:p>0?m*u/p:0;return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,t.jsxs)(N.Radio.Group,{size:"small",value:d,onChange:e=>c(e.target.value),children:[(0,t.jsx)(N.Radio.Button,{value:"pretty",children:"Pretty"}),(0,t.jsx)(N.Radio.Button,{value:"json",children:"JSON"})]})]}),children:(0,t.jsx)("div",{children:"pretty"===d?(0,t.jsx)(eH,{request:l(),response:r(),metrics:{prompt_tokens:x,completion_tokens:u,input_cost:f,output_cost:y}}):(0,t.jsx)(b.Tabs,{activeKey:n,onChange:e=>o(e),tabBarExtraContent:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(n===I.TAB_REQUEST?l():r(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:n===I.TAB_RESPONSE&&!e&&!a}),items:[{key:I.TAB_REQUEST,label:"Request",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:(0,t.jsx)(X,{data:l(),mode:"formatted"})})},{key:I.TAB_RESPONSE,label:"Response",children:(0,t.jsx)("div",{style:{paddingTop:I.SPACING_XLARGE,paddingBottom:I.SPACING_XLARGE},children:e||a?(0,t.jsx)(X,{data:r(),mode:"formatted"}):(0,t.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function eJ({guardrailEntries:e}){let s=e.every(e=>{let t=e?.guardrail_status||e?.status;return"pass"===t||"passed"===t||"success"===t});return(0,t.jsx)("div",{style:{textAlign:"left",marginBottom:12},children:(0,t.jsxs)("div",{onClick:()=>{let e=document.getElementById("guardrail-section");e&&e.scrollIntoView({behavior:"smooth"})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:16,cursor:"pointer",fontSize:13,fontWeight:500,backgroundColor:s?"#f0fdf4":"#fef2f2",color:s?"#15803d":"#b91c1c",border:`1px solid ${s?"#bbf7d0":"#fecaca"}`},children:[s?"✓":"✗"," ",e.length," guardrail",1!==e.length?"s":""," evaluated",(0,t.jsx)("span",{style:{fontSize:11,opacity:.7},children:"↓"})]})})}function eQ({metadata:e}){return(0,t.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,t.jsx)(_.Collapse,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,t.jsx)(e$,{copyable:{text:JSON.stringify(e,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,t.jsx)("pre",{style:{maxHeight:I.METADATA_MAX_HEIGHT,overflowY:"auto",fontSize:I.FONT_SIZE_SMALL,fontFamily:I.FONT_FAMILY_MONO,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(e,null,2)})]})}]})})}var eX=e.i(764205),eZ=e.i(266027),e0=e.i(135214);function e1({row:e,isSelected:s,onClick:a}){let l=x.MCP_CALL_TYPES.includes(e.call_type),r=x.AGENT_CALL_TYPES.includes(e.call_type),i=null!=e.request_duration_ms?(e.request_duration_ms/1e3).toFixed(3):e.startTime&&e.endTime?((Date.parse(e.endTime)-Date.parse(e.startTime))/1e3).toFixed(3):"-";return(0,t.jsxs)("button",{type:"button",className:`w-full text-left pl-8 pr-2 py-1 transition-colors ${s?"bg-blue-50":"hover:bg-slate-100"}`,onClick:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[l?(0,t.jsx)(m.Wrench,{size:12,className:"text-slate-500 flex-shrink-0"}):r?(0,t.jsx)(d.Bot,{size:12,className:"text-slate-500 flex-shrink-0"}):(0,t.jsx)(c.Sparkles,{size:12,className:"text-slate-500 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-xs font-medium text-slate-900 truncate",children:(0,u.getEventDisplayName)(e.call_type,e.model)})]}),(0,t.jsxs)("div",{className:"text-[10px] text-slate-500 mt-0 flex items-center gap-1.5 font-mono",children:[(0,t.jsxs)("span",{children:[i,"s"]}),e.spend?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:(0,C.getSpendString)(e.spend)})]}):null,e.total_tokens?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[e.total_tokens," tok"]})]}):null]})]})}function e2({open:e,onClose:d,logEntry:c,sessionId:m,accessToken:u,onOpenSettings:g,allLogs:f=[],onSelectLog:y,startTime:j}){let b=!!m,[v,_]=(0,s.useState)(null),[N,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(!1),{data:T=[]}=(0,eZ.useQuery)({queryKey:["sessionLogs",m],queryFn:async()=>{if(!m||!u)return[];let e=await (0,eX.sessionSpendLogsCall)(u,m);return(e.data||e||[]).map(e=>({...e,request_duration_ms:e.request_duration_ms??Date.parse(e.endTime)-Date.parse(e.startTime)})).sort((e,t)=>{let s=+!!x.MCP_CALL_TYPES.includes(e.call_type),a=+!!x.MCP_CALL_TYPES.includes(t.call_type);return s!==a?s-a:new Date(e.startTime).getTime()-new Date(t.startTime).getTime()})},enabled:!!(e&&b&&m&&u)}),L=(0,s.useMemo)(()=>b?T.length?v?T.find(e=>e.request_id===v)||T[0]:c?.request_id&&T.find(e=>e.request_id===c.request_id)||T[0]:null:c,[b,c,v,T]);(0,s.useEffect)(()=>{b&&T.length&&(v&&T.some(e=>e.request_id===v)||_(c?.request_id&&T.some(e=>e.request_id===c.request_id)?c.request_id:T[0].request_id))},[b,c,v,T]),(0,s.useEffect)(()=>{e?w(!1):(b&&_(null),k(!1))},[e,b]);let{selectNextLog:M,selectPreviousLog:A}=(0,h.useKeyboardNavigation)({isOpen:e,currentLog:L,allLogs:b?T:f,onClose:d,onSelectLog:e=>{b&&_(e.request_id),y?.(e)}}),E=((e,t,s)=>{let{accessToken:a}=(0,e0.default)();return(0,eZ.useQuery)({queryKey:["logDetails",e,t,a],queryFn:async()=>a&&e&&t?await (0,eX.uiSpendLogDetailsCall)(a,e,t):null,enabled:s&&!!a&&!!e&&!!t,staleTime:6e5,gcTime:6e5})})(L?.request_id,j,e&&!!L?.request_id),D=E.data,O=E.isLoading,z=(0,s.useMemo)(()=>L?{...L,messages:D?.messages||L.messages,response:D?.response||L.response,proxy_server_request:D?.proxy_server_request||L.proxy_server_request}:null,[L,D]),R=L?.metadata||{},P="failure"===R.status?"Failure":"Success",B="failure"===R.status?"error":"success",F=R?.user_api_key_team_alias||"default",q=T.reduce((e,t)=>e+(t.spend||0),0),H=T.length>0?new Date(Math.min(...T.map(e=>new Date(e.startTime).getTime()))):null,$=T.length>0?new Date(Math.max(...T.map(e=>new Date(e.endTime).getTime()))):null,Y=H&&$?(($.getTime()-H.getTime())/1e3).toFixed(2):"0.00",K=T.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,V=T.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,W=T.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length,U=b?T:L?[L]:[],G=b?m||"":L?.request_id||"",J=G.length>14?`${G.slice(0,11)}...`:G,Q=async()=>{if(G)try{await navigator.clipboard.writeText(G),k(!0),setTimeout(()=>k(!1),1200)}catch{}};return L&&z?(0,t.jsx)(l.Drawer,{title:null,placement:"right",onClose:d,open:e,width:I.DRAWER_WIDTH,closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:(0,t.jsxs)("div",{style:{height:"100%"},className:"flex relative",children:[N?(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(o.RightOutlined,{}),onClick:()=>w(!1),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Expand trace sidebar"}):(0,t.jsx)(a.Button,{type:"text",size:"small",icon:(0,t.jsx)(n.LeftOutlined,{}),onClick:()=>w(!0),className:"absolute top-2 left-2 z-20 !bg-white !border !border-slate-200 !rounded-md","aria-label":"Collapse trace sidebar"}),!N&&(0,t.jsxs)("div",{className:"border-r border-slate-200 bg-slate-50 flex flex-col",style:{width:224},children:[(0,t.jsxs)("div",{className:"pl-12 pr-3 py-2 border-b border-slate-200 bg-white",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:b?"Session":"Trace"}),(0,t.jsxs)("div",{className:"font-mono text-[12px] text-slate-900 leading-tight flex items-center gap-1",children:[(0,t.jsx)("span",{className:"truncate",children:J}),(0,t.jsx)("button",{type:"button",onClick:Q,className:"text-slate-400 hover:text-slate-600","aria-label":"Copy trace id",children:S?(0,t.jsx)(r.CheckOutlined,{className:"text-[11px]"}):(0,t.jsx)(i.CopyOutlined,{className:"text-[11px]"})})]})]})}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500 font-mono",children:[U.length," req",[b?K:U.filter(e=>!x.MCP_CALL_TYPES.includes(e.call_type)&&!x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?V:U.filter(e=>x.AGENT_CALL_TYPES.includes(e.call_type)).length,b?W:U.filter(e=>x.MCP_CALL_TYPES.includes(e.call_type)).length].map((e,s)=>{let a=[" LLM"," Agent"," MCP"][s];return e>0?(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),e,a]},a):null}),(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),b?(0,C.getSpendString)(q):(0,C.getSpendString)(L.spend||0),b&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-1.5",children:"·"}),Y,"s"]})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[ee(R?.guardrail_information).length>0&&(0,t.jsx)("div",{className:"px-3 pt-2",children:(0,t.jsx)(eJ,{guardrailEntries:ee(R?.guardrail_information)})}),b?(0,t.jsx)("div",{className:"py-1",children:(0,t.jsxs)("div",{className:"relative pl-2",children:[(0,t.jsx)("div",{className:"absolute left-4 top-1 bottom-1 border-l border-slate-300"}),U.map((e,s)=>{let a=s===U.length-1;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"absolute left-4 top-3 w-3 border-t border-slate-300"}),a&&(0,t.jsx)("div",{className:"absolute left-4 top-3 bottom-0 w-px bg-slate-50"}),(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>{_(e.request_id),y?.(e)}})]},e.request_id)})]})}):(0,t.jsx)("div",{className:"py-1",children:U.map(e=>(0,t.jsx)(e1,{row:e,isSelected:e.request_id===L.request_id,onClick:()=>y?.(e)},e.request_id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[(0,t.jsx)(p.DrawerHeader,{log:L,onClose:d,onPrevious:A,onNext:M,statusLabel:P,statusColor:B,environment:F}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)(eY,{logEntry:z,onOpenSettings:g,isLoadingDetails:O,accessToken:u??null})})]})]})}):null}e.s(["LogDetailsDrawer",()=>e2],502626),e.s([],3565)},936190,e=>{"use strict";var t=e.i(843476),s=e.i(619273),a=e.i(266027),l=e.i(912598),r=e.i(166540),i=e.i(271645);e.i(517442),e.i(500330),e.i(122550);var n=e.i(313603),o=e.i(772345),d=e.i(793130),c=e.i(197647),m=e.i(653824),x=e.i(881073),u=e.i(404206),p=e.i(723731),h=e.i(464571),g=e.i(708347),f=e.i(93648),y=e.i(245767),j=e.i(50882),b=e.i(291950),v=e.i(969550),_=e.i(764205),N=e.i(20147),w=e.i(942161),S=e.i(245099);e.i(70969);var k=e.i(97859);e.i(70635),e.i(339086);var C=e.i(504809);e.i(3565);var T=e.i(502626),L=e.i(727749);e.i(867612);var M=e.i(153472),A=e.i(954616),E=e.i(135214);let D=async(e,t)=>{let s=(0,_.getProxyBaseUrl)(),a=s?`${s}/config/update`:"/config/update",l=await fetch(a,{method:"POST",headers:{[(0,_.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:t.store_prompts_in_spend_logs,...t.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:t.maximum_spend_logs_retention_period}}})});if(!l.ok){let e=await l.json().catch(()=>({}));throw Error(e?.error?.message||e?.message||e?.detail||"Failed to update spend logs settings")}return await l.json()};var I=e.i(190702),O=e.i(637235),z=e.i(808613),R=e.i(311451),P=e.i(212931),B=e.i(981339),F=e.i(770914),q=e.i(790848),H=e.i(898586);let $=({isVisible:e,onCancel:s,onSuccess:a})=>{let[l]=z.Form.useForm(),{mutateAsync:r,isPending:n}=(()=>{let{accessToken:e}=(0,E.default)();return(0,A.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await D(e,t)}})})(),{mutateAsync:o,isPending:d}=(0,M.useDeleteProxyConfigField)(),{data:c,isLoading:m,refetch:x}=(0,M.useProxyConfig)(M.ConfigType.GENERAL_SETTINGS),u=z.Form.useWatch("store_prompts_in_spend_logs",l);(0,i.useEffect)(()=>{e&&x()},[e,x]);let p=(0,i.useMemo)(()=>{if(!c)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let e=c.find(e=>"store_prompts_in_spend_logs"===e.field_name),t=c.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:e?.field_value??!1,maximum_spend_logs_retention_period:t?.field_value??void 0}},[c]),g=async e=>{try{let t=e.maximum_spend_logs_retention_period;if(!t||"string"==typeof t&&""===t.trim())try{await o({config_type:M.ConfigType.GENERAL_SETTINGS,field_name:M.GeneralSettingsFieldName.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let s={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...t&&"string"==typeof t&&""!==t.trim()&&{maximum_spend_logs_retention_period:t}};await r(s,{onSuccess:()=>{L.default.success("Spend logs settings updated successfully"),x(),a?.()},onError:e=>{L.default.fromBackend("Failed to save spend logs settings: "+(0,I.parseErrorMessage)(e))}})}catch(e){L.default.fromBackend("Failed to save spend logs settings: "+(0,I.parseErrorMessage)(e))}},f=()=>{l.resetFields(),s()};return(0,t.jsx)(P.Modal,{title:(0,t.jsx)(H.Typography.Title,{level:5,children:"Spend Logs Settings"}),open:e,footer:(0,t.jsxs)(F.Space,{children:[(0,t.jsx)(h.Button,{onClick:f,disabled:n||d||m,children:"Cancel"}),(0,t.jsx)(h.Button,{type:"primary",loading:n||d,disabled:m,onClick:()=>l.submit(),children:n||d?"Saving...":"Save Settings"})]}),onCancel:f,children:(0,t.jsxs)(z.Form,{form:l,layout:"horizontal",onFinish:g,initialValues:p,children:[(0,t.jsx)(z.Form.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:c?.find(e=>"store_prompts_in_spend_logs"===e.field_name)?.field_description||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,t.jsx)("div",{children:m?(0,t.jsx)(B.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(q.Switch,{checked:u??!1,onChange:e=>l.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,t.jsx)(z.Form.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:c?.find(e=>"maximum_spend_logs_retention_period"===e.field_name)?.field_description||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:m?(0,t.jsx)(B.Skeleton.Input,{active:!0,block:!0}):(0,t.jsx)(R.Input,{placeholder:"e.g., 7d, 30d",prefix:(0,t.jsx)(O.ClockCircleOutlined,{})})})]},c?JSON.stringify(p):"loading")})};var Y=e.i(149121);function K({accessToken:e,token:L,userRole:M,userID:A,allTeams:E,premiumUser:D}){let[I,O]=(0,i.useState)(""),[z,R]=(0,i.useState)(!1),[P,B]=(0,i.useState)(!1),[F,q]=(0,i.useState)(1),[H]=(0,i.useState)(50),K=(0,i.useRef)(null),V=(0,i.useRef)(null),W=(0,i.useRef)(null),[U,G]=(0,i.useState)((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[J,Q]=(0,i.useState)((0,r.default)().format("YYYY-MM-DDTHH:mm")),[X,Z]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)(""),[el,er]=(0,i.useState)(""),[ei,en]=(0,i.useState)(""),[eo,ed]=(0,i.useState)(""),[ec,em]=(0,i.useState)(""),[ex,eu]=(0,i.useState)(null),[ep,eh]=(0,i.useState)(null),[eg,ef]=(0,i.useState)(""),[ey,ej]=(0,i.useState)(""),[eb,ev]=(0,i.useState)(M&&g.internalUserRoles.includes(M)),[e_,eN]=(0,i.useState)("request logs"),[ew,eS]=(0,i.useState)(null),[ek,eC]=(0,i.useState)(!1),[eT,eL]=(0,i.useState)(null),[eM,eA]=(0,i.useState)(!1),[eE,eD]=(0,i.useState)("startTime"),[eI,eO]=(0,i.useState)("desc"),[ez,eR]=(0,i.useState)(!0);(0,l.useQueryClient)();let[eP,eB]=(0,i.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,i.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eP))},[eP]);let[eF,eq]=(0,i.useState)({value:24,unit:"hours"});(0,i.useEffect)(()=>{(async()=>{ep&&e&&eu({...(await (0,_.keyInfoV1Call)(e,ep)).info,token:ep,api_key:ep})})()},[ep,e]),(0,i.useEffect)(()=>{function e(e){K.current&&!K.current.contains(e.target)&&B(!1),V.current&&!V.current.contains(e.target)&&R(!1),W.current&&!W.current.contains(e.target)&&et(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{M&&g.internalUserRoles.includes(M)&&ev(!0)},[M]);let eH=(0,a.useQuery)({queryKey:["logs","table",F,H,U,J,ei,eo,eb?A:null,eg,ec,eE,eI],queryFn:async()=>{if(!e||!L||!M||!A)return{data:[],total:0,page:1,page_size:H,total_pages:0};let t=(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss"),s=X?(0,r.default)(J).utc().format("YYYY-MM-DD HH:mm:ss"):(0,r.default)().utc().format("YYYY-MM-DD HH:mm:ss");return await (0,_.uiSpendLogsCall)({accessToken:e,start_date:t,end_date:s,page:F,page_size:H,params:{api_key:eo||void 0,team_id:ei||void 0,user_id:eb?A??void 0:void 0,end_user:ey||void 0,status_filter:eg||void 0,model_id:ec||void 0,sort_by:eE,sort_order:eI}})},enabled:!!e&&!!L&&!!M&&!!A&&"request logs"===e_&&ez,refetchInterval:!!eP&&1===F&&15e3,placeholderData:s.keepPreviousData,refetchIntervalInBackground:!0}),e$=(0,i.useDeferredValue)(eH.isFetching),eY=eH.isFetching||e$,eK=eH.data||{data:[],total:0,page:1,page_size:H||10,total_pages:1},{filters:eV,filteredLogs:eW,hasBackendFilters:eU,allTeams:eG,handleFilterChange:eJ,handleFilterReset:eQ}=(0,C.useLogFilterLogic)({logs:eK,accessToken:e,startTime:U,endTime:J,pageSize:H,isCustomDate:X,setCurrentPage:q,userID:A,userRole:M,sortBy:eE,sortOrder:eI,currentPage:F}),eX=(0,i.useCallback)(()=>{eQ(),G((0,r.default)().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),Z(!1),eq({value:24,unit:"hours"}),q(1)},[eQ]);if((0,i.useEffect)(()=>{eR(!eU)},[eU]),(0,i.useEffect)(()=>{e&&(eV["Team ID"]?en(eV["Team ID"]):en(""),ef(eV.Status||""),em(eV.Model||""),ej(eV["End User"]||""),ed(eV["Key Hash"]||""))},[eV,e]),!e||!L||!M||!A)return null;let eZ=eW.data.filter(e=>!I||e.request_id.includes(I)||e.model.includes(I)||e.user&&e.user.includes(I)),e0=eZ.reduce((e,t)=>(t.session_id&&(e[t.session_id]||(e[t.session_id]={llm:0,agent:0,mcp:0}),k.MCP_CALL_TYPES.includes(t.call_type)?e[t.session_id].mcp+=1:k.AGENT_CALL_TYPES.includes(t.call_type)?e[t.session_id].agent+=1:e[t.session_id].llm+=1),e),{}),e1=new Map;for(let e of eZ){if(!e.session_id||1>=(e.session_total_count||1))continue;let t=k.MCP_CALL_TYPES.includes(e.call_type),s=e1.get(e.session_id);s&&(!s.isMcp||t)||e1.set(e.session_id,{requestId:e.request_id,isMcp:t})}let e2=eZ.map(e=>{let t=e.session_id?e0[e.session_id]:void 0;return{...e,request_duration_ms:e.request_duration_ms,session_llm_count:t?.llm??void 0,session_mcp_count:t?.mcp??void 0,session_agent_count:t?.agent??void 0,onKeyHashClick:e=>eh(e),onSessionClick:t=>{t&&(eL(t),eS(e),eC(!0))}}}).filter(e=>!e.session_id||1>=(e.session_total_count||1)||e1.get(e.session_id)?.requestId===e.request_id)||[],e5=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>E&&0!==E.length?E.filter(t=>t.team_id.toLowerCase().includes(e.toLowerCase())||t.team_alias&&t.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:`${e.team_alias||e.team_id} (${e.team_id})`,value:e.team_id})):[]},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",customComponent:b.PaginatedModelSelect},{name:"Key Alias",label:"Key Alias",customComponent:j.PaginatedKeyAliasSelect},{name:"End User",label:"End User",isSearchable:!0,searchFn:async t=>{if(!e)return[];let s=await (0,_.allEndUsersCall)(e);return(s?.map(e=>e.user_id)||[]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>{if(!e)return k.ERROR_CODE_OPTIONS;let t=e.toLowerCase(),s=k.ERROR_CODE_OPTIONS.filter(e=>e.label.toLowerCase().includes(t));return!k.ERROR_CODE_OPTIONS.some(t=>t.value===e.trim())&&e.trim()&&s.push({label:`Use custom code: ${e.trim()}`,value:e.trim()}),s}},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}],e4=k.QUICK_SELECT_OPTIONS.find(e=>e.value===eF.value&&e.unit===eF.unit),e6=X?((e,t,s)=>{if(e)return`${(0,r.default)(t).format("MMM D, h:mm A")} - ${(0,r.default)(s).format("MMM D, h:mm A")}`;let a=(0,r.default)(),l=(0,r.default)(t),i=a.diff(l,"minutes");if(i>=0&&i<2)return"Last 1 Minute";if(i>=2&&i<16)return"Last 15 Minutes";if(i>=16&&i<61)return"Last Hour";let n=a.diff(l,"hours");return n>=1&&n<5?"Last 4 Hours":n>=5&&n<25?"Last 24 Hours":n>=25&&n<169?"Last 7 Days":`${l.format("MMM D")} - ${a.format("MMM D")}`})(X,U,J):e4?.label;return(0,t.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,t.jsxs)(m.TabGroup,{defaultIndex:0,onIndexChange:e=>eN(0===e?"request logs":"audit logs"),children:[(0,t.jsxs)(x.TabList,{children:[(0,t.jsx)(c.Tab,{children:"Request Logs"}),(0,t.jsx)(c.Tab,{children:"Audit Logs"}),(0,t.jsx)(c.Tab,{children:"Deleted Keys"}),(0,t.jsx)(c.Tab,{children:"Deleted Teams"})]}),(0,t.jsxs)(p.TabPanels,{children:[(0,t.jsxs)(u.TabPanel,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Request Logs"}),(0,t.jsx)(h.Button,{icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>eA(!0),title:"Spend Logs Settings"})]}),ex&&ep&&ex.api_key===ep?(0,t.jsx)(N.default,{keyId:ep,keyData:ex,teams:E,onClose:()=>eh(null),backButtonText:"Back to Logs"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{options:e5,onApplyFilters:eJ,onResetFilters:eX}),(0,t.jsx)($,{isVisible:eM,onCancel:()=>eA(!1),onSuccess:()=>eA(!1)}),(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,t.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:I,onChange:e=>O(e.target.value)}),(0,t.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,t.jsxs)("div",{className:"relative z-50",ref:W,children:[(0,t.jsxs)("button",{onClick:()=>et(!ee),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e6]}),ee&&(0,t.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,t.jsxs)("div",{className:"space-y-1",children:[k.QUICK_SELECT_OPTIONS.map(e=>(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${e6===e.label?"bg-blue-50 text-blue-600":""}`,onClick:()=>{q(1),Q((0,r.default)().format("YYYY-MM-DDTHH:mm")),G((0,r.default)().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eq({value:e.value,unit:e.unit}),Z(!1),et(!1)},children:e.label},e.label)),(0,t.jsx)("div",{className:"border-t my-2"}),(0,t.jsx)("button",{className:`w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ${X?"bg-blue-50 text-blue-600":""}`,onClick:()=>Z(!X),children:"Custom Range"})]})})]}),(0,t.jsx)(()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,t.jsx)(d.Switch,{color:"green",checked:eP,defaultChecked:!0,onChange:eB})]}),{}),(0,t.jsx)(h.Button,{type:"default",icon:(0,t.jsx)(o.SyncOutlined,{spin:eY}),onClick:()=>{eH.refetch()},disabled:eY,title:"Fetch data",children:eY?"Fetching":"Fetch"})]}),X&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:U,onChange:e=>{G(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,t.jsx)("span",{className:"text-gray-500",children:"to"}),(0,t.jsx)("div",{children:(0,t.jsx)("input",{type:"datetime-local",value:J,onChange:e=>{Q(e.target.value),q(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eH.isLoading?"...":eW?(F-1)*H+1:0," -"," ",eH.isLoading?"...":eW?Math.min(F*H,eW.total):0," ","of ",eH.isLoading?"...":eW?eW.total:0," results"]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eH.isLoading?"...":F," of"," ",eH.isLoading?"...":eW?eW.total_pages:1]}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.max(1,e-1)),disabled:eH.isLoading||1===F,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{onClick:()=>q(e=>Math.min(eW.total_pages||1,e+1)),disabled:eH.isLoading||F===(eW.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eP&&1===F&&ez&&(0,t.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,t.jsx)("button",{onClick:()=>eB(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,t.jsx)(Y.DataTable,{columns:(0,S.createColumns)({sortBy:eE,sortOrder:eI,onSortChange:(e,t)=>{eD(e),eO(t),q(1)}}),data:e2,onRowClick:e=>{if(e.session_id&&(e.session_total_count||1)>1){eL(e.session_id),eS(e),eC(!0);return}eL(null),eS(e),eC(!0)},isLoading:eH.isLoading})]})]})]}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(w.default,{userID:A,userRole:M,token:L,accessToken:e,isActive:"audit logs"===e_,premiumUser:D})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(f.default,{})}),(0,t.jsx)(u.TabPanel,{children:(0,t.jsx)(y.default,{})})]})]}),(0,t.jsx)(T.LogDetailsDrawer,{open:ek,onClose:()=>{eC(!1),eL(null)},logEntry:ew,sessionId:eT,accessToken:e,onOpenSettings:()=>eA(!0),allLogs:e2,onSelectLog:e=>{eS(e)},startTime:(0,r.default)(U).utc().format("YYYY-MM-DD HH:mm:ss")})]})}e.i(331052),e.s(["default",()=>K],936190)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/c562cdbf19a2d9de.js b/litellm/proxy/_experimental/out/_next/static/chunks/c562cdbf19a2d9de.js new file mode 100644 index 00000000000..ac0942660e9 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/c562cdbf19a2d9de.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,180166,t=>{"use strict";var e={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},i=new class{#t=e;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}};function s(t){setTimeout(t,0)}t.s(["systemSetTimeoutZero",()=>s,"timeoutManager",()=>i])},619273,t=>{"use strict";var e=t.i(180166),i="u"=0&&t!==1/0}function a(t,e){return Math.max(t+(e||0)-Date.now(),0)}function o(t,e){return"function"==typeof t?t(e):t}function u(t,e){return"function"==typeof t?t(e):t}function h(t,e){let{type:i="all",exact:s,fetchStatus:r,predicate:n,queryKey:a,stale:o}=t;if(a){if(s){if(e.queryHash!==l(a,e.options))return!1}else if(!f(e.queryKey,a))return!1}if("all"!==i){let t=e.isActive();if("active"===i&&!t||"inactive"===i&&t)return!1}return("boolean"!=typeof o||e.isStale()===o)&&(!r||r===e.state.fetchStatus)&&(!n||!!n(e))}function c(t,e){let{exact:i,status:s,predicate:r,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(i){if(d(e.options.mutationKey)!==d(n))return!1}else if(!f(e.options.mutationKey,n))return!1}return(!s||e.state.status===s)&&(!r||!!r(e))}function l(t,e){return(e?.queryKeyHashFn||d)(t)}function d(t){return JSON.stringify(t,(t,e)=>v(e)?Object.keys(e).sort().reduce((t,i)=>(t[i]=e[i],t),{}):e)}function f(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(i=>f(t[i],e[i]))}var p=Object.prototype.hasOwnProperty;function y(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let i in t)if(t[i]!==e[i])return!1;return!0}function m(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function v(t){if(!g(t))return!1;let e=t.constructor;if(void 0===e)return!0;let i=e.prototype;return!!g(i)&&!!i.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function g(t){return"[object Object]"===Object.prototype.toString.call(t)}function b(t){return new Promise(i=>{e.timeoutManager.setTimeout(i,t)})}function C(t,e,i){return"function"==typeof i.structuralSharing?i.structuralSharing(t,e):!1!==i.structuralSharing?function t(e,i,s=0){if(e===i)return e;if(s>500)return i;let r=m(e)&&m(i);if(!r&&!(v(e)&&v(i)))return i;let n=(r?e:Object.keys(e)).length,a=r?i:Object.keys(i),o=a.length,u=r?Array(o):{},h=0;for(let c=0;ci?s.slice(1):s}function S(t,e,i=0){let s=[e,...t];return i&&s.length>i?s.slice(0,-1):s}var P=Symbol();function q(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==P?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function M(t,e){return"function"==typeof t?t(...e):!!t}function T(t,e,i){let s,r=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=e(),r||(r=!0,s.aborted?i():s.addEventListener("abort",i,{once:!0})),s)}),t}t.s(["addConsumeAwareSignal",()=>T,"addToEnd",()=>w,"addToStart",()=>S,"ensureQueryFn",()=>q,"functionalUpdate",()=>r,"hashKey",()=>d,"hashQueryKeyByOptions",()=>l,"isServer",()=>i,"isValidTimeout",()=>n,"keepPreviousData",()=>O,"matchMutation",()=>c,"matchQuery",()=>h,"noop",()=>s,"partialMatchKey",()=>f,"replaceData",()=>C,"resolveEnabled",()=>u,"resolveStaleTime",()=>o,"shallowEqualObjects",()=>y,"shouldThrowError",()=>M,"skipToken",()=>P,"sleep",()=>b,"timeUntilStale",()=>a])},540143,t=>{"use strict";let e,i,s,r,n,a;var o=t.i(180166).systemSetTimeoutZero,u=(e=[],i=0,s=t=>{t()},r=t=>{t()},n=o,{batch:t=>{let a;i++;try{a=t()}finally{let t;--i||(t=e,e=[],t.length&&n(()=>{r(()=>{t.forEach(t=>{s(t)})})}))}return a},batchCalls:t=>(...e)=>{a(()=>{t(...e)})},schedule:a=t=>{i?e.push(t):n(()=>{s(t)})},setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{r=t},setScheduler:t=>{n=t}});t.s(["notifyManager",()=>u])},915823,t=>{"use strict";var e=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};t.s(["Subscribable",()=>e])},175555,t=>{"use strict";var e=t.i(915823),i=t.i(619273),s=new class extends e.Subscribable{#i;#s;#r;constructor(){super(),this.#r=t=>{if(!i.isServer&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#s||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(t){this.#r=t,this.#s?.(),this.#s=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#i!==t&&(this.#i=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#i?this.#i:globalThis.document?.visibilityState!=="hidden"}};t.s(["focusManager",()=>s])},936553,814448,793803,t=>{"use strict";var e=t.i(175555),i=t.i(915823),s=t.i(619273),r=new class extends i.Subscribable{#n=!0;#s;#r;constructor(){super(),this.#r=t=>{if(!s.isServer&&window.addEventListener){let e=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#s||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#s?.(),this.#s=void 0)}setEventListener(t){this.#r=t,this.#s?.(),this.#s=t(this.setOnline.bind(this))}setOnline(t){this.#n!==t&&(this.#n=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#n}};function n(){let t,e,i=new Promise((i,s)=>{t=i,e=s});function s(t){Object.assign(i,t),delete i.resolve,delete i.reject}return i.status="pending",i.catch(()=>{}),i.resolve=e=>{s({status:"fulfilled",value:e}),t(e)},i.reject=t=>{s({status:"rejected",reason:t}),e(t)},i}function a(t){return Math.min(1e3*2**t,3e4)}function o(t){return(t??"online")!=="online"||r.isOnline()}t.s(["onlineManager",()=>r],814448),t.s(["pendingThenable",()=>n],793803);var u=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function h(t){let i,h=!1,c=0,l=n(),d=()=>e.focusManager.isFocused()&&("always"===t.networkMode||r.isOnline())&&t.canRun(),f=()=>o(t.networkMode)&&t.canRun(),p=t=>{"pending"===l.status&&(i?.(),l.resolve(t))},y=t=>{"pending"===l.status&&(i?.(),l.reject(t))},m=()=>new Promise(e=>{i=t=>{("pending"!==l.status||d())&&e(t)},t.onPause?.()}).then(()=>{i=void 0,"pending"===l.status&&t.onContinue?.()}),v=()=>{let e;if("pending"!==l.status)return;let i=0===c?t.initialPromise:void 0;try{e=i??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(p).catch(e=>{if("pending"!==l.status)return;let i=t.retry??3*!s.isServer,r=t.retryDelay??a,n="function"==typeof r?r(c,e):r,o=!0===i||"number"==typeof i&&cd()?void 0:m()).then(()=>{h?y(e):v()}))})};return{promise:l,status:()=>l.status,cancel:e=>{if("pending"===l.status){let i=new u(e);y(i),t.onCancel?.(i)}},continue:()=>(i?.(),l),cancelRetry:()=>{h=!0},continueRetry:()=>{h=!1},canStart:f,start:()=>(f()?v():m().then(v),l)}}t.s(["CancelledError",()=>u,"canFetch",()=>o,"createRetryer",()=>h],936553)},88587,t=>{"use strict";var e=t.i(180166),i=t.i(619273),s=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,i.isValidTimeout)(this.gcTime)&&(this.#a=e.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(i.isServer?1/0:3e5))}clearGcTimeout(){this.#a&&(e.timeoutManager.clearTimeout(this.#a),this.#a=void 0)}};t.s(["Removable",()=>s])},286491,t=>{"use strict";var e=t.i(619273),i=t.i(540143),s=t.i(936553),r=t.i(88587),n=class extends r.Removable{#o;#u;#h;#c;#l;#d;#f;constructor(t){super(),this.#f=!1,this.#d=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#c=t.client,this.#h=this.#c.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#o=u(this.options),this.state=t.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(t){if(this.options={...this.#d,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=u(this.options);void 0!==t.data&&(this.setState(o(t.data,t.dataUpdatedAt)),this.#o=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#h.remove(this)}setData(t,i){let s=(0,e.replaceData)(this.state.data,t,this.options);return this.#p({data:s,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),s}setState(t,e){this.#p({type:"setState",state:t,setStateOptions:e})}cancel(t){let i=this.#l?.promise;return this.#l?.cancel(t),i?i.then(e.noop).catch(e.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}isActive(){return this.observers.some(t=>!1!==(0,e.resolveEnabled)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===e.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,e.resolveStaleTime)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,e.timeUntilStale)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#h.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#l&&(this.#f?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#h.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(t,i){let r;if("idle"!==this.state.fetchStatus&&this.#l?.status()!=="rejected"){if(void 0!==this.state.data&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let n=new AbortController,a=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},o=()=>{let t,s=(0,e.ensureQueryFn)(this.options,i),r=(a(t={client:this.#c,queryKey:this.queryKey,meta:this.meta}),t);return(this.#f=!1,this.options.persister)?this.options.persister(s,r,this):s(r)},u=(a(r={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:o}),r);this.options.behavior?.onFetch(u,this),this.#u=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#p({type:"fetch",meta:u.fetchOptions?.meta}),this.#l=(0,s.createRetryer)({initialPromise:i?.initialPromise,fn:u.fetchFn,onCancel:t=>{t instanceof s.CancelledError&&t.revert&&this.setState({...this.#u,fetchStatus:"idle"}),n.abort()},onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{let t=await this.#l.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#h.config.onSuccess?.(t,this),this.#h.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof s.CancelledError){if(t.silent)return this.#l.promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#p({type:"error",error:t}),this.#h.config.onError?.(t,this),this.#h.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#p(t){let e=e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...a(e.data,this.options),fetchMeta:t.meta??null};case"success":let i={...e,...o(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=t.manual?i:void 0,i;case"error":let s=t.error;return{...e,error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),i.notifyManager.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#h.notify({query:this,type:"updated",action:t})})}};function a(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.canFetch)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function o(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function u(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,i=void 0!==e,s=i?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}t.s(["Query",()=>n,"fetchState",()=>a])},912598,t=>{"use strict";var e=t.i(271645),i=t.i(843476),s=e.createContext(void 0),r=t=>{let i=e.useContext(s);if(t)return t;if(!i)throw Error("No QueryClient set, use QueryClientProvider to set one");return i},n=({client:t,children:r})=>(e.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(s.Provider,{value:t,children:r}));t.s(["QueryClientProvider",()=>n,"useQueryClient",()=>r])},114272,t=>{"use strict";var e=t.i(540143),i=t.i(88587),s=t.i(936553),r=class extends i.Removable{#c;#y;#m;#l;constructor(t){super(),this.#c=t.client,this.mutationId=t.mutationId,this.#m=t.mutationCache,this.#y=[],this.state=t.state||n(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#y.includes(t)||(this.#y.push(t),this.clearGcTimeout(),this.#m.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#y=this.#y.filter(e=>e!==t),this.scheduleGc(),this.#m.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#y.length||("pending"===this.state.status?this.scheduleGc():this.#m.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#p({type:"continue"})},i={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=(0,s.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#m.canRun(this)});let r="pending"===this.state.status,n=!this.#l.canStart();try{if(r)e();else{this.#p({type:"pending",variables:t,isPaused:n}),this.#m.config.onMutate&&await this.#m.config.onMutate(t,this,i);let e=await this.options.onMutate?.(t,i);e!==this.state.context&&this.#p({type:"pending",context:e,variables:t,isPaused:n})}let s=await this.#l.start();return await this.#m.config.onSuccess?.(s,t,this.state.context,this,i),await this.options.onSuccess?.(s,t,this.state.context,i),await this.#m.config.onSettled?.(s,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(s,null,t,this.state.context,i),this.#p({type:"success",data:s}),s}catch(e){try{await this.#m.config.onError?.(e,t,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,i)}catch(t){Promise.reject(t)}try{await this.#m.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,i)}catch(t){Promise.reject(t)}throw this.#p({type:"error",error:e}),e}finally{this.#m.runNext(this)}}#p(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),e.notifyManager.batch(()=>{this.#y.forEach(e=>{e.onMutationUpdate(t)}),this.#m.notify({mutation:this,type:"updated",action:t})})}};function n(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}t.s(["Mutation",()=>r,"getDefaultState",()=>n])},992571,t=>{"use strict";var e=t.i(619273);function i(t){return{onFetch:(i,n)=>{let a=i.options,o=i.fetchOptions?.meta?.fetchMore?.direction,u=i.state.data?.pages||[],h=i.state.data?.pageParams||[],c={pages:[],pageParams:[]},l=0,d=async()=>{let n=!1,d=(0,e.ensureQueryFn)(i.options,i.fetchOptions),f=async(t,s,r)=>{let a;if(n)return Promise.reject();if(null==s&&t.pages.length)return Promise.resolve(t);let o=(a={client:i.client,queryKey:i.queryKey,pageParam:s,direction:r?"backward":"forward",meta:i.options.meta},(0,e.addConsumeAwareSignal)(a,()=>i.signal,()=>n=!0),a),u=await d(o),{maxPages:h}=i.options,c=r?e.addToStart:e.addToEnd;return{pages:c(t.pages,u,h),pageParams:c(t.pageParams,s,h)}};if(o&&u.length){let t="backward"===o,e={pages:u,pageParams:h},i=(t?r:s)(a,e);c=await f(e,i,t)}else{let e=t??u.length;do{let t=0===l?h[0]??a.initialPageParam:s(a,c);if(l>0&&null==t)break;c=await f(c,t),l++}while(li.options.persister?.(d,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},n):i.fetchFn=d}}}function s(t,{pages:e,pageParams:i}){let s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,i[s],i):void 0}function r(t,{pages:e,pageParams:i}){return e.length>0?t.getPreviousPageParam?.(e[0],e,i[0],i):void 0}function n(t,e){return!!e&&null!=s(t,e)}function a(t,e){return!!e&&!!t.getPreviousPageParam&&null!=r(t,e)}t.s(["hasNextPage",()=>n,"hasPreviousPage",()=>a,"infiniteQueryBehavior",()=>i])},71195,t=>{"use strict";var e=t.i(843476),i=t.i(271645),s=t.i(698173),r=t.i(998573),n=t.i(727749),a=t.i(888259);function o({children:t}){let[o,u]=s.notification.useNotification(),[h,c]=r.message.useMessage(),l=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{l.current||((0,n.setNotificationInstance)(o),(0,a.setMessageInstance)(h),l.current=!0)},[o,h]),(0,e.jsxs)(e.Fragment,{children:[u,c,t]})}t.s(["default",()=>o])},867271,t=>{"use strict";var e=t.i(843476),i=t.i(619273),s=t.i(286491),r=t.i(540143),n=t.i(915823),a=class extends n.Subscribable{constructor(t={}){super(),this.config=t,this.#v=new Map}#v;build(t,e,r){let n=e.queryKey,a=e.queryHash??(0,i.hashQueryKeyByOptions)(n,e),o=this.get(a);return o||(o=new s.Query({client:t,queryKey:n,queryHash:a,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(n)}),this.add(o)),o}add(t){this.#v.has(t.queryHash)||(this.#v.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#v.get(t.queryHash);e&&(t.destroy(),e===t&&this.#v.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){r.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#v.get(t)}getAll(){return[...this.#v.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,i.matchQuery)(e,t))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(e=>(0,i.matchQuery)(t,e)):e}notify(t){r.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){r.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){r.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},o=t.i(114272),u=n,h=class extends u.Subscribable{constructor(t={}){super(),this.config=t,this.#g=new Set,this.#b=new Map,this.#C=0}#g;#b;#C;build(t,e,i){let s=new o.Mutation({client:t,mutationCache:this,mutationId:++this.#C,options:t.defaultMutationOptions(e),state:i});return this.add(s),s}add(t){this.#g.add(t);let e=c(t);if("string"==typeof e){let i=this.#b.get(e);i?i.push(t):this.#b.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#g.delete(t)){let e=c(t);if("string"==typeof e){let i=this.#b.get(e);if(i)if(i.length>1){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}else i[0]===t&&this.#b.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=c(t);if("string"!=typeof e)return!0;{let i=this.#b.get(e),s=i?.find(t=>"pending"===t.state.status);return!s||s===t}}runNext(t){let e=c(t);if("string"!=typeof e)return Promise.resolve();{let i=this.#b.get(e)?.find(e=>e!==t&&e.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){r.notifyManager.batch(()=>{this.#g.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#g.clear(),this.#b.clear()})}getAll(){return Array.from(this.#g)}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,i.matchMutation)(e,t))}findAll(t={}){return this.getAll().filter(e=>(0,i.matchMutation)(t,e))}notify(t){r.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return r.notifyManager.batch(()=>Promise.all(t.map(t=>t.continue().catch(i.noop))))}};function c(t){return t.options.scope?.id}var l=t.i(175555),d=t.i(814448),f=t.i(992571),p=class{#O;#m;#d;#w;#S;#P;#q;#M;constructor(t={}){this.#O=t.queryCache||new a,this.#m=t.mutationCache||new h,this.#d=t.defaultOptions||{},this.#w=new Map,this.#S=new Map,this.#P=0}mount(){this.#P++,1===this.#P&&(this.#q=l.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#O.onFocus())}),this.#M=d.onlineManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#O.onOnline())}))}unmount(){this.#P--,0===this.#P&&(this.#q?.(),this.#q=void 0,this.#M?.(),this.#M=void 0)}isFetching(t){return this.#O.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#m.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#O.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),s=this.#O.build(this,e),r=s.state.data;return void 0===r?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime((0,i.resolveStaleTime)(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#O.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){let r=this.defaultQueryOptions({queryKey:t}),n=this.#O.get(r.queryHash),a=n?.state.data,o=(0,i.functionalUpdate)(e,a);if(void 0!==o)return this.#O.build(this,r).setData(o,{...s,manual:!0})}setQueriesData(t,e,i){return r.notifyManager.batch(()=>this.#O.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,i)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#O.get(e.queryHash)?.state}removeQueries(t){let e=this.#O;r.notifyManager.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let i=this.#O;return r.notifyManager.batch(()=>(i.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let s={revert:!0,...e};return Promise.all(r.notifyManager.batch(()=>this.#O.findAll(t).map(t=>t.cancel(s)))).then(i.noop).catch(i.noop)}invalidateQueries(t,e={}){return r.notifyManager.batch(()=>(this.#O.findAll(t).forEach(t=>{t.invalidate()}),t?.refetchType==="none")?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e))}refetchQueries(t,e={}){let s={...e,cancelRefetch:e.cancelRefetch??!0};return Promise.all(r.notifyManager.batch(()=>this.#O.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,s);return s.throwOnError||(e=e.catch(i.noop)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(i.noop)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let s=this.#O.build(this,e);return s.isStaleByTime((0,i.resolveStaleTime)(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(i.noop).catch(i.noop)}fetchInfiniteQuery(t){return t.behavior=(0,f.infiniteQueryBehavior)(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(i.noop).catch(i.noop)}ensureInfiniteQueryData(t){return t.behavior=(0,f.infiniteQueryBehavior)(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return d.onlineManager.isOnline()?this.#m.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#O}getMutationCache(){return this.#m}getDefaultOptions(){return this.#d}setDefaultOptions(t){this.#d=t}setQueryDefaults(t,e){this.#w.set((0,i.hashKey)(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#w.values()],s={};return e.forEach(e=>{(0,i.partialMatchKey)(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#S.set((0,i.hashKey)(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#S.values()],s={};return e.forEach(e=>{(0,i.partialMatchKey)(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#d.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=(0,i.hashQueryKeyByOptions)(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===i.skipToken&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#d.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#O.clear(),this.#m.clear()}},y=t.i(912598);let m=new p;function v({children:t}){return(0,e.jsx)(y.QueryClientProvider,{client:m,children:t})}t.s(["default",()=>v],867271)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4cc2a4292409c9b3.js b/litellm/proxy/_experimental/out/_next/static/chunks/c593ac1f978fcc64.js similarity index 62% rename from litellm/proxy/_experimental/out/_next/static/chunks/4cc2a4292409c9b3.js rename to litellm/proxy/_experimental/out/_next/static/chunks/c593ac1f978fcc64.js index 9baf7795db4..cda612801bf 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/4cc2a4292409c9b3.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/c593ac1f978fcc64.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207670,e=>{"use strict";function t(){for(var e,t,n=0,r="",i=arguments.length;nt,"default",0,t])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(914949),i=e.i(404948);let o=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,o],836938);var a=e.i(613541),l=e.i(763731),s=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),m=e.i(717356),p=e.i(320560),g=e.i(307358),h=e.i(246422),f=e.i(838378),b=e.i(617933);let y=(0,h.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:n}=e,r=(0,f.mergeToken)(e,{popoverBg:t,popoverColor:n});return[(e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:l,borderRadiusLG:s,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:m,popoverBg:g,titleBorderBottom:h,innerContentPadding:f,titlePadding:b}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:s,boxShadow:a,padding:o},[`${t}-title`]:{minWidth:r,marginBottom:d,color:l,fontWeight:i,borderBottom:h,padding:b},[`${t}-inner-content`]:{color:n,padding:f}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(r),(e=>{let{componentCls:t}=e;return{[t]:b.PresetColors.map(n=>{let r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}})}})(r),(0,m.initZoomMotion)(r,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:l,marginXS:s,lineType:c,colorSplit:d,paddingSM:u}=e,m=n-r;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},(0,g.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:12*!o,titleMarginBottom:o?0:s,titlePadding:o?`${m/2}px ${i}px ${m/2-t}px`:0,titleBorderBottom:o?`${t}px ${c} ${d}`:"none",innerContentPadding:o?`${u}px ${i}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let x=({title:e,content:n,prefixCls:r})=>e||n?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${r}-title`},e),n&&t.createElement("div",{className:`${r}-inner-content`},n)):null,$=e=>{let{hashId:r,prefixCls:i,className:a,style:l,placement:s="top",title:c,content:u,children:m}=e,p=o(c),g=o(u),h=(0,n.default)(r,i,`${i}-pure`,`${i}-placement-${s}`,a);return t.createElement("div",{className:h,style:l},t.createElement("div",{className:`${i}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:r,prefixCls:i}),m||t.createElement(x,{prefixCls:i,title:p,content:g})))},S=e=>{let{prefixCls:r,className:i}=e,o=v(e,["prefixCls","className"]),{getPrefixCls:a}=t.useContext(s.ConfigContext),l=a("popover",r),[c,d,u]=y(l);return c(t.createElement($,Object.assign({},o,{prefixCls:l,hashId:d,className:(0,n.default)(i,u)})))};e.s(["Overlay",0,x,"default",0,S],310730);var O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let w=t.forwardRef((e,d)=>{var u,m;let{prefixCls:p,title:g,content:h,overlayClassName:f,placement:b="top",trigger:v="hover",children:$,mouseEnterDelay:S=.1,mouseLeaveDelay:w=.1,onOpenChange:j,overlayStyle:C={},styles:E,classNames:k}=e,N=O(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:I,className:L,style:M,classNames:P,styles:z}=(0,s.useComponentConfig)("popover"),R=I("popover",p),[T,_,B]=y(R),W=I(),U=(0,n.default)(f,_,B,L,P.root,null==k?void 0:k.root),A=(0,n.default)(P.body,null==k?void 0:k.body),[H,D]=(0,r.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),G=(e,t)=>{D(e,!0),null==j||j(e,t)},F=o(g),K=o(h);return T(t.createElement(c.default,Object.assign({placement:b,trigger:v,mouseEnterDelay:S,mouseLeaveDelay:w},N,{prefixCls:R,classNames:{root:U,body:A},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},z.root),M),C),null==E?void 0:E.root),body:Object.assign(Object.assign({},z.body),null==E?void 0:E.body)},ref:d,open:H,onOpenChange:e=>{G(e)},overlay:F||K?t.createElement(x,{prefixCls:R,title:F,content:K}):null,transitionName:(0,a.getTransitionName)(W,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,l.cloneElement)($,{onKeyDown:e=>{var n,r;(0,t.isValidElement)($)&&(null==(r=null==$?void 0:(n=$.props).onKeyDown)||r.call(n,e)),e.keyCode===i.default.ESC&&G(!1,e)}})))});w._InternalPanelDoNotUseOrYouWillBeFired=S,e.s(["default",0,w],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},560445,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(201072),r=e.i(726289),i=e.i(864517),o=e.i(562901),a=e.i(779573),l=e.i(343794),s=e.i(361275),c=e.i(244009),d=e.i(611935),u=e.i(763731),m=e.i(242064);e.i(296059);var p=e.i(915654),g=e.i(183293),h=e.i(246422);let f=(e,t,n,r,i)=>({background:e,border:`${(0,p.unit)(r.lineWidth)} ${r.lineType} ${t}`,[`${i}-icon`]:{color:n}}),b=(0,h.genStyleHooks)("Alert",e=>[(e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:o,fontSizeLG:a,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:c,withDescriptionIconSize:d,colorText:u,colorTextHeading:m,withDescriptionPadding:p,defaultPadding:h}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"relative",display:"flex",alignItems:"center",padding:h,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:l},"&-message":{color:m},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207670,e=>{"use strict";function t(){for(var e,t,n=0,r="",i=arguments.length;nt,"default",0,t])},829672,836938,310730,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(914949),i=e.i(404948);let o=e=>e?"function"==typeof e?e():e:null;e.s(["getRenderPropValue",0,o],836938);var a=e.i(613541),l=e.i(763731),s=e.i(242064),c=e.i(491816);e.i(793154);var d=e.i(880476),u=e.i(183293),m=e.i(717356),p=e.i(320560),g=e.i(307358),h=e.i(246422),f=e.i(838378),b=e.i(617933);let y=(0,h.genStyleHooks)("Popover",e=>{let{colorBgElevated:t,colorText:n}=e,r=(0,f.mergeToken)(e,{popoverBg:t,popoverColor:n});return[(e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:l,borderRadiusLG:s,zIndexPopup:c,titleMarginBottom:d,colorBgElevated:m,popoverBg:g,titleBorderBottom:h,innerContentPadding:f,titlePadding:b}=e;return[{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:s,boxShadow:a,padding:o},[`${t}-title`]:{minWidth:r,marginBottom:d,color:l,fontWeight:i,borderBottom:h,padding:b},[`${t}-inner-content`]:{color:n,padding:f}})},(0,p.default)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]})(r),(e=>{let{componentCls:t}=e;return{[t]:b.PresetColors.map(n=>{let r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}})}})(r),(0,m.initZoomMotion)(r,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:l,marginXS:s,lineType:c,colorSplit:d,paddingSM:u}=e,m=n-r;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},(0,g.getArrowToken)(e)),(0,p.getArrowOffsetToken)({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:12*!o,titleMarginBottom:o?0:s,titlePadding:o?`${m/2}px ${i}px ${m/2-t}px`:0,titleBorderBottom:o?`${t}px ${c} ${d}`:"none",innerContentPadding:o?`${u}px ${i}px`:0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let x=({title:e,content:n,prefixCls:r})=>e||n?t.createElement(t.Fragment,null,e&&t.createElement("div",{className:`${r}-title`},e),n&&t.createElement("div",{className:`${r}-inner-content`},n)):null,$=e=>{let{hashId:r,prefixCls:i,className:a,style:l,placement:s="top",title:c,content:u,children:m}=e,p=o(c),g=o(u),h=(0,n.default)(r,i,`${i}-pure`,`${i}-placement-${s}`,a);return t.createElement("div",{className:h,style:l},t.createElement("div",{className:`${i}-arrow`}),t.createElement(d.Popup,Object.assign({},e,{className:r,prefixCls:i}),m||t.createElement(x,{prefixCls:i,title:p,content:g})))},S=e=>{let{prefixCls:r,className:i}=e,o=v(e,["prefixCls","className"]),{getPrefixCls:a}=t.useContext(s.ConfigContext),l=a("popover",r),[c,d,u]=y(l);return c(t.createElement($,Object.assign({},o,{prefixCls:l,hashId:d,className:(0,n.default)(i,u)})))};e.s(["Overlay",0,x,"default",0,S],310730);var O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let w=t.forwardRef((e,d)=>{var u,m;let{prefixCls:p,title:g,content:h,overlayClassName:f,placement:b="top",trigger:v="hover",children:$,mouseEnterDelay:S=.1,mouseLeaveDelay:w=.1,onOpenChange:j,overlayStyle:C={},styles:E,classNames:k}=e,N=O(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:I,className:L,style:M,classNames:P,styles:z}=(0,s.useComponentConfig)("popover"),R=I("popover",p),[T,_,B]=y(R),W=I(),U=(0,n.default)(f,_,B,L,P.root,null==k?void 0:k.root),A=(0,n.default)(P.body,null==k?void 0:k.body),[H,D]=(0,r.default)(!1,{value:null!=(u=e.open)?u:e.visible,defaultValue:null!=(m=e.defaultOpen)?m:e.defaultVisible}),G=(e,t)=>{D(e,!0),null==j||j(e,t)},F=o(g),K=o(h);return T(t.createElement(c.default,Object.assign({placement:b,trigger:v,mouseEnterDelay:S,mouseLeaveDelay:w},N,{prefixCls:R,classNames:{root:U,body:A},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},z.root),M),C),null==E?void 0:E.root),body:Object.assign(Object.assign({},z.body),null==E?void 0:E.body)},ref:d,open:H,onOpenChange:e=>{G(e)},overlay:F||K?t.createElement(x,{prefixCls:R,title:F,content:K}):null,transitionName:(0,a.getTransitionName)(W,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,l.cloneElement)($,{onKeyDown:e=>{var n,r;(0,t.isValidElement)($)&&(null==(r=null==$?void 0:(n=$.props).onKeyDown)||r.call(n,e)),e.keyCode===i.default.ESC&&G(!1,e)}})))});w._InternalPanelDoNotUseOrYouWillBeFired=S,e.s(["default",0,w],829672)},282786,e=>{"use strict";var t=e.i(829672);e.s(["Popover",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),n=e.i(114272),r=e.i(540143),i=e.i(915823),o=e.i(619273),a=class extends i.Subscribable{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??(0,n.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(912598);function s(e,n){let i=(0,l.useQueryClient)(n),[s]=t.useState(()=>new a(i,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let c=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(r.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=t.useCallback((e,t)=>{s.mutate(e,t).catch(o.noop)},[s]);if(c.error&&(0,o.shouldThrowError)(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>s],954616)},560445,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(201072),r=e.i(726289),i=e.i(864517),o=e.i(562901),a=e.i(779573),l=e.i(343794),s=e.i(361275),c=e.i(244009),d=e.i(611935),u=e.i(763731),m=e.i(242064);e.i(296059);var p=e.i(915654),g=e.i(183293),h=e.i(246422);let f=(e,t,n,r,i)=>({background:e,border:`${(0,p.unit)(r.lineWidth)} ${r.lineType} ${t}`,[`${i}-icon`]:{color:n}}),b=(0,h.genStyleHooks)("Alert",e=>[(e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:o,fontSizeLG:a,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:c,withDescriptionIconSize:d,colorText:u,colorTextHeading:m,withDescriptionPadding:p,defaultPadding:h}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"relative",display:"flex",alignItems:"center",padding:h,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:l},"&-message":{color:m},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, padding-top ${n} ${c}, padding-bottom ${n} ${c}, margin-bottom ${n} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",padding:p,[`${t}-icon`]:{marginInlineEnd:i,fontSize:d,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:r,color:m,fontSize:a},[`${t}-description`]:{display:"block",color:u}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}})(e),(e=>{let{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:o,colorWarningBorder:a,colorWarningBg:l,colorError:s,colorErrorBorder:c,colorErrorBg:d,colorInfo:u,colorInfoBorder:m,colorInfoBg:p}=e;return{[t]:{"&-success":f(i,r,n,e,t),"&-info":f(p,m,u,e,t),"&-warning":f(l,a,o,e,t),"&-error":Object.assign(Object.assign({},f(d,c,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}})(e),(e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:o,colorIcon:a,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:"hidden",fontSize:o,lineHeight:(0,p.unit)(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:l}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:l}}}}})(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}));var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let v={success:n.default,info:a.default,error:r.default,warning:o.default},x=e=>{let{icon:n,prefixCls:r,type:i}=e,o=v[i]||null;return n?(0,u.replaceElement)(n,t.createElement("span",{className:`${r}-icon`},n),()=>({className:(0,l.default)(`${r}-icon`,n.props.className)})):t.createElement(o,{className:`${r}-icon`})},$=e=>{let{isClosable:n,prefixCls:r,closeIcon:o,handleClose:a,ariaProps:l}=e,s=!0===o||void 0===o?t.createElement(i.default,null):o;return n?t.createElement("button",Object.assign({type:"button",onClick:a,className:`${r}-close-icon`,tabIndex:0},l),s):null},S=t.forwardRef((e,n)=>{let{description:r,prefixCls:i,message:o,banner:a,className:u,rootClassName:p,style:g,onMouseEnter:h,onMouseLeave:f,onClick:v,afterClose:S,showIcon:O,closable:w,closeText:j,closeIcon:C,action:E,id:k}=e,N=y(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[I,L]=t.useState(!1),M=t.useRef(null);t.useImperativeHandle(n,()=>({nativeElement:M.current}));let{getPrefixCls:P,direction:z,closable:R,closeIcon:T,className:_,style:B}=(0,m.useComponentConfig)("alert"),W=P("alert",i),[U,A,H]=b(W),D=t=>{var n;L(!0),null==(n=e.onClose)||n.call(e,t)},G=t.useMemo(()=>void 0!==e.type?e.type:a?"warning":"info",[e.type,a]),F=t.useMemo(()=>"object"==typeof w&&!!w.closeIcon||!!j||("boolean"==typeof w?w:!1!==C&&null!=C||!!R),[j,C,w,R]),K=!!a&&void 0===O||O,V=(0,l.default)(W,`${W}-${G}`,{[`${W}-with-description`]:!!r,[`${W}-no-icon`]:!K,[`${W}-banner`]:!!a,[`${W}-rtl`]:"rtl"===z},_,u,p,H,A),q=(0,c.default)(N,{aria:!0,data:!0}),X=t.useMemo(()=>"object"==typeof w&&w.closeIcon?w.closeIcon:j||(void 0!==C?C:"object"==typeof R&&R.closeIcon?R.closeIcon:T),[C,w,R,j,T]),J=t.useMemo(()=>{let e=null!=w?w:R;if("object"==typeof e){let{closeIcon:t}=e;return y(e,["closeIcon"])}return{}},[w,R]);return U(t.createElement(s.default,{visible:!I,motionName:`${W}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:S},({className:n,style:i},a)=>t.createElement("div",Object.assign({id:k,ref:(0,d.composeRef)(M,a),"data-show":!I,className:(0,l.default)(V,n),style:Object.assign(Object.assign(Object.assign({},B),g),i),onMouseEnter:h,onMouseLeave:f,onClick:v,role:"alert"},q),K?t.createElement(x,{description:r,icon:e.icon,prefixCls:W,type:G}):null,t.createElement("div",{className:`${W}-content`},o?t.createElement("div",{className:`${W}-message`},o):null,r?t.createElement("div",{className:`${W}-description`},r):null),E?t.createElement("div",{className:`${W}-action`},E):null,t.createElement($,{isClosable:F,prefixCls:W,closeIcon:X,handleClose:D,ariaProps:J}))))});var O=e.i(278409),w=e.i(233848),j=e.i(487806),C=e.i(479671),E=e.i(480002),k=e.i(868917);let N=function(e){function n(){var e,t,r;return(0,O.default)(this,n),t=n,r=arguments,t=(0,j.default)(t),(e=(0,E.default)(this,(0,C.default)()?Reflect.construct(t,r||[],(0,j.default)(this).constructor):t.apply(this,r))).state={error:void 0,info:{componentStack:""}},e}return(0,k.default)(n,e),(0,w.default)(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,description:n,id:r,children:i}=this.props,{error:o,info:a}=this.state,l=(null==a?void 0:a.componentStack)||null,s=void 0===e?(o||"").toString():e;return o?t.createElement(S,{id:r,type:"error",message:s,description:t.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},void 0===n?l:n)}):i}}])}(t.Component);S.ErrorBoundary=N,e.s(["Alert",0,S],560445)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(529681),i=e.i(242064),o=e.i(517455),a=e.i(185793),l=e.i(721369),s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let c=e=>{var{prefixCls:r,className:o,hoverable:a=!0}=e,l=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=t.useContext(i.ConfigContext),d=c("card",r),u=(0,n.default)(`${d}-grid`,o,{[`${d}-grid-hoverable`]:a});return t.createElement("div",Object.assign({},l,{className:u}))};e.i(296059);var d=e.i(915654),u=e.i(183293),m=e.i(246422),p=e.i(838378);let g=(0,m.genStyleHooks)("Card",e=>{let t=(0,p.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:o,bodyPadding:a,extraColor:l}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:o},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:o}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:`0 ${(0,d.unit)(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[` > ${n}-typography, @@ -9,4 +9,4 @@ ${(0,d.unit)(i)} ${(0,d.unit)(i)} 0 0 ${n}, ${(0,d.unit)(i)} 0 0 0 ${n} inset, 0 ${(0,d.unit)(i)} 0 0 ${n} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,d.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:(0,d.unit)(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${o}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,d.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${(0,d.unit)(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,d.unit)(e.padding)} ${(0,d.unit)(i)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${(0,d.unit)(r)}`,fontSize:o,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var h=e.i(792812),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let b=e=>{let{actionClasses:n,actions:r=[],actionStyle:i}=e;return t.createElement("ul",{className:n,style:i},r.map((e,n)=>{let i=`action-${n}`;return t.createElement("li",{style:{width:`${100/r.length}%`},key:i},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let d,{prefixCls:u,className:m,rootClassName:p,style:y,extra:v,headStyle:x={},bodyStyle:$={},title:S,loading:O,bordered:w,variant:j,size:C,type:E,cover:k,actions:N,tabList:I,children:L,activeTabKey:M,defaultActiveTabKey:P,tabBarExtraContent:z,hoverable:R,tabProps:T={},classNames:_,styles:B}=e,W=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:U,direction:A,card:H}=t.useContext(i.ConfigContext),[D]=(0,h.default)("card",j,w),G=e=>{var t;return(0,n.default)(null==(t=null==H?void 0:H.classNames)?void 0:t[e],null==_?void 0:_[e])},F=e=>{var t;return Object.assign(Object.assign({},null==(t=null==H?void 0:H.styles)?void 0:t[e]),null==B?void 0:B[e])},K=t.useMemo(()=>{let e=!1;return t.Children.forEach(L,t=>{(null==t?void 0:t.type)===c&&(e=!0)}),e},[L]),V=U("card",u),[q,X,J]=g(V),Y=t.createElement(a.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},L),Q=void 0!==M,Z=Object.assign(Object.assign({},T),{[Q?"activeKey":"defaultActiveKey"]:Q?M:P,tabBarExtraContent:z}),ee=(0,o.default)(C),et=ee&&"default"!==ee?ee:"large",en=I?t.createElement(l.default,Object.assign({size:et},Z,{className:`${V}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:I.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(S||v||en){let e=(0,n.default)(`${V}-head`,G("header")),r=(0,n.default)(`${V}-head-title`,G("title")),i=(0,n.default)(`${V}-extra`,G("extra")),o=Object.assign(Object.assign({},x),F("header"));d=t.createElement("div",{className:e,style:o},t.createElement("div",{className:`${V}-head-wrapper`},S&&t.createElement("div",{className:r,style:F("title")},S),v&&t.createElement("div",{className:i,style:F("extra")},v)),en)}let er=(0,n.default)(`${V}-cover`,G("cover")),ei=k?t.createElement("div",{className:er,style:F("cover")},k):null,eo=(0,n.default)(`${V}-body`,G("body")),ea=Object.assign(Object.assign({},$),F("body")),el=t.createElement("div",{className:eo,style:ea},O?Y:L),es=(0,n.default)(`${V}-actions`,G("actions")),ec=(null==N?void 0:N.length)?t.createElement(b,{actionClasses:es,actionStyle:F("actions"),actions:N}):null,ed=(0,r.default)(W,["onTabChange"]),eu=(0,n.default)(V,null==H?void 0:H.className,{[`${V}-loading`]:O,[`${V}-bordered`]:"borderless"!==D,[`${V}-hoverable`]:R,[`${V}-contain-grid`]:K,[`${V}-contain-tabs`]:null==I?void 0:I.length,[`${V}-${ee}`]:ee,[`${V}-type-${E}`]:!!E,[`${V}-rtl`]:"rtl"===A},m,p,X,J),em=Object.assign(Object.assign({},null==H?void 0:H.style),y);return q(t.createElement("div",Object.assign({ref:s},ed,{className:eu,style:em}),d,ei,el,ec))});var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};y.Grid=c,y.Meta=e=>{let{prefixCls:r,className:o,avatar:a,title:l,description:s}=e,c=v(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=t.useContext(i.ConfigContext),u=d("card",r),m=(0,n.default)(`${u}-meta`,o),p=a?t.createElement("div",{className:`${u}-meta-avatar`},a):null,g=l?t.createElement("div",{className:`${u}-meta-title`},l):null,h=s?t.createElement("div",{className:`${u}-meta-description`},s):null,f=g||h?t.createElement("div",{className:`${u}-meta-detail`},g,h):null;return t.createElement("div",Object.assign({},c,{className:m}),p,f)},e.s(["Card",0,y],175712)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),n=e.i(114272),r=e.i(540143),i=e.i(915823),o=e.i(619273),a=class extends i.Subscribable{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??(0,n.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){r.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},l=e.i(912598);function s(e,n){let i=(0,l.useQueryClient)(n),[s]=t.useState(()=>new a(i,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let c=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(r.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=t.useCallback((e,t)=>{s.mutate(e,t).catch(o.noop)},[s]);if(c.error&&(0,o.shouldThrowError)(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>s],954616)},295320,283713,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var i=e.i(9583),o=n.forwardRef(function(e,o){return n.createElement(i.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["CloudServerOutlined",0,o],295320);var a=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,r=e?.workers??[],[i,o]=(0,n.useState)(()=>localStorage.getItem(s));(0,n.useEffect)(()=>{if(!i||0===r.length)return;let e=r.find(e=>e.worker_id===i);e&&(0,a.switchToWorkerUrl)(e.url)},[i,r]);let c=r.find(e=>e.worker_id===i)??null,d=(0,n.useCallback)(e=>{let t=r.find(t=>t.worker_id===e);t&&(o(e),localStorage.setItem(s,e),(0,a.switchToWorkerUrl)(t.url))},[r]);return{isControlPlane:t,workers:r,selectedWorkerId:i,selectedWorker:c,selectWorker:d,disconnectFromWorker:(0,n.useCallback)(()=>{o(null),localStorage.removeItem(s),(0,a.switchToWorkerUrl)(null)},[])}}],283713)},571303,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(115504);function i({className:e="",...i}){var o,a;let l=(0,n.useId)();return o=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===l),n=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==l);t&&n&&(t.currentTime=n.currentTime)},a=[l],(0,n.useLayoutEffect)(o,a),(0,t.jsxs)("svg",{"data-spinner-id":l,className:(0,r.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...i,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>i],571303)},936578,e=>{"use strict";var t=e.i(843476),n=e.i(115504),r=e.i(571303);function i(){return(0,t.jsxs)("div",{className:(0,n.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(r.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>i])},594542,e=>{"use strict";var t=e.i(843476),n=e.i(954616),r=e.i(764205),i=e.i(612256),o=e.i(936578),a=e.i(268004),l=e.i(161281),s=e.i(321836),c=e.i(827252),d=e.i(295320),u=e.i(560445),m=e.i(464571),p=e.i(175712),g=e.i(808613),h=e.i(311451),f=e.i(282786),b=e.i(199133),y=e.i(770914),v=e.i(898586),x=e.i(618566),$=e.i(271645),S=e.i(283713);function O(){let[e,O]=(0,$.useState)(""),[w,j]=(0,$.useState)(""),[C,E]=(0,$.useState)(!0),{data:k,isLoading:N}=(0,i.useUIConfig)(),I=(0,n.useMutation)({mutationFn:async({username:e,password:t,useV3:n})=>await (0,r.loginCall)(e,t,n)}),L=(0,x.useRouter)(),{workers:M,selectWorker:P}=(0,S.useWorker)(),[z,R]=(0,$.useState)(null);(0,$.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("worker");e&&R(e)},[]),(0,$.useEffect)(()=>{if(N)return;if(k&&k.admin_ui_disabled)return void E(!1);let e=new URLSearchParams(window.location.search),t=e.get("code");if(t){let n=localStorage.getItem("litellm_worker_url");(0,r.exchangeLoginCode)(t,n).then(()=>{e.delete("code");let t=e.toString();window.history.replaceState(null,"",window.location.pathname+(t?`?${t}`:"")),L.replace("/ui/?login=success")});return}let n=e.get("token");if(n&&!(0,l.isJwtExpired)(n)){document.cookie=`token=${n}; path=/; SameSite=Lax`,e.delete("token");let t=e.toString();window.history.replaceState(null,"",window.location.pathname+(t?`?${t}`:"")),L.replace("/ui/?login=success");return}if(e.has("worker")&&k?.is_control_plane){(0,a.clearTokenCookies)(),E(!1);return}let i=(0,a.getCookie)("token");if(i&&!(0,l.isJwtExpired)(i)){let e=(0,s.consumeReturnUrl)();e?L.replace(e):L.replace("/ui");return}if(k&&k.auto_redirect_to_sso){let e=(0,s.getReturnUrl)(),t=`${(0,r.getProxyBaseUrl)()}/sso/key/generate`;e&&(0,s.isValidReturnUrl)(e)&&(t+=`?redirect_to=${encodeURIComponent(e)}`),L.push(t);return}E(!1)},[N,L,k]);let T=I.error instanceof Error?I.error.message:null,_=I.isPending,{Title:B,Text:W,Paragraph:U}=v.Typography;return N||C?(0,t.jsx)(o.default,{}):k&&k.admin_ui_disabled?(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:(0,t.jsx)(p.Card,{className:"w-full max-w-lg shadow-md",children:(0,t.jsxs)(y.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(B,{level:2,children:"🚅 LiteLLM"})}),(0,t.jsx)(u.Alert,{message:"Admin UI Disabled",description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{className:"text-sm",children:"The Admin UI has been disabled by the administrator. To re-enable it, please update the following environment variable:"}),(0,t.jsx)(U,{className:"text-sm",children:(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"DISABLE_ADMIN_UI=False"})})]}),type:"warning",showIcon:!0})]})})}):(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:(0,t.jsxs)(p.Card,{className:"w-full max-w-lg shadow-md",children:[(0,t.jsxs)(y.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(B,{level:2,children:"🚅 LiteLLM"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(B,{level:3,children:"Login"}),(0,t.jsx)(W,{type:"secondary",children:"Access your LiteLLM Admin UI."})]}),(0,t.jsx)(u.Alert,{message:"Default Credentials",description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U,{className:"text-sm",children:["By default, Username is ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"admin"})," and Password is your set LiteLLM Proxy",(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"MASTER_KEY"}),"."]}),(0,t.jsxs)(U,{className:"text-sm",children:["Need to set UI credentials or SSO?"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/ui",target:"_blank",rel:"noopener noreferrer",children:"Check the documentation"}),"."]})]}),type:"info",icon:(0,t.jsx)(c.InfoCircleOutlined,{}),showIcon:!0}),T&&(0,t.jsx)(u.Alert,{message:T,type:"error",showIcon:!0}),(0,t.jsxs)(g.Form,{onFinish:()=>{let t=M.find(e=>e.worker_id===z);t&&(0,r.switchToWorkerUrl)(t.url),I.mutate({username:e,password:w,useV3:!!t},{onSuccess:e=>{if(t)P(t.worker_id),L.push("/ui/?login=success");else{let t=(0,s.consumeReturnUrl)();t?L.push(t):L.push(e.redirect_url)}},onError:()=>{t&&(0,r.switchToWorkerUrl)(null)}})},layout:"vertical",requiredMark:!1,children:[k?.is_control_plane&&M.length>0&&(0,t.jsx)(g.Form.Item,{label:"Worker",style:{marginBottom:16},children:(0,t.jsx)(b.Select,{value:z||void 0,onChange:e=>R(e),placeholder:"Choose a worker to connect to",size:"large",suffixIcon:(0,t.jsx)(d.CloudServerOutlined,{}),options:M.map(e=>({label:e.name,value:e.worker_id}))})}),(0,t.jsx)(g.Form.Item,{label:"Username",name:"username",rules:[{required:!0,message:"Please enter your username"}],children:(0,t.jsx)(h.Input,{placeholder:"Enter your username",autoComplete:"username",value:e,onChange:e=>O(e.target.value),disabled:_,size:"large",className:"rounded-md border-gray-300"})}),(0,t.jsx)(g.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"Please enter your password"}],children:(0,t.jsx)(h.Input.Password,{placeholder:"Enter your password",autoComplete:"current-password",value:w,onChange:e=>j(e.target.value),disabled:_,size:"large"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:_,disabled:_,block:!0,size:"large",children:_?"Logging in...":"Login"})}),(0,t.jsx)(g.Form.Item,{children:k?.sso_configured?(0,t.jsx)(m.Button,{disabled:_||!!z&&0===M.length,onClick:()=>{let e=M.find(e=>e.worker_id===z);e&&(localStorage.setItem("litellm_selected_worker_id",z),(0,r.switchToWorkerUrl)(e.url));let t=e?.url??(0,r.getProxyBaseUrl)(),n=encodeURIComponent(window.location.origin+"/ui/login");L.push(`${t}/sso/key/generate?return_to=${n}`)},block:!0,size:"large",children:"Login with SSO"}):(0,t.jsx)(f.Popover,{content:"Please configure SSO to log in with SSO.",trigger:"hover",children:(0,t.jsx)(m.Button,{disabled:!0,block:!0,size:"large",children:"Login with SSO"})})})]})]}),k?.sso_configured&&(0,t.jsx)(u.Alert,{type:"info",showIcon:!0,closable:!0,message:(0,t.jsxs)(W,{children:["Single Sign-On (SSO) is enabled. LiteLLM no longer automatically redirects to the SSO login flow upon loading this page. To re-enable auto-redirect-to-SSO, set ",(0,t.jsx)(W,{code:!0,children:"AUTO_REDIRECT_UI_LOGIN_TO_SSO=true"})," in your environment configuration."]})})]})})}e.s(["default",0,function(){return(0,t.jsx)(O,{})}],594542)}]); \ No newline at end of file + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,d.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:(0,d.unit)(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${o}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,d.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${(0,d.unit)(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,d.unit)(e.padding)} ${(0,d.unit)(i)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${(0,d.unit)(r)}`,fontSize:o,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var h=e.i(792812),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let b=e=>{let{actionClasses:n,actions:r=[],actionStyle:i}=e;return t.createElement("ul",{className:n,style:i},r.map((e,n)=>{let i=`action-${n}`;return t.createElement("li",{style:{width:`${100/r.length}%`},key:i},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let d,{prefixCls:u,className:m,rootClassName:p,style:y,extra:v,headStyle:x={},bodyStyle:$={},title:S,loading:O,bordered:w,variant:j,size:C,type:E,cover:k,actions:N,tabList:I,children:L,activeTabKey:M,defaultActiveTabKey:P,tabBarExtraContent:z,hoverable:R,tabProps:T={},classNames:_,styles:B}=e,W=f(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:U,direction:A,card:H}=t.useContext(i.ConfigContext),[D]=(0,h.default)("card",j,w),G=e=>{var t;return(0,n.default)(null==(t=null==H?void 0:H.classNames)?void 0:t[e],null==_?void 0:_[e])},F=e=>{var t;return Object.assign(Object.assign({},null==(t=null==H?void 0:H.styles)?void 0:t[e]),null==B?void 0:B[e])},K=t.useMemo(()=>{let e=!1;return t.Children.forEach(L,t=>{(null==t?void 0:t.type)===c&&(e=!0)}),e},[L]),V=U("card",u),[q,X,J]=g(V),Y=t.createElement(a.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},L),Q=void 0!==M,Z=Object.assign(Object.assign({},T),{[Q?"activeKey":"defaultActiveKey"]:Q?M:P,tabBarExtraContent:z}),ee=(0,o.default)(C),et=ee&&"default"!==ee?ee:"large",en=I?t.createElement(l.default,Object.assign({size:et},Z,{className:`${V}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:I.map(e=>{var{tab:t}=e;return Object.assign({label:t},f(e,["tab"]))})})):null;if(S||v||en){let e=(0,n.default)(`${V}-head`,G("header")),r=(0,n.default)(`${V}-head-title`,G("title")),i=(0,n.default)(`${V}-extra`,G("extra")),o=Object.assign(Object.assign({},x),F("header"));d=t.createElement("div",{className:e,style:o},t.createElement("div",{className:`${V}-head-wrapper`},S&&t.createElement("div",{className:r,style:F("title")},S),v&&t.createElement("div",{className:i,style:F("extra")},v)),en)}let er=(0,n.default)(`${V}-cover`,G("cover")),ei=k?t.createElement("div",{className:er,style:F("cover")},k):null,eo=(0,n.default)(`${V}-body`,G("body")),ea=Object.assign(Object.assign({},$),F("body")),el=t.createElement("div",{className:eo,style:ea},O?Y:L),es=(0,n.default)(`${V}-actions`,G("actions")),ec=(null==N?void 0:N.length)?t.createElement(b,{actionClasses:es,actionStyle:F("actions"),actions:N}):null,ed=(0,r.default)(W,["onTabChange"]),eu=(0,n.default)(V,null==H?void 0:H.className,{[`${V}-loading`]:O,[`${V}-bordered`]:"borderless"!==D,[`${V}-hoverable`]:R,[`${V}-contain-grid`]:K,[`${V}-contain-tabs`]:null==I?void 0:I.length,[`${V}-${ee}`]:ee,[`${V}-type-${E}`]:!!E,[`${V}-rtl`]:"rtl"===A},m,p,X,J),em=Object.assign(Object.assign({},null==H?void 0:H.style),y);return q(t.createElement("div",Object.assign({ref:s},ed,{className:eu,style:em}),d,ei,el,ec))});var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};y.Grid=c,y.Meta=e=>{let{prefixCls:r,className:o,avatar:a,title:l,description:s}=e,c=v(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=t.useContext(i.ConfigContext),u=d("card",r),m=(0,n.default)(`${u}-meta`,o),p=a?t.createElement("div",{className:`${u}-meta-avatar`},a):null,g=l?t.createElement("div",{className:`${u}-meta-title`},l):null,h=s?t.createElement("div",{className:`${u}-meta-description`},s):null,f=g||h?t.createElement("div",{className:`${u}-meta-detail`},g,h):null;return t.createElement("div",Object.assign({},c,{className:m}),p,f)},e.s(["Card",0,y],175712)},770914,e=>{"use strict";var t=e.i(38243);e.s(["Space",()=>t.default])},295320,283713,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"};var i=e.i(9583),o=n.forwardRef(function(e,o){return n.createElement(i.default,(0,t.default)({},e,{ref:o,icon:r}))});e.s(["CloudServerOutlined",0,o],295320);var a=e.i(764205),l=e.i(612256);let s="litellm_selected_worker_id";e.s(["useWorker",0,()=>{let{data:e}=(0,l.useUIConfig)(),t=e?.is_control_plane??!1,r=e?.workers??[],[i,o]=(0,n.useState)(()=>localStorage.getItem(s));(0,n.useEffect)(()=>{if(!i||0===r.length)return;let e=r.find(e=>e.worker_id===i);e&&(0,a.switchToWorkerUrl)(e.url)},[i,r]);let c=r.find(e=>e.worker_id===i)??null,d=(0,n.useCallback)(e=>{let t=r.find(t=>t.worker_id===e);t&&(o(e),localStorage.setItem(s,e),(0,a.switchToWorkerUrl)(t.url))},[r]);return{isControlPlane:t,workers:r,selectedWorkerId:i,selectedWorker:c,selectWorker:d,disconnectFromWorker:(0,n.useCallback)(()=>{o(null),localStorage.removeItem(s),(0,a.switchToWorkerUrl)(null)},[])}}],283713)},571303,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(115504);function i({className:e="",...i}){var o,a;let l=(0,n.useId)();return o=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),t=e.find(e=>e.effect.target?.getAttribute("data-spinner-id")===l),n=e.find(e=>e.effect instanceof KeyframeEffect&&e.effect.target?.getAttribute("data-spinner-id")!==l);t&&n&&(t.currentTime=n.currentTime)},a=[l],(0,n.useLayoutEffect)(o,a),(0,t.jsxs)("svg",{"data-spinner-id":l,className:(0,r.cx)("pointer-events-none size-12 animate-spin text-current",e),fill:"none",viewBox:"0 0 24 24",...i,children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}e.s(["UiLoadingSpinner",()=>i],571303)},936578,e=>{"use strict";var t=e.i(843476),n=e.i(115504),r=e.i(571303);function i(){return(0,t.jsxs)("div",{className:(0,n.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,t.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"🚅 LiteLLM"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(r.UiLoadingSpinner,{className:"size-4"}),(0,t.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}e.s(["default",()=>i])},594542,e=>{"use strict";var t=e.i(843476),n=e.i(954616),r=e.i(764205),i=e.i(612256),o=e.i(936578),a=e.i(268004),l=e.i(161281),s=e.i(321836),c=e.i(827252),d=e.i(295320),u=e.i(560445),m=e.i(464571),p=e.i(175712),g=e.i(808613),h=e.i(311451),f=e.i(282786),b=e.i(199133),y=e.i(770914),v=e.i(898586),x=e.i(618566),$=e.i(271645),S=e.i(283713);function O(){let[e,O]=(0,$.useState)(""),[w,j]=(0,$.useState)(""),[C,E]=(0,$.useState)(!0),{data:k,isLoading:N}=(0,i.useUIConfig)(),I=(0,n.useMutation)({mutationFn:async({username:e,password:t,useV3:n})=>await (0,r.loginCall)(e,t,n)}),L=(0,x.useRouter)(),{workers:M,selectWorker:P}=(0,S.useWorker)(),[z,R]=(0,$.useState)(null);(0,$.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("worker");e&&R(e)},[]),(0,$.useEffect)(()=>{if(N)return;if(k&&k.admin_ui_disabled)return void E(!1);let e=new URLSearchParams(window.location.search),t=e.get("code");if(t){let n=localStorage.getItem("litellm_worker_url");(0,r.exchangeLoginCode)(t,n).then(()=>{e.delete("code");let t=e.toString();window.history.replaceState(null,"",window.location.pathname+(t?`?${t}`:"")),L.replace("/ui/?login=success")});return}let n=e.get("token");if(n&&!(0,l.isJwtExpired)(n)){document.cookie=`token=${n}; path=/; SameSite=Lax`,e.delete("token");let t=e.toString();window.history.replaceState(null,"",window.location.pathname+(t?`?${t}`:"")),L.replace("/ui/?login=success");return}if(e.has("worker")&&k?.is_control_plane){(0,a.clearTokenCookies)(),E(!1);return}let i=(0,a.getCookie)("token");if(i&&!(0,l.isJwtExpired)(i)){let e=(0,s.consumeReturnUrl)();e?L.replace(e):L.replace("/ui");return}if(k&&k.auto_redirect_to_sso){let e=(0,s.getReturnUrl)(),t=`${(0,r.getProxyBaseUrl)()}/sso/key/generate`;e&&(0,s.isValidReturnUrl)(e)&&(t+=`?redirect_to=${encodeURIComponent(e)}`),L.push(t);return}E(!1)},[N,L,k]);let T=I.error instanceof Error?I.error.message:null,_=I.isPending,{Title:B,Text:W,Paragraph:U}=v.Typography;return N||C?(0,t.jsx)(o.default,{}):k&&k.admin_ui_disabled?(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:(0,t.jsx)(p.Card,{className:"w-full max-w-lg shadow-md",children:(0,t.jsxs)(y.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(B,{level:2,children:"🚅 LiteLLM"})}),(0,t.jsx)(u.Alert,{message:"Admin UI Disabled",description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{className:"text-sm",children:"The Admin UI has been disabled by the administrator. To re-enable it, please update the following environment variable:"}),(0,t.jsx)(U,{className:"text-sm",children:(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"DISABLE_ADMIN_UI=False"})})]}),type:"warning",showIcon:!0})]})})}):(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:(0,t.jsxs)(p.Card,{className:"w-full max-w-lg shadow-md",children:[(0,t.jsxs)(y.Space,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)(B,{level:2,children:"🚅 LiteLLM"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(B,{level:3,children:"Login"}),(0,t.jsx)(W,{type:"secondary",children:"Access your LiteLLM Admin UI."})]}),(0,t.jsx)(u.Alert,{message:"Default Credentials",description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U,{className:"text-sm",children:["By default, Username is ",(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"admin"})," and Password is your set LiteLLM Proxy",(0,t.jsx)("code",{className:"bg-gray-100 px-1 py-0.5 rounded text-xs",children:"MASTER_KEY"}),"."]}),(0,t.jsxs)(U,{className:"text-sm",children:["Need to set UI credentials or SSO?"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/ui",target:"_blank",rel:"noopener noreferrer",children:"Check the documentation"}),"."]})]}),type:"info",icon:(0,t.jsx)(c.InfoCircleOutlined,{}),showIcon:!0}),T&&(0,t.jsx)(u.Alert,{message:T,type:"error",showIcon:!0}),(0,t.jsxs)(g.Form,{onFinish:()=>{let t=M.find(e=>e.worker_id===z);t&&(0,r.switchToWorkerUrl)(t.url),I.mutate({username:e,password:w,useV3:!!t},{onSuccess:e=>{if(t)P(t.worker_id),L.push("/ui/?login=success");else{let t=(0,s.consumeReturnUrl)();t?L.push(t):L.push(e.redirect_url)}},onError:()=>{t&&(0,r.switchToWorkerUrl)(null)}})},layout:"vertical",requiredMark:!1,children:[k?.is_control_plane&&M.length>0&&(0,t.jsx)(g.Form.Item,{label:"Worker",style:{marginBottom:16},children:(0,t.jsx)(b.Select,{value:z||void 0,onChange:e=>R(e),placeholder:"Choose a worker to connect to",size:"large",suffixIcon:(0,t.jsx)(d.CloudServerOutlined,{}),options:M.map(e=>({label:e.name,value:e.worker_id}))})}),(0,t.jsx)(g.Form.Item,{label:"Username",name:"username",rules:[{required:!0,message:"Please enter your username"}],children:(0,t.jsx)(h.Input,{placeholder:"Enter your username",autoComplete:"username",value:e,onChange:e=>O(e.target.value),disabled:_,size:"large",className:"rounded-md border-gray-300"})}),(0,t.jsx)(g.Form.Item,{label:"Password",name:"password",rules:[{required:!0,message:"Please enter your password"}],children:(0,t.jsx)(h.Input.Password,{placeholder:"Enter your password",autoComplete:"current-password",value:w,onChange:e=>j(e.target.value),disabled:_,size:"large"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:_,disabled:_,block:!0,size:"large",children:_?"Logging in...":"Login"})}),(0,t.jsx)(g.Form.Item,{children:k?.sso_configured?(0,t.jsx)(m.Button,{disabled:_||!!z&&0===M.length,onClick:()=>{let e=M.find(e=>e.worker_id===z);e&&(localStorage.setItem("litellm_selected_worker_id",z),(0,r.switchToWorkerUrl)(e.url));let t=e?.url??(0,r.getProxyBaseUrl)(),n=encodeURIComponent(window.location.origin+"/ui/login");L.push(`${t}/sso/key/generate?return_to=${n}`)},block:!0,size:"large",children:"Login with SSO"}):(0,t.jsx)(f.Popover,{content:"Please configure SSO to log in with SSO.",trigger:"hover",children:(0,t.jsx)(m.Button,{disabled:!0,block:!0,size:"large",children:"Login with SSO"})})})]})]}),k?.sso_configured&&(0,t.jsx)(u.Alert,{type:"info",showIcon:!0,closable:!0,message:(0,t.jsxs)(W,{children:["Single Sign-On (SSO) is enabled. LiteLLM no longer automatically redirects to the SSO login flow upon loading this page. To re-enable auto-redirect-to-SSO, set ",(0,t.jsx)(W,{code:!0,children:"AUTO_REDIRECT_UI_LOGIN_TO_SSO=true"})," in your environment configuration."]})})]})})}e.s(["default",0,function(){return(0,t.jsx)(O,{})}],594542)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/d1ddfd3f3d5b2449.js b/litellm/proxy/_experimental/out/_next/static/chunks/d1ddfd3f3d5b2449.js deleted file mode 100644 index 14311dfbea4..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/d1ddfd3f3d5b2449.js +++ /dev/null @@ -1,10 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(908206),o=e.i(242064),l=e.i(517455),i=e.i(150073);let a={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var c=e.i(876556),d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let b=e=>{let{itemPrefixCls:r,component:o,span:l,className:i,style:a,labelStyle:c,contentStyle:d,bordered:u,label:b,content:p,colon:g,type:f,styles:m}=e,{classNames:y}=t.useContext(s),h=Object.assign(Object.assign({},c),null==m?void 0:m.label),O=Object.assign(Object.assign({},d),null==m?void 0:m.content);if(u)return t.createElement(o,{colSpan:l,style:a,className:(0,n.default)(i,{[`${r}-item-${f}`]:"label"===f||"content"===f,[null==y?void 0:y.label]:(null==y?void 0:y.label)&&"label"===f,[null==y?void 0:y.content]:(null==y?void 0:y.content)&&"content"===f})},null!=b&&t.createElement("span",{style:h},b),null!=p&&t.createElement("span",{style:O},p));return t.createElement(o,{colSpan:l,style:a,className:(0,n.default)(`${r}-item`,i)},t.createElement("div",{className:`${r}-item-container`},null!=b&&t.createElement("span",{style:h,className:(0,n.default)(`${r}-item-label`,null==y?void 0:y.label,{[`${r}-item-no-colon`]:!g})},b),null!=p&&t.createElement("span",{style:O,className:(0,n.default)(`${r}-item-content`,null==y?void 0:y.content)},p)))};function p(e,{colon:n,prefixCls:r,bordered:o},{component:l,type:i,showLabel:a,showContent:s,labelStyle:c,contentStyle:d,styles:u}){return e.map(({label:e,children:p,prefixCls:g=r,className:f,style:m,labelStyle:y,contentStyle:h,span:O=1,key:v,styles:$},j)=>"string"==typeof l?t.createElement(b,{key:`${i}-${v||j}`,className:f,style:m,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),y),null==$?void 0:$.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),h),null==$?void 0:$.content)},span:O,colon:n,component:l,itemPrefixCls:g,bordered:o,label:a?e:null,content:s?p:null,type:i}):[t.createElement(b,{key:`label-${v||j}`,className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),m),y),null==$?void 0:$.label),span:1,colon:n,component:l[0],itemPrefixCls:g,bordered:o,label:e,type:"label"}),t.createElement(b,{key:`content-${v||j}`,className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),m),h),null==$?void 0:$.content),span:2*O-1,component:l[1],itemPrefixCls:g,bordered:o,content:p,type:"content"})])}let g=e=>{let n=t.useContext(s),{prefixCls:r,vertical:o,row:l,index:i,bordered:a}=e;return o?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${i}`,className:`${r}-row`},p(l,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${i}`,className:`${r}-row`},p(l,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:i,className:`${r}-row`},p(l,e,Object.assign({component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var f=e.i(915654),m=e.i(183293),y=e.i(246422),h=e.i(838378);let O=(0,y.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:o,colonMarginRight:l,colonMarginLeft:i,titleMarginBottom:a}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,m.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.padding)} ${(0,f.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.paddingSM)} ${(0,f.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,f.unit)(e.paddingXS)} ${(0,f.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${t}-title`]:Object.assign(Object.assign({},m.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:o},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,f.unit)(i)} ${(0,f.unit)(l)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,h.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let $=e=>{let b,{prefixCls:p,title:f,extra:m,column:y,colon:h=!0,bordered:$,layout:j,children:x,className:S,rootClassName:C,style:w,size:E,labelStyle:P,contentStyle:T,styles:k,items:B,classNames:z}=e,N=v(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:L,direction:R,className:M,style:I,classNames:H,styles:G}=(0,o.useComponentConfig)("descriptions"),W=L("descriptions",p),D=(0,i.default)(),A=t.useMemo(()=>{var e;return"number"==typeof y?y:null!=(e=(0,r.matchScreen)(D,Object.assign(Object.assign({},a),y)))?e:3},[D,y]),F=(b=t.useMemo(()=>B||(0,c.default)(x).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[B,x]),t.useMemo(()=>b.map(e=>{var{span:t}=e,n=d(e,["span"]);return"filled"===t?Object.assign(Object.assign({},n),{filled:!0}):Object.assign(Object.assign({},n),{span:"number"==typeof t?t:(0,r.matchScreen)(D,t)})}),[b,D])),X=(0,l.default)(E),_=((e,n)=>{let[r,o]=(0,t.useMemo)(()=>{let t,r,o,l;return t=[],r=[],o=!1,l=0,n.filter(e=>e).forEach(n=>{let{filled:i}=n,a=u(n,["filled"]);if(i){r.push(a),t.push(r),r=[],l=0;return}let s=e-l;(l+=n.span||1)>=e?(l>e?(o=!0,r.push(Object.assign(Object.assign({},a),{span:s}))):r.push(a),t.push(r),r=[],l=0):r.push(a)}),r.length>0&&t.push(r),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:P,contentStyle:T,styles:{content:Object.assign(Object.assign({},G.content),null==k?void 0:k.content),label:Object.assign(Object.assign({},G.label),null==k?void 0:k.label)},classNames:{label:(0,n.default)(H.label,null==z?void 0:z.label),content:(0,n.default)(H.content,null==z?void 0:z.content)}}),[P,T,k,z,H,G]);return K(t.createElement(s.Provider,{value:U},t.createElement("div",Object.assign({className:(0,n.default)(W,M,H.root,null==z?void 0:z.root,{[`${W}-${X}`]:X&&"default"!==X,[`${W}-bordered`]:!!$,[`${W}-rtl`]:"rtl"===R},S,C,q,Q),style:Object.assign(Object.assign(Object.assign(Object.assign({},I),G.root),null==k?void 0:k.root),w)},N),(f||m)&&t.createElement("div",{className:(0,n.default)(`${W}-header`,H.header,null==z?void 0:z.header),style:Object.assign(Object.assign({},G.header),null==k?void 0:k.header)},f&&t.createElement("div",{className:(0,n.default)(`${W}-title`,H.title,null==z?void 0:z.title),style:Object.assign(Object.assign({},G.title),null==k?void 0:k.title)},f),m&&t.createElement("div",{className:(0,n.default)(`${W}-extra`,H.extra,null==z?void 0:z.extra),style:Object.assign(Object.assign({},G.extra),null==k?void 0:k.extra)},m)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,_.map((e,n)=>t.createElement(g,{key:n,index:n,colon:h,prefixCls:W,vertical:"vertical"===j,bordered:$,row:e}))))))))};$.Item=({children:e})=>e,e.s(["Descriptions",0,$],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let r={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 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var o=e.i(9583),l=n.forwardRef(function(e,l){return n.createElement(o.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["ExclamationCircleOutlined",0,l],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),r=e.i(529681),o=e.i(242064),l=e.i(517455),i=e.i(185793),a=e.i(721369),s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let c=e=>{var{prefixCls:r,className:l,hoverable:i=!0}=e,a=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=t.useContext(o.ConfigContext),d=c("card",r),u=(0,n.default)(`${d}-grid`,l,{[`${d}-grid-hoverable`]:i});return t.createElement("div",Object.assign({},a,{className:u}))};e.i(296059);var d=e.i(915654),u=e.i(183293),b=e.i(246422),p=e.i(838378);let g=(0,b.genStyleHooks)("Card",e=>{let t=(0,p.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:o,boxShadowTertiary:l,bodyPadding:i,extraColor:a}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:l},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:o,tabsMarginBottom:l}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:`0 ${(0,d.unit)(o)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[` - > ${n}-typography, - > ${n}-typography-edit-content - `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:l,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:a,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:i,borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` - ${(0,d.unit)(o)} 0 0 0 ${n}, - 0 ${(0,d.unit)(o)} 0 0 ${n}, - ${(0,d.unit)(o)} ${(0,d.unit)(o)} 0 0 ${n}, - ${(0,d.unit)(o)} 0 0 0 ${n} inset, - 0 ${(0,d.unit)(o)} 0 0 ${n} inset; - `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:o,colorBorderSecondary:l,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${l}`,display:"flex",borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,d.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:o,lineHeight:(0,d.unit)(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${l}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,d.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${o}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:o}=e;return{[`${t}-head`]:{padding:`0 ${(0,d.unit)(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,d.unit)(e.padding)} ${(0,d.unit)(o)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:o,headerFontSizeSM:l}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:o,padding:`0 ${(0,d.unit)(r)}`,fontSize:l,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var f=e.i(792812),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let y=e=>{let{actionClasses:n,actions:r=[],actionStyle:o}=e;return t.createElement("ul",{className:n,style:o},r.map((e,n)=>{let o=`action-${n}`;return t.createElement("li",{style:{width:`${100/r.length}%`},key:o},t.createElement("span",null,e))}))},h=t.forwardRef((e,s)=>{let d,{prefixCls:u,className:b,rootClassName:p,style:h,extra:O,headStyle:v={},bodyStyle:$={},title:j,loading:x,bordered:S,variant:C,size:w,type:E,cover:P,actions:T,tabList:k,children:B,activeTabKey:z,defaultActiveTabKey:N,tabBarExtraContent:L,hoverable:R,tabProps:M={},classNames:I,styles:H}=e,G=m(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:D,card:A}=t.useContext(o.ConfigContext),[F]=(0,f.default)("card",C,S),X=e=>{var t;return(0,n.default)(null==(t=null==A?void 0:A.classNames)?void 0:t[e],null==I?void 0:I[e])},_=e=>{var t;return Object.assign(Object.assign({},null==(t=null==A?void 0:A.styles)?void 0:t[e]),null==H?void 0:H[e])},K=t.useMemo(()=>{let e=!1;return t.Children.forEach(B,t=>{(null==t?void 0:t.type)===c&&(e=!0)}),e},[B]),q=W("card",u),[Q,U,V]=g(q),J=t.createElement(i.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},B),Y=void 0!==z,Z=Object.assign(Object.assign({},M),{[Y?"activeKey":"defaultActiveKey"]:Y?z:N,tabBarExtraContent:L}),ee=(0,l.default)(w),et=ee&&"default"!==ee?ee:"large",en=k?t.createElement(a.default,Object.assign({size:et},Z,{className:`${q}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:k.map(e=>{var{tab:t}=e;return Object.assign({label:t},m(e,["tab"]))})})):null;if(j||O||en){let e=(0,n.default)(`${q}-head`,X("header")),r=(0,n.default)(`${q}-head-title`,X("title")),o=(0,n.default)(`${q}-extra`,X("extra")),l=Object.assign(Object.assign({},v),_("header"));d=t.createElement("div",{className:e,style:l},t.createElement("div",{className:`${q}-head-wrapper`},j&&t.createElement("div",{className:r,style:_("title")},j),O&&t.createElement("div",{className:o,style:_("extra")},O)),en)}let er=(0,n.default)(`${q}-cover`,X("cover")),eo=P?t.createElement("div",{className:er,style:_("cover")},P):null,el=(0,n.default)(`${q}-body`,X("body")),ei=Object.assign(Object.assign({},$),_("body")),ea=t.createElement("div",{className:el,style:ei},x?J:B),es=(0,n.default)(`${q}-actions`,X("actions")),ec=(null==T?void 0:T.length)?t.createElement(y,{actionClasses:es,actionStyle:_("actions"),actions:T}):null,ed=(0,r.default)(G,["onTabChange"]),eu=(0,n.default)(q,null==A?void 0:A.className,{[`${q}-loading`]:x,[`${q}-bordered`]:"borderless"!==F,[`${q}-hoverable`]:R,[`${q}-contain-grid`]:K,[`${q}-contain-tabs`]:null==k?void 0:k.length,[`${q}-${ee}`]:ee,[`${q}-type-${E}`]:!!E,[`${q}-rtl`]:"rtl"===D},b,p,U,V),eb=Object.assign(Object.assign({},null==A?void 0:A.style),h);return Q(t.createElement("div",Object.assign({ref:s},ed,{className:eu,style:eb}),d,eo,ea,ec))});var O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};h.Grid=c,h.Meta=e=>{let{prefixCls:r,className:l,avatar:i,title:a,description:s}=e,c=O(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=t.useContext(o.ConfigContext),u=d("card",r),b=(0,n.default)(`${u}-meta`,l),p=i?t.createElement("div",{className:`${u}-meta-avatar`},i):null,g=a?t.createElement("div",{className:`${u}-meta-title`},a):null,f=s?t.createElement("div",{className:`${u}-meta-description`},s):null,m=g||f?t.createElement("div",{className:`${u}-meta-detail`},g,f):null;return t.createElement("div",Object.assign({},c,{className:b}),p,m)},e.s(["Card",0,h],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),n=e.i(560445),r=e.i(175712),o=e.i(869216),l=e.i(311451),i=e.i(212931),a=e.i(898586);e.i(296059);var s=e.i(868297),c=e.i(732961),d=e.i(289882),u=e.i(170517),b=e.i(628882),p=e.i(320890),g=e.i(104458),f=e.i(722319),m=e.i(8398),y=e.i(279728);e.i(765846);var h=e.i(602716),O=e.i(328052);e.i(262370);var v=e.i(135551);let $=(e,t)=>new v.FastColor(e).setA(t).toRgbString(),j=(e,t)=>new v.FastColor(e).lighten(t).toHexString(),x=e=>{let t=(0,h.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},S=(e,t)=>{let n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:$(r,.85),colorTextSecondary:$(r,.65),colorTextTertiary:$(r,.45),colorTextQuaternary:$(r,.25),colorFill:$(r,.18),colorFillSecondary:$(r,.12),colorFillTertiary:$(r,.08),colorFillQuaternary:$(r,.04),colorBgSolid:$(r,.95),colorBgSolidHover:$(r,1),colorBgSolidActive:$(r,.9),colorBgElevated:j(n,12),colorBgContainer:j(n,8),colorBgLayout:j(n,0),colorBgSpotlight:j(n,26),colorBgBlur:$(r,.04),colorBorder:j(n,26),colorBorderSecondary:j(n,19)}},C={defaultSeed:p.defaultConfig.token,useToken:function(){let[e,t,n]=(0,g.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:f.default,darkAlgorithm:(e,t)=>{let n=Object.keys(u.defaultPresetColors).map(t=>{let n=(0,h.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,r,o)=>(e[`${t}-${o+1}`]=n[o],e[`${t}${o+1}`]=n[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),r=null!=t?t:(0,f.default)(e),o=(0,O.default)(e,{generateColorPalettes:x,generateNeutralColorPalettes:S});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),o),{colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,f.default)(e),r=n.fontSizeSM,o=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}(null!=t?t:e)),(0,y.default)(r)),{controlHeight:o}),(0,m.default)(Object.assign(Object.assign({},n),{controlHeight:o})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):d.default,n=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,c.getComputedToken)(n,{override:null==e?void 0:e.token},t,b.default)},defaultConfig:p.defaultConfig,_internalContext:p.DesignTokenContext};e.s(["theme",0,C],368869);var w=e.i(270377),E=e.i(271645);function P({isOpen:e,title:s,alertMessage:c,message:d,resourceInformationTitle:u,resourceInformation:b,onCancel:p,onOk:g,confirmLoading:f,requiredConfirmation:m}){let{Title:y,Text:h}=a.Typography,{token:O}=C.useToken(),[v,$]=(0,E.useState)("");return(0,E.useEffect)(()=>{e&&$("")},[e]),(0,t.jsx)(i.Modal,{title:s,open:e,onOk:g,onCancel:p,confirmLoading:f,okText:f?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!m&&v!==m||f},cancelButtonProps:{disabled:f},children:(0,t.jsxs)("div",{className:"space-y-4",children:[c&&(0,t.jsx)(n.Alert,{message:c,type:"warning"}),(0,t.jsx)(r.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:O.colorErrorBg,borderColor:O.colorErrorBorder}},style:{backgroundColor:O.colorErrorBg,borderColor:O.colorErrorBorder},children:(0,t.jsx)(o.Descriptions,{column:1,size:"small",children:b&&b.map(({label:e,value:n,...r})=>(0,t.jsx)(o.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(h,{...r,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(h,{children:d})}),m&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(h,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(h,{children:"Type "}),(0,t.jsx)(h,{strong:!0,type:"danger",children:m}),(0,t.jsx)(h,{children:" to confirm deletion:"})]}),(0,t.jsx)(l.Input,{value:v,onChange:e=>$(e.target.value),placeholder:m,className:"rounded-md",prefix:(0,t.jsx)(w.ExclamationCircleOutlined,{style:{color:O.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>P],127952)},292639,e=>{"use strict";var t=e.i(764205),n=e.i(266027);let r=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,n.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},743151,(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var o=a(e.r(271645)),l=a(e.r(844343)),i=["text","onCopy","options","children"];function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,i),r=o.default.Children.only(t);return o.default.cloneElement(r,c(c({},n),{},{onClick:this.onClick}))}}],function(e,t){for(var n=0;n{"use strict";var r=e.r(743151).CopyToClipboard;r.CopyToClipboard=r,t.exports=r}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5855ff7033bd4d2e.js b/litellm/proxy/_experimental/out/_next/static/chunks/db0ac43a898048e2.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/5855ff7033bd4d2e.js rename to litellm/proxy/_experimental/out/_next/static/chunks/db0ac43a898048e2.js index 99d1b43a663..d88ad8c1d56 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5855ff7033bd4d2e.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/db0ac43a898048e2.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,475647,286536,77705,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"};var i=e.i(9583),l=s.forwardRef(function(e,l){return s.createElement(i.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["PlusCircleOutlined",0,l],475647);var a=e.i(475254);let n=(0,a.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>n],286536);let o=(0,a.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>o],77705)},366283,e=>{"use strict";var t=e.i(290571),s=e.i(271645),r=e.i(95779),i=e.i(444755),l=e.i(673706);let a=(0,l.makeClassName)("Callout"),n=s.default.forwardRef((e,n)=>{let{title:o,icon:c,color:d,className:u,children:p}=e,m=(0,t.__rest)(e,["title","icon","color","className","children"]);return s.default.createElement("div",Object.assign({ref:n,className:(0,i.tremorTwMerge)(a("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",d?(0,i.tremorTwMerge)((0,l.getColorClassNames)(d,r.colorPalette.background).bgColor,(0,l.getColorClassNames)(d,r.colorPalette.darkBorder).borderColor,(0,l.getColorClassNames)(d,r.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,i.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},m),s.default.createElement("div",{className:(0,i.tremorTwMerge)(a("header"),"flex items-start")},c?s.default.createElement(c,{className:(0,i.tremorTwMerge)(a("icon"),"flex-none h-5 w-5 mr-1.5")}):null,s.default.createElement("h4",{className:(0,i.tremorTwMerge)(a("title"),"font-semibold")},o)),s.default.createElement("p",{className:(0,i.tremorTwMerge)(a("body"),"overflow-y-auto",p?"mt-2":"")},p))});n.displayName="Callout",e.s(["Callout",()=>n],366283)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",()=>t],727612)},105278,e=>{"use strict";var t=e.i(843476),s=e.i(135214),r=e.i(994388),i=e.i(366283),l=e.i(304967),a=e.i(269200),n=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),p=e.i(560445),m=e.i(464571),g=e.i(808613),h=e.i(311451),_=e.i(212931),x=e.i(770914),f=e.i(653496),y=e.i(898586),j=e.i(271645),v=e.i(844444),S=e.i(700514),b=e.i(727749),I=e.i(764205),C=e.i(629569),w=e.i(599724),T=e.i(350967),k=e.i(779241),E=e.i(114600),N=e.i(237016),O=e.i(596239),F=e.i(438957),A=e.i(166406),M=e.i(270377),P=e.i(475647),B=e.i(190702);let U=({accessToken:e,userID:s,proxySettings:a})=>{let[n]=g.Form.useForm(),[o,c]=(0,j.useState)(!1),[d,u]=(0,j.useState)(null),[p,m]=(0,j.useState)("");(0,j.useEffect)(()=>{let e="";m(e=a&&a.PROXY_BASE_URL&&void 0!==a.PROXY_BASE_URL?a.PROXY_BASE_URL:window.location.origin)},[a]);let h=`${p}/scim/v2`,_=async t=>{if(!e||!s)return void b.default.fromBackend("You need to be logged in to create a SCIM token");try{c(!0);let r={key_alias:t.key_alias||"SCIM Access Token",team_id:null,models:[],allowed_routes:["/scim/*"]},i=await (0,I.keyCreateCall)(e,s,r);u(i),b.default.success("SCIM token created successfully")}catch(e){console.error("Error creating SCIM token:",e),b.default.fromBackend("Failed to create SCIM token: "+(0,B.parseErrorMessage)(e))}finally{c(!1)}};return(0,t.jsx)(T.Grid,{numItems:1,children:(0,t.jsxs)(l.Card,{children:[(0,t.jsx)("div",{className:"flex items-center mb-4",children:(0,t.jsx)(C.Title,{children:"SCIM Configuration"})}),(0,t.jsx)(w.Text,{className:"text-gray-600",children:"System for Cross-domain Identity Management (SCIM) allows you to automatically provision and manage users and groups in LiteLLM."}),(0,t.jsx)(E.Divider,{}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"1"}),(0,t.jsxs)(C.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(O.LinkOutlined,{className:"h-5 w-5 mr-2"}),"SCIM Tenant URL"]})]}),(0,t.jsx)(w.Text,{className:"text-gray-600 mb-3",children:"Use this URL in your identity provider SCIM integration settings."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:h,disabled:!0,className:"flex-grow"}),(0,t.jsx)(N.CopyToClipboard,{text:h,onCopy:()=>b.default.success("URL copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"ml-2 flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"2"}),(0,t.jsxs)(C.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-5 w-5 mr-2"}),"Authentication Token"]})]}),(0,t.jsx)(i.Callout,{title:"Using SCIM",color:"blue",className:"mb-4",children:"You need a SCIM token to authenticate with the SCIM API. Create one below and use it in your SCIM provider configuration."}),d?(0,t.jsxs)(l.Card,{className:"border border-yellow-300 bg-yellow-50",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-yellow-800",children:[(0,t.jsx)(M.ExclamationCircleOutlined,{className:"h-5 w-5 mr-2"}),(0,t.jsx)(C.Title,{className:"text-lg text-yellow-800",children:"Your SCIM Token"})]}),(0,t.jsx)(w.Text,{className:"text-yellow-800 mb-4 font-medium",children:"Make sure to copy this token now. You will not be able to see it again."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:d.key,className:"flex-grow mr-2 bg-white",type:"password",disabled:!0}),(0,t.jsx)(N.CopyToClipboard,{text:d.key,onCopy:()=>b.default.success("Token copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]}),(0,t.jsxs)(r.Button,{className:"mt-4 flex items-center",variant:"secondary",onClick:()=>u(null),children:[(0,t.jsx)(P.PlusCircleOutlined,{className:"h-4 w-4 mr-1"}),"Create Another Token"]})]}):(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsxs)(g.Form,{form:n,onFinish:_,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{name:"key_alias",label:"Token Name",rules:[{required:!0,message:"Please enter a name for your token"}],children:(0,t.jsx)(k.TextInput,{placeholder:"SCIM Access Token"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsxs)(r.Button,{variant:"primary",type:"submit",loading:o,className:"flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-4 w-4 mr-1"}),"Create SCIM Token"]})})]})})]})]})]})})};var R=e.i(266027),z=e.i(243652);let D=(0,z.createQueryKeys)("sso"),L=()=>{let{accessToken:e,userId:t,userRole:r}=(0,s.default)();return(0,R.useQuery)({queryKey:D.detail("settings"),queryFn:async()=>await (0,I.getSSOSettings)(e),enabled:!!(e&&t&&r)})};var V=e.i(175712),G=e.i(869216),q=e.i(262218),H=e.i(688511),$=e.i(98919),K=e.i(727612);let Q={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},W={google:"Google SSO",microsoft:"Microsoft SSO",okta:"Okta / Auth0 SSO",generic:"Generic SSO"},Y={internal_user_viewer:"Internal Viewer",internal_user:"Internal User",proxy_admin_viewer:"Proxy Admin Viewer",proxy_admin:"Proxy Admin"};var J=e.i(536916),Z=e.i(199133);let X={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},ee=({form:e,onFormSubmit:s})=>(0,t.jsx)("div",{children:(0,t.jsxs)(g.Form,{form:e,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(Z.Select,{children:Object.entries(Q).map(([e,s])=>(0,t.jsx)(Z.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsx)("span",{children:W[e]||e.charAt(0).toUpperCase()+e.slice(1)+" SSO"})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=X[r])?s.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(h.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(Z.Select,{children:[(0,t.jsx)(Z.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Team Mappings",name:"use_team_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_team_mappings!==t.use_team_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_team_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(g.Form.Item,{label:"Team IDs JWT Field",name:"team_ids_jwt_field",rules:[{required:!0,message:"Please enter the team IDs JWT field"}],children:(0,t.jsx)(k.TextInput,{})}):null}})]})});var et=e.i(954616);let es=()=>{let{accessToken:e}=(0,s.default)();return(0,et.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await (0,I.updateSSOSettings)(e,t)}})},er=e=>{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:i,default_role:l,group_claim:a,use_role_mappings:n,use_team_mappings:o,team_ids_jwt_field:c,...d}=e,u={...d},p=d.sso_provider;if(n&&("okta"===p||"generic"===p)){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:a,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[l]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(i)}}}return o&&("okta"===p||"generic"===p)&&(u.team_mappings={team_ids_jwt_field:c}),u},ei=e=>e.google_client_id?"google":e.microsoft_client_id?"microsoft":e.generic_client_id?e.generic_authorization_endpoint?.includes("okta")||e.generic_authorization_endpoint?.includes("auth0")?"okta":"generic":null,el=({isVisible:e,onCancel:s,onSuccess:r})=>{let[i]=g.Form.useForm(),{mutateAsync:l,isPending:a}=es(),n=async e=>{let t=er(e);await l(t,{onSuccess:()=>{b.default.success("SSO settings added successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})},o=()=>{i.resetFields(),s()};return(0,t.jsx)(_.Modal,{title:"Add SSO",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:o,disabled:a,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:a,onClick:()=>i.submit(),children:a?"Adding...":"Add SSO"})]}),onCancel:o,children:(0,t.jsx)(ee,{form:i,onFormSubmit:n})})};var ea=e.i(127952);let en=({isVisible:e,onCancel:s,onSuccess:r})=>{let{data:i}=L(),{mutateAsync:l,isPending:a}=es(),n=async()=>{await l({google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null,team_mappings:null},{onSuccess:()=>{b.default.success("SSO settings cleared successfully"),s(),r()},onError:e=>{b.default.fromBackend("Failed to clear SSO settings: "+(0,B.parseErrorMessage)(e))}})};return(0,t.jsx)(ea.default,{isOpen:e,title:"Confirm Clear SSO Settings",alertMessage:"This action cannot be undone.",message:"Are you sure you want to clear all SSO settings? Users will no longer be able to login using SSO after this change.",resourceInformationTitle:"SSO Settings",resourceInformation:[{label:"Provider",value:i?.values&&ei(i?.values)||"Generic"}],onCancel:s,onOk:n,confirmLoading:a})},eo=({isVisible:e,onCancel:s,onSuccess:r})=>{let[i]=g.Form.useForm(),l=L(),{mutateAsync:a,isPending:n}=es();(0,j.useEffect)(()=>{if(e&&l.data&&l.data.values){let e=l.data;console.log("Raw SSO data received:",e),console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={};e.values.team_mappings&&(r={use_team_mappings:!0,team_ids_jwt_field:e.values.team_mappings.team_ids_jwt_field});let a={sso_provider:t,...e.values,...s,...r};console.log("Setting form values:",a),i.resetFields(),setTimeout(()=>{i.setFieldsValue(a),console.log("Form values set, current form values:",i.getFieldsValue())},100)}},[e,l.data,i]);let o=async e=>{try{let t=er(e);await a(t,{onSuccess:()=>{b.default.success("SSO settings updated successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})}catch(e){b.default.fromBackend("Failed to process SSO settings: "+(0,B.parseErrorMessage)(e))}},c=()=>{i.resetFields(),s()};return(0,t.jsx)(_.Modal,{title:"Edit SSO Settings",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:c,disabled:n,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:n,onClick:()=>i.submit(),children:n?"Saving...":"Save"})]}),onCancel:c,children:(0,t.jsx)(ee,{form:i,onFormSubmit:o})})};var ec=e.i(286536),ed=e.i(77705);function eu({defaultHidden:e=!0,value:s}){let[r,i]=(0,j.useState)(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-gray-600 flex-1",children:s?r?"•".repeat(s.length):s:(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})}),s&&(0,t.jsx)(m.Button,{type:"text",size:"small",icon:r?(0,t.jsx)(ec.Eye,{className:"w-4 h-4"}):(0,t.jsx)(ed.EyeOff,{className:"w-4 h-4"}),onClick:()=>i(!r),className:"text-gray-400 hover:text-gray-600"})]})}var ep=e.i(312361),em=e.i(291542),eg=e.i(761911);let{Title:eh,Text:e_}=y.Typography;function ex({roleMappings:e}){if(!e)return null;let s=[{title:"Role",dataIndex:"role",key:"role",render:e=>(0,t.jsx)(e_,{strong:!0,children:Y[e]})},{title:"Mapped Groups",dataIndex:"groups",key:"groups",render:e=>(0,t.jsx)(t.Fragment,{children:e.length>0?e.map((e,s)=>(0,t.jsx)(q.Tag,{color:"blue",children:e},s)):(0,t.jsx)(e_,{className:"text-gray-400 italic",children:"No groups mapped"})})}];return(0,t.jsxs)(V.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eg.Users,{className:"w-6 h-6 text-gray-400 mb-2"}),(0,t.jsx)(eh,{level:3,children:"Role Mappings"})]}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eh,{level:5,children:"Group Claim"}),(0,t.jsx)("div",{children:(0,t.jsx)(e_,{code:!0,children:e.group_claim})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eh,{level:5,children:"Default Role"}),(0,t.jsx)("div",{children:(0,t.jsx)(e_,{strong:!0,children:Y[e.default_role]})})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(em.Table,{columns:s,dataSource:Object.entries(e.roles).map(([e,t])=>({role:e,groups:t})),pagination:!1,bordered:!0,size:"small",className:"w-full"})]})]})}var ef=e.i(21548);let{Title:ey,Paragraph:ej}=y.Typography;function ev({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ef.Empty,{image:ef.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ey,{level:4,children:"No SSO Configuration Found"}),(0,t.jsx)(ej,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Single Sign-On (SSO) to enable seamless authentication for your team members using your identity provider."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure SSO"})})})}var eS=e.i(981339);let{Title:eb,Text:eI}=y.Typography;function eC(){return(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)($.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eb,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eI,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eS.Skeleton.Button,{active:!0,size:"default",style:{width:170,height:32}}),(0,t.jsx)(eS.Skeleton.Button,{active:!0,size:"default",style:{width:190,height:32}})]})]}),(0,t.jsxs)(G.Descriptions,{bordered:!0,...{column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},children:[(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:100,height:16}})})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:200,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:250,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:180,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:220,height:16}})})]})]})})}let{Title:ew,Text:eT}=y.Typography;function ek(){let{data:e,refetch:s,isLoading:r}=L(),[i,l]=(0,j.useState)(!1),[a,n]=(0,j.useState)(!1),[o,c]=(0,j.useState)(!1),d=!!e?.values.google_client_id||!!e?.values.microsoft_client_id||!!e?.values.generic_client_id,u=e?.values?ei(e.values):null,p=!!e?.values.role_mappings,g=!!e?.values.team_mappings,h=e=>(0,t.jsx)(eT,{className:"font-mono text-gray-600 text-sm",copyable:!!e,children:e||"-"}),_=e=>e||(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),f=e=>e.team_mappings?.team_ids_jwt_field?(0,t.jsx)(q.Tag,{children:e.team_mappings.team_ids_jwt_field}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),y={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},v={google:{providerText:W.google,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.google_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.google_client_secret})},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},microsoft:{providerText:W.microsoft,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.microsoft_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.microsoft_client_secret})},{label:"Tenant",render:e=>_(e.microsoft_tenant)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},okta:{providerText:W.okta,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>h(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>h(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>h(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]},generic:{providerText:W.generic,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>h(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>h(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>h(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]}};return(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(eC,{}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)($.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(ew,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eT,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(H.Edit,{className:"w-4 h-4"}),onClick:()=>c(!0),children:"Edit SSO Settings"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)(K.Trash2,{className:"w-4 h-4"}),onClick:()=>l(!0),children:"Delete SSO Settings"})]})})]}),d?(()=>{if(!e?.values||!u)return null;let{values:s}=e,r=v[u];return r?(0,t.jsxs)(G.Descriptions,{bordered:!0,...y,children:[(0,t.jsx)(G.Descriptions.Item,{label:"Provider",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Q[u]&&(0,t.jsx)("img",{src:Q[u],alt:u,style:{height:24,width:24,objectFit:"contain"}}),(0,t.jsx)("span",{children:r.providerText})]})}),r.fields.map((e,r)=>e&&(0,t.jsx)(G.Descriptions.Item,{label:e.label,children:e.render(s)},r))]}):null})():(0,t.jsx)(ev,{onAdd:()=>n(!0)})]})}),p&&(0,t.jsx)(ex,{roleMappings:e?.values.role_mappings})]}),(0,t.jsx)(en,{isVisible:i,onCancel:()=>l(!1),onSuccess:()=>s()}),(0,t.jsx)(el,{isVisible:a,onCancel:()=>n(!1),onSuccess:()=>{n(!1),s()}}),(0,t.jsx)(eo,{isVisible:o,onCancel:()=>c(!1),onSuccess:()=>{c(!1),s()}})]})}var eE=e.i(292639),eN=e.i(912598);let eO=(0,z.createQueryKeys)("uiSettings");var eF=e.i(111672);let eA={"api-keys":"Manage virtual keys for API access and authentication","llm-playground":"Interactive playground for testing LLM requests",models:"Configure and manage LLM models and endpoints",agents:"Create and manage AI agents","mcp-servers":"Configure Model Context Protocol servers",guardrails:"Set up content moderation and safety guardrails",policies:"Define access control and usage policies","search-tools":"Configure RAG search and retrieval tools","tool-policies":"Configure tool use policies and permissions","vector-stores":"Manage vector databases for embeddings",new_usage:"View usage analytics and metrics",logs:"Access request and response logs","guardrails-monitor":"Monitor guardrail performance and view logs",users:"Manage internal user accounts and permissions",teams:"Create and manage teams for access control",organizations:"Manage organizations and their members",projects:"Manage projects within teams","access-groups":"Manage access groups for role-based permissions",budgets:"Set and monitor spending budgets","api-reference":"Browse API documentation and endpoints","model-hub-table":"Explore available AI models and providers","learning-resources":"Access tutorials and documentation",caching:"Configure response caching settings","transform-request":"Set up request transformation rules","cost-tracking":"Track and analyze API costs","ui-theme":"Customize dashboard appearance","tag-management":"Organize resources with tags",prompts:"Manage and version prompt templates","claude-code-plugins":"Configure Claude Code plugins",usage:"View legacy usage dashboard","router-settings":"Configure routing and load balancing settings","logging-and-alerts":"Set up logging and alert configurations","admin-panel":"Access admin panel and settings"};var eM=e.i(708347);let eP=e=>!e||0===e.length||e.some(e=>eM.internalUserRoles.includes(e));var eB=e.i(362024);function eU({enabledPagesInternalUsers:e,enabledPagesPropertyDescription:s,isUpdating:r,onUpdate:i}){let l=null!=e,a=(0,j.useMemo)(()=>{let e;return e=[],eF.menuGroups.forEach(t=>{t.items.forEach(s=>{if(s.page&&"tools"!==s.page&&"experimental"!==s.page&&"settings"!==s.page&&eP(s.roles)){let r="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:r,group:t.groupLabel,description:eA[s.page]||"No description available"})}if(s.children){let r="string"==typeof s.label?s.label:s.key;s.children.forEach(s=>{if(eP(s.roles)){let i="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:i,group:`${t.groupLabel} > ${r}`,description:eA[s.page]||"No description available"})}})}})}),e},[]),n=(0,j.useMemo)(()=>{let e={};return a.forEach(t=>{e[t.group]||(e[t.group]=[]),e[t.group].push(t)}),e},[a]),[o,c]=(0,j.useState)(e||[]);return(0,j.useMemo)(()=>{e?c(e):c([])},[e]),(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsxs)(x.Space,{align:"center",children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Internal User Page Visibility"}),!l&&(0,t.jsx)(q.Tag,{color:"default",style:{marginLeft:"8px"},children:"Not set (all pages visible)"}),l&&(0,t.jsxs)(q.Tag,{color:"blue",style:{marginLeft:"8px"},children:[o.length," page",1!==o.length?"s":""," selected"]})]}),s&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:s}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"By default, all pages are visible to internal users. Select specific pages to restrict visibility."}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",color:"#8b5cf6"},children:"Note: Only pages accessible to internal user roles are shown here. Admin-only pages are excluded as they cannot be made visible to internal users regardless of this setting."})]}),(0,t.jsx)(eB.Collapse,{items:[{key:"page-visibility",label:"Configure Page Visibility",children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(J.Checkbox.Group,{value:o,onChange:c,style:{width:"100%"},children:(0,t.jsx)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:Object.entries(n).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,style:{fontSize:"11px",color:"#6b7280",letterSpacing:"0.05em",display:"block",marginBottom:"8px"},children:e}),(0,t.jsx)(x.Space,{direction:"vertical",size:"small",style:{marginLeft:"16px",width:"100%"},children:s.map(e=>(0,t.jsx)("div",{style:{marginBottom:"4px"},children:(0,t.jsx)(J.Checkbox,{value:e.page,children:(0,t.jsxs)(x.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(y.Typography.Text,{children:e.label}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px"},children:e.description})]})})},e.page))})]},e))})}),(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{type:"primary",onClick:()=>{i({enabled_ui_pages_internal_users:o.length>0?o:null})},loading:r,disabled:r,children:"Save Page Visibility Settings"}),l&&(0,t.jsx)(m.Button,{onClick:()=>{c([]),i({enabled_ui_pages_internal_users:null})},loading:r,disabled:r,children:"Reset to Default (All Pages)"})]})]})}]})]})}var eR=e.i(790848);function ez(){let e,{accessToken:r}=(0,s.default)(),{data:i,isLoading:l,isError:a,error:n}=(0,eE.useUISettings)(),{mutate:o,isPending:c,error:d}=(e=(0,eN.useQueryClient)(),(0,et.useMutation)({mutationFn:async e=>{if(!r)throw Error("Access token is required");return(0,I.updateUiSettings)(r,e)},onSuccess:()=>{e.invalidateQueries({queryKey:eO.all})}})),u=i?.field_schema,m=u?.properties?.disable_model_add_for_internal_users,g=u?.properties?.disable_team_admin_delete_team_user,h=u?.properties?.require_auth_for_public_ai_hub,_=u?.properties?.forward_client_headers_to_llm_api,f=u?.properties?.enable_projects_ui,j=u?.properties?.enabled_ui_pages_internal_users,v=u?.properties?.disable_agents_for_internal_users,S=u?.properties?.allow_agents_for_team_admins,C=u?.properties?.disable_vector_stores_for_internal_users,w=u?.properties?.allow_vector_stores_for_team_admins,T=u?.properties?.scope_user_search_to_org,k=u?.properties?.disable_custom_api_keys,E=i?.values??{},N=!!E.disable_model_add_for_internal_users,O=!!E.disable_team_admin_delete_team_user,F=!!E.disable_agents_for_internal_users,A=!!E.disable_vector_stores_for_internal_users;return(0,t.jsx)(V.Card,{title:"UI Settings",children:l?(0,t.jsx)(eS.Skeleton,{active:!0}):a?(0,t.jsx)(p.Alert,{type:"error",message:"Could not load UI settings",description:n instanceof Error?n.message:void 0}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[u?.description&&(0,t.jsx)(y.Typography.Paragraph,{style:{marginBottom:0},children:u.description}),d&&(0,t.jsx)(p.Alert,{type:"error",message:"Could not update UI settings",description:d instanceof Error?d.message:void 0}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:N,disabled:c,loading:c,onChange:e=>{o({disable_model_add_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":m?.description??"Disable model add for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable model add for internal users"}),m?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:m.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:O,disabled:c,loading:c,onChange:e=>{o({disable_team_admin_delete_team_user:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":g?.description??"Disable team admin delete team user"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable team admin delete team user"}),g?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:g.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:E.require_auth_for_public_ai_hub,disabled:c,loading:c,onChange:e=>{o({require_auth_for_public_ai_hub:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":h?.description??"Require authentication for public AI Hub"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Require authentication for public AI Hub"}),h?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:h.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:!!E.forward_client_headers_to_llm_api,disabled:c,loading:c,onChange:e=>{o({forward_client_headers_to_llm_api:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":_?.description??"Forward client headers to LLM API"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward client headers to LLM API"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:_?.description??"If enabled, forwards client headers (e.g. Authorization) to the LLM API. Required for Claude Code with Max subscription."})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:!!E.enable_projects_ui,disabled:c,loading:c,onChange:e=>{o({enable_projects_ui:e},{onSuccess:()=>{b.default.success("UI settings updated successfully. Refreshing page..."),setTimeout(()=>window.location.reload(),1e3)},onError:e=>{b.default.fromBackend(e)}})},"aria-label":f?.description??"Enable Projects UI"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"[BETA] Enable Projects (page will refresh)"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:f?.description??"If enabled, shows the Projects feature in the UI sidebar and the project field in key management."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:F,disabled:c,loading:c,onChange:e=>{o({disable_agents_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":v?.description??"Disable agents for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable agents for internal users"}),v?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:v.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(eR.Switch,{checked:!!E.allow_agents_for_team_admins,disabled:c||!F,loading:c,onChange:e=>{o({allow_agents_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":S?.description??"Allow agents for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:F?void 0:"secondary",children:"Allow agents for team admins"}),S?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:S.description})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:A,disabled:c,loading:c,onChange:e=>{o({disable_vector_stores_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":C?.description??"Disable vector stores for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable vector stores for internal users"}),C?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:C.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(eR.Switch,{checked:!!E.allow_vector_stores_for_team_admins,disabled:c||!A,loading:c,onChange:e=>{o({allow_vector_stores_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":w?.description??"Allow vector stores for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:A?void 0:"secondary",children:"Allow vector stores for team admins"}),w?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:w.description})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:!!E.scope_user_search_to_org,disabled:c,loading:c,onChange:e=>{o({scope_user_search_to_org:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":T?.description??"Scope user search to organization"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Scope user search to organization"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:T?.description??"If enabled, the user search endpoint restricts results by organization. When off, any authenticated user can search all users."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:!!E.disable_custom_api_keys,disabled:c,loading:c,onChange:e=>{o({disable_custom_api_keys:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":k?.description??"Disable custom Virtual key values"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable custom Virtual key values"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:k?.description??"If true, users cannot specify custom key values. All keys must be auto-generated."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(eU,{enabledPagesInternalUsers:E.enabled_ui_pages_internal_users,enabledPagesPropertyDescription:j?.description,isUpdating:c,onUpdate:e=>{o(e,{onSuccess:()=>{b.default.success("Page visibility settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})}})]})})}let eD=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"GET",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eL=async(e,t)=>{let s=(0,I.getProxyBaseUrl)(),r=s?`${s}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",i=await fetch(r,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){let e=await i.json();throw Error((0,I.deriveErrorMessage)(e))}return await i.json()},eV=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"DELETE",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eG=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault/test_connection`:"/config_overrides/hashicorp_vault/test_connection",r=await fetch(s,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eq=(0,z.createQueryKeys)("hashicorpVaultConfig"),eH=()=>{let{accessToken:e}=(0,s.default)();return(0,R.useQuery)({queryKey:eq.list({}),queryFn:async()=>{if(!e)throw Error("Access token is required");return eD(e)},enabled:!!e,staleTime:36e5,gcTime:36e5})},e$=e=>{let t=(0,eN.useQueryClient)();return(0,et.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return eL(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:eq.all})}})};var eK=e.i(525720),eQ=e.i(475254);let eW=(0,eQ.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),eY=(0,eQ.default)("plug-zap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]),eJ=new Set(["vault_token","approle_secret_id","client_key"]),eZ={vault_addr:"Vault Address",vault_namespace:"Namespace",vault_mount_name:"KV Mount Name",vault_path_prefix:"Path Prefix",vault_token:"Token",approle_role_id:"Role ID",approle_secret_id:"Secret ID",approle_mount_path:"Mount Path",client_cert:"Client Certificate",client_key:"Client Key",vault_cert_role:"Certificate Role"},eX=[{title:"Connection",fields:["vault_addr","vault_namespace","vault_mount_name","vault_path_prefix"]},{title:"Token Authentication",subtitle:"Use a Vault token to authenticate. Only one auth method is required.",fields:["vault_token"]},{title:"AppRole Authentication",subtitle:"Use AppRole credentials to authenticate. Only one auth method is required.",fields:["approle_role_id","approle_secret_id","approle_mount_path"]},{title:"TLS",subtitle:"Optional client certificate for mTLS.",fields:["client_cert","client_key","vault_cert_role"]}],e0=({isVisible:e,onCancel:r,onSuccess:i})=>{let[l]=g.Form.useForm(),{accessToken:a}=(0,s.default)(),{data:n}=eH(),{mutate:o,isPending:c}=e$(a),d=n?.field_schema,u=d?.properties??{},p=n?.values??{};(0,j.useEffect)(()=>{if(e&&n){l.resetFields();let e={};for(let[t,s]of Object.entries(p))eJ.has(t)||(e[t]=s);l.setFieldsValue(e)}},[e,n,l]);let f=()=>{l.resetFields(),r()},v=e=>{let s=u[e];if(!s)return null;let r="vault_addr"===e?[{pattern:/^https?:\/\/.+/,message:"Must start with http:// or https://"}]:void 0,i=eJ.has(e),l=p[e],a=i&&null!=l&&""!==l?`Leave blank to keep existing (${l})`:s?.description;return(0,t.jsx)(g.Form.Item,{name:e,label:eZ[e]??e,rules:r,children:i?(0,t.jsx)(h.Input.Password,{placeholder:a}):(0,t.jsx)(h.Input,{placeholder:s?.description})},e)};return(0,t.jsx)(_.Modal,{title:"Edit Hashicorp Vault Configuration",open:e,width:700,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:f,disabled:c,children:"Cancel"}),(0,t.jsx)(m.Button,{type:"primary",loading:c,onClick:()=>l.submit(),children:c?"Saving...":"Save"})]}),onCancel:f,children:(0,t.jsx)(g.Form,{form:l,layout:"vertical",onFinish:e=>{let t={};for(let[s,r]of Object.entries(e))null!=r&&""!==r?t[s]=r:eJ.has(s)||(t[s]="");o(t,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration updated successfully"),i()},onError:e=>{b.default.fromBackend(e)}})},children:eX.map((e,s)=>(0,t.jsxs)("div",{children:[s>0&&(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(y.Typography.Title,{level:5,style:{marginBottom:4},children:e.title}),e.subtitle&&(0,t.jsx)(y.Typography.Paragraph,{type:"secondary",style:{marginBottom:16},children:e.subtitle}),e.fields.map(v)]},e.title))})})},{Title:e1,Paragraph:e4}=y.Typography;function e2({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ef.Empty,{image:ef.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(e1,{level:4,children:"No Vault Configuration Found"}),(0,t.jsx)(e4,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Hashicorp Vault to securely manage provider API keys and secrets for your LiteLLM deployment."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure Vault"})})})}let{Title:e6,Text:e5}=y.Typography,e7={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}};function e8(){let e,{accessToken:r}=(0,s.default)(),{data:i,isLoading:l,isError:a,error:n}=eH(),{mutate:o,isPending:c}=(e=(0,eN.useQueryClient)(),(0,et.useMutation)({mutationFn:async()=>{if(!r)throw Error("Access token is required");return eV(r)},onSuccess:()=>{e.invalidateQueries({queryKey:eq.all})}})),{mutate:d,isPending:u}=e$(r),[g,h]=(0,j.useState)(!1),[_,f]=(0,j.useState)(!1),[v,S]=(0,j.useState)(null),[I,C]=(0,j.useState)(!1),w=i?.values??{},T=!!w.vault_addr,k=async()=>{if(r){C(!0);try{let e=await eG(r);b.default.success(e.message||"Connection to Vault successful!")}catch(e){b.default.fromBackend(e)}finally{C(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(V.Card,{children:(0,t.jsx)(eS.Skeleton,{active:!0})}):a?(0,t.jsx)(V.Card,{children:(0,t.jsx)(p.Alert,{type:"error",message:"Could not load Hashicorp Vault configuration",description:n instanceof Error?n.message:void 0})}):(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)(eK.Flex,{justify:"space-between",align:"center",children:[(0,t.jsxs)(eK.Flex,{align:"center",gap:12,children:[(0,t.jsx)(eW,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(e6,{level:3,style:{marginBottom:0},children:"Hashicorp Vault"}),(0,t.jsx)(e5,{type:"secondary",children:"Manage secret manager configuration"})]})]}),(0,t.jsx)(x.Space,{children:T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(eY,{className:"w-4 h-4"}),loading:I,onClick:k,children:"Test Connection"}),(0,t.jsx)(m.Button,{icon:(0,t.jsx)(H.Edit,{className:"w-4 h-4"}),onClick:()=>h(!0),children:"Edit Configuration"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)(K.Trash2,{className:"w-4 h-4"}),onClick:()=>f(!0),children:"Delete Configuration"})]})})]}),T&&(0,t.jsx)(p.Alert,{type:"info",showIcon:!0,message:'Secrets must be stored with the field name "key"',description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e5,{code:!0,children:"vault kv put secret/SECRET_NAME key=secret_value"}),(0,t.jsx)("br",{}),(0,t.jsx)(y.Typography.Link,{href:"https://docs.litellm.ai/docs/secret_managers/hashicorp_vault",target:"_blank",children:"View documentation"})]})}),T?(()=>{let e=Object.entries(w).filter(([e,t])=>null!=t&&""!==t);return 0===e.length?null:(0,t.jsxs)(G.Descriptions,{bordered:!0,...e7,children:[(0,t.jsx)(G.Descriptions.Item,{label:"Auth Method",children:(0,t.jsx)(e5,{children:w.approle_role_id||w.approle_secret_id?"AppRole":w.client_cert&&w.client_key?"TLS Certificate":w.vault_token?"Token":"None"})}),e.map(([e])=>{let s;return(0,t.jsx)(G.Descriptions.Item,{label:eZ[e]??e,children:(s=w[e])?eJ.has(e)?(0,t.jsxs)(eK.Flex,{justify:"space-between",align:"center",children:[(0,t.jsx)(e5,{className:"font-mono text-gray-600",children:s}),(0,t.jsx)(m.Button,{type:"text",size:"small",danger:!0,icon:(0,t.jsx)(K.Trash2,{className:"w-3.5 h-3.5"}),onClick:()=>S(e)})]}):(0,t.jsx)(e5,{className:"font-mono text-gray-600",children:s}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})},e)})]})})():(0,t.jsx)(e2,{onAdd:()=>h(!0)})]})}),(0,t.jsx)(e0,{isVisible:g,onCancel:()=>h(!1),onSuccess:()=>h(!1)}),(0,t.jsx)(ea.default,{isOpen:_,title:"Delete Hashicorp Vault Configuration?",message:"Models using Vault secrets will lose access to their API keys until a new configuration is saved.",resourceInformationTitle:"Vault Configuration",resourceInformation:[{label:"Vault Address",value:w.vault_addr}],onCancel:()=>f(!1),onOk:()=>{o(void 0,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration deleted"),f(!1)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:c}),(0,t.jsx)(ea.default,{isOpen:null!==v,title:`Clear ${v?eZ[v]??v:""}?`,message:"This will remove the stored value.",resourceInformationTitle:"Field",resourceInformation:[{label:"Field",value:v?eZ[v]??v:""}],onCancel:()=>S(null),onOk:()=>{v&&d({[v]:""},{onSuccess:()=>{b.default.success(`${eZ[v]??v} cleared`),S(null)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:u})]})}let e3={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},e9={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},te=({isAddSSOModalVisible:e,isInstructionsModalVisible:s,handleAddSSOOk:r,handleAddSSOCancel:i,handleShowInstructions:l,handleInstructionsOk:a,handleInstructionsCancel:n,form:o,accessToken:c,ssoConfigured:d=!1})=>{let[u,p]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e&&c)try{let e=await (0,I.getSSOSettings)(c);if(console.log("Raw SSO data received:",e),e&&e.values){console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={sso_provider:t,proxy_base_url:e.values.proxy_base_url,user_email:e.values.user_email,...e.values,...s};console.log("Setting form values:",r),o.resetFields(),setTimeout(()=>{o.setFieldsValue(r),console.log("Form values set, current form values:",o.getFieldsValue())},100)}}catch(e){console.error("Failed to load SSO settings:",e)}})()},[e,c,o]);let x=async e=>{if(!c)return void b.default.fromBackend("No access token available");try{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:i,default_role:a,group_claim:n,use_role_mappings:o,...d}=e,u={...d};if(o){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[a]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(i)}}}await (0,I.updateSSOSettings)(c,u),l(e)}catch(e){b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}},f=async()=>{if(!c)return void b.default.fromBackend("No access token available");try{await (0,I.updateSSOSettings)(c,{google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null}),o.resetFields(),p(!1),r(),b.default.success("SSO settings cleared successfully")}catch(e){console.error("Failed to clear SSO settings:",e),b.default.fromBackend("Failed to clear SSO settings")}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Modal,{title:d?"Edit SSO Settings":"Add SSO",open:e,width:800,footer:null,onOk:r,onCancel:i,children:(0,t.jsxs)(g.Form,{form:o,onFinish:x,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(Z.Select,{children:Object.entries(e3).map(([e,s])=>(0,t.jsx)(Z.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsxs)("span",{children:["okta"===e.toLowerCase()?"Okta / Auth0":e.charAt(0).toUpperCase()+e.slice(1)," ","SSO"]})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=e9[r])?s.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(h.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(Z.Select,{children:[(0,t.jsx)(Z.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null})]}),(0,t.jsxs)("div",{style:{textAlign:"right",marginTop:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px"},children:[d&&(0,t.jsx)(m.Button,{onClick:()=>p(!0),style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#5558eb",e.currentTarget.style.borderColor="#5558eb"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1",e.currentTarget.style.borderColor="#6366f1"},children:"Clear"}),(0,t.jsx)(m.Button,{htmlType:"submit",children:"Save"})]})]})}),(0,t.jsxs)(_.Modal,{title:"Confirm Clear SSO Settings",open:u,onOk:f,onCancel:()=>p(!1),okText:"Yes, Clear",cancelText:"Cancel",okButtonProps:{danger:!0,style:{backgroundColor:"#dc2626",borderColor:"#dc2626"}},children:[(0,t.jsx)("p",{children:"Are you sure you want to clear all SSO settings? This action cannot be undone."}),(0,t.jsx)("p",{children:"Users will no longer be able to login using SSO after this change."})]}),(0,t.jsxs)(_.Modal,{title:"SSO Setup Instructions",open:s,width:800,footer:null,onOk:a,onCancel:n,children:[(0,t.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,t.jsx)(w.Text,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,t.jsx)(w.Text,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,t.jsx)(w.Text,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,t.jsx)(w.Text,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(m.Button,{onClick:a,children:"Done"})})]})]})},tt=({accessToken:e,onSuccess:s})=>{let[r]=g.Form.useForm(),[i,l]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e)try{let t=await (0,I.getSSOSettings)(e);if(t&&t.values){let e=t.values.ui_access_mode,s={};e&&"object"==typeof e?s={ui_access_mode_type:e.type,restricted_sso_group:e.restricted_sso_group,sso_group_jwt_field:e.sso_group_jwt_field}:"string"==typeof e&&(s={ui_access_mode_type:e,restricted_sso_group:t.values.restricted_sso_group,sso_group_jwt_field:t.values.team_ids_jwt_field||t.values.sso_group_jwt_field}),r.setFieldsValue(s)}}catch(e){console.error("Failed to load UI access settings:",e)}})()},[e,r]);let a=async t=>{if(!e)return void b.default.fromBackend("No access token available");l(!0);try{let r;r="all_authenticated_users"===t.ui_access_mode_type?{ui_access_mode:"none"}:{ui_access_mode:{type:t.ui_access_mode_type,restricted_sso_group:t.restricted_sso_group,sso_group_jwt_field:t.sso_group_jwt_field}},await (0,I.updateSSOSettings)(e,r),s()}catch(e){console.error("Failed to save UI access settings:",e),b.default.fromBackend("Failed to save UI access settings")}finally{l(!1)}};return(0,t.jsxs)("div",{style:{padding:"16px"},children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},children:(0,t.jsx)(w.Text,{style:{fontSize:"14px",color:"#6b7280"},children:"Configure who can access the UI interface and how group information is extracted from JWT tokens."})}),(0,t.jsxs)(g.Form,{form:r,onFinish:a,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{label:"UI Access Mode",name:"ui_access_mode_type",tooltip:"Controls who can access the UI interface",children:(0,t.jsxs)(Z.Select,{placeholder:"Select access mode",children:[(0,t.jsx)(Z.Select.Option,{value:"all_authenticated_users",children:"All Authenticated Users"}),(0,t.jsx)(Z.Select.Option,{value:"restricted_sso_group",children:"Restricted SSO Group"})]})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.ui_access_mode_type!==t.ui_access_mode_type,children:({getFieldValue:e})=>"restricted_sso_group"===e("ui_access_mode_type")?(0,t.jsx)(g.Form.Item,{label:"Restricted SSO Group",name:"restricted_sso_group",rules:[{required:!0,message:"Please enter the restricted SSO group"}],children:(0,t.jsx)(k.TextInput,{placeholder:"ui-access-group"})}):null}),(0,t.jsx)(g.Form.Item,{label:"SSO Group JWT Field",name:"sso_group_jwt_field",tooltip:"JWT field name that contains team/group information. Use dot notation to access nested fields.",children:(0,t.jsx)(k.TextInput,{placeholder:"groups"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"16px"},children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:i,style:{backgroundColor:"#6366f1",borderColor:"#6366f1"},children:"Update UI Access Control"})})]})]})},{Title:ts,Paragraph:tr,Text:ti}=y.Typography;e.s(["default",0,({proxySettings:e})=>{let{premiumUser:y,accessToken:C,userId:w}=(0,s.default)(),[T]=g.Form.useForm(),[k,E]=(0,j.useState)(!1),[N,O]=(0,j.useState)(!1),[F,A]=(0,j.useState)(!1),[M,P]=(0,j.useState)(!1),[B,R]=(0,j.useState)(!1),[z,D]=(0,j.useState)(!1),[L,V]=(0,j.useState)([]),[G,q]=(0,j.useState)(null),[H,$]=(0,j.useState)(!1),K=(0,S.useBaseUrl)(),Q="All IP Addresses Allowed",W=K;W+="/fallback/login";let Y=async()=>{if(C)try{let e=await (0,I.getSSOSettings)(C);if(e&&e.values){let t=e.values.google_client_id&&e.values.google_client_secret,s=e.values.microsoft_client_id&&e.values.microsoft_client_secret,r=e.values.generic_client_id&&e.values.generic_client_secret;$(t||s||r)}else $(!1)}catch(e){console.error("Error checking SSO configuration:",e),$(!1)}},J=async()=>{try{if(!0!==y)return void b.default.fromBackend("This feature is only available for premium users. Please upgrade your account.");if(C){let e=await (0,I.getAllowedIPs)(C);V(e&&e.length>0?e:[Q])}else V([Q])}catch(e){console.error("Error fetching allowed IPs:",e),b.default.fromBackend(`Failed to fetch allowed IPs ${e}`),V([Q])}finally{!0===y&&A(!0)}},Z=async e=>{try{if(C){await (0,I.addAllowedIP)(C,e.ip);let t=await (0,I.getAllowedIPs)(C);V(t),b.default.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),b.default.fromBackend(`Failed to add IP address ${e}`)}finally{P(!1)}},X=async e=>{q(e),R(!0)},ee=async()=>{if(G&&C)try{await (0,I.deleteAllowedIP)(C,G);let e=await (0,I.getAllowedIPs)(C);V(e.length>0?e:[Q]),b.default.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),b.default.fromBackend(`Failed to delete IP address ${e}`)}finally{R(!1),q(null)}};(0,j.useEffect)(()=>{Y()},[C,y,Y]);let et=()=>{D(!1)},es=[{key:"sso-settings",label:"SSO Settings",children:(0,t.jsx)(ek,{})},{key:"security-settings",label:"Security Settings",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(ts,{level:4,children:" ✨ Security Settings"}),(0,t.jsx)(p.Alert,{message:"SSO Configuration Deprecated",description:"Editing SSO Settings on this page is deprecated and will be removed in a future version. Please use the SSO Settings tab for SSO configuration.",type:"warning",showIcon:!0}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem",marginLeft:"0.5rem"},children:[(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>E(!0),children:H?"Edit SSO Settings":"Add SSO"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:J,children:"Allowed IPs"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>!0===y?D(!0):b.default.fromBackend("Only premium users can configure UI access control"),children:"UI Access Control"})})]})]}),(0,t.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,t.jsx)(te,{isAddSSOModalVisible:k,isInstructionsModalVisible:N,handleAddSSOOk:()=>{E(!1),T.resetFields(),C&&y&&Y()},handleAddSSOCancel:()=>{E(!1),T.resetFields()},handleShowInstructions:e=>{E(!1),O(!0)},handleInstructionsOk:()=>{O(!1),C&&y&&Y()},handleInstructionsCancel:()=>{O(!1),C&&y&&Y()},form:T,accessToken:C,ssoConfigured:H}),(0,t.jsx)(_.Modal,{title:"Manage Allowed IP Addresses",width:800,open:F,onCancel:()=>A(!1),footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>P(!0),children:"Add IP Address"},"add"),(0,t.jsx)(r.Button,{onClick:()=>A(!1),children:"Close"},"close")],children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"IP Address"}),(0,t.jsx)(d.TableHeaderCell,{className:"text-right",children:"Action"})]})}),(0,t.jsx)(n.TableBody,{children:L.map((e,s)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e}),(0,t.jsx)(o.TableCell,{className:"text-right",children:e!==Q&&(0,t.jsx)(r.Button,{onClick:()=>X(e),color:"red",size:"xs",children:"Delete"})})]},s))})]})}),(0,t.jsx)(_.Modal,{title:"Add Allowed IP Address",open:M,onCancel:()=>P(!1),footer:null,children:(0,t.jsxs)(g.Form,{onFinish:Z,children:[(0,t.jsx)(g.Form.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,t.jsx)(h.Input,{placeholder:"Enter IP address"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,t.jsx)(_.Modal,{title:"Confirm Delete",open:B,onCancel:()=>R(!1),onOk:ee,footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>ee(),children:"Yes"},"delete"),(0,t.jsx)(r.Button,{onClick:()=>R(!1),children:"Close"},"close")],children:(0,t.jsxs)(ti,{children:["Are you sure you want to delete the IP address: ",G,"?"]})}),(0,t.jsx)(_.Modal,{title:"UI Access Control Settings",open:z,width:600,footer:null,onOk:et,onCancel:()=>{D(!1)},children:(0,t.jsx)(tt,{accessToken:C,onSuccess:()=>{et(),b.default.success("UI Access Control settings updated successfully")}})})]}),(0,t.jsxs)(i.Callout,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,t.jsxs)("a",{href:W,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)("b",{children:W})," "]})]})]})},{key:"scim",label:"SCIM",children:(0,t.jsx)(U,{accessToken:C,userID:w,proxySettings:e})},{key:"ui-settings",label:(0,t.jsx)(x.Space,{children:(0,t.jsxs)(ti,{children:["UI Settings ",(0,t.jsx)(v.default,{})]})}),children:(0,t.jsx)(ez,{})},{key:"hashicorp-vault",label:"Hashicorp Vault",children:(0,t.jsx)(e8,{})}];return(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsx)(ts,{level:4,children:"Admin Access "}),(0,t.jsx)(tr,{children:"Go to 'Internal Users' page to add other admins."}),(0,t.jsx)(f.Tabs,{items:es})]})}],105278)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,475647,286536,77705,e=>{"use strict";e.i(247167);var t=e.i(931067),s=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"};var i=e.i(9583),l=s.forwardRef(function(e,l){return s.createElement(i.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["PlusCircleOutlined",0,l],475647);var a=e.i(475254);let n=(0,a.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>n],286536);let o=(0,a.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>o],77705)},366283,e=>{"use strict";var t=e.i(290571),s=e.i(271645),r=e.i(95779),i=e.i(444755),l=e.i(673706);let a=(0,l.makeClassName)("Callout"),n=s.default.forwardRef((e,n)=>{let{title:o,icon:c,color:d,className:u,children:p}=e,m=(0,t.__rest)(e,["title","icon","color","className","children"]);return s.default.createElement("div",Object.assign({ref:n,className:(0,i.tremorTwMerge)(a("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",d?(0,i.tremorTwMerge)((0,l.getColorClassNames)(d,r.colorPalette.background).bgColor,(0,l.getColorClassNames)(d,r.colorPalette.darkBorder).borderColor,(0,l.getColorClassNames)(d,r.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,i.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},m),s.default.createElement("div",{className:(0,i.tremorTwMerge)(a("header"),"flex items-start")},c?s.default.createElement(c,{className:(0,i.tremorTwMerge)(a("icon"),"flex-none h-5 w-5 mr-1.5")}):null,s.default.createElement("h4",{className:(0,i.tremorTwMerge)(a("title"),"font-semibold")},o)),s.default.createElement("p",{className:(0,i.tremorTwMerge)(a("body"),"overflow-y-auto",p?"mt-2":"")},p))});n.displayName="Callout",e.s(["Callout",()=>n],366283)},98919,e=>{"use strict";var t=e.i(918549);e.s(["Shield",()=>t.default])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",()=>t],727612)},918549,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["default",()=>t])},105278,e=>{"use strict";var t=e.i(843476),s=e.i(135214),r=e.i(994388),i=e.i(366283),l=e.i(304967),a=e.i(269200),n=e.i(942232),o=e.i(977572),c=e.i(427612),d=e.i(64848),u=e.i(496020),p=e.i(560445),m=e.i(464571),g=e.i(808613),h=e.i(311451),_=e.i(212931),x=e.i(770914),f=e.i(653496),y=e.i(898586),j=e.i(271645),v=e.i(844444),S=e.i(700514),b=e.i(727749),I=e.i(764205),C=e.i(629569),w=e.i(599724),T=e.i(350967),k=e.i(779241),E=e.i(114600),N=e.i(237016),O=e.i(596239),F=e.i(438957),A=e.i(166406),M=e.i(270377),P=e.i(475647),B=e.i(190702);let U=({accessToken:e,userID:s,proxySettings:a})=>{let[n]=g.Form.useForm(),[o,c]=(0,j.useState)(!1),[d,u]=(0,j.useState)(null),[p,m]=(0,j.useState)("");(0,j.useEffect)(()=>{let e="";m(e=a&&a.PROXY_BASE_URL&&void 0!==a.PROXY_BASE_URL?a.PROXY_BASE_URL:window.location.origin)},[a]);let h=`${p}/scim/v2`,_=async t=>{if(!e||!s)return void b.default.fromBackend("You need to be logged in to create a SCIM token");try{c(!0);let r={key_alias:t.key_alias||"SCIM Access Token",team_id:null,models:[],allowed_routes:["/scim/*"]},i=await (0,I.keyCreateCall)(e,s,r);u(i),b.default.success("SCIM token created successfully")}catch(e){console.error("Error creating SCIM token:",e),b.default.fromBackend("Failed to create SCIM token: "+(0,B.parseErrorMessage)(e))}finally{c(!1)}};return(0,t.jsx)(T.Grid,{numItems:1,children:(0,t.jsxs)(l.Card,{children:[(0,t.jsx)("div",{className:"flex items-center mb-4",children:(0,t.jsx)(C.Title,{children:"SCIM Configuration"})}),(0,t.jsx)(w.Text,{className:"text-gray-600",children:"System for Cross-domain Identity Management (SCIM) allows you to automatically provision and manage users and groups in LiteLLM."}),(0,t.jsx)(E.Divider,{}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"1"}),(0,t.jsxs)(C.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(O.LinkOutlined,{className:"h-5 w-5 mr-2"}),"SCIM Tenant URL"]})]}),(0,t.jsx)(w.Text,{className:"text-gray-600 mb-3",children:"Use this URL in your identity provider SCIM integration settings."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:h,disabled:!0,className:"flex-grow"}),(0,t.jsx)(N.CopyToClipboard,{text:h,onCopy:()=>b.default.success("URL copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"ml-2 flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"2"}),(0,t.jsxs)(C.Title,{className:"text-lg flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-5 w-5 mr-2"}),"Authentication Token"]})]}),(0,t.jsx)(i.Callout,{title:"Using SCIM",color:"blue",className:"mb-4",children:"You need a SCIM token to authenticate with the SCIM API. Create one below and use it in your SCIM provider configuration."}),d?(0,t.jsxs)(l.Card,{className:"border border-yellow-300 bg-yellow-50",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-yellow-800",children:[(0,t.jsx)(M.ExclamationCircleOutlined,{className:"h-5 w-5 mr-2"}),(0,t.jsx)(C.Title,{className:"text-lg text-yellow-800",children:"Your SCIM Token"})]}),(0,t.jsx)(w.Text,{className:"text-yellow-800 mb-4 font-medium",children:"Make sure to copy this token now. You will not be able to see it again."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(k.TextInput,{value:d.key,className:"flex-grow mr-2 bg-white",type:"password",disabled:!0}),(0,t.jsx)(N.CopyToClipboard,{text:d.key,onCopy:()=>b.default.success("Token copied to clipboard"),children:(0,t.jsxs)(r.Button,{variant:"primary",className:"flex items-center",children:[(0,t.jsx)(A.CopyOutlined,{className:"h-4 w-4 mr-1"}),"Copy"]})})]}),(0,t.jsxs)(r.Button,{className:"mt-4 flex items-center",variant:"secondary",onClick:()=>u(null),children:[(0,t.jsx)(P.PlusCircleOutlined,{className:"h-4 w-4 mr-1"}),"Create Another Token"]})]}):(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsxs)(g.Form,{form:n,onFinish:_,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{name:"key_alias",label:"Token Name",rules:[{required:!0,message:"Please enter a name for your token"}],children:(0,t.jsx)(k.TextInput,{placeholder:"SCIM Access Token"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsxs)(r.Button,{variant:"primary",type:"submit",loading:o,className:"flex items-center",children:[(0,t.jsx)(F.KeyOutlined,{className:"h-4 w-4 mr-1"}),"Create SCIM Token"]})})]})})]})]})]})})};var R=e.i(266027),z=e.i(243652);let D=(0,z.createQueryKeys)("sso"),L=()=>{let{accessToken:e,userId:t,userRole:r}=(0,s.default)();return(0,R.useQuery)({queryKey:D.detail("settings"),queryFn:async()=>await (0,I.getSSOSettings)(e),enabled:!!(e&&t&&r)})};var V=e.i(175712),G=e.i(869216),q=e.i(262218),H=e.i(688511),$=e.i(98919),K=e.i(727612);let Q={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},W={google:"Google SSO",microsoft:"Microsoft SSO",okta:"Okta / Auth0 SSO",generic:"Generic SSO"},Y={internal_user_viewer:"Internal Viewer",internal_user:"Internal User",proxy_admin_viewer:"Proxy Admin Viewer",proxy_admin:"Proxy Admin"};var J=e.i(536916),Z=e.i(199133);let X={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},ee=({form:e,onFormSubmit:s})=>(0,t.jsx)("div",{children:(0,t.jsxs)(g.Form,{form:e,onFinish:s,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(Z.Select,{children:Object.entries(Q).map(([e,s])=>(0,t.jsx)(Z.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsx)("span",{children:W[e]||e.charAt(0).toUpperCase()+e.slice(1)+" SSO"})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=X[r])?s.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(h.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_role_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(Z.Select,{children:[(0,t.jsx)(Z.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Team Mappings",name:"use_team_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_team_mappings!==t.use_team_mappings||e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("use_team_mappings"),r=e("sso_provider");return s&&("okta"===r||"generic"===r)?(0,t.jsx)(g.Form.Item,{label:"Team IDs JWT Field",name:"team_ids_jwt_field",rules:[{required:!0,message:"Please enter the team IDs JWT field"}],children:(0,t.jsx)(k.TextInput,{})}):null}})]})});var et=e.i(954616);let es=()=>{let{accessToken:e}=(0,s.default)();return(0,et.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await (0,I.updateSSOSettings)(e,t)}})},er=e=>{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:i,default_role:l,group_claim:a,use_role_mappings:n,use_team_mappings:o,team_ids_jwt_field:c,...d}=e,u={...d},p=d.sso_provider;if(n&&("okta"===p||"generic"===p)){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:a,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[l]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(i)}}}return o&&("okta"===p||"generic"===p)&&(u.team_mappings={team_ids_jwt_field:c}),u},ei=e=>e.google_client_id?"google":e.microsoft_client_id?"microsoft":e.generic_client_id?e.generic_authorization_endpoint?.includes("okta")||e.generic_authorization_endpoint?.includes("auth0")?"okta":"generic":null,el=({isVisible:e,onCancel:s,onSuccess:r})=>{let[i]=g.Form.useForm(),{mutateAsync:l,isPending:a}=es(),n=async e=>{let t=er(e);await l(t,{onSuccess:()=>{b.default.success("SSO settings added successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})},o=()=>{i.resetFields(),s()};return(0,t.jsx)(_.Modal,{title:"Add SSO",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:o,disabled:a,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:a,onClick:()=>i.submit(),children:a?"Adding...":"Add SSO"})]}),onCancel:o,children:(0,t.jsx)(ee,{form:i,onFormSubmit:n})})};var ea=e.i(127952);let en=({isVisible:e,onCancel:s,onSuccess:r})=>{let{data:i}=L(),{mutateAsync:l,isPending:a}=es(),n=async()=>{await l({google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null,team_mappings:null},{onSuccess:()=>{b.default.success("SSO settings cleared successfully"),s(),r()},onError:e=>{b.default.fromBackend("Failed to clear SSO settings: "+(0,B.parseErrorMessage)(e))}})};return(0,t.jsx)(ea.default,{isOpen:e,title:"Confirm Clear SSO Settings",alertMessage:"This action cannot be undone.",message:"Are you sure you want to clear all SSO settings? Users will no longer be able to login using SSO after this change.",resourceInformationTitle:"SSO Settings",resourceInformation:[{label:"Provider",value:i?.values&&ei(i?.values)||"Generic"}],onCancel:s,onOk:n,confirmLoading:a})},eo=({isVisible:e,onCancel:s,onSuccess:r})=>{let[i]=g.Form.useForm(),l=L(),{mutateAsync:a,isPending:n}=es();(0,j.useEffect)(()=>{if(e&&l.data&&l.data.values){let e=l.data;console.log("Raw SSO data received:",e),console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={};e.values.team_mappings&&(r={use_team_mappings:!0,team_ids_jwt_field:e.values.team_mappings.team_ids_jwt_field});let a={sso_provider:t,...e.values,...s,...r};console.log("Setting form values:",a),i.resetFields(),setTimeout(()=>{i.setFieldsValue(a),console.log("Form values set, current form values:",i.getFieldsValue())},100)}},[e,l.data,i]);let o=async e=>{try{let t=er(e);await a(t,{onSuccess:()=>{b.default.success("SSO settings updated successfully"),r()},onError:e=>{b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}})}catch(e){b.default.fromBackend("Failed to process SSO settings: "+(0,B.parseErrorMessage)(e))}},c=()=>{i.resetFields(),s()};return(0,t.jsx)(_.Modal,{title:"Edit SSO Settings",open:e,width:800,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:c,disabled:n,children:"Cancel"}),(0,t.jsx)(m.Button,{loading:n,onClick:()=>i.submit(),children:n?"Saving...":"Save"})]}),onCancel:c,children:(0,t.jsx)(ee,{form:i,onFormSubmit:o})})};var ec=e.i(286536),ed=e.i(77705);function eu({defaultHidden:e=!0,value:s}){let[r,i]=(0,j.useState)(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-gray-600 flex-1",children:s?r?"•".repeat(s.length):s:(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})}),s&&(0,t.jsx)(m.Button,{type:"text",size:"small",icon:r?(0,t.jsx)(ec.Eye,{className:"w-4 h-4"}):(0,t.jsx)(ed.EyeOff,{className:"w-4 h-4"}),onClick:()=>i(!r),className:"text-gray-400 hover:text-gray-600"})]})}var ep=e.i(312361),em=e.i(291542),eg=e.i(761911);let{Title:eh,Text:e_}=y.Typography;function ex({roleMappings:e}){if(!e)return null;let s=[{title:"Role",dataIndex:"role",key:"role",render:e=>(0,t.jsx)(e_,{strong:!0,children:Y[e]})},{title:"Mapped Groups",dataIndex:"groups",key:"groups",render:e=>(0,t.jsx)(t.Fragment,{children:e.length>0?e.map((e,s)=>(0,t.jsx)(q.Tag,{color:"blue",children:e},s)):(0,t.jsx)(e_,{className:"text-gray-400 italic",children:"No groups mapped"})})}];return(0,t.jsxs)(V.Card,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eg.Users,{className:"w-6 h-6 text-gray-400 mb-2"}),(0,t.jsx)(eh,{level:3,children:"Role Mappings"})]}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eh,{level:5,children:"Group Claim"}),(0,t.jsx)("div",{children:(0,t.jsx)(e_,{code:!0,children:e.group_claim})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eh,{level:5,children:"Default Role"}),(0,t.jsx)("div",{children:(0,t.jsx)(e_,{strong:!0,children:Y[e.default_role]})})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(em.Table,{columns:s,dataSource:Object.entries(e.roles).map(([e,t])=>({role:e,groups:t})),pagination:!1,bordered:!0,size:"small",className:"w-full"})]})]})}var ef=e.i(21548);let{Title:ey,Paragraph:ej}=y.Typography;function ev({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ef.Empty,{image:ef.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ey,{level:4,children:"No SSO Configuration Found"}),(0,t.jsx)(ej,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Single Sign-On (SSO) to enable seamless authentication for your team members using your identity provider."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure SSO"})})})}var eS=e.i(981339);let{Title:eb,Text:eI}=y.Typography;function eC(){return(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)($.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eb,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eI,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eS.Skeleton.Button,{active:!0,size:"default",style:{width:170,height:32}}),(0,t.jsx)(eS.Skeleton.Button,{active:!0,size:"default",style:{width:190,height:32}})]})]}),(0,t.jsxs)(G.Descriptions,{bordered:!0,...{column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},children:[(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:100,height:16}})})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:200,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:250,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:180,height:16}})}),(0,t.jsx)(G.Descriptions.Item,{label:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(eS.Skeleton.Node,{active:!0,style:{width:220,height:16}})})]})]})})}let{Title:ew,Text:eT}=y.Typography;function ek(){let{data:e,refetch:s,isLoading:r}=L(),[i,l]=(0,j.useState)(!1),[a,n]=(0,j.useState)(!1),[o,c]=(0,j.useState)(!1),d=!!e?.values.google_client_id||!!e?.values.microsoft_client_id||!!e?.values.generic_client_id,u=e?.values?ei(e.values):null,p=!!e?.values.role_mappings,g=!!e?.values.team_mappings,h=e=>(0,t.jsx)(eT,{className:"font-mono text-gray-600 text-sm",copyable:!!e,children:e||"-"}),_=e=>e||(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),f=e=>e.team_mappings?.team_ids_jwt_field?(0,t.jsx)(q.Tag,{children:e.team_mappings.team_ids_jwt_field}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),y={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},v={google:{providerText:W.google,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.google_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.google_client_secret})},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},microsoft:{providerText:W.microsoft,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.microsoft_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.microsoft_client_secret})},{label:"Tenant",render:e=>_(e.microsoft_tenant)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)}]},okta:{providerText:W.okta,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>h(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>h(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>h(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]},generic:{providerText:W.generic,fields:[{label:"Client ID",render:e=>(0,t.jsx)(eu,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(eu,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>h(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>h(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>h(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>_(e.proxy_base_url)},g?{label:"Team IDs JWT Field",render:e=>f(e)}:null]}};return(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(eC,{}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)($.Shield,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(ew,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eT,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(H.Edit,{className:"w-4 h-4"}),onClick:()=>c(!0),children:"Edit SSO Settings"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)(K.Trash2,{className:"w-4 h-4"}),onClick:()=>l(!0),children:"Delete SSO Settings"})]})})]}),d?(()=>{if(!e?.values||!u)return null;let{values:s}=e,r=v[u];return r?(0,t.jsxs)(G.Descriptions,{bordered:!0,...y,children:[(0,t.jsx)(G.Descriptions.Item,{label:"Provider",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Q[u]&&(0,t.jsx)("img",{src:Q[u],alt:u,style:{height:24,width:24,objectFit:"contain"}}),(0,t.jsx)("span",{children:r.providerText})]})}),r.fields.map((e,r)=>e&&(0,t.jsx)(G.Descriptions.Item,{label:e.label,children:e.render(s)},r))]}):null})():(0,t.jsx)(ev,{onAdd:()=>n(!0)})]})}),p&&(0,t.jsx)(ex,{roleMappings:e?.values.role_mappings})]}),(0,t.jsx)(en,{isVisible:i,onCancel:()=>l(!1),onSuccess:()=>s()}),(0,t.jsx)(el,{isVisible:a,onCancel:()=>n(!1),onSuccess:()=>{n(!1),s()}}),(0,t.jsx)(eo,{isVisible:o,onCancel:()=>c(!1),onSuccess:()=>{c(!1),s()}})]})}var eE=e.i(292639),eN=e.i(912598);let eO=(0,z.createQueryKeys)("uiSettings");var eF=e.i(111672);let eA={"api-keys":"Manage virtual keys for API access and authentication","llm-playground":"Interactive playground for testing LLM requests",models:"Configure and manage LLM models and endpoints",agents:"Create and manage AI agents","mcp-servers":"Configure Model Context Protocol servers",guardrails:"Set up content moderation and safety guardrails",policies:"Define access control and usage policies","search-tools":"Configure RAG search and retrieval tools","tool-policies":"Configure tool use policies and permissions","vector-stores":"Manage vector databases for embeddings",new_usage:"View usage analytics and metrics",logs:"Access request and response logs","guardrails-monitor":"Monitor guardrail performance and view logs",users:"Manage internal user accounts and permissions",teams:"Create and manage teams for access control",organizations:"Manage organizations and their members",projects:"Manage projects within teams","access-groups":"Manage access groups for role-based permissions",budgets:"Set and monitor spending budgets","api-reference":"Browse API documentation and endpoints","model-hub-table":"Explore available AI models and providers","learning-resources":"Access tutorials and documentation",caching:"Configure response caching settings","transform-request":"Set up request transformation rules","cost-tracking":"Track and analyze API costs","ui-theme":"Customize dashboard appearance","tag-management":"Organize resources with tags",prompts:"Manage and version prompt templates","claude-code-plugins":"Configure Claude Code plugins",usage:"View legacy usage dashboard","router-settings":"Configure routing and load balancing settings","logging-and-alerts":"Set up logging and alert configurations","admin-panel":"Access admin panel and settings"};var eM=e.i(708347);let eP=e=>!e||0===e.length||e.some(e=>eM.internalUserRoles.includes(e));var eB=e.i(362024);function eU({enabledPagesInternalUsers:e,enabledPagesPropertyDescription:s,isUpdating:r,onUpdate:i}){let l=null!=e,a=(0,j.useMemo)(()=>{let e;return e=[],eF.menuGroups.forEach(t=>{t.items.forEach(s=>{if(s.page&&"tools"!==s.page&&"experimental"!==s.page&&"settings"!==s.page&&eP(s.roles)){let r="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:r,group:t.groupLabel,description:eA[s.page]||"No description available"})}if(s.children){let r="string"==typeof s.label?s.label:s.key;s.children.forEach(s=>{if(eP(s.roles)){let i="string"==typeof s.label?s.label:s.key;e.push({page:s.page,label:i,group:`${t.groupLabel} > ${r}`,description:eA[s.page]||"No description available"})}})}})}),e},[]),n=(0,j.useMemo)(()=>{let e={};return a.forEach(t=>{e[t.group]||(e[t.group]=[]),e[t.group].push(t)}),e},[a]),[o,c]=(0,j.useState)(e||[]);return(0,j.useMemo)(()=>{e?c(e):c([])},[e]),(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsxs)(x.Space,{align:"center",children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Internal User Page Visibility"}),!l&&(0,t.jsx)(q.Tag,{color:"default",style:{marginLeft:"8px"},children:"Not set (all pages visible)"}),l&&(0,t.jsxs)(q.Tag,{color:"blue",style:{marginLeft:"8px"},children:[o.length," page",1!==o.length?"s":""," selected"]})]}),s&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:s}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"By default, all pages are visible to internal users. Select specific pages to restrict visibility."}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px",color:"#8b5cf6"},children:"Note: Only pages accessible to internal user roles are shown here. Admin-only pages are excluded as they cannot be made visible to internal users regardless of this setting."})]}),(0,t.jsx)(eB.Collapse,{items:[{key:"page-visibility",label:"Configure Page Visibility",children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(J.Checkbox.Group,{value:o,onChange:c,style:{width:"100%"},children:(0,t.jsx)(x.Space,{direction:"vertical",size:"middle",style:{width:"100%"},children:Object.entries(n).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Typography.Text,{strong:!0,style:{fontSize:"11px",color:"#6b7280",letterSpacing:"0.05em",display:"block",marginBottom:"8px"},children:e}),(0,t.jsx)(x.Space,{direction:"vertical",size:"small",style:{marginLeft:"16px",width:"100%"},children:s.map(e=>(0,t.jsx)("div",{style:{marginBottom:"4px"},children:(0,t.jsx)(J.Checkbox,{value:e.page,children:(0,t.jsxs)(x.Space,{direction:"vertical",size:0,children:[(0,t.jsx)(y.Typography.Text,{children:e.label}),(0,t.jsx)(y.Typography.Text,{type:"secondary",style:{fontSize:"12px"},children:e.description})]})})},e.page))})]},e))})}),(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{type:"primary",onClick:()=>{i({enabled_ui_pages_internal_users:o.length>0?o:null})},loading:r,disabled:r,children:"Save Page Visibility Settings"}),l&&(0,t.jsx)(m.Button,{onClick:()=>{c([]),i({enabled_ui_pages_internal_users:null})},loading:r,disabled:r,children:"Reset to Default (All Pages)"})]})]})}]})]})}var eR=e.i(790848);function ez(){let e,{accessToken:r}=(0,s.default)(),{data:i,isLoading:l,isError:a,error:n}=(0,eE.useUISettings)(),{mutate:o,isPending:c,error:d}=(e=(0,eN.useQueryClient)(),(0,et.useMutation)({mutationFn:async e=>{if(!r)throw Error("Access token is required");return(0,I.updateUiSettings)(r,e)},onSuccess:()=>{e.invalidateQueries({queryKey:eO.all})}})),u=i?.field_schema,m=u?.properties?.disable_model_add_for_internal_users,g=u?.properties?.disable_team_admin_delete_team_user,h=u?.properties?.require_auth_for_public_ai_hub,_=u?.properties?.forward_client_headers_to_llm_api,f=u?.properties?.enable_projects_ui,j=u?.properties?.enabled_ui_pages_internal_users,v=u?.properties?.disable_agents_for_internal_users,S=u?.properties?.allow_agents_for_team_admins,C=u?.properties?.disable_vector_stores_for_internal_users,w=u?.properties?.allow_vector_stores_for_team_admins,T=u?.properties?.scope_user_search_to_org,k=u?.properties?.disable_custom_api_keys,E=i?.values??{},N=!!E.disable_model_add_for_internal_users,O=!!E.disable_team_admin_delete_team_user,F=!!E.disable_agents_for_internal_users,A=!!E.disable_vector_stores_for_internal_users;return(0,t.jsx)(V.Card,{title:"UI Settings",children:l?(0,t.jsx)(eS.Skeleton,{active:!0}):a?(0,t.jsx)(p.Alert,{type:"error",message:"Could not load UI settings",description:n instanceof Error?n.message:void 0}):(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",style:{width:"100%"},children:[u?.description&&(0,t.jsx)(y.Typography.Paragraph,{style:{marginBottom:0},children:u.description}),d&&(0,t.jsx)(p.Alert,{type:"error",message:"Could not update UI settings",description:d instanceof Error?d.message:void 0}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:N,disabled:c,loading:c,onChange:e=>{o({disable_model_add_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":m?.description??"Disable model add for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable model add for internal users"}),m?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:m.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:O,disabled:c,loading:c,onChange:e=>{o({disable_team_admin_delete_team_user:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":g?.description??"Disable team admin delete team user"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable team admin delete team user"}),g?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:g.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:E.require_auth_for_public_ai_hub,disabled:c,loading:c,onChange:e=>{o({require_auth_for_public_ai_hub:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":h?.description??"Require authentication for public AI Hub"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Require authentication for public AI Hub"}),h?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:h.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:!!E.forward_client_headers_to_llm_api,disabled:c,loading:c,onChange:e=>{o({forward_client_headers_to_llm_api:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":_?.description??"Forward client headers to LLM API"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Forward client headers to LLM API"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:_?.description??"If enabled, forwards client headers (e.g. Authorization) to the LLM API. Required for Claude Code with Max subscription."})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:!!E.enable_projects_ui,disabled:c,loading:c,onChange:e=>{o({enable_projects_ui:e},{onSuccess:()=>{b.default.success("UI settings updated successfully. Refreshing page..."),setTimeout(()=>window.location.reload(),1e3)},onError:e=>{b.default.fromBackend(e)}})},"aria-label":f?.description??"Enable Projects UI"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"[BETA] Enable Projects (page will refresh)"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:f?.description??"If enabled, shows the Projects feature in the UI sidebar and the project field in key management."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:F,disabled:c,loading:c,onChange:e=>{o({disable_agents_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":v?.description??"Disable agents for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable agents for internal users"}),v?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:v.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(eR.Switch,{checked:!!E.allow_agents_for_team_admins,disabled:c||!F,loading:c,onChange:e=>{o({allow_agents_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":S?.description??"Allow agents for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:F?void 0:"secondary",children:"Allow agents for team admins"}),S?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:S.description})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:A,disabled:c,loading:c,onChange:e=>{o({disable_vector_stores_for_internal_users:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":C?.description??"Disable vector stores for internal users"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable vector stores for internal users"}),C?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:C.description})]})]}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",style:{marginLeft:32},children:[(0,t.jsx)(eR.Switch,{checked:!!E.allow_vector_stores_for_team_admins,disabled:c||!A,loading:c,onChange:e=>{o({allow_vector_stores_for_team_admins:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":w?.description??"Allow vector stores for team admins"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,type:A?void 0:"secondary",children:"Allow vector stores for team admins"}),w?.description&&(0,t.jsx)(y.Typography.Text,{type:"secondary",children:w.description})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:!!E.scope_user_search_to_org,disabled:c,loading:c,onChange:e=>{o({scope_user_search_to_org:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":T?.description??"Scope user search to organization"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Scope user search to organization"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:T?.description??"If enabled, the user search endpoint restricts results by organization. When off, any authenticated user can search all users."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsxs)(x.Space,{align:"start",size:"middle",children:[(0,t.jsx)(eR.Switch,{checked:!!E.disable_custom_api_keys,disabled:c,loading:c,onChange:e=>{o({disable_custom_api_keys:e},{onSuccess:()=>{b.default.success("UI settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})},"aria-label":k?.description??"Disable custom Virtual key values"}),(0,t.jsxs)(x.Space,{direction:"vertical",size:4,children:[(0,t.jsx)(y.Typography.Text,{strong:!0,children:"Disable custom Virtual key values"}),(0,t.jsx)(y.Typography.Text,{type:"secondary",children:k?.description??"If true, users cannot specify custom key values. All keys must be auto-generated."})]})]}),(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(eU,{enabledPagesInternalUsers:E.enabled_ui_pages_internal_users,enabledPagesPropertyDescription:j?.description,isUpdating:c,onUpdate:e=>{o(e,{onSuccess:()=>{b.default.success("Page visibility settings updated successfully")},onError:e=>{b.default.fromBackend(e)}})}})]})})}let eD=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"GET",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eL=async(e,t)=>{let s=(0,I.getProxyBaseUrl)(),r=s?`${s}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",i=await fetch(r,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){let e=await i.json();throw Error((0,I.deriveErrorMessage)(e))}return await i.json()},eV=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault`:"/config_overrides/hashicorp_vault",r=await fetch(s,{method:"DELETE",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eG=async e=>{let t=(0,I.getProxyBaseUrl)(),s=t?`${t}/config_overrides/hashicorp_vault/test_connection`:"/config_overrides/hashicorp_vault/test_connection",r=await fetch(s,{method:"POST",headers:{[(0,I.getGlobalLitellmHeaderName)()]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error((0,I.deriveErrorMessage)(e))}return await r.json()},eq=(0,z.createQueryKeys)("hashicorpVaultConfig"),eH=()=>{let{accessToken:e}=(0,s.default)();return(0,R.useQuery)({queryKey:eq.list({}),queryFn:async()=>{if(!e)throw Error("Access token is required");return eD(e)},enabled:!!e,staleTime:36e5,gcTime:36e5})},e$=e=>{let t=(0,eN.useQueryClient)();return(0,et.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return eL(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:eq.all})}})};var eK=e.i(525720),eQ=e.i(475254);let eW=(0,eQ.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),eY=(0,eQ.default)("plug-zap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]),eJ=new Set(["vault_token","approle_secret_id","client_key"]),eZ={vault_addr:"Vault Address",vault_namespace:"Namespace",vault_mount_name:"KV Mount Name",vault_path_prefix:"Path Prefix",vault_token:"Token",approle_role_id:"Role ID",approle_secret_id:"Secret ID",approle_mount_path:"Mount Path",client_cert:"Client Certificate",client_key:"Client Key",vault_cert_role:"Certificate Role"},eX=[{title:"Connection",fields:["vault_addr","vault_namespace","vault_mount_name","vault_path_prefix"]},{title:"Token Authentication",subtitle:"Use a Vault token to authenticate. Only one auth method is required.",fields:["vault_token"]},{title:"AppRole Authentication",subtitle:"Use AppRole credentials to authenticate. Only one auth method is required.",fields:["approle_role_id","approle_secret_id","approle_mount_path"]},{title:"TLS",subtitle:"Optional client certificate for mTLS.",fields:["client_cert","client_key","vault_cert_role"]}],e0=({isVisible:e,onCancel:r,onSuccess:i})=>{let[l]=g.Form.useForm(),{accessToken:a}=(0,s.default)(),{data:n}=eH(),{mutate:o,isPending:c}=e$(a),d=n?.field_schema,u=d?.properties??{},p=n?.values??{};(0,j.useEffect)(()=>{if(e&&n){l.resetFields();let e={};for(let[t,s]of Object.entries(p))eJ.has(t)||(e[t]=s);l.setFieldsValue(e)}},[e,n,l]);let f=()=>{l.resetFields(),r()},v=e=>{let s=u[e];if(!s)return null;let r="vault_addr"===e?[{pattern:/^https?:\/\/.+/,message:"Must start with http:// or https://"}]:void 0,i=eJ.has(e),l=p[e],a=i&&null!=l&&""!==l?`Leave blank to keep existing (${l})`:s?.description;return(0,t.jsx)(g.Form.Item,{name:e,label:eZ[e]??e,rules:r,children:i?(0,t.jsx)(h.Input.Password,{placeholder:a}):(0,t.jsx)(h.Input,{placeholder:s?.description})},e)};return(0,t.jsx)(_.Modal,{title:"Edit Hashicorp Vault Configuration",open:e,width:700,footer:(0,t.jsxs)(x.Space,{children:[(0,t.jsx)(m.Button,{onClick:f,disabled:c,children:"Cancel"}),(0,t.jsx)(m.Button,{type:"primary",loading:c,onClick:()=>l.submit(),children:c?"Saving...":"Save"})]}),onCancel:f,children:(0,t.jsx)(g.Form,{form:l,layout:"vertical",onFinish:e=>{let t={};for(let[s,r]of Object.entries(e))null!=r&&""!==r?t[s]=r:eJ.has(s)||(t[s]="");o(t,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration updated successfully"),i()},onError:e=>{b.default.fromBackend(e)}})},children:eX.map((e,s)=>(0,t.jsxs)("div",{children:[s>0&&(0,t.jsx)(ep.Divider,{}),(0,t.jsx)(y.Typography.Title,{level:5,style:{marginBottom:4},children:e.title}),e.subtitle&&(0,t.jsx)(y.Typography.Paragraph,{type:"secondary",style:{marginBottom:16},children:e.subtitle}),e.fields.map(v)]},e.title))})})},{Title:e1,Paragraph:e4}=y.Typography;function e2({onAdd:e}){return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(ef.Empty,{image:ef.Empty.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(e1,{level:4,children:"No Vault Configuration Found"}),(0,t.jsx)(e4,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Hashicorp Vault to securely manage provider API keys and secrets for your LiteLLM deployment."})]}),children:(0,t.jsx)(m.Button,{type:"primary",size:"large",onClick:e,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure Vault"})})})}let{Title:e6,Text:e5}=y.Typography,e7={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}};function e8(){let e,{accessToken:r}=(0,s.default)(),{data:i,isLoading:l,isError:a,error:n}=eH(),{mutate:o,isPending:c}=(e=(0,eN.useQueryClient)(),(0,et.useMutation)({mutationFn:async()=>{if(!r)throw Error("Access token is required");return eV(r)},onSuccess:()=>{e.invalidateQueries({queryKey:eq.all})}})),{mutate:d,isPending:u}=e$(r),[g,h]=(0,j.useState)(!1),[_,f]=(0,j.useState)(!1),[v,S]=(0,j.useState)(null),[I,C]=(0,j.useState)(!1),w=i?.values??{},T=!!w.vault_addr,k=async()=>{if(r){C(!0);try{let e=await eG(r);b.default.success(e.message||"Connection to Vault successful!")}catch(e){b.default.fromBackend(e)}finally{C(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(V.Card,{children:(0,t.jsx)(eS.Skeleton,{active:!0})}):a?(0,t.jsx)(V.Card,{children:(0,t.jsx)(p.Alert,{type:"error",message:"Could not load Hashicorp Vault configuration",description:n instanceof Error?n.message:void 0})}):(0,t.jsx)(V.Card,{children:(0,t.jsxs)(x.Space,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)(eK.Flex,{justify:"space-between",align:"center",children:[(0,t.jsxs)(eK.Flex,{align:"center",gap:12,children:[(0,t.jsx)(eW,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(e6,{level:3,style:{marginBottom:0},children:"Hashicorp Vault"}),(0,t.jsx)(e5,{type:"secondary",children:"Manage secret manager configuration"})]})]}),(0,t.jsx)(x.Space,{children:T&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{icon:(0,t.jsx)(eY,{className:"w-4 h-4"}),loading:I,onClick:k,children:"Test Connection"}),(0,t.jsx)(m.Button,{icon:(0,t.jsx)(H.Edit,{className:"w-4 h-4"}),onClick:()=>h(!0),children:"Edit Configuration"}),(0,t.jsx)(m.Button,{danger:!0,icon:(0,t.jsx)(K.Trash2,{className:"w-4 h-4"}),onClick:()=>f(!0),children:"Delete Configuration"})]})})]}),T&&(0,t.jsx)(p.Alert,{type:"info",showIcon:!0,message:'Secrets must be stored with the field name "key"',description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e5,{code:!0,children:"vault kv put secret/SECRET_NAME key=secret_value"}),(0,t.jsx)("br",{}),(0,t.jsx)(y.Typography.Link,{href:"https://docs.litellm.ai/docs/secret_managers/hashicorp_vault",target:"_blank",children:"View documentation"})]})}),T?(()=>{let e=Object.entries(w).filter(([e,t])=>null!=t&&""!==t);return 0===e.length?null:(0,t.jsxs)(G.Descriptions,{bordered:!0,...e7,children:[(0,t.jsx)(G.Descriptions.Item,{label:"Auth Method",children:(0,t.jsx)(e5,{children:w.approle_role_id||w.approle_secret_id?"AppRole":w.client_cert&&w.client_key?"TLS Certificate":w.vault_token?"Token":"None"})}),e.map(([e])=>{let s;return(0,t.jsx)(G.Descriptions.Item,{label:eZ[e]??e,children:(s=w[e])?eJ.has(e)?(0,t.jsxs)(eK.Flex,{justify:"space-between",align:"center",children:[(0,t.jsx)(e5,{className:"font-mono text-gray-600",children:s}),(0,t.jsx)(m.Button,{type:"text",size:"small",danger:!0,icon:(0,t.jsx)(K.Trash2,{className:"w-3.5 h-3.5"}),onClick:()=>S(e)})]}):(0,t.jsx)(e5,{className:"font-mono text-gray-600",children:s}):(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})},e)})]})})():(0,t.jsx)(e2,{onAdd:()=>h(!0)})]})}),(0,t.jsx)(e0,{isVisible:g,onCancel:()=>h(!1),onSuccess:()=>h(!1)}),(0,t.jsx)(ea.default,{isOpen:_,title:"Delete Hashicorp Vault Configuration?",message:"Models using Vault secrets will lose access to their API keys until a new configuration is saved.",resourceInformationTitle:"Vault Configuration",resourceInformation:[{label:"Vault Address",value:w.vault_addr}],onCancel:()=>f(!1),onOk:()=>{o(void 0,{onSuccess:()=>{b.default.success("Hashicorp Vault configuration deleted"),f(!1)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:c}),(0,t.jsx)(ea.default,{isOpen:null!==v,title:`Clear ${v?eZ[v]??v:""}?`,message:"This will remove the stored value.",resourceInformationTitle:"Field",resourceInformation:[{label:"Field",value:v?eZ[v]??v:""}],onCancel:()=>S(null),onOk:()=>{v&&d({[v]:""},{onSuccess:()=>{b.default.success(`${eZ[v]??v} cleared`),S(null)},onError:e=>{b.default.fromBackend(e)}})},confirmLoading:u})]})}let e3={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},e9={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},te=({isAddSSOModalVisible:e,isInstructionsModalVisible:s,handleAddSSOOk:r,handleAddSSOCancel:i,handleShowInstructions:l,handleInstructionsOk:a,handleInstructionsCancel:n,form:o,accessToken:c,ssoConfigured:d=!1})=>{let[u,p]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e&&c)try{let e=await (0,I.getSSOSettings)(c);if(console.log("Raw SSO data received:",e),e&&e.values){console.log("SSO values:",e.values),console.log("user_email from API:",e.values.user_email);let t=null;e.values.google_client_id?t="google":e.values.microsoft_client_id?t="microsoft":e.values.generic_client_id&&(t=e.values.generic_authorization_endpoint?.includes("okta")||e.values.generic_authorization_endpoint?.includes("auth0")?"okta":"generic");let s={};if(e.values.role_mappings){let t=e.values.role_mappings,r=e=>e&&0!==e.length?e.join(", "):"";s={use_role_mappings:!0,group_claim:t.group_claim,default_role:t.default_role||"internal_user",proxy_admin_teams:r(t.roles?.proxy_admin),admin_viewer_teams:r(t.roles?.proxy_admin_viewer),internal_user_teams:r(t.roles?.internal_user),internal_viewer_teams:r(t.roles?.internal_user_viewer)}}let r={sso_provider:t,proxy_base_url:e.values.proxy_base_url,user_email:e.values.user_email,...e.values,...s};console.log("Setting form values:",r),o.resetFields(),setTimeout(()=>{o.setFieldsValue(r),console.log("Form values set, current form values:",o.getFieldsValue())},100)}}catch(e){console.error("Failed to load SSO settings:",e)}})()},[e,c,o]);let x=async e=>{if(!c)return void b.default.fromBackend("No access token available");try{let{proxy_admin_teams:t,admin_viewer_teams:s,internal_user_teams:r,internal_viewer_teams:i,default_role:a,group_claim:n,use_role_mappings:o,...d}=e,u={...d};if(o){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];u.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[a]||"internal_user",roles:{proxy_admin:e(t),proxy_admin_viewer:e(s),internal_user:e(r),internal_user_viewer:e(i)}}}await (0,I.updateSSOSettings)(c,u),l(e)}catch(e){b.default.fromBackend("Failed to save SSO settings: "+(0,B.parseErrorMessage)(e))}},f=async()=>{if(!c)return void b.default.fromBackend("No access token available");try{await (0,I.updateSSOSettings)(c,{google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null}),o.resetFields(),p(!1),r(),b.default.success("SSO settings cleared successfully")}catch(e){console.error("Failed to clear SSO settings:",e),b.default.fromBackend("Failed to clear SSO settings")}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Modal,{title:d?"Edit SSO Settings":"Add SSO",open:e,width:800,footer:null,onOk:r,onCancel:i,children:(0,t.jsxs)(g.Form,{form:o,onFinish:x,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(Z.Select,{children:Object.entries(e3).map(([e,s])=>(0,t.jsx)(Z.Select.Option,{value:e,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[s&&(0,t.jsx)("img",{src:s,alt:e,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsxs)("span",{children:["okta"===e.toLowerCase()?"Okta / Auth0":e.charAt(0).toUpperCase()+e.slice(1)," ","SSO"]})]})},e))})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s,r=e("sso_provider");return r&&(s=e9[r])?s.fields.map(e=>(0,t.jsx)(g.Form.Item,{label:e.label,name:e.name,rules:[{required:!0,message:`Please enter the ${e.label.toLowerCase()}`}],children:e.name.includes("client")?(0,t.jsx)(h.Input.Password,{}):(0,t.jsx)(k.TextInput,{placeholder:e.placeholder})},e.name)):null}}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>e?.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,t)=>t&&/^https?:\/\/.+/.test(t)&&t.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(k.TextInput,{placeholder:"https://example.com"})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.sso_provider!==t.sso_provider,children:({getFieldValue:e})=>{let s=e("sso_provider");return"okta"===s||"generic"===s?(0,t.jsx)(g.Form.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(J.Checkbox,{})}):null}}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsx)(g.Form.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(k.TextInput,{})}):null}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.use_role_mappings!==t.use_role_mappings,children:({getFieldValue:e})=>e("use_role_mappings")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.Form.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(Z.Select,{children:[(0,t.jsx)(Z.Select.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(Z.Select.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(g.Form.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(k.TextInput,{})}),(0,t.jsx)(g.Form.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(k.TextInput,{})})]}):null})]}),(0,t.jsxs)("div",{style:{textAlign:"right",marginTop:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px"},children:[d&&(0,t.jsx)(m.Button,{onClick:()=>p(!0),style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#5558eb",e.currentTarget.style.borderColor="#5558eb"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1",e.currentTarget.style.borderColor="#6366f1"},children:"Clear"}),(0,t.jsx)(m.Button,{htmlType:"submit",children:"Save"})]})]})}),(0,t.jsxs)(_.Modal,{title:"Confirm Clear SSO Settings",open:u,onOk:f,onCancel:()=>p(!1),okText:"Yes, Clear",cancelText:"Cancel",okButtonProps:{danger:!0,style:{backgroundColor:"#dc2626",borderColor:"#dc2626"}},children:[(0,t.jsx)("p",{children:"Are you sure you want to clear all SSO settings? This action cannot be undone."}),(0,t.jsx)("p",{children:"Users will no longer be able to login using SSO after this change."})]}),(0,t.jsxs)(_.Modal,{title:"SSO Setup Instructions",open:s,width:800,footer:null,onOk:a,onCancel:n,children:[(0,t.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,t.jsx)(w.Text,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,t.jsx)(w.Text,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,t.jsx)(w.Text,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,t.jsx)(w.Text,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(m.Button,{onClick:a,children:"Done"})})]})]})},tt=({accessToken:e,onSuccess:s})=>{let[r]=g.Form.useForm(),[i,l]=(0,j.useState)(!1);(0,j.useEffect)(()=>{(async()=>{if(e)try{let t=await (0,I.getSSOSettings)(e);if(t&&t.values){let e=t.values.ui_access_mode,s={};e&&"object"==typeof e?s={ui_access_mode_type:e.type,restricted_sso_group:e.restricted_sso_group,sso_group_jwt_field:e.sso_group_jwt_field}:"string"==typeof e&&(s={ui_access_mode_type:e,restricted_sso_group:t.values.restricted_sso_group,sso_group_jwt_field:t.values.team_ids_jwt_field||t.values.sso_group_jwt_field}),r.setFieldsValue(s)}}catch(e){console.error("Failed to load UI access settings:",e)}})()},[e,r]);let a=async t=>{if(!e)return void b.default.fromBackend("No access token available");l(!0);try{let r;r="all_authenticated_users"===t.ui_access_mode_type?{ui_access_mode:"none"}:{ui_access_mode:{type:t.ui_access_mode_type,restricted_sso_group:t.restricted_sso_group,sso_group_jwt_field:t.sso_group_jwt_field}},await (0,I.updateSSOSettings)(e,r),s()}catch(e){console.error("Failed to save UI access settings:",e),b.default.fromBackend("Failed to save UI access settings")}finally{l(!1)}};return(0,t.jsxs)("div",{style:{padding:"16px"},children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},children:(0,t.jsx)(w.Text,{style:{fontSize:"14px",color:"#6b7280"},children:"Configure who can access the UI interface and how group information is extracted from JWT tokens."})}),(0,t.jsxs)(g.Form,{form:r,onFinish:a,layout:"vertical",children:[(0,t.jsx)(g.Form.Item,{label:"UI Access Mode",name:"ui_access_mode_type",tooltip:"Controls who can access the UI interface",children:(0,t.jsxs)(Z.Select,{placeholder:"Select access mode",children:[(0,t.jsx)(Z.Select.Option,{value:"all_authenticated_users",children:"All Authenticated Users"}),(0,t.jsx)(Z.Select.Option,{value:"restricted_sso_group",children:"Restricted SSO Group"})]})}),(0,t.jsx)(g.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.ui_access_mode_type!==t.ui_access_mode_type,children:({getFieldValue:e})=>"restricted_sso_group"===e("ui_access_mode_type")?(0,t.jsx)(g.Form.Item,{label:"Restricted SSO Group",name:"restricted_sso_group",rules:[{required:!0,message:"Please enter the restricted SSO group"}],children:(0,t.jsx)(k.TextInput,{placeholder:"ui-access-group"})}):null}),(0,t.jsx)(g.Form.Item,{label:"SSO Group JWT Field",name:"sso_group_jwt_field",tooltip:"JWT field name that contains team/group information. Use dot notation to access nested fields.",children:(0,t.jsx)(k.TextInput,{placeholder:"groups"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"16px"},children:(0,t.jsx)(m.Button,{type:"primary",htmlType:"submit",loading:i,style:{backgroundColor:"#6366f1",borderColor:"#6366f1"},children:"Update UI Access Control"})})]})]})},{Title:ts,Paragraph:tr,Text:ti}=y.Typography;e.s(["default",0,({proxySettings:e})=>{let{premiumUser:y,accessToken:C,userId:w}=(0,s.default)(),[T]=g.Form.useForm(),[k,E]=(0,j.useState)(!1),[N,O]=(0,j.useState)(!1),[F,A]=(0,j.useState)(!1),[M,P]=(0,j.useState)(!1),[B,R]=(0,j.useState)(!1),[z,D]=(0,j.useState)(!1),[L,V]=(0,j.useState)([]),[G,q]=(0,j.useState)(null),[H,$]=(0,j.useState)(!1),K=(0,S.useBaseUrl)(),Q="All IP Addresses Allowed",W=K;W+="/fallback/login";let Y=async()=>{if(C)try{let e=await (0,I.getSSOSettings)(C);if(e&&e.values){let t=e.values.google_client_id&&e.values.google_client_secret,s=e.values.microsoft_client_id&&e.values.microsoft_client_secret,r=e.values.generic_client_id&&e.values.generic_client_secret;$(t||s||r)}else $(!1)}catch(e){console.error("Error checking SSO configuration:",e),$(!1)}},J=async()=>{try{if(!0!==y)return void b.default.fromBackend("This feature is only available for premium users. Please upgrade your account.");if(C){let e=await (0,I.getAllowedIPs)(C);V(e&&e.length>0?e:[Q])}else V([Q])}catch(e){console.error("Error fetching allowed IPs:",e),b.default.fromBackend(`Failed to fetch allowed IPs ${e}`),V([Q])}finally{!0===y&&A(!0)}},Z=async e=>{try{if(C){await (0,I.addAllowedIP)(C,e.ip);let t=await (0,I.getAllowedIPs)(C);V(t),b.default.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),b.default.fromBackend(`Failed to add IP address ${e}`)}finally{P(!1)}},X=async e=>{q(e),R(!0)},ee=async()=>{if(G&&C)try{await (0,I.deleteAllowedIP)(C,G);let e=await (0,I.getAllowedIPs)(C);V(e.length>0?e:[Q]),b.default.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),b.default.fromBackend(`Failed to delete IP address ${e}`)}finally{R(!1),q(null)}};(0,j.useEffect)(()=>{Y()},[C,y,Y]);let et=()=>{D(!1)},es=[{key:"sso-settings",label:"SSO Settings",children:(0,t.jsx)(ek,{})},{key:"security-settings",label:"Security Settings",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.Card,{children:[(0,t.jsx)(ts,{level:4,children:" ✨ Security Settings"}),(0,t.jsx)(p.Alert,{message:"SSO Configuration Deprecated",description:"Editing SSO Settings on this page is deprecated and will be removed in a future version. Please use the SSO Settings tab for SSO configuration.",type:"warning",showIcon:!0}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem",marginLeft:"0.5rem"},children:[(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>E(!0),children:H?"Edit SSO Settings":"Add SSO"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:J,children:"Allowed IPs"})}),(0,t.jsx)("div",{children:(0,t.jsx)(r.Button,{style:{width:"150px"},onClick:()=>!0===y?D(!0):b.default.fromBackend("Only premium users can configure UI access control"),children:"UI Access Control"})})]})]}),(0,t.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,t.jsx)(te,{isAddSSOModalVisible:k,isInstructionsModalVisible:N,handleAddSSOOk:()=>{E(!1),T.resetFields(),C&&y&&Y()},handleAddSSOCancel:()=>{E(!1),T.resetFields()},handleShowInstructions:e=>{E(!1),O(!0)},handleInstructionsOk:()=>{O(!1),C&&y&&Y()},handleInstructionsCancel:()=>{O(!1),C&&y&&Y()},form:T,accessToken:C,ssoConfigured:H}),(0,t.jsx)(_.Modal,{title:"Manage Allowed IP Addresses",width:800,open:F,onCancel:()=>A(!1),footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>P(!0),children:"Add IP Address"},"add"),(0,t.jsx)(r.Button,{onClick:()=>A(!1),children:"Close"},"close")],children:(0,t.jsxs)(a.Table,{children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(d.TableHeaderCell,{children:"IP Address"}),(0,t.jsx)(d.TableHeaderCell,{className:"text-right",children:"Action"})]})}),(0,t.jsx)(n.TableBody,{children:L.map((e,s)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(o.TableCell,{children:e}),(0,t.jsx)(o.TableCell,{className:"text-right",children:e!==Q&&(0,t.jsx)(r.Button,{onClick:()=>X(e),color:"red",size:"xs",children:"Delete"})})]},s))})]})}),(0,t.jsx)(_.Modal,{title:"Add Allowed IP Address",open:M,onCancel:()=>P(!1),footer:null,children:(0,t.jsxs)(g.Form,{onFinish:Z,children:[(0,t.jsx)(g.Form.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,t.jsx)(h.Input,{placeholder:"Enter IP address"})}),(0,t.jsx)(g.Form.Item,{children:(0,t.jsx)(m.Button,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,t.jsx)(_.Modal,{title:"Confirm Delete",open:B,onCancel:()=>R(!1),onOk:ee,footer:[(0,t.jsx)(r.Button,{className:"mx-1",onClick:()=>ee(),children:"Yes"},"delete"),(0,t.jsx)(r.Button,{onClick:()=>R(!1),children:"Close"},"close")],children:(0,t.jsxs)(ti,{children:["Are you sure you want to delete the IP address: ",G,"?"]})}),(0,t.jsx)(_.Modal,{title:"UI Access Control Settings",open:z,width:600,footer:null,onOk:et,onCancel:()=>{D(!1)},children:(0,t.jsx)(tt,{accessToken:C,onSuccess:()=>{et(),b.default.success("UI Access Control settings updated successfully")}})})]}),(0,t.jsxs)(i.Callout,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,t.jsxs)("a",{href:W,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)("b",{children:W})," "]})]})]})},{key:"scim",label:"SCIM",children:(0,t.jsx)(U,{accessToken:C,userID:w,proxySettings:e})},{key:"ui-settings",label:(0,t.jsx)(x.Space,{children:(0,t.jsxs)(ti,{children:["UI Settings ",(0,t.jsx)(v.default,{})]})}),children:(0,t.jsx)(ez,{})},{key:"hashicorp-vault",label:"Hashicorp Vault",children:(0,t.jsx)(e8,{})}];return(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsx)(ts,{level:4,children:"Admin Access "}),(0,t.jsx)(tr,{children:"Go to 'Internal Users' page to add other admins."}),(0,t.jsx)(f.Tabs,{items:es})]})}],105278)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/e9de3f8db541361f.js b/litellm/proxy/_experimental/out/_next/static/chunks/e9de3f8db541361f.js deleted file mode 100644 index e421672d90c..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/e9de3f8db541361f.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),g=e.i(72713),p=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:N}=s.Typography;function k({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:k,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(N,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:k,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(g.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(p.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>k],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},643449,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(389083),l=e.i(810757),r=e.i(477386),i=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:n=[],variant:o="card",className:d=""}){let c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var n;let o=(n=e.callback_name,Object.entries(i.callback_map).find(([e,t])=>t===n)?.[0]||n),d=i.callbackInfo[o]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:o,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-blue-800",children:o}),(0,t.jsxs)(a.Text,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(s.Badge,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}})(e.callback_type),size:"sm",children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(s.Badge,{color:"red",size:"xs",children:n.length})]}),n.length>0?(0,t.jsx)("div",{className:"space-y-3",children:n.map((e,l)=>{let n=i.reverse_callback_map[e]||e,o=i.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-red-800",children:n}),(0,t.jsx)(a.Text,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(s.Badge,{color:"red",size:"sm",children:"Disabled"})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===o?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${d}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${d}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),c]})}])},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),g=e.i(808613),p=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),N=e.i(237016),k=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=g.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),k.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),k.default.fromBackend(e),C(!1)}}},B=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:B,footer:_?[(0,n.jsx)(o.Button,{onClick:B,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:B,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(N.CopyToClipboard,{text:_,onCopy:()=>k.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(g.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(p.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),g=e.i(653824),p=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),N=e.i(784647),k=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),B=e.i(190702),E=e.i(891547),O=e.i(109799),P=e.i(921511),z=e.i(827252),K=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[g,p]=(0,k.useState)([]),[h,j]=(0,k.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,k.useState)([]),[v,N]=(0,k.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,k.useState)(e.organization_id||null),[A,M]=(0,k.useState)(e.auto_rotate||!1),[R,D]=(0,k.useState)(e.rotation_interval||""),[B,el]=(0,k.useState)(!e.expires),[er,ei]=(0,k.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,k.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);p(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,k.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let eg=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,ep={...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,k.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,k.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,k.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,k.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}B&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:ep,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(E.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:g.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{N((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:B,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:E,teams:O,onKeyDataUpdate:P,onDelete:z,backButtonText:K="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,k.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,k.useState)(!1),[es,er]=(0,k.useState)(!1),[ei,en]=(0,k.useState)(""),[eo,ed]=(0,k.useState)(!1),[ec,em]=(0,k.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[eg,ep]=(0,k.useState)(E),[eh,ej]=(0,k.useState)(null),[e_,ey]=(0,k.useState)(!1),[eb,ef]=(0,k.useState)({}),[ev,eN]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{E&&ep(E)},[E]),(0,k.useEffect)(()=>{(async()=>{let e=eg?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;eN(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eN(!1)}})()},[U,eg?.metadata?.policies]),(0,k.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!eg)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:K}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let ek=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...eg.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...eg.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);ep(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,eg.token||eg.token_id),F.default.success("Key deleted successfully"),z&&z(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"")||$===eg.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(N.KeyInfoHeader,{data:{keyName:eg.key_alias||"Virtual Key",keyId:eg.token_id||eg.token,userId:eg.user_id||"",userEmail:eg.user_email||"",createdBy:eg.user_email||eg.user_id||"",createdAt:eg.created_at?ew(eg.created_at):"",lastUpdated:eg.updated_at?ew(eg.updated_at):"",lastActive:eg.last_active?ew(eg.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:K,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:eg,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{ep(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:eg?.key_alias||"-"},{label:"Key ID",value:eg?.token_id||eg?.token||"-",code:!0},{label:"Team ID",value:eg?.team_id||"-",code:!0},{label:"Spend",value:eg?.spend?`$${(0,i.formatNumberWithCommas)(eg.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:eg?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(eg.token||eg.token_id,{onSuccess:()=>{ep(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:eg?.key_alias||eg?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(g.TabGroup,{children:[(0,t.jsxs)(p.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(eg.metadata?.guardrails)&&eg.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eg.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof eg.metadata?.disable_global_guardrails&&!0===eg.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(eg.metadata?.policies)&&eg.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:eg.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:eg,onCancel:()=>Z(!1),onSubmit:ek,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.token_id||eg.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:eg.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:eg.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:eg.project_id?(V=J?.find(e=>e.project_id===eg.project_id),V?.project_alias?`${V.project_alias} (${eg.project_id})`:eg.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(eg.organization_id??eg.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(eg.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:eg.expires?ew(eg.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.metadata?.tags)&&eg.metadata.tags.length>0?eg.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.prompts)&&eg.metadata.prompts.length>0?eg.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.allowed_routes)&&eg.allowed_routes.length>0?eg.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.allowed_passthrough_routes)&&eg.metadata.allowed_passthrough_routes.length>0?eg.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:eg.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==eg.max_parallel_requests?eg.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",eg.metadata?.model_tpm_limit?JSON.stringify(eg.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",eg.metadata?.model_rpm_limit?JSON.stringify(eg.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(eg.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5400ee883dfa8c43.js b/litellm/proxy/_experimental/out/_next/static/chunks/ed901fab61dc16dc.js similarity index 89% rename from litellm/proxy/_experimental/out/_next/static/chunks/5400ee883dfa8c43.js rename to litellm/proxy/_experimental/out/_next/static/chunks/ed901fab61dc16dc.js index 2337c72cb67..2081d28ca40 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/5400ee883dfa8c43.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/ed901fab61dc16dc.js @@ -390,7 +390,7 @@ audio_file = open("path/to/your/audio/file.mp3", "rb") response = client.audio.transcriptions.create( model="${S}", file=audio_file${l?`, - prompt="${l.replace(/"/g,'\\"')}"`:""} + prompt="${l.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:""} ) print(response.text) @@ -417,7 +417,7 @@ print(f"Audio saved to {output_filename}") # ) # response.stream_to_file("output_speech.mp3") `;break;default:t="\n# Code generation for this endpoint is not implemented yet."}return`${I} -${t}`}],190272)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",()=>t])},916925,e=>{"use strict";var t,a=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let s={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},r="../ui/assets/logos/",i={"A2A Agent":`${r}a2a_agent.png`,Ai21:`${r}ai21.svg`,"Ai21 Chat":`${r}ai21.svg`,"AI/ML API":`${r}aiml_api.svg`,"Aiohttp Openai":`${r}openai_small.svg`,Anthropic:`${r}anthropic.svg`,"Anthropic Text":`${r}anthropic.svg`,AssemblyAI:`${r}assemblyai_small.png`,Azure:`${r}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${r}microsoft_azure.svg`,"Azure Text":`${r}microsoft_azure.svg`,Baseten:`${r}baseten.svg`,"Amazon Bedrock":`${r}bedrock.svg`,"Amazon Bedrock Mantle":`${r}bedrock.svg`,"AWS SageMaker":`${r}bedrock.svg`,Cerebras:`${r}cerebras.svg`,Cloudflare:`${r}cloudflare.svg`,Codestral:`${r}mistral.svg`,Cohere:`${r}cohere.svg`,"Cohere Chat":`${r}cohere.svg`,Cometapi:`${r}cometapi.svg`,Cursor:`${r}cursor.svg`,"Databricks (Qwen API)":`${r}databricks.svg`,Dashscope:`${r}dashscope.svg`,Deepseek:`${r}deepseek.svg`,Deepgram:`${r}deepgram.png`,DeepInfra:`${r}deepinfra.png`,ElevenLabs:`${r}elevenlabs.png`,"Fal AI":`${r}fal_ai.jpg`,"Featherless Ai":`${r}featherless.svg`,"Fireworks AI":`${r}fireworks.svg`,Friendliai:`${r}friendli.svg`,"Github Copilot":`${r}github_copilot.svg`,"Google AI Studio":`${r}google.svg`,GradientAI:`${r}gradientai.svg`,Groq:`${r}groq.svg`,vllm:`${r}vllm.png`,Huggingface:`${r}huggingface.svg`,Hyperbolic:`${r}hyperbolic.svg`,Infinity:`${r}infinity.png`,"Jina AI":`${r}jina.png`,"Lambda Ai":`${r}lambda.svg`,"Lm Studio":`${r}lmstudio.svg`,"Meta Llama":`${r}meta_llama.svg`,MiniMax:`${r}minimax.svg`,"Mistral AI":`${r}mistral.svg`,Moonshot:`${r}moonshot.svg`,Morph:`${r}morph.svg`,Nebius:`${r}nebius.svg`,Novita:`${r}novita.svg`,"Nvidia Nim":`${r}nvidia_nim.svg`,Ollama:`${r}ollama.svg`,"Ollama Chat":`${r}ollama.svg`,Oobabooga:`${r}openai_small.svg`,OpenAI:`${r}openai_small.svg`,"Openai Like":`${r}openai_small.svg`,"OpenAI Text Completion":`${r}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${r}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${r}openai_small.svg`,Openrouter:`${r}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${r}oracle.svg`,Perplexity:`${r}perplexity-ai.svg`,Recraft:`${r}recraft.svg`,Replicate:`${r}replicate.svg`,RunwayML:`${r}runwayml.png`,Sagemaker:`${r}bedrock.svg`,Sambanova:`${r}sambanova.svg`,"SAP Generative AI Hub":`${r}sap.png`,Snowflake:`${r}snowflake.svg`,"Text-Completion-Codestral":`${r}mistral.svg`,TogetherAI:`${r}togetherai.svg`,Topaz:`${r}topaz.svg`,Triton:`${r}nvidia_triton.png`,V0:`${r}v0.svg`,"Vercel Ai Gateway":`${r}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${r}google.svg`,"Vertex Ai Beta":`${r}google.svg`,Vllm:`${r}vllm.png`,VolcEngine:`${r}volcengine.png`,"Voyage AI":`${r}voyage.webp`,Watsonx:`${r}watsonx.svg`,"Watsonx Text":`${r}watsonx.svg`,xAI:`${r}xai.svg`,Xinference:`${r}xinference.svg`};e.s(["Providers",()=>a,"getPlaceholder",0,e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(s).find(t=>s[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let r=a[t];return{logo:i[r],displayName:r}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let a=s[e];console.log(`Provider mapped to: ${a}`);let r=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let s=t.litellm_provider;(s===a||"string"==typeof s&&s.includes(a))&&r.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&r.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&r.push(e)}))),r},"providerLogoMap",0,i,"provider_map",0,s])},798496,e=>{"use strict";var t=e.i(843476),a=e.i(152990),s=e.i(682830),r=e.i(271645),i=e.i(269200),l=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572),m=e.i(94629),p=e.i(360820),u=e.i(871943);function g({data:e=[],columns:g,isLoading:x=!1,defaultSorting:h=[],pagination:_,onPaginationChange:f,enablePagination:b=!1,onRowClick:v}){let[j,A]=r.default.useState(h),[y]=r.default.useState("onChange"),[N,T]=r.default.useState({}),[C,S]=r.default.useState({}),I=(0,a.useReactTable)({data:e,columns:g,state:{sorting:j,columnSizing:N,columnVisibility:C,...b&&_?{pagination:_}:{}},columnResizeMode:y,onSortingChange:A,onColumnSizingChange:T,onColumnVisibilityChange:S,...b&&f?{onPaginationChange:f}:{},getCoreRowModel:(0,s.getCoreRowModel)(),getSortedRowModel:(0,s.getSortedRowModel)(),...b?{getPaginationRowModel:(0,s.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:I.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(l.TableHead,{children:I.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(n.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,a.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(p.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(u.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(m.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:g.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):I.getRowModel().rows.length>0?I.getRowModel().rows.map(e=>(0,t.jsx)(c.TableRow,{onClick:()=>v?.(e.original),className:v?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:g.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>g])},976883,174886,e=>{"use strict";var t=e.i(843476),a=e.i(275144),s=e.i(434626),r=e.i(271645);let i=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});var l=e.i(994388),n=e.i(304967),o=e.i(599724),c=e.i(629569),d=e.i(212931),m=e.i(199133),p=e.i(653496),u=e.i(262218),g=e.i(592968),x=e.i(991124);e.s(["Copy",()=>x.default],174886);var x=x,h=e.i(879664),h=h,_=e.i(798496),f=e.i(727749),b=e.i(402874),v=e.i(764205),j=e.i(190272),A=e.i(785913),y=e.i(916925);let{TabPane:N}=p.Tabs;e.s(["default",0,({accessToken:e,isEmbedded:T=!1})=>{let C,S,I,w,E,O,M,[k,L]=(0,r.useState)(null),[R,P]=(0,r.useState)(null),[$,D]=(0,r.useState)(null),[z,H]=(0,r.useState)("LiteLLM Gateway"),[G,F]=(0,r.useState)(null),[U,B]=(0,r.useState)(""),[V,K]=(0,r.useState)({}),[W,X]=(0,r.useState)(!0),[q,Y]=(0,r.useState)(!0),[J,Z]=(0,r.useState)(!0),[Q,ee]=(0,r.useState)(""),[et,ea]=(0,r.useState)(""),[es,er]=(0,r.useState)(""),[ei,el]=(0,r.useState)([]),[en,eo]=(0,r.useState)([]),[ec,ed]=(0,r.useState)([]),[em,ep]=(0,r.useState)([]),[eu,eg]=(0,r.useState)([]),[ex,eh]=(0,r.useState)("I'm alive! ✓"),[e_,ef]=(0,r.useState)(!1),[eb,ev]=(0,r.useState)(!1),[ej,eA]=(0,r.useState)(!1),[ey,eN]=(0,r.useState)(null),[eT,eC]=(0,r.useState)(null),[eS,eI]=(0,r.useState)(null),[ew,eE]=(0,r.useState)({}),[eO,eM]=(0,r.useState)("models");(0,r.useEffect)(()=>{(async()=>{try{await (0,v.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{X(!0);let e=await (0,v.modelHubPublicModelsCall)();console.log("ModelHubData:",e),L(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public model data",e),eh("Service unavailable")}finally{X(!1)}},t=async()=>{try{Y(!0);let e=await (0,v.agentHubPublicModelsCall)();console.log("AgentHubData:",e),P(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public agent data",e)}finally{Y(!1)}},a=async()=>{try{Z(!0);let e=await (0,v.mcpHubPublicServersCall)();console.log("MCPHubData:",e),D(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{Z(!1)}};(async()=>{let e=await (0,v.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),H(e.docs_title),F(e.custom_docs_description),B(e.litellm_version),K(e.useful_links||{})})(),e(),t(),a()})()},[]),(0,r.useEffect)(()=>{},[Q,ei,en,ec]);let ek=(0,r.useMemo)(()=>{if(!k||!Array.isArray(k))return[];let e=k;if(Q.trim()){let t=Q.toLowerCase(),a=t.split(/\s+/),s=k.filter(e=>{let s=e.model_group.toLowerCase();return!!s.includes(t)||a.every(e=>s.includes(e))});s.length>0&&(e=s.sort((e,a)=>{let s=e.model_group.toLowerCase(),r=a.model_group.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=50*!!t.split(/\s+/).every(e=>s.includes(e)),d=50*!!t.split(/\s+/).every(e=>r.includes(e)),m=s.length;return l+o+d+(1e3-r.length)-(i+n+c+(1e3-m))}))}return e.filter(e=>{let t=0===ei.length||ei.some(t=>e.providers.includes(t)),a=0===en.length||en.includes(e.mode||""),s=0===ec.length||Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).some(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return ec.includes(t)});return t&&a&&s})},[k,Q,ei,en,ec]),eL=(0,r.useMemo)(()=>{if(!R||!Array.isArray(R))return[];let e=R;if(et.trim()){let t=et.toLowerCase(),a=t.split(/\s+/);e=(e=R.filter(e=>{let s=e.name.toLowerCase(),r=e.description.toLowerCase();return!!(s.includes(t)||r.includes(t))||a.every(e=>s.includes(e)||r.includes(e))})).sort((e,a)=>{let s=e.name.toLowerCase(),r=a.name.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=i+n+(1e3-s.length);return l+o+(1e3-r.length)-c})}return e.filter(e=>0===em.length||e.skills?.some(e=>e.tags?.some(e=>em.includes(e))))},[R,et,em]),eR=(0,r.useMemo)(()=>{if(!$||!Array.isArray($))return[];let e=$;if(es.trim()){let t=es.toLowerCase(),a=t.split(/\s+/);e=(e=$.filter(e=>{let s=e.server_name.toLowerCase(),r=(e.mcp_info?.description||"").toLowerCase();return!!(s.includes(t)||r.includes(t))||a.every(e=>s.includes(e)||r.includes(e))})).sort((e,a)=>{let s=e.server_name.toLowerCase(),r=a.server_name.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=i+n+(1e3-s.length);return l+o+(1e3-r.length)-c})}return e.filter(e=>0===eu.length||eu.includes(e.transport))},[$,es,eu]),eP=e=>{navigator.clipboard.writeText(e),f.default.success("Copied to clipboard!")},e$=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),eD=e=>`$${(1e6*e).toFixed(4)}`,ez=e=>e?e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString():"N/A";return(0,t.jsx)(a.ThemeProvider,{accessToken:e,children:(0,t.jsxs)("div",{className:T?"w-full":"min-h-screen bg-white",children:[!T&&(0,t.jsx)(b.default,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:eE,proxySettings:ew,accessToken:e||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,t.jsxs)("div",{className:T?"w-full p-6":"w-full px-8 py-12",children:[T&&(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,t.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!T&&(0,t.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,t.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:G||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,t.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"w-4 h-4 mr-2",children:"🔧"}),"Built with litellm: v",U]})})]}),V&&Object.keys(V).length>0&&(0,t.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(V||{}).map(([e,t])=>({title:e,url:"string"==typeof t?t:t.url,index:"string"==typeof t?0:t.index??0})).sort((e,t)=>e.index-t.index).map(({title:e,url:a})=>(0,t.jsxs)("button",{onClick:()=>window.open(a,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,t.jsx)(s.ExternalLinkIcon,{className:"w-4 h-4"}),(0,t.jsx)(o.Text,{className:"text-sm font-medium",children:e})]},e))})]}),!T&&(0,t.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,t.jsxs)(o.Text,{className:"text-green-600 font-medium text-sm",children:["Service status: ",ex]})})]}),(0,t.jsx)(n.Card,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,t.jsxs)(p.Tabs,{activeKey:eO,onChange:eM,size:"large",className:"public-hub-tabs",children:[(0,t.jsxs)(N,{tab:"Model Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,t.jsx)(g.Tooltip,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,t.jsx)(h.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:Q,onChange:e=>ee(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:ei,onChange:e=>el(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:a}=(0,y.getProviderLogoAndName)(e.value);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e.label})]})},children:k&&Array.isArray(k)&&(C=new Set,k.forEach(e=>{(e.providers??[]).forEach(e=>C.add(e))}),Array.from(C)).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:en,onChange:e=>eo(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:k&&Array.isArray(k)&&(S=new Set,k.forEach(e=>{e.mode&&S.add(e.mode)}),Array.from(S)).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:ec,onChange:e=>ed(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:k&&Array.isArray(k)&&(I=new Set,k.forEach(e=>{Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).forEach(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");I.add(t)})}),Array.from(I).sort()).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(_.ModelDataTable,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(g.Tooltip,{title:e.original.model_group,children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eN(e.original),ef(!0)},children:e.original.model_group})})}),size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:({row:e})=>{let a=e.original.providers??[];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.map(e=>{let{logo:a}=(0,y.getProviderLogoAndName)(e);return(0,t.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:({row:e})=>{let a=e.original.mode;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:(e=>{switch(e?.toLowerCase()){case"chat":return"💬";case"rerank":return"🔄";case"embedding":return"📄";default:return"🤖"}})(a||"")}),(0,t.jsx)(o.Text,{children:a||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(o.Text,{className:"text-center",children:ez(e.original.max_input_tokens)}),size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(o.Text,{className:"text-center",children:ez(e.original.max_output_tokens)}),size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:({row:e})=>{let a=e.original.input_cost_per_token;return(0,t.jsx)(o.Text,{className:"text-center",children:a?eD(a):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:({row:e})=>{let a=e.original.output_cost_per_token;return(0,t.jsx)(o.Text,{className:"text-center",children:a?eD(a):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:({row:e})=>{let a=Object.entries(e.original).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e$(e));return 0===a.length?(0,t.jsx)(o.Text,{className:"text-gray-400",children:"-"}):1===a.length?(0,t.jsx)("div",{className:"h-6 flex items-center",children:(0,t.jsx)(u.Tag,{color:"blue",className:"text-xs",children:a[0]})}):(0,t.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,t.jsx)(u.Tag,{color:"blue",className:"text-xs",children:a[0]}),(0,t.jsx)(g.Tooltip,{title:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"font-medium",children:"All Features:"}),a.map((e,a)=>(0,t.jsxs)("div",{className:"text-xs",children:["• ",e]},a))]}),trigger:"click",placement:"topLeft",children:(0,t.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",a.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:({row:e})=>{let a=e.original,s="healthy"===a.health_status?"green":"unhealthy"===a.health_status?"red":"default",r=a.health_response_time?`Response Time: ${Number(a.health_response_time).toFixed(2)}ms`:"N/A",i=a.health_checked_at?`Last Checked: ${new Date(a.health_checked_at).toLocaleString()}`:"N/A";return(0,t.jsx)(g.Tooltip,{title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{children:r}),(0,t.jsx)("div",{children:i})]}),children:(0,t.jsx)(u.Tag,{color:s,children:(0,t.jsx)("span",{className:"capitalize",children:a.health_status??"Unknown"})},a.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:({row:e})=>{var a,s;let r,i=e.original;return(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:(a=i.rpm,s=i.tpm,r=[],a&&r.push(`RPM: ${a.toLocaleString()}`),s&&r.push(`TPM: ${s.toLocaleString()}`),r.length>0?r.join(", "):"N/A")})},size:150}],data:ek,isLoading:W,defaultSorting:[{id:"model_group",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",ek.length," of ",k?.length||0," models"]})})]},"models"),R&&Array.isArray(R)&&R.length>0&&(0,t.jsxs)(N,{tab:"Agent Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,t.jsx)(g.Tooltip,{title:"Search agents by name or description",placement:"top",children:(0,t.jsx)(h.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:et,onChange:e=>ea(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:em,onChange:e=>ep(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:R&&Array.isArray(R)&&(w=new Set,R.forEach(e=>{e.skills?.forEach(e=>{e.tags?.forEach(e=>w.add(e))})}),Array.from(w).sort()).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(_.ModelDataTable,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(g.Tooltip,{title:e.original.name,children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eC(e.original),ev(!0)},children:e.original.name})})}),size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>{let a=e.original.description??"",s=a.length>80?a.substring(0,80)+"...":a;return(0,t.jsx)(g.Tooltip,{title:a,children:(0,t.jsx)(o.Text,{className:"text-sm text-gray-700",children:s})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(o.Text,{className:"text-sm",children:e.original.version}),size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:({row:e})=>{let a=e.original.provider;return a?(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(o.Text,{className:"font-medium",children:a.organization})}):(0,t.jsx)(o.Text,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let a=e.original.skills||[];return 0===a.length?(0,t.jsx)(o.Text,{className:"text-gray-400",children:"-"}):1===a.length?(0,t.jsx)("div",{className:"h-6 flex items-center",children:(0,t.jsx)(u.Tag,{color:"purple",className:"text-xs",children:a[0].name})}):(0,t.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,t.jsx)(u.Tag,{color:"purple",className:"text-xs",children:a[0].name}),(0,t.jsx)(g.Tooltip,{title:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"font-medium",children:"All Skills:"}),a.map((e,a)=>(0,t.jsxs)("div",{className:"text-xs",children:["• ",e.name]},a))]}),trigger:"click",placement:"topLeft",children:(0,t.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",a.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let a=Object.entries(e.original.capabilities||{}).filter(([e,t])=>!0===t).map(([e])=>e);return 0===a.length?(0,t.jsx)(o.Text,{className:"text-gray-400",children:"-"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.map(e=>(0,t.jsx)(u.Tag,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eL,isLoading:q,defaultSorting:[{id:"name",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",eL.length," of ",R?.length||0," agents"]})})]},"agents"),$&&Array.isArray($)&&$.length>0&&(0,t.jsxs)(N,{tab:"MCP Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,t.jsx)(g.Tooltip,{title:"Search MCP servers by name or description",placement:"top",children:(0,t.jsx)(h.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:es,onChange:e=>er(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:eu,onChange:e=>eg(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:$&&Array.isArray($)&&(E=new Set,$.forEach(e=>{e.transport&&E.add(e.transport)}),Array.from(E).sort()).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(_.ModelDataTable,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(g.Tooltip,{title:e.original.server_name,children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eI(e.original),eA(!0)},children:e.original.server_name})})}),size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:({row:e})=>{let a=String(e.original.mcp_info?.description??"-"),s=a.length>80?a.substring(0,80)+"...":a;return(0,t.jsx)(g.Tooltip,{title:a,children:(0,t.jsx)(o.Text,{className:"text-sm text-gray-700",children:s})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:({row:e})=>{let a=e.original.url??"",s=a.length>40?a.substring(0,40)+"...":a;return(0,t.jsx)(g.Tooltip,{title:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs font-mono",children:s}),(0,t.jsx)(x.default,{onClick:()=>eP(a),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:({row:e})=>{let a=e.original.transport;return(0,t.jsx)(u.Tag,{color:"blue",className:"text-xs uppercase",children:a})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:({row:e})=>{let a=e.original.auth_type;return(0,t.jsx)(u.Tag,{color:"none"===a?"gray":"green",className:"text-xs capitalize",children:a})},size:100}],data:eR,isLoading:J,defaultSorting:[{id:"server_name",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",eR.length," of ",$?.length||0," MCP servers"]})})]},"mcp")]})})]}),(0,t.jsx)(d.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:ey?.model_group||"Model Details"}),ey&&(0,t.jsx)(g.Tooltip,{title:"Copy model name",children:(0,t.jsx)(x.default,{onClick:()=>eP(ey.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:e_,footer:null,onOk:()=>{ef(!1),eN(null)},onCancel:()=>{ef(!1),eN(null)},children:ey&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Model Name:"}),(0,t.jsx)(o.Text,{children:ey.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(o.Text,{children:ey.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ey.providers??[]).map(e=>{let{logo:a}=(0,y.getProviderLogoAndName)(e);return(0,t.jsx)(u.Tag,{color:"blue",children:(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),ey.model_group.includes("*")&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,t.jsx)(h.default,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group}),", you can use any string (",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group.replace("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(o.Text,{children:ey.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(o.Text,{children:ey.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:ey.input_cost_per_token?eD(ey.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:ey.output_cost_per_token?eD(ey.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(O=Object.entries(ey).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),M=["green","blue","purple","orange","red","yellow"],0===O.length?(0,t.jsx)(o.Text,{className:"text-gray-500",children:"No special capabilities listed"}):O.map((e,a)=>(0,t.jsx)(u.Tag,{color:M[a%M.length],children:e$(e)},e)))})]}),(ey.tpm||ey.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[ey.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(o.Text,{children:ey.tpm.toLocaleString()})]}),ey.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(o.Text,{children:ey.rpm.toLocaleString()})]})]})]}),ey.supported_openai_params&&ey.supported_openai_params.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.supported_openai_params.map(e=>(0,t.jsx)(u.Tag,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,t.jsx)("pre",{className:"text-sm",children:(0,j.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,A.getEndpointType)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"})})}),(0,t.jsx)("div",{className:"mt-2 text-right",children:(0,t.jsx)("button",{onClick:()=>{eP((0,j.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,A.getEndpointType)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,t.jsx)(d.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:eT?.name||"Agent Details"}),eT&&(0,t.jsx)(g.Tooltip,{title:"Copy agent name",children:(0,t.jsx)(x.default,{onClick:()=>eP(eT.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:eb,footer:null,onOk:()=>{ev(!1),eC(null)},onCancel:()=>{ev(!1),eC(null)},children:eT&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Name:"}),(0,t.jsx)(o.Text,{children:eT.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Version:"}),(0,t.jsx)(o.Text,{children:eT.version})]}),(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{children:eT.description})]}),eT.url&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsx)("a",{href:eT.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:eT.url})]})]})]}),eT.capabilities&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(eT.capabilities).filter(([e,t])=>!0===t).map(([e])=>(0,t.jsx)(u.Tag,{color:"green",className:"capitalize",children:e},e))})]}),eT.skills&&eT.skills.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,t.jsx)("div",{className:"space-y-4",children:eT.skills.map((e,a)=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,t.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium text-base",children:e.name}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,t.jsx)(u.Tag,{color:"purple",className:"text-xs",children:e},e))})]},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eT.defaultInputModes??[]).map(e=>(0,t.jsx)(u.Tag,{color:"blue",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eT.defaultOutputModes??[]).map(e=>(0,t.jsx)(u.Tag,{color:"blue",children:e},e))})]})]})]}),eT.documentationUrl&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,t.jsxs)("a",{href:eT.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,t.jsx)(s.ExternalLinkIcon,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"View Documentation"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,t.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,t.jsx)("pre",{className:"text-xs",children:`base_url = '${eT.url}' +${t}`}],190272)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",()=>t])},916925,e=>{"use strict";var t,a=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t);let s={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference"},r="../ui/assets/logos/",i={"A2A Agent":`${r}a2a_agent.png`,Ai21:`${r}ai21.svg`,"Ai21 Chat":`${r}ai21.svg`,"AI/ML API":`${r}aiml_api.svg`,"Aiohttp Openai":`${r}openai_small.svg`,Anthropic:`${r}anthropic.svg`,"Anthropic Text":`${r}anthropic.svg`,AssemblyAI:`${r}assemblyai_small.png`,Azure:`${r}microsoft_azure.svg`,"Azure AI Foundry (Studio)":`${r}microsoft_azure.svg`,"Azure Text":`${r}microsoft_azure.svg`,Baseten:`${r}baseten.svg`,"Amazon Bedrock":`${r}bedrock.svg`,"Amazon Bedrock Mantle":`${r}bedrock.svg`,"AWS SageMaker":`${r}bedrock.svg`,Cerebras:`${r}cerebras.svg`,Cloudflare:`${r}cloudflare.svg`,Codestral:`${r}mistral.svg`,Cohere:`${r}cohere.svg`,"Cohere Chat":`${r}cohere.svg`,Cometapi:`${r}cometapi.svg`,Cursor:`${r}cursor.svg`,"Databricks (Qwen API)":`${r}databricks.svg`,Dashscope:`${r}dashscope.svg`,Deepseek:`${r}deepseek.svg`,Deepgram:`${r}deepgram.png`,DeepInfra:`${r}deepinfra.png`,ElevenLabs:`${r}elevenlabs.png`,"Fal AI":`${r}fal_ai.jpg`,"Featherless Ai":`${r}featherless.svg`,"Fireworks AI":`${r}fireworks.svg`,Friendliai:`${r}friendli.svg`,"Github Copilot":`${r}github_copilot.svg`,"Google AI Studio":`${r}google.svg`,GradientAI:`${r}gradientai.svg`,Groq:`${r}groq.svg`,vllm:`${r}vllm.png`,Huggingface:`${r}huggingface.svg`,Hyperbolic:`${r}hyperbolic.svg`,Infinity:`${r}infinity.png`,"Jina AI":`${r}jina.png`,"Lambda Ai":`${r}lambda.svg`,"Lm Studio":`${r}lmstudio.svg`,"Meta Llama":`${r}meta_llama.svg`,MiniMax:`${r}minimax.svg`,"Mistral AI":`${r}mistral.svg`,Moonshot:`${r}moonshot.svg`,Morph:`${r}morph.svg`,Nebius:`${r}nebius.svg`,Novita:`${r}novita.svg`,"Nvidia Nim":`${r}nvidia_nim.svg`,Ollama:`${r}ollama.svg`,"Ollama Chat":`${r}ollama.svg`,Oobabooga:`${r}openai_small.svg`,OpenAI:`${r}openai_small.svg`,"Openai Like":`${r}openai_small.svg`,"OpenAI Text Completion":`${r}openai_small.svg`,"OpenAI-Compatible Text Completion Models (Together AI, etc.)":`${r}openai_small.svg`,"OpenAI-Compatible Endpoints (Together AI, etc.)":`${r}openai_small.svg`,Openrouter:`${r}openrouter.svg`,"Oracle Cloud Infrastructure (OCI)":`${r}oracle.svg`,Perplexity:`${r}perplexity-ai.svg`,Recraft:`${r}recraft.svg`,Replicate:`${r}replicate.svg`,RunwayML:`${r}runwayml.png`,Sagemaker:`${r}bedrock.svg`,Sambanova:`${r}sambanova.svg`,"SAP Generative AI Hub":`${r}sap.png`,Snowflake:`${r}snowflake.svg`,"Text-Completion-Codestral":`${r}mistral.svg`,TogetherAI:`${r}togetherai.svg`,Topaz:`${r}topaz.svg`,Triton:`${r}nvidia_triton.png`,V0:`${r}v0.svg`,"Vercel Ai Gateway":`${r}vercel.svg`,"Vertex AI (Anthropic, Gemini, etc.)":`${r}google.svg`,"Vertex Ai Beta":`${r}google.svg`,Vllm:`${r}vllm.png`,VolcEngine:`${r}volcengine.png`,"Voyage AI":`${r}voyage.webp`,Watsonx:`${r}watsonx.svg`,"Watsonx Text":`${r}watsonx.svg`,xAI:`${r}xai.svg`,Xinference:`${r}xinference.svg`};e.s(["Providers",()=>a,"getPlaceholder",0,e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:i[e],displayName:e}}let t=Object.keys(s).find(t=>s[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let r=a[t];return{logo:i[r],displayName:r}},"getProviderModels",0,(e,t)=>{console.log(`Provider key: ${e}`);let a=s[e];console.log(`Provider mapped to: ${a}`);let r=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let s=t.litellm_provider;(s===a||"string"==typeof s&&s.includes(a))&&r.push(e)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&r.push(e)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&r.push(e)}))),r},"providerLogoMap",0,i,"provider_map",0,s])},798496,e=>{"use strict";var t=e.i(843476),a=e.i(152990),s=e.i(682830),r=e.i(271645),i=e.i(269200),l=e.i(427612),n=e.i(64848),o=e.i(942232),c=e.i(496020),d=e.i(977572),m=e.i(94629),p=e.i(360820),u=e.i(871943);function g({data:e=[],columns:g,isLoading:x=!1,defaultSorting:h=[],pagination:_,onPaginationChange:f,enablePagination:b=!1,onRowClick:v}){let[j,A]=r.default.useState(h),[y]=r.default.useState("onChange"),[N,T]=r.default.useState({}),[C,S]=r.default.useState({}),I=(0,a.useReactTable)({data:e,columns:g,state:{sorting:j,columnSizing:N,columnVisibility:C,...b&&_?{pagination:_}:{}},columnResizeMode:y,onSortingChange:A,onColumnSizingChange:T,onColumnVisibilityChange:S,...b&&f?{onPaginationChange:f}:{},getCoreRowModel:(0,s.getCoreRowModel)(),getSortedRowModel:(0,s.getSortedRowModel)(),...b?{getPaginationRowModel:(0,s.getPaginationRowModel)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsx)("div",{className:"relative min-w-full",children:(0,t.jsxs)(i.Table,{className:"[&_td]:py-2 [&_th]:py-2",style:{width:I.getTotalSize(),minWidth:"100%",tableLayout:"fixed"},children:[(0,t.jsx)(l.TableHead,{children:I.getHeaderGroups().map(e=>(0,t.jsx)(c.TableRow,{children:e.headers.map(e=>(0,t.jsxs)(n.TableHeaderCell,{className:`py-1 h-8 relative ${"actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,a.flexRender)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(p.ChevronUpIcon,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(u.ChevronDownIcon,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(m.SwitchVerticalIcon,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,t.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200"}`})]},e.id))},e.id))}),(0,t.jsx)(o.TableBody,{children:x?(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:g.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"🚅 Loading models..."})})})}):I.getRowModel().rows.length>0?I.getRowModel().rows.map(e=>(0,t.jsx)(c.TableRow,{onClick:()=>v?.(e.original),className:v?"cursor-pointer hover:bg-gray-50":"",children:e.getVisibleCells().map(e=>(0,t.jsx)(d.TableCell,{className:`py-0.5 overflow-hidden ${"actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""} ${e.column.columnDef.meta?.className||""}`,style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(c.TableRow,{children:(0,t.jsx)(d.TableCell,{colSpan:g.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No models found"})})})})})]})})})})}e.s(["ModelDataTable",()=>g])},976883,174886,e=>{"use strict";var t=e.i(843476),a=e.i(275144),s=e.i(434626),r=e.i(271645);let i=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});var l=e.i(994388),n=e.i(304967),o=e.i(599724),c=e.i(629569),d=e.i(212931),m=e.i(199133),p=e.i(653496),u=e.i(262218),g=e.i(592968),x=e.i(991124);e.s(["Copy",()=>x.default],174886);var x=x,h=e.i(879664),h=h,_=e.i(798496),f=e.i(727749),b=e.i(402874),v=e.i(764205),j=e.i(190272),A=e.i(785913),y=e.i(916925);let{TabPane:N}=p.Tabs;e.s(["default",0,({accessToken:e,isEmbedded:T=!1})=>{let C,S,I,w,E,O,M,[k,L]=(0,r.useState)(null),[R,P]=(0,r.useState)(null),[$,D]=(0,r.useState)(null),[z,H]=(0,r.useState)("LiteLLM Gateway"),[G,F]=(0,r.useState)(null),[U,B]=(0,r.useState)(""),[V,K]=(0,r.useState)({}),[W,X]=(0,r.useState)(!0),[q,Y]=(0,r.useState)(!0),[J,Z]=(0,r.useState)(!0),[Q,ee]=(0,r.useState)(""),[et,ea]=(0,r.useState)(""),[es,er]=(0,r.useState)(""),[ei,el]=(0,r.useState)([]),[en,eo]=(0,r.useState)([]),[ec,ed]=(0,r.useState)([]),[em,ep]=(0,r.useState)([]),[eu,eg]=(0,r.useState)([]),[ex,eh]=(0,r.useState)("I'm alive! ✓"),[e_,ef]=(0,r.useState)(!1),[eb,ev]=(0,r.useState)(!1),[ej,eA]=(0,r.useState)(!1),[ey,eN]=(0,r.useState)(null),[eT,eC]=(0,r.useState)(null),[eS,eI]=(0,r.useState)(null),[ew,eE]=(0,r.useState)({}),[eO,eM]=(0,r.useState)("models");(0,r.useEffect)(()=>{(async()=>{try{await (0,v.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{X(!0);let e=await (0,v.modelHubPublicModelsCall)();console.log("ModelHubData:",e),L(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public model data",e),eh("Service unavailable")}finally{X(!1)}},t=async()=>{try{Y(!0);let e=await (0,v.agentHubPublicModelsCall)();console.log("AgentHubData:",e),P(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public agent data",e)}finally{Y(!1)}},a=async()=>{try{Z(!0);let e=await (0,v.mcpHubPublicServersCall)();console.log("MCPHubData:",e),D(Array.isArray(e)?e:[])}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{Z(!1)}};(async()=>{let e=await (0,v.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),H(e.docs_title),F(e.custom_docs_description),B(e.litellm_version),K(e.useful_links||{})})(),e(),t(),a()})()},[]),(0,r.useEffect)(()=>{},[Q,ei,en,ec]);let ek=(0,r.useMemo)(()=>{if(!k||!Array.isArray(k))return[];let e=k;if(Q.trim()){let t=Q.toLowerCase(),a=t.split(/\s+/),s=k.filter(e=>{let s=e.model_group.toLowerCase();return!!s.includes(t)||a.every(e=>s.includes(e))});s.length>0&&(e=s.sort((e,a)=>{let s=e.model_group.toLowerCase(),r=a.model_group.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=50*!!t.split(/\s+/).every(e=>s.includes(e)),d=50*!!t.split(/\s+/).every(e=>r.includes(e)),m=s.length;return l+o+d+(1e3-r.length)-(i+n+c+(1e3-m))}))}return e.filter(e=>{let t=0===ei.length||ei.some(t=>e.providers.includes(t)),a=0===en.length||en.includes(e.mode||""),s=0===ec.length||Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).some(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return ec.includes(t)});return t&&a&&s})},[k,Q,ei,en,ec]),eL=(0,r.useMemo)(()=>{if(!R||!Array.isArray(R))return[];let e=R;if(et.trim()){let t=et.toLowerCase(),a=t.split(/\s+/);e=(e=R.filter(e=>{let s=e.name.toLowerCase(),r=e.description.toLowerCase();return!!(s.includes(t)||r.includes(t))||a.every(e=>s.includes(e)||r.includes(e))})).sort((e,a)=>{let s=e.name.toLowerCase(),r=a.name.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=i+n+(1e3-s.length);return l+o+(1e3-r.length)-c})}return e.filter(e=>0===em.length||e.skills?.some(e=>e.tags?.some(e=>em.includes(e))))},[R,et,em]),eR=(0,r.useMemo)(()=>{if(!$||!Array.isArray($))return[];let e=$;if(es.trim()){let t=es.toLowerCase(),a=t.split(/\s+/);e=(e=$.filter(e=>{let s=e.server_name.toLowerCase(),r=(e.mcp_info?.description||"").toLowerCase();return!!(s.includes(t)||r.includes(t))||a.every(e=>s.includes(e)||r.includes(e))})).sort((e,a)=>{let s=e.server_name.toLowerCase(),r=a.server_name.toLowerCase(),i=1e3*(s===t),l=1e3*(r===t),n=100*!!s.startsWith(t),o=100*!!r.startsWith(t),c=i+n+(1e3-s.length);return l+o+(1e3-r.length)-c})}return e.filter(e=>0===eu.length||eu.includes(e.transport))},[$,es,eu]),eP=e=>{navigator.clipboard.writeText(e),f.default.success("Copied to clipboard!")},e$=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),eD=e=>`$${(1e6*e).toFixed(4)}`,ez=e=>e?e>=1e3?`${(e/1e3).toFixed(0)}K`:e.toString():"N/A";return(0,t.jsx)(a.ThemeProvider,{accessToken:e,children:(0,t.jsxs)("div",{className:T?"w-full":"min-h-screen bg-white",children:[!T&&(0,t.jsx)(b.default,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:eE,proxySettings:ew,accessToken:e||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,t.jsxs)("div",{className:T?"w-full p-6":"w-full px-8 py-12",children:[T&&(0,t.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,t.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!T&&(0,t.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,t.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:G||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,t.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)("span",{className:"w-4 h-4 mr-2",children:"🔧"}),"Built with litellm: v",U]})})]}),V&&Object.keys(V).length>0&&(0,t.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(V||{}).map(([e,t])=>({title:e,url:"string"==typeof t?t:t.url,index:"string"==typeof t?0:t.index??0})).sort((e,t)=>e.index-t.index).map(({title:e,url:a})=>(0,t.jsxs)("button",{onClick:()=>window.open(a,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,t.jsx)(s.ExternalLinkIcon,{className:"w-4 h-4"}),(0,t.jsx)(o.Text,{className:"text-sm font-medium",children:e})]},e))})]}),!T&&(0,t.jsxs)(n.Card,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,t.jsx)(c.Title,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,t.jsxs)(o.Text,{className:"text-green-600 font-medium text-sm",children:["Service status: ",ex]})})]}),(0,t.jsx)(n.Card,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,t.jsxs)(p.Tabs,{activeKey:eO,onChange:eM,size:"large",className:"public-hub-tabs",children:[(0,t.jsxs)(N,{tab:"Model Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,t.jsx)(g.Tooltip,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,t.jsx)(h.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:Q,onChange:e=>ee(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:ei,onChange:e=>el(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:a}=(0,y.getProviderLogoAndName)(e.value);return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[a&&(0,t.jsx)("img",{src:a,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e.label})]})},children:k&&Array.isArray(k)&&(C=new Set,k.forEach(e=>{(e.providers??[]).forEach(e=>C.add(e))}),Array.from(C)).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:en,onChange:e=>eo(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:k&&Array.isArray(k)&&(S=new Set,k.forEach(e=>{e.mode&&S.add(e.mode)}),Array.from(S)).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:ec,onChange:e=>ed(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:k&&Array.isArray(k)&&(I=new Set,k.forEach(e=>{Object.entries(e).filter(([e,t])=>e.startsWith("supports_")&&!0===t).forEach(([e])=>{let t=e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");I.add(t)})}),Array.from(I).sort()).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(_.ModelDataTable,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(g.Tooltip,{title:e.original.model_group,children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eN(e.original),ef(!0)},children:e.original.model_group})})}),size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:({row:e})=>{let a=e.original.providers??[];return(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.map(e=>{let{logo:a}=(0,y.getProviderLogoAndName)(e);return(0,t.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:({row:e})=>{let a=e.original.mode;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:(e=>{switch(e?.toLowerCase()){case"chat":return"💬";case"rerank":return"🔄";case"embedding":return"📄";default:return"🤖"}})(a||"")}),(0,t.jsx)(o.Text,{children:a||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(o.Text,{className:"text-center",children:ez(e.original.max_input_tokens)}),size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(o.Text,{className:"text-center",children:ez(e.original.max_output_tokens)}),size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:({row:e})=>{let a=e.original.input_cost_per_token;return(0,t.jsx)(o.Text,{className:"text-center",children:a?eD(a):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:({row:e})=>{let a=e.original.output_cost_per_token;return(0,t.jsx)(o.Text,{className:"text-center",children:a?eD(a):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:({row:e})=>{let a=Object.entries(e.original).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e$(e));return 0===a.length?(0,t.jsx)(o.Text,{className:"text-gray-400",children:"-"}):1===a.length?(0,t.jsx)("div",{className:"h-6 flex items-center",children:(0,t.jsx)(u.Tag,{color:"blue",className:"text-xs",children:a[0]})}):(0,t.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,t.jsx)(u.Tag,{color:"blue",className:"text-xs",children:a[0]}),(0,t.jsx)(g.Tooltip,{title:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"font-medium",children:"All Features:"}),a.map((e,a)=>(0,t.jsxs)("div",{className:"text-xs",children:["• ",e]},a))]}),trigger:"click",placement:"topLeft",children:(0,t.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",a.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:({row:e})=>{let a=e.original,s="healthy"===a.health_status?"green":"unhealthy"===a.health_status?"red":"default",r=a.health_response_time?`Response Time: ${Number(a.health_response_time).toFixed(2)}ms`:"N/A",i=a.health_checked_at?`Last Checked: ${new Date(a.health_checked_at).toLocaleString()}`:"N/A";return(0,t.jsx)(g.Tooltip,{title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{children:r}),(0,t.jsx)("div",{children:i})]}),children:(0,t.jsx)(u.Tag,{color:s,children:(0,t.jsx)("span",{className:"capitalize",children:a.health_status??"Unknown"})},a.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:({row:e})=>{var a,s;let r,i=e.original;return(0,t.jsx)(o.Text,{className:"text-xs text-gray-600",children:(a=i.rpm,s=i.tpm,r=[],a&&r.push(`RPM: ${a.toLocaleString()}`),s&&r.push(`TPM: ${s.toLocaleString()}`),r.length>0?r.join(", "):"N/A")})},size:150}],data:ek,isLoading:W,defaultSorting:[{id:"model_group",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",ek.length," of ",k?.length||0," models"]})})]},"models"),R&&Array.isArray(R)&&R.length>0&&(0,t.jsxs)(N,{tab:"Agent Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,t.jsx)(g.Tooltip,{title:"Search agents by name or description",placement:"top",children:(0,t.jsx)(h.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:et,onChange:e=>ea(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:em,onChange:e=>ep(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:R&&Array.isArray(R)&&(w=new Set,R.forEach(e=>{e.skills?.forEach(e=>{e.tags?.forEach(e=>w.add(e))})}),Array.from(w).sort()).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(_.ModelDataTable,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(g.Tooltip,{title:e.original.name,children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eC(e.original),ev(!0)},children:e.original.name})})}),size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:({row:e})=>{let a=e.original.description??"",s=a.length>80?a.substring(0,80)+"...":a;return(0,t.jsx)(g.Tooltip,{title:a,children:(0,t.jsx)(o.Text,{className:"text-sm text-gray-700",children:s})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:({row:e})=>(0,t.jsx)(o.Text,{className:"text-sm",children:e.original.version}),size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:({row:e})=>{let a=e.original.provider;return a?(0,t.jsx)("div",{className:"text-sm",children:(0,t.jsx)(o.Text,{className:"font-medium",children:a.organization})}):(0,t.jsx)(o.Text,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:({row:e})=>{let a=e.original.skills||[];return 0===a.length?(0,t.jsx)(o.Text,{className:"text-gray-400",children:"-"}):1===a.length?(0,t.jsx)("div",{className:"h-6 flex items-center",children:(0,t.jsx)(u.Tag,{color:"purple",className:"text-xs",children:a[0].name})}):(0,t.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,t.jsx)(u.Tag,{color:"purple",className:"text-xs",children:a[0].name}),(0,t.jsx)(g.Tooltip,{title:(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"font-medium",children:"All Skills:"}),a.map((e,a)=>(0,t.jsxs)("div",{className:"text-xs",children:["• ",e.name]},a))]}),trigger:"click",placement:"topLeft",children:(0,t.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",a.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:({row:e})=>{let a=Object.entries(e.original.capabilities||{}).filter(([e,t])=>!0===t).map(([e])=>e);return 0===a.length?(0,t.jsx)(o.Text,{className:"text-gray-400",children:"-"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:a.map(e=>(0,t.jsx)(u.Tag,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eL,isLoading:q,defaultSorting:[{id:"name",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",eL.length," of ",R?.length||0," agents"]})})]},"agents"),$&&Array.isArray($)&&$.length>0&&(0,t.jsxs)(N,{tab:"MCP Hub",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,t.jsx)(c.Title,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,t.jsx)(g.Tooltip,{title:"Search MCP servers by name or description",placement:"top",children:(0,t.jsx)(h.default,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,t.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:es,onChange:e=>er(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,t.jsx)(m.Select,{mode:"multiple",value:eu,onChange:e=>eg(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:$&&Array.isArray($)&&(E=new Set,$.forEach(e=>{e.transport&&E.add(e.transport)}),Array.from(E).sort()).map(e=>(0,t.jsx)(m.Select.Option,{value:e,children:e},e))})]})]}),(0,t.jsx)(_.ModelDataTable,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:({row:e})=>(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsx)(g.Tooltip,{title:e.original.server_name,children:(0,t.jsx)(l.Button,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>{eI(e.original),eA(!0)},children:e.original.server_name})})}),size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:({row:e})=>{let a=String(e.original.mcp_info?.description??"-"),s=a.length>80?a.substring(0,80)+"...":a;return(0,t.jsx)(g.Tooltip,{title:a,children:(0,t.jsx)(o.Text,{className:"text-sm text-gray-700",children:s})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:({row:e})=>{let a=e.original.url??"",s=a.length>40?a.substring(0,40)+"...":a;return(0,t.jsx)(g.Tooltip,{title:a,children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(o.Text,{className:"text-xs font-mono",children:s}),(0,t.jsx)(x.default,{onClick:()=>eP(a),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:({row:e})=>{let a=e.original.transport;return(0,t.jsx)(u.Tag,{color:"blue",className:"text-xs uppercase",children:a})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:({row:e})=>{let a=e.original.auth_type;return(0,t.jsx)(u.Tag,{color:"none"===a?"gray":"green",className:"text-xs capitalize",children:a})},size:100}],data:eR,isLoading:J,defaultSorting:[{id:"server_name",desc:!1}]}),(0,t.jsx)("div",{className:"mt-8 text-center",children:(0,t.jsxs)(o.Text,{className:"text-sm text-gray-600",children:["Showing ",eR.length," of ",$?.length||0," MCP servers"]})})]},"mcp")]})})]}),(0,t.jsx)(d.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:ey?.model_group||"Model Details"}),ey&&(0,t.jsx)(g.Tooltip,{title:"Copy model name",children:(0,t.jsx)(x.default,{onClick:()=>eP(ey.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:e_,footer:null,onOk:()=>{ef(!1),eN(null)},onCancel:()=>{ef(!1),eN(null)},children:ey&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Model Name:"}),(0,t.jsx)(o.Text,{children:ey.model_group})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Mode:"}),(0,t.jsx)(o.Text,{children:ey.mode||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Providers:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(ey.providers??[]).map(e=>{let{logo:a}=(0,y.getProviderLogoAndName)(e);return(0,t.jsx)(u.Tag,{color:"blue",children:(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[a&&(0,t.jsx)("img",{src:a,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),ey.model_group.includes("*")&&(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,t.jsx)(h.default,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,t.jsxs)(o.Text,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group}),", you can use any string (",(0,t.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group.replaceAll("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Input Tokens:"}),(0,t.jsx)(o.Text,{children:ey.max_input_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Max Output Tokens:"}),(0,t.jsx)(o.Text,{children:ey.max_output_tokens?.toLocaleString()||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:ey.input_cost_per_token?eD(ey.input_cost_per_token):"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,t.jsx)(o.Text,{children:ey.output_cost_per_token?eD(ey.output_cost_per_token):"Not specified"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(O=Object.entries(ey).filter(([e,t])=>e.startsWith("supports_")&&!0===t).map(([e])=>e),M=["green","blue","purple","orange","red","yellow"],0===O.length?(0,t.jsx)(o.Text,{className:"text-gray-500",children:"No special capabilities listed"}):O.map((e,a)=>(0,t.jsx)(u.Tag,{color:M[a%M.length],children:e$(e)},e)))})]}),(ey.tpm||ey.rpm)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[ey.tpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Tokens per Minute:"}),(0,t.jsx)(o.Text,{children:ey.tpm.toLocaleString()})]}),ey.rpm&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Requests per Minute:"}),(0,t.jsx)(o.Text,{children:ey.rpm.toLocaleString()})]})]})]}),ey.supported_openai_params&&ey.supported_openai_params.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.supported_openai_params.map(e=>(0,t.jsx)(u.Tag,{color:"green",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,t.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,t.jsx)("pre",{className:"text-sm",children:(0,j.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,A.getEndpointType)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"})})}),(0,t.jsx)("div",{className:"mt-2 text-right",children:(0,t.jsx)("button",{onClick:()=>{eP((0,j.generateCodeSnippet)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,A.getEndpointType)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,t.jsx)(d.Modal,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{children:eT?.name||"Agent Details"}),eT&&(0,t.jsx)(g.Tooltip,{title:"Copy agent name",children:(0,t.jsx)(x.default,{onClick:()=>eP(eT.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:eb,footer:null,onOk:()=>{ev(!1),eC(null)},onCancel:()=>{ev(!1),eC(null)},children:eT&&(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Name:"}),(0,t.jsx)(o.Text,{children:eT.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Version:"}),(0,t.jsx)(o.Text,{children:eT.version})]}),(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Description:"}),(0,t.jsx)(o.Text,{children:eT.description})]}),eT.url&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"URL:"}),(0,t.jsx)("a",{href:eT.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:eT.url})]})]})]}),eT.capabilities&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(eT.capabilities).filter(([e,t])=>!0===t).map(([e])=>(0,t.jsx)(u.Tag,{color:"green",className:"capitalize",children:e},e))})]}),eT.skills&&eT.skills.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,t.jsx)("div",{className:"space-y-4",children:eT.skills.map((e,a)=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,t.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium text-base",children:e.name}),(0,t.jsx)(o.Text,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,t.jsx)(u.Tag,{color:"purple",className:"text-xs",children:e},e))})]},a))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Input Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eT.defaultInputModes??[]).map(e=>(0,t.jsx)(u.Tag,{color:"blue",children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"font-medium",children:"Output Modes:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:(eT.defaultOutputModes??[]).map(e=>(0,t.jsx)(u.Tag,{color:"blue",children:e},e))})]})]})]}),eT.documentationUrl&&(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,t.jsxs)("a",{href:eT.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,t.jsx)(s.ExternalLinkIcon,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"View Documentation"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Text,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,t.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,t.jsx)("pre",{className:"text-xs",children:`base_url = '${eT.url}' resolver = A2ACardResolver( httpx_client=httpx_client, diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/efc1a6ef38353eda.js b/litellm/proxy/_experimental/out/_next/static/chunks/efc1a6ef38353eda.js new file mode 100644 index 00000000000..46b29186c89 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/efc1a6ef38353eda.js @@ -0,0 +1,10 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,869216,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(908206),r=e.i(242064),l=e.i(517455),a=e.i(150073);let o={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},s=t.default.createContext({});var c=e.i(876556),d=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n},u=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};let g=e=>{let{itemPrefixCls:i,component:r,span:l,className:a,style:o,labelStyle:c,contentStyle:d,bordered:u,label:g,content:b,colon:m,type:p,styles:h}=e,{classNames:f}=t.useContext(s),y=Object.assign(Object.assign({},c),null==h?void 0:h.label),$=Object.assign(Object.assign({},d),null==h?void 0:h.content);if(u)return t.createElement(r,{colSpan:l,style:o,className:(0,n.default)(a,{[`${i}-item-${p}`]:"label"===p||"content"===p,[null==f?void 0:f.label]:(null==f?void 0:f.label)&&"label"===p,[null==f?void 0:f.content]:(null==f?void 0:f.content)&&"content"===p})},null!=g&&t.createElement("span",{style:y},g),null!=b&&t.createElement("span",{style:$},b));return t.createElement(r,{colSpan:l,style:o,className:(0,n.default)(`${i}-item`,a)},t.createElement("div",{className:`${i}-item-container`},null!=g&&t.createElement("span",{style:y,className:(0,n.default)(`${i}-item-label`,null==f?void 0:f.label,{[`${i}-item-no-colon`]:!m})},g),null!=b&&t.createElement("span",{style:$,className:(0,n.default)(`${i}-item-content`,null==f?void 0:f.content)},b)))};function b(e,{colon:n,prefixCls:i,bordered:r},{component:l,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:d,styles:u}){return e.map(({label:e,children:b,prefixCls:m=i,className:p,style:h,labelStyle:f,contentStyle:y,span:$=1,key:v,styles:O},j)=>"string"==typeof l?t.createElement(g,{key:`${a}-${v||j}`,className:p,style:h,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),f),null==O?void 0:O.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),y),null==O?void 0:O.content)},span:$,colon:n,component:l,itemPrefixCls:m,bordered:r,label:o?e:null,content:s?b:null,type:a}):[t.createElement(g,{key:`label-${v||j}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),null==u?void 0:u.label),h),f),null==O?void 0:O.label),span:1,colon:n,component:l[0],itemPrefixCls:m,bordered:r,label:e,type:"label"}),t.createElement(g,{key:`content-${v||j}`,className:p,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),null==u?void 0:u.content),h),y),null==O?void 0:O.content),span:2*$-1,component:l[1],itemPrefixCls:m,bordered:r,content:b,type:"content"})])}let m=e=>{let n=t.useContext(s),{prefixCls:i,vertical:r,row:l,index:a,bordered:o}=e;return r?t.createElement(t.Fragment,null,t.createElement("tr",{key:`label-${a}`,className:`${i}-row`},b(l,e,Object.assign({component:"th",type:"label",showLabel:!0},n))),t.createElement("tr",{key:`content-${a}`,className:`${i}-row`},b(l,e,Object.assign({component:"td",type:"content",showContent:!0},n)))):t.createElement("tr",{key:a,className:`${i}-row`},b(l,e,Object.assign({component:o?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},n)))};e.i(296059);var p=e.i(915654),h=e.i(183293),f=e.i(246422),y=e.i(838378);let $=(0,f.genStyleHooks)("Descriptions",e=>(e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:i,itemPaddingEnd:r,colonMarginRight:l,colonMarginLeft:a,titleMarginBottom:o}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,h.resetComponent)(e)),(e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.padding)} ${(0,p.unit)(e.paddingLG)}`,borderInlineEnd:`${(0,p.unit)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingSM)} ${(0,p.unit)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,p.unit)(e.paddingXS)} ${(0,p.unit)(e.padding)}`}}}}}})(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:o},[`${t}-title`]:Object.assign(Object.assign({},h.textEllipsis),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:i,paddingInlineEnd:r},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,p.unit)(a)} ${(0,p.unit)(l)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}})((0,y.mergeToken)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}));var v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};let O=e=>{let g,{prefixCls:b,title:p,extra:h,column:f,colon:y=!0,bordered:O,layout:j,children:x,className:S,rootClassName:C,style:E,size:w,labelStyle:z,contentStyle:B,styles:M,items:N,classNames:T}=e,P=v(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:k,direction:R,className:L,style:I,classNames:H,styles:G}=(0,r.useComponentConfig)("descriptions"),W=k("descriptions",b),A=(0,a.default)(),D=t.useMemo(()=>{var e;return"number"==typeof f?f:null!=(e=(0,i.matchScreen)(A,Object.assign(Object.assign({},o),f)))?e:3},[A,f]),F=(g=t.useMemo(()=>N||(0,c.default)(x).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key})),[N,x]),t.useMemo(()=>g.map(e=>{var{span:t}=e,n=d(e,["span"]);return"filled"===t?Object.assign(Object.assign({},n),{filled:!0}):Object.assign(Object.assign({},n),{span:"number"==typeof t?t:(0,i.matchScreen)(A,t)})}),[g,A])),X=(0,l.default)(w),K=((e,n)=>{let[i,r]=(0,t.useMemo)(()=>{let t,i,r,l;return t=[],i=[],r=!1,l=0,n.filter(e=>e).forEach(n=>{let{filled:a}=n,o=u(n,["filled"]);if(a){i.push(o),t.push(i),i=[],l=0;return}let s=e-l;(l+=n.span||1)>=e?(l>e?(r=!0,i.push(Object.assign(Object.assign({},o),{span:s}))):i.push(o),t.push(i),i=[],l=0):i.push(o)}),i.length>0&&t.push(i),[t=t.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(n({labelStyle:z,contentStyle:B,styles:{content:Object.assign(Object.assign({},G.content),null==M?void 0:M.content),label:Object.assign(Object.assign({},G.label),null==M?void 0:M.label)},classNames:{label:(0,n.default)(H.label,null==T?void 0:T.label),content:(0,n.default)(H.content,null==T?void 0:T.content)}}),[z,B,M,T,H,G]);return q(t.createElement(s.Provider,{value:V},t.createElement("div",Object.assign({className:(0,n.default)(W,L,H.root,null==T?void 0:T.root,{[`${W}-${X}`]:X&&"default"!==X,[`${W}-bordered`]:!!O,[`${W}-rtl`]:"rtl"===R},S,C,U,Q),style:Object.assign(Object.assign(Object.assign(Object.assign({},I),G.root),null==M?void 0:M.root),E)},P),(p||h)&&t.createElement("div",{className:(0,n.default)(`${W}-header`,H.header,null==T?void 0:T.header),style:Object.assign(Object.assign({},G.header),null==M?void 0:M.header)},p&&t.createElement("div",{className:(0,n.default)(`${W}-title`,H.title,null==T?void 0:T.title),style:Object.assign(Object.assign({},G.title),null==M?void 0:M.title)},p),h&&t.createElement("div",{className:(0,n.default)(`${W}-extra`,H.extra,null==T?void 0:T.extra),style:Object.assign(Object.assign({},G.extra),null==M?void 0:M.extra)},h)),t.createElement("div",{className:`${W}-view`},t.createElement("table",null,t.createElement("tbody",null,K.map((e,n)=>t.createElement(m,{key:n,index:n,colon:y,prefixCls:W,vertical:"vertical"===j,bordered:O,row:e}))))))))};O.Item=({children:e})=>e,e.s(["Descriptions",0,O],869216)},270377,e=>{"use strict";e.i(247167);var t=e.i(931067),n=e.i(271645);let i={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 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var r=e.i(9583),l=n.forwardRef(function(e,l){return n.createElement(r.default,(0,t.default)({},e,{ref:l,icon:i}))});e.s(["ExclamationCircleOutlined",0,l],270377)},175712,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(343794),i=e.i(529681),r=e.i(242064),l=e.i(517455),a=e.i(185793),o=e.i(721369),s=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};let c=e=>{var{prefixCls:i,className:l,hoverable:a=!0}=e,o=s(e,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=t.useContext(r.ConfigContext),d=c("card",i),u=(0,n.default)(`${d}-grid`,l,{[`${d}-grid-hoverable`]:a});return t.createElement("div",Object.assign({},o,{className:u}))};e.i(296059);var d=e.i(915654),u=e.i(183293),g=e.i(246422),b=e.i(838378);let m=(0,g.genStyleHooks)("Card",e=>{let t=(0,b.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:r,boxShadowTertiary:l,bodyPadding:a,extraColor:o}=e;return{[t]:Object.assign(Object.assign({},(0,u.resetComponent)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:l},[`${t}-head`]:(e=>{let{antCls:t,componentCls:n,headerHeight:i,headerPadding:r,tabsMarginBottom:l}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${(0,d.unit)(r)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`},(0,u.clearFix)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.textEllipsis),{[` + > ${n}-typography, + > ${n}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:l,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:o,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:a,borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:i,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${(0,d.unit)(r)} 0 0 0 ${n}, + 0 ${(0,d.unit)(r)} 0 0 ${n}, + ${(0,d.unit)(r)} ${(0,d.unit)(r)} 0 0 ${n}, + ${(0,d.unit)(r)} 0 0 0 ${n} inset, + 0 ${(0,d.unit)(r)} 0 0 ${n} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:n,actionsLiMargin:i,cardActionsIconSize:r,colorBorderSecondary:l,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${l}`,display:"flex",borderRadius:`0 0 ${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)}`},(0,u.clearFix)()),{"& > li":{margin:i,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,d.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:(0,d.unit)(e.calc(r).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${l}`}}})})(e),[`${t}-meta`]:Object.assign(Object.assign({margin:`${(0,d.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,u.clearFix)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.textEllipsis),"&-description":{color:e.colorTextDescription}})}),[`${t}-bordered`]:{border:`${(0,d.unit)(e.lineWidth)} ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,d.unit)(e.borderRadiusLG)} ${(0,d.unit)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:n,headerPadding:i,bodyPadding:r}=e;return{[`${t}-head`]:{padding:`0 ${(0,d.unit)(i)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,d.unit)(e.padding)} ${(0,d.unit)(r)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:i,headerHeightSM:r,headerFontSizeSM:l}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:r,padding:`0 ${(0,d.unit)(i)}`,fontSize:l,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!=(t=e.bodyPadding)?t:e.paddingLG,headerPadding:null!=(n=e.headerPadding)?n:e.paddingLG}});var p=e.i(792812),h=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};let f=e=>{let{actionClasses:n,actions:i=[],actionStyle:r}=e;return t.createElement("ul",{className:n,style:r},i.map((e,n)=>{let r=`action-${n}`;return t.createElement("li",{style:{width:`${100/i.length}%`},key:r},t.createElement("span",null,e))}))},y=t.forwardRef((e,s)=>{let d,{prefixCls:u,className:g,rootClassName:b,style:y,extra:$,headStyle:v={},bodyStyle:O={},title:j,loading:x,bordered:S,variant:C,size:E,type:w,cover:z,actions:B,tabList:M,children:N,activeTabKey:T,defaultActiveTabKey:P,tabBarExtraContent:k,hoverable:R,tabProps:L={},classNames:I,styles:H}=e,G=h(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:W,direction:A,card:D}=t.useContext(r.ConfigContext),[F]=(0,p.default)("card",C,S),X=e=>{var t;return(0,n.default)(null==(t=null==D?void 0:D.classNames)?void 0:t[e],null==I?void 0:I[e])},K=e=>{var t;return Object.assign(Object.assign({},null==(t=null==D?void 0:D.styles)?void 0:t[e]),null==H?void 0:H[e])},q=t.useMemo(()=>{let e=!1;return t.Children.forEach(N,t=>{(null==t?void 0:t.type)===c&&(e=!0)}),e},[N]),U=W("card",u),[Q,V,_]=m(U),J=t.createElement(a.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},N),Y=void 0!==T,Z=Object.assign(Object.assign({},L),{[Y?"activeKey":"defaultActiveKey"]:Y?T:P,tabBarExtraContent:k}),ee=(0,l.default)(E),et=ee&&"default"!==ee?ee:"large",en=M?t.createElement(o.default,Object.assign({size:et},Z,{className:`${U}-head-tabs`,onChange:t=>{var n;null==(n=e.onTabChange)||n.call(e,t)},items:M.map(e=>{var{tab:t}=e;return Object.assign({label:t},h(e,["tab"]))})})):null;if(j||$||en){let e=(0,n.default)(`${U}-head`,X("header")),i=(0,n.default)(`${U}-head-title`,X("title")),r=(0,n.default)(`${U}-extra`,X("extra")),l=Object.assign(Object.assign({},v),K("header"));d=t.createElement("div",{className:e,style:l},t.createElement("div",{className:`${U}-head-wrapper`},j&&t.createElement("div",{className:i,style:K("title")},j),$&&t.createElement("div",{className:r,style:K("extra")},$)),en)}let ei=(0,n.default)(`${U}-cover`,X("cover")),er=z?t.createElement("div",{className:ei,style:K("cover")},z):null,el=(0,n.default)(`${U}-body`,X("body")),ea=Object.assign(Object.assign({},O),K("body")),eo=t.createElement("div",{className:el,style:ea},x?J:N),es=(0,n.default)(`${U}-actions`,X("actions")),ec=(null==B?void 0:B.length)?t.createElement(f,{actionClasses:es,actionStyle:K("actions"),actions:B}):null,ed=(0,i.default)(G,["onTabChange"]),eu=(0,n.default)(U,null==D?void 0:D.className,{[`${U}-loading`]:x,[`${U}-bordered`]:"borderless"!==F,[`${U}-hoverable`]:R,[`${U}-contain-grid`]:q,[`${U}-contain-tabs`]:null==M?void 0:M.length,[`${U}-${ee}`]:ee,[`${U}-type-${w}`]:!!w,[`${U}-rtl`]:"rtl"===A},g,b,V,_),eg=Object.assign(Object.assign({},null==D?void 0:D.style),y);return Q(t.createElement("div",Object.assign({ref:s},ed,{className:eu,style:eg}),d,er,eo,ec))});var $=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);rt.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};y.Grid=c,y.Meta=e=>{let{prefixCls:i,className:l,avatar:a,title:o,description:s}=e,c=$(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=t.useContext(r.ConfigContext),u=d("card",i),g=(0,n.default)(`${u}-meta`,l),b=a?t.createElement("div",{className:`${u}-meta-avatar`},a):null,m=o?t.createElement("div",{className:`${u}-meta-title`},o):null,p=s?t.createElement("div",{className:`${u}-meta-description`},s):null,h=m||p?t.createElement("div",{className:`${u}-meta-detail`},m,p):null;return t.createElement("div",Object.assign({},c,{className:g}),b,h)},e.s(["Card",0,y],175712)},127952,368869,e=>{"use strict";var t=e.i(843476),n=e.i(560445),i=e.i(175712),r=e.i(869216),l=e.i(311451),a=e.i(212931),o=e.i(898586);e.i(296059);var s=e.i(868297),c=e.i(732961),d=e.i(289882),u=e.i(170517),g=e.i(628882),b=e.i(320890),m=e.i(104458),p=e.i(722319),h=e.i(8398),f=e.i(279728);e.i(765846);var y=e.i(602716),$=e.i(328052);e.i(262370);var v=e.i(135551);let O=(e,t)=>new v.FastColor(e).setA(t).toRgbString(),j=(e,t)=>new v.FastColor(e).lighten(t).toHexString(),x=e=>{let t=(0,y.generate)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},S=(e,t)=>{let n=e||"#000",i=t||"#fff";return{colorBgBase:n,colorTextBase:i,colorText:O(i,.85),colorTextSecondary:O(i,.65),colorTextTertiary:O(i,.45),colorTextQuaternary:O(i,.25),colorFill:O(i,.18),colorFillSecondary:O(i,.12),colorFillTertiary:O(i,.08),colorFillQuaternary:O(i,.04),colorBgSolid:O(i,.95),colorBgSolidHover:O(i,1),colorBgSolidActive:O(i,.9),colorBgElevated:j(n,12),colorBgContainer:j(n,8),colorBgLayout:j(n,0),colorBgSpotlight:j(n,26),colorBgBlur:O(i,.04),colorBorder:j(n,26),colorBorderSecondary:j(n,19)}},C={defaultSeed:b.defaultConfig.token,useToken:function(){let[e,t,n]=(0,m.useToken)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:p.default,darkAlgorithm:(e,t)=>{let n=Object.keys(u.defaultPresetColors).map(t=>{let n=(0,y.generate)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,i,r)=>(e[`${t}-${r+1}`]=n[r],e[`${t}${r+1}`]=n[r],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),i=null!=t?t:(0,p.default)(e),r=(0,$.default)(e,{generateColorPalettes:x,generateNeutralColorPalettes:S});return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),r),{colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,p.default)(e),i=n.fontSizeSM,r=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,i=n-2;return{sizeXXL:t*(i+10),sizeXL:t*(i+6),sizeLG:t*(i+2),sizeMD:t*(i+2),sizeMS:t*(i+1),size:t*i,sizeSM:t*i,sizeXS:t*(i-1),sizeXXS:t*(i-1)}}(null!=t?t:e)),(0,f.default)(i)),{controlHeight:r}),(0,h.default)(Object.assign(Object.assign({},n),{controlHeight:r})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,s.createTheme)(e.algorithm):d.default,n=Object.assign(Object.assign({},u.default),null==e?void 0:e.token);return(0,c.getComputedToken)(n,{override:null==e?void 0:e.token},t,g.default)},defaultConfig:b.defaultConfig,_internalContext:b.DesignTokenContext};e.s(["theme",0,C],368869);var E=e.i(270377),w=e.i(271645);function z({isOpen:e,title:s,alertMessage:c,message:d,resourceInformationTitle:u,resourceInformation:g,onCancel:b,onOk:m,confirmLoading:p,requiredConfirmation:h}){let{Title:f,Text:y}=o.Typography,{token:$}=C.useToken(),[v,O]=(0,w.useState)("");return(0,w.useEffect)(()=>{e&&O("")},[e]),(0,t.jsx)(a.Modal,{title:s,open:e,onOk:m,onCancel:b,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!h&&v!==h||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[c&&(0,t.jsx)(n.Alert,{message:c,type:"warning"}),(0,t.jsx)(i.Card,{title:u,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder}},style:{backgroundColor:$.colorErrorBg,borderColor:$.colorErrorBorder},children:(0,t.jsx)(r.Descriptions,{column:1,size:"small",children:g&&g.map(({label:e,value:n,...i})=>(0,t.jsx)(r.Descriptions.Item,{label:(0,t.jsx)("span",{className:"font-semibold",children:e}),children:(0,t.jsx)(y,{...i,children:n??"-"})},e))})}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{children:d})}),h&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,t.jsxs)(y,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,t.jsx)(y,{children:"Type "}),(0,t.jsx)(y,{strong:!0,type:"danger",children:h}),(0,t.jsx)(y,{children:" to confirm deletion:"})]}),(0,t.jsx)(l.Input,{value:v,onChange:e=>O(e.target.value),placeholder:h,className:"rounded-md",prefix:(0,t.jsx)(E.ExclamationCircleOutlined,{style:{color:$.colorError}}),autoFocus:!0})]})]})})}e.s(["default",()=>z],127952)},954616,e=>{"use strict";var t=e.i(271645),n=e.i(114272),i=e.i(540143),r=e.i(915823),l=e.i(619273),a=class extends r.Subscribable{#e;#t=void 0;#n;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#l()}mutate(e,t){return this.#i=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#r(){let e=this.#n?.state??(0,n.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#l(e){i.notifyManager.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#i.onSuccess?.(e.data,t,n,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(e.data,null,t,n,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#i.onError?.(e.error,t,n,i)}catch(e){Promise.reject(e)}try{this.#i.onSettled?.(void 0,e.error,t,n,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},o=e.i(912598);function s(e,n){let r=(0,o.useQueryClient)(n),[s]=t.useState(()=>new a(r,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let c=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(i.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),d=t.useCallback((e,t)=>{s.mutate(e,t).catch(l.noop)},[s]);if(c.error&&(0,l.shouldThrowError)(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>s],954616)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/58461a445becf104.js b/litellm/proxy/_experimental/out/_next/static/chunks/f19a24d7e7fafd09.js similarity index 92% rename from litellm/proxy/_experimental/out/_next/static/chunks/58461a445becf104.js rename to litellm/proxy/_experimental/out/_next/static/chunks/f19a24d7e7fafd09.js index ba3f4511b3a..499722300d6 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/58461a445becf104.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/f19a24d7e7fafd09.js @@ -81,4 +81,4 @@ .primitives-collapse .ant-collapse-content-box { padding: 8px 12px !important; } - `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let[o,d]=(0,m.useState)(null),[g,x]=(0,m.useState)(null),[h,f]=(0,m.useState)(!0),[y,j]=(0,m.useState)(!1),[_]=r.Form.useForm(),[b,v]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[w,S]=(0,m.useState)(null),[k,I]=(0,m.useState)({}),[A,T]=(0,m.useState)(!1),O={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[P,B]=(0,m.useState)(O),[L,F]=(0,m.useState)(!1),[$,E]=(0,m.useState)(!1),M=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),R=(0,m.useCallback)((e,t,a,l,r)=>{M.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(f(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(d(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(v([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),v(t),C(a)}}else v([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{f(!1)}},G=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);x(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);S(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{G()},[a]),(0,m.useEffect)(()=>{z(),D()},[e,a]),(0,m.useEffect)(()=>{o&&_&&_.setFieldsValue({guardrail_name:o.guardrail_name,...o.litellm_params,guardrail_info:o.guardrail_info?JSON.stringify(o.guardrail_info,null,2):"",...o.litellm_params?.optional_params&&{optional_params:o.litellm_params.optional_params}})},[o,g,_]);let K=(0,m.useCallback)(()=>{o?.litellm_params?.guardrail==="tool_permission"?B({rules:o.litellm_params?.rules||[],default_action:(o.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(o.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:o.litellm_params?.violation_message_template||""}):B(O),F(!1)},[o]);(0,m.useEffect)(()=>{K()},[K]);let H=async t=>{try{if(!a)return;let d={litellm_params:{}};t.guardrail_name!==o.guardrail_name&&(d.guardrail_name=t.guardrail_name),t.default_on!==o.litellm_params?.default_on&&(d.litellm_params.default_on=t.default_on);let c=o.guardrail_info,m=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(c)!==JSON.stringify(m)&&(d.guardrail_info=m);let x=o.litellm_params?.pii_entities_config||{},h={};if(b.forEach(e=>{h[e]=N[e]||"MASK"}),JSON.stringify(x)!==JSON.stringify(h)&&(d.litellm_params.pii_entities_config=h),o.litellm_params?.guardrail==="litellm_content_filter"&&A){var l,r,i,s,n;let e,t=(l=M.current.patterns||[],r=M.current.blockedWords||[],i=M.current.categories||[],s=M.current.competitorIntentEnabled,n=M.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);d.litellm_params.patterns=t.patterns,d.litellm_params.blocked_words=t.blocked_words,d.litellm_params.categories=t.categories,d.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(o.litellm_params?.guardrail==="tool_permission"){let e=o.litellm_params?.rules||[],t=P.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(o.litellm_params?.default_action||"deny").toLowerCase(),r=(P.default_action||"deny").toLowerCase(),i=l!==r,s=(o.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(P.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=o.litellm_params?.violation_message_template||"",u=P.violation_message_template||"",p=m!==u;(L||a||i||c||p)&&(d.litellm_params.rules=t,d.litellm_params.default_action=r,d.litellm_params.on_disallowed_action=n,d.litellm_params.violation_message_template=u||null)}let f=Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",f);let y=o.litellm_params?.guardrail==="tool_permission";if(g&&f&&!y){let e=g[ea[f]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=o.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?d.litellm_params[e]=a:null!=l&&""!==l&&(d.litellm_params[e]=null))})}if(0===Object.keys(d.litellm_params).length&&delete d.litellm_params,0===Object.keys(d).length){u.default.info("No changes detected"),j(!1);return}await (0,p.updateGuardrailCall)(a,e,d),u.default.success("Guardrail updated successfully"),T(!1),z(),j(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(h)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!o)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let q=e=>e?new Date(e).toLocaleString():"-",{logo:J,displayName:W}=eo(o.litellm_params?.guardrail||""),U=async(e,t)=>{await (0,ta.copyToClipboard)(e)&&(I(e=>({...e,[t]:!0})),setTimeout(()=>{I(e=>({...e,[t]:!1}))},2e3))},V="config"===o.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(tr.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(tm.Title,{children:o.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eL.Text,{className:"text-gray-500 font-mono",children:o.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:k["guardrail-id"]?(0,l.jsx)(tu.CheckIcon,{size:12}):(0,l.jsx)(tp.CopyIcon,{size:12}),onClick:()=>U(o.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${k["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tn.TabGroup,{children:[(0,l.jsxs)(to.TabList,{className:"mb-4",children:[(0,l.jsx)(ts.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(ts.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tc.TabPanels,{children:[(0,l.jsxs)(td.TabPanel,{children:[(0,l.jsxs)(ti.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[J&&(0,l.jsx)("img",{src:J,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(tm.Title,{children:W})]})]}),(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(tm.Title,{children:o.litellm_params?.mode||"-"}),(0,l.jsx)(e4.Badge,{color:o.litellm_params?.default_on?"green":"gray",children:o.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(tm.Title,{children:q(o.created_at)}),(0,l.jsxs)(eL.Text,{children:["Last Updated: ",q(o.updated_at)]})]})]})]}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eB.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e4.Badge,{color:"blue",children:[Object.keys(o.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eB.Card,{className:"mt-6",children:[(0,l.jsx)(eL.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eL.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eL.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(o.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eL.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eL.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(ej.default,{}):(0,l.jsx)(e_.StopOutlined,{}),String(t)]})})]},e))})]})]}),o.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eB.Card,{className:"mt-6",children:(0,l.jsx)(eR,{value:P,disabled:!0})}),o.litellm_params?.guardrail==="custom_code"&&o.litellm_params?.custom_code&&(0,l.jsxs)(eB.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(tl.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eL.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!V&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(tl.CodeOutlined,{}),onClick:()=>E(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:o.litellm_params.custom_code})})})]}),(0,l.jsx)(t_,{guardrailData:o,guardrailSettings:w,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(td.TabPanel,{children:(0,l.jsxs)(eB.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(tm.Title,{children:"Guardrail Settings"}),V&&(0,l.jsx)(ef.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eE.InfoCircleOutlined,{})}),!y&&!V&&(o.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(tl.CodeOutlined,{}),onClick:()=>E(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>j(!0),children:"Edit Settings"}))]}),y?(0,l.jsxs)(r.Form,{form:_,onFinish:H,initialValues:{guardrail_name:o.guardrail_name,...o.litellm_params,guardrail_info:o.guardrail_info?JSON.stringify(o.guardrail_info,null,2):"",...o.litellm_params?.optional_params&&{optional_params:o.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),o.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eF.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:w&&(0,l.jsx)(eP,{entities:w.supported_entities,actions:w.supported_actions,selectedEntities:b,selectedActions:N,onEntitySelect:e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:w.pii_entity_categories})})]}),(0,l.jsx)(t_,{guardrailData:o,guardrailSettings:w,isEditing:!0,accessToken:a,onDataChange:R,onUnsavedChanges:T}),(o.litellm_params?.guardrail==="tool_permission"||g)&&(0,l.jsx)(eF.Divider,{orientation:"left",children:"Provider Settings"}),o.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eR,{value:P,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ex,{selectedProvider:Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail)||null,accessToken:a,providerParams:g,value:o.litellm_params}),g&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail);if(!e)return null;let t=g[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(eu,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:o.litellm_params}):null})()]}),(0,l.jsx)(eF.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{j(!1),T(!1),K()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:o.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:o.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:o.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e4.Badge,{color:o.litellm_params?.default_on?"green":"gray",children:o.litellm_params?.default_on?"Yes":"No"})]}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e4.Badge,{color:"blue",children:[Object.keys(o.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:q(o.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:q(o.updated_at)})]}),o.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eR,{value:P,disabled:!0})]})]})})]})]}),(0,l.jsx)(tF,{visible:$,onClose:()=>E(!1),onSuccess:()=>{E(!1),z()},accessToken:a,editData:o?{guardrail_id:o.guardrail_id,guardrail_name:o.guardrail_name,litellm_params:o.litellm_params}:null})]})}],969641);var t$=e.i(573421),tE=e.i(19732),tM=e.i(928685),tR=e.i(166406),tz=e.i(637235),tG=e.i(755151),tD=e.i(240647);let{Text:tK}=d.Typography,tH=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eB.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tD.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tG.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tv.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tz.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(eQ.Button,{size:"xs",variant:"secondary",icon:tR.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eB.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tD.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tG.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tz.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tq}=i.Input,{Text:tJ}=d.Typography,tW=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ef.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eE.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(eQ.Button,{size:"xs",variant:"secondary",icon:tR.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tq,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tJ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tJ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(eQ.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tH,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[i,s]=(0,m.useState)(new Set),[n,o]=(0,m.useState)(""),[d,c]=(0,m.useState)([]),[g,x]=(0,m.useState)([]),[h,f]=(0,m.useState)(!1),y=e.filter(e=>e.guardrail_name?.toLowerCase().includes(n.toLowerCase())),j=e=>{let t=new Set(i);t.has(e)?t.delete(e):t.add(e),s(t)},_=async e=>{if(0===i.size||!a)return;f(!0),c([]),x([]);let t=[],l=[];await Promise.all(Array.from(i).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),c(t),x(l),f(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(eB.Card,{className:"h-full",children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)(tm.Title,{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(e8.TextInput,{icon:tM.SearchOutlined,placeholder:"Search guardrails...",value:n,onValueChange:o})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(ep.Spin,{})}):0===y.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(e$.Empty,{description:n?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(t$.List,{dataSource:y,renderItem:e=>(0,l.jsx)(t$.List.Item,{onClick:()=>{e.guardrail_name&&j(e.guardrail_name)},className:`cursor-pointer hover:bg-gray-50 transition-colors px-4 ${i.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(t$.List.Item.Meta,{avatar:(0,l.jsx)(eh.Checkbox,{checked:i.has(e.guardrail_name||""),onClick:t=>{t.stopPropagation(),e.guardrail_name&&j(e.guardrail_name)}}),title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tE.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(eL.Text,{className:"text-xs text-gray-600",children:[i.size," of ",y.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(tm.Title,{className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===i.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tE.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(eL.Text,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(eL.Text,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tW,{guardrailNames:Array.from(i),onSubmit:_,results:d.length>0?d:null,errors:g.length>0?g:null,isLoading:h,onClose:()=>s(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tF],64352);let tU="../ui/assets/logos/",tV=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tU}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tU}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tU}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tU}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tU}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tU}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tU}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tU}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tU}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tU}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tU}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tU}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tU}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tU}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tU}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tU}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tU}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tU}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tU}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tU}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tU}akto.svg`,tags:["Security","Safety","Monitoring"]}];e.s(["ALL_CARDS",0,tV],230312)},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(994388),r=e.i(653824),i=e.i(881073),s=e.i(197647),n=e.i(723731),o=e.i(404206),d=e.i(326373),c=e.i(755151),m=e.i(646563),u=e.i(245094),p=e.i(764205),g=e.i(185357),x=e.i(782719),h=e.i(708347),f=e.i(969641),y=e.i(476993),j=e.i(727749),_=e.i(127952),b=e.i(180766);e.i(824296);var v=e.i(64352),N=e.i(311451),C=e.i(928685),w=e.i(266537),S=e.i(230312),k=e.i(826910);let I=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},A=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(I,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(k.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var T=e.i(464571),O=e.i(447566);let P={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1}},B=({card:e,onBack:l,accessToken:r,onGuardrailCreated:i})=>{let[s,n]=(0,a.useState)(!1),[o,d]=(0,a.useState)("overview"),c=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],m=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],u=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:l,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(O.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(T.Button,{onClick:()=>n(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:u.map(e=>(0,t.jsx)("div",{onClick:()=>d(e.key),style:{padding:"12px 20px",fontSize:14,color:o===e.key?"#1a73e8":"#5f6368",borderBottom:o===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:o===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===o&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:c.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===o&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:m.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(g.default,{visible:s,onClose:()=>n(!1),accessToken:r,onSuccess:()=>{n(!1),i()},preset:P[e.id]})]})},L=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=S.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(B,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(N.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(C.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(A,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(A,{card:e,onClick:()=>n(e)},e.id))})]})]})};var F=e.i(988846),$=e.i(837007),E=e.i(409797),M=e.i(54131),R=e.i(995926),z=e.i(678784),G=e.i(634831),D=e.i(438100),K=e.i(302202),H=e.i(328196),q=e.i(879664);e.s(["InfoIcon",()=>q.default],168118);var q=q;function J(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt:function(e){if(!e)return"—";try{let t=new Date(e);return isNaN(t.getTime())?e:t.toISOString().slice(0,10)}catch{return e}}(e.submitted_at),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let W={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{label:"Pending Review",bg:"bg-yellow-50",text:"text-yellow-700",dot:"bg-yellow-500"},rejected:{label:"Rejected",bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}},U={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function V({label:e,value:a,color:l}){return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg px-4 py-3",children:[(0,t.jsx)("div",{className:`text-2xl font-bold ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function Y({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function Z({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=W[e.status],c=U[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(K.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(Y,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,className:"text-xs bg-green-500 hover:bg-green-600 text-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:o,className:"text-xs border border-red-300 text-red-600 hover:bg-red-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:"Reject"})]})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(M.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(E.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function Q({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function X({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=W[e.status],y=U[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(R.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(Q,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)(G.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(Q,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(D.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(Y,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(R.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(R.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(M.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(E.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(q.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(G.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(z.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(R.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ee({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="approve"===e;return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-xl p-6 max-w-sm w-full mx-4",children:[(0,t.jsx)("div",{className:`w-10 h-10 rounded-full flex items-center justify-center mb-4 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(z.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(H.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"flex-1 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:l,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function et({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[d,c]=(0,a.useState)("all"),[m,u]=(0,a.useState)(null),[g,x]=(0,a.useState)(new Set),[h,f]=(0,a.useState)(null),[y,_]=(0,a.useState)(!0),[b,v]=(0,a.useState)(null),[N,C]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let w=(0,a.useCallback)(async()=>{if(!e)return void _(!1);_(!0),v(null);try{let t="all"===d?void 0:"pending"===d?"pending_review":d,a=await (0,p.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(J)),s(a.summary)}catch(e){v(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{_(!1)}},[e,d,N]);(0,a.useEffect)(()=>{w()},[w]);let S=l.find(e=>e.id===m)??null,k=i.total,I=i.pending_review,A=i.active,T=i.rejected;async function O(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),j.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{j.default.fromBackend("Failed to update forward API key")}}async function P(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),j.default.success("Static headers updated")}catch{j.default.fromBackend("Failed to update static headers")}}async function B(t,a){if(e)try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),j.default.success("Forward client headers updated")}catch{j.default.fromBackend("Failed to update forward client headers")}}async function L(t){if(e)try{await (0,p.approveGuardrailSubmission)(e,t),f(null),m===t&&u(null),await w(),j.default.success("Guardrail approved")}catch{j.default.fromBackend("Failed to approve guardrail")}}async function E(t){if(e)try{await (0,p.rejectGuardrailSubmission)(e,t),f(null),m===t&&u(null),await w(),j.default.success("Guardrail rejected")}catch{j.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${S?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(V,{label:"Total Submitted",value:k,color:"text-gray-900"}),(0,t.jsx)(V,{label:"Pending Review",value:I,color:"text-yellow-600"}),(0,t.jsx)(V,{label:"Active",value:A,color:"text-green-600"}),(0,t.jsx)(V,{label:"Rejected",value:T,color:"text-red-600"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(F.SearchIcon,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,t.jsx)("input",{type:"text",placeholder:"Search guardrails...",value:n,onChange:e=>o(e.target.value),className:"w-full pl-9 pr-4 py-2 border border-gray-200 rounded-md text-sm text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:d,onChange:e=>c(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 bg-white",children:[(0,t.jsx)("option",{value:"all",children:"All Status"}),(0,t.jsx)("option",{value:"pending",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)($.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[y&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),b&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:b}),!y&&!b&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!y&&!b&&l.map(e=>(0,t.jsx)(Z,{guardrail:e,isSelected:m===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>u(m===e.id?null:e.id),onToggleForwardKey:()=>O(e.id),onToggleHeaders:()=>{var t;return t=e.id,void x(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>f({id:e.id,action:"approve"}),onReject:()=>f({id:e.id,action:"reject"})},e.id))]})]}),S&&(0,t.jsx)(X,{guardrail:S,onClose:()=>u(null),onApprove:()=>f({id:S.id,action:"approve"}),onReject:()=>f({id:S.id,action:"reject"}),onToggleForwardKey:()=>O(S.id),onUpdateCustomHeaders:e=>P(S.id,e),onUpdateExtraHeaders:e=>B(S.id,e)}),h&&(0,t.jsx)(ee,{action:h.action,guardrailName:l.find(e=>e.id===h.id)?.name??"",onConfirm:()=>"approve"===h.action?L(h.id):E(h.id),onCancel:()=>f(null)})]})}e.s(["default",0,({accessToken:e,userRole:N})=>{let[C,w]=(0,a.useState)([]),[S,k]=(0,a.useState)(!1),[I,A]=(0,a.useState)(!1),[T,O]=(0,a.useState)(!1),[P,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),[E,M]=(0,a.useState)(!1),[R,z]=(0,a.useState)(null),[G,D]=(0,a.useState)(0),K=!!N&&(0,h.isAdminRole)(N),H=async()=>{if(e){O(!0);try{let t=await (0,p.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),w(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{O(!1)}}};(0,a.useEffect)(()=>{H()},[e]);let q=()=>{H()},J=async()=>{if(F&&e){B(!0);try{await (0,p.deleteGuardrailCall)(e,F.guardrail_id),j.default.success(`Guardrail "${F.guardrail_name}" deleted successfully`),await H()}catch(e){console.error("Error deleting guardrail:",e),j.default.fromBackend("Failed to delete guardrail")}finally{B(!1),M(!1),$(null)}}},W=F&&F.litellm_params?(0,b.getGuardrailLogoAndName)(F.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsxs)(r.TabGroup,{index:G,onIndexChange:D,children:[(0,t.jsxs)(i.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Guardrail Garden"}),(0,t.jsx)(s.Tab,{children:"Guardrails"}),(0,t.jsx)(s.Tab,{disabled:!e||0===C.length,children:"Test Playground"}),(0,t.jsx)(s.Tab,{children:"Submitted Guardrails"})]}),(0,t.jsxs)(n.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(L,{accessToken:e,onGuardrailCreated:q})}),(0,t.jsxs)(o.TabPanel,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(d.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(m.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{R&&z(null),k(!0)}},{key:"custom_code",icon:(0,t.jsx)(u.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{R&&z(null),A(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(c.DownOutlined,{className:"ml-2"})]})})}),R?(0,t.jsx)(f.default,{guardrailId:R,onClose:()=>z(null),accessToken:e,isAdmin:K}):(0,t.jsx)(x.default,{guardrailsList:C,isLoading:T,onDeleteClick:(e,t)=>{$(C.find(t=>t.guardrail_id===e)||null),M(!0)},accessToken:e,onGuardrailUpdated:H,isAdmin:K,onGuardrailClick:e=>z(e)}),(0,t.jsx)(g.default,{visible:S,onClose:()=>{k(!1)},accessToken:e,onSuccess:q}),(0,t.jsx)(v.CustomCodeModal,{visible:I,onClose:()=>{A(!1)},accessToken:e,onSuccess:q}),(0,t.jsx)(_.default,{isOpen:E,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${F?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:F?.guardrail_name},{label:"ID",value:F?.guardrail_id,code:!0},{label:"Provider",value:W},{label:"Mode",value:F?.litellm_params.mode},{label:"Default On",value:F?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{M(!1),$(null)},onOk:J,confirmLoading:P})]}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(y.default,{guardrailsList:C,isLoading:T,accessToken:e,onClose:()=>D(0)})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(et,{accessToken:e})})]})]})})}],487304)}]); \ No newline at end of file + `})]})};e.s(["default",0,({guardrailId:e,onClose:t,accessToken:a,isAdmin:s})=>{let[o,d]=(0,m.useState)(null),[g,x]=(0,m.useState)(null),[h,f]=(0,m.useState)(!0),[y,j]=(0,m.useState)(!1),[_]=r.Form.useForm(),[b,v]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[w,S]=(0,m.useState)(null),[k,I]=(0,m.useState)({}),[A,T]=(0,m.useState)(!1),O={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},[P,B]=(0,m.useState)(O),[L,F]=(0,m.useState)(!1),[$,E]=(0,m.useState)(!1),M=m.default.useRef({patterns:[],blockedWords:[],categories:[]}),R=(0,m.useCallback)((e,t,a,l,r)=>{M.current={patterns:e,blockedWords:t,categories:a||[],competitorIntentEnabled:l,competitorIntentConfig:r}},[]),z=async()=>{try{if(f(!0),!a)return;let t=await (0,p.getGuardrailInfo)(a,e);if(d(t),t.litellm_params?.pii_entities_config){let e=t.litellm_params.pii_entities_config;if(v([]),C({}),Object.keys(e).length>0){let t=[],a={};Object.entries(e).forEach(([e,l])=>{t.push(e),a[e]="string"==typeof l?l:"MASK"}),v(t),C(a)}}else v([]),C({})}catch(e){u.default.fromBackend("Failed to load guardrail information"),console.error("Error fetching guardrail info:",e)}finally{f(!1)}},G=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailProviderSpecificParams)(a);x(e)}catch(e){console.error("Error fetching guardrail provider specific params:",e)}},D=async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);S(e)}catch(e){console.error("Error fetching guardrail UI settings:",e)}};(0,m.useEffect)(()=>{G()},[a]),(0,m.useEffect)(()=>{z(),D()},[e,a]),(0,m.useEffect)(()=>{o&&_&&_.setFieldsValue({guardrail_name:o.guardrail_name,...o.litellm_params,guardrail_info:o.guardrail_info?JSON.stringify(o.guardrail_info,null,2):"",...o.litellm_params?.optional_params&&{optional_params:o.litellm_params.optional_params}})},[o,g,_]);let K=(0,m.useCallback)(()=>{o?.litellm_params?.guardrail==="tool_permission"?B({rules:o.litellm_params?.rules||[],default_action:(o.litellm_params?.default_action||"deny").toLowerCase(),on_disallowed_action:(o.litellm_params?.on_disallowed_action||"block").toLowerCase(),violation_message_template:o.litellm_params?.violation_message_template||""}):B(O),F(!1)},[o]);(0,m.useEffect)(()=>{K()},[K]);let H=async t=>{try{if(!a)return;let d={litellm_params:{}};t.guardrail_name!==o.guardrail_name&&(d.guardrail_name=t.guardrail_name),t.default_on!==o.litellm_params?.default_on&&(d.litellm_params.default_on=t.default_on);let c=o.guardrail_info,m=t.guardrail_info?JSON.parse(t.guardrail_info):void 0;JSON.stringify(c)!==JSON.stringify(m)&&(d.guardrail_info=m);let x=o.litellm_params?.pii_entities_config||{},h={};if(b.forEach(e=>{h[e]=N[e]||"MASK"}),JSON.stringify(x)!==JSON.stringify(h)&&(d.litellm_params.pii_entities_config=h),o.litellm_params?.guardrail==="litellm_content_filter"&&A){var l,r,i,s,n;let e,t=(l=M.current.patterns||[],r=M.current.blockedWords||[],i=M.current.categories||[],s=M.current.competitorIntentEnabled,n=M.current.competitorIntentConfig,e={patterns:l.map(e=>({pattern_type:"prebuilt"===e.type?"prebuilt":"regex",pattern_name:"prebuilt"===e.type?e.name:void 0,pattern:"custom"===e.type?e.pattern:void 0,name:e.name,action:e.action})),blocked_words:r.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))},void 0!==i&&(e.categories=i.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),s&&n&&n.brand_self.length>0&&(e.competitor_intent_config={competitor_intent_type:n.competitor_intent_type,brand_self:n.brand_self,locations:n.locations?.length?n.locations:void 0,competitors:"generic"===n.competitor_intent_type&&n.competitors?.length?n.competitors:void 0,policy:n.policy,threshold_high:n.threshold_high,threshold_medium:n.threshold_medium,threshold_low:n.threshold_low}),e);d.litellm_params.patterns=t.patterns,d.litellm_params.blocked_words=t.blocked_words,d.litellm_params.categories=t.categories,d.litellm_params.competitor_intent_config=t.competitor_intent_config??null}if(o.litellm_params?.guardrail==="tool_permission"){let e=o.litellm_params?.rules||[],t=P.rules||[],a=JSON.stringify(e)!==JSON.stringify(t),l=(o.litellm_params?.default_action||"deny").toLowerCase(),r=(P.default_action||"deny").toLowerCase(),i=l!==r,s=(o.litellm_params?.on_disallowed_action||"block").toLowerCase(),n=(P.on_disallowed_action||"block").toLowerCase(),c=s!==n,m=o.litellm_params?.violation_message_template||"",u=P.violation_message_template||"",p=m!==u;(L||a||i||c||p)&&(d.litellm_params.rules=t,d.litellm_params.default_action=r,d.litellm_params.on_disallowed_action=n,d.litellm_params.violation_message_template=u||null)}let f=Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail);console.log("values: ",JSON.stringify(t)),console.log("currentProvider: ",f);let y=o.litellm_params?.guardrail==="tool_permission";if(g&&f&&!y){let e=g[ea[f]?.toLowerCase()]||{},a=new Set;console.log("providerSpecificParams: ",JSON.stringify(e)),Object.keys(e).forEach(e=>{"optional_params"!==e&&a.add(e)}),e.optional_params&&e.optional_params.fields&&Object.keys(e.optional_params.fields).forEach(e=>{a.add(e)}),console.log("allowedParams: ",a),a.forEach(e=>{if("patterns"===e||"blocked_words"===e||"categories"===e)return;let a=t[e];(null==a||""===a)&&(a=t.optional_params?.[e]);let l=o.litellm_params?.[e];JSON.stringify(a)!==JSON.stringify(l)&&(null!=a&&""!==a?d.litellm_params[e]=a:null!=l&&""!==l&&(d.litellm_params[e]=null))})}if(0===Object.keys(d.litellm_params).length&&delete d.litellm_params,0===Object.keys(d).length){u.default.info("No changes detected"),j(!1);return}await (0,p.updateGuardrailCall)(a,e,d),u.default.success("Guardrail updated successfully"),T(!1),z(),j(!1)}catch(e){console.error("Error updating guardrail:",e),u.default.fromBackend("Failed to update guardrail")}};if(h)return(0,l.jsx)("div",{className:"p-4",children:"Loading..."});if(!o)return(0,l.jsx)("div",{className:"p-4",children:"Guardrail not found"});let q=e=>e?new Date(e).toLocaleString():"-",{logo:J,displayName:W}=eo(o.litellm_params?.guardrail||""),U=async(e,t)=>{await (0,ta.copyToClipboard)(e)&&(I(e=>({...e,[t]:!0})),setTimeout(()=>{I(e=>({...e,[t]:!1}))},2e3))},V="config"===o.guardrail_definition_location;return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Button,{type:"text",icon:(0,l.jsx)(tr.ArrowLeftIcon,{className:"w-4 h-4"}),onClick:t,className:"mb-4",children:"Back to Guardrails"}),(0,l.jsx)(tm.Title,{children:o.guardrail_name||"Unnamed Guardrail"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,l.jsx)(eL.Text,{className:"text-gray-500 font-mono",children:o.guardrail_id}),(0,l.jsx)(c.Button,{type:"text",size:"small",icon:k["guardrail-id"]?(0,l.jsx)(tu.CheckIcon,{size:12}):(0,l.jsx)(tp.CopyIcon,{size:12}),onClick:()=>U(o.guardrail_id,"guardrail-id"),className:`left-2 z-10 transition-all duration-200 ${k["guardrail-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"}`})]})]}),(0,l.jsxs)(tn.TabGroup,{children:[(0,l.jsxs)(to.TabList,{className:"mb-4",children:[(0,l.jsx)(ts.Tab,{children:"Overview"},"overview"),s?(0,l.jsx)(ts.Tab,{children:"Settings"},"settings"):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(tc.TabPanels,{children:[(0,l.jsxs)(td.TabPanel,{children:[(0,l.jsxs)(ti.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Provider"}),(0,l.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[J&&(0,l.jsx)("img",{src:J,alt:`${W} logo`,className:"w-6 h-6",onError:e=>{e.target.style.display="none"}}),(0,l.jsx)(tm.Title,{children:W})]})]}),(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Mode"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(tm.Title,{children:o.litellm_params?.mode||"-"}),(0,l.jsx)(e4.Badge,{color:o.litellm_params?.default_on?"green":"gray",children:o.litellm_params?.default_on?"Default On":"Default Off"})]})]}),(0,l.jsxs)(eB.Card,{children:[(0,l.jsx)(eL.Text,{children:"Created At"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsx)(tm.Title,{children:q(o.created_at)}),(0,l.jsxs)(eL.Text,{children:["Last Updated: ",q(o.updated_at)]})]})]})]}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsx)(eB.Card,{className:"mt-6",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsxs)(e4.Badge,{color:"blue",children:[Object.keys(o.litellm_params.pii_entities_config).length," PII entities configured"]})]})}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)(eB.Card,{className:"mt-6",children:[(0,l.jsx)(eL.Text,{className:"mb-4 text-lg font-semibold",children:"PII Entity Configuration"}),(0,l.jsxs)("div",{className:"border rounded-lg overflow-hidden shadow-sm",children:[(0,l.jsxs)("div",{className:"bg-gray-50 px-5 py-3 border-b flex",children:[(0,l.jsx)(eL.Text,{className:"flex-1 font-semibold text-gray-700",children:"Entity Type"}),(0,l.jsx)(eL.Text,{className:"flex-1 font-semibold text-gray-700",children:"Configuration"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:Object.entries(o.litellm_params?.pii_entities_config).map(([e,t])=>(0,l.jsxs)("div",{className:"px-5 py-3 flex border-b hover:bg-gray-50 transition-colors",children:[(0,l.jsx)(eL.Text,{className:"flex-1 font-medium text-gray-900",children:e}),(0,l.jsx)(eL.Text,{className:"flex-1",children:(0,l.jsxs)("span",{className:`inline-flex items-center gap-1.5 ${"MASK"===t?"text-blue-600":"text-red-600"}`,children:["MASK"===t?(0,l.jsx)(ej.default,{}):(0,l.jsx)(e_.StopOutlined,{}),String(t)]})})]},e))})]})]}),o.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eB.Card,{className:"mt-6",children:(0,l.jsx)(eR,{value:P,disabled:!0})}),o.litellm_params?.guardrail==="custom_code"&&o.litellm_params?.custom_code&&(0,l.jsxs)(eB.Card,{className:"mt-6",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(tl.CodeOutlined,{className:"text-blue-500"}),(0,l.jsx)(eL.Text,{className:"font-medium text-lg",children:"Custom Code"})]}),s&&!V&&(0,l.jsx)(c.Button,{size:"small",icon:(0,l.jsx)(tl.CodeOutlined,{}),onClick:()=>E(!0),children:"Edit Code"})]}),(0,l.jsx)("div",{className:"relative rounded-lg overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:(0,l.jsx)("pre",{className:"p-4 text-sm text-gray-200 overflow-x-auto",style:{fontFamily:"'Fira Code', 'Monaco', 'Consolas', monospace"},children:(0,l.jsx)("code",{children:o.litellm_params.custom_code})})})]}),(0,l.jsx)(t_,{guardrailData:o,guardrailSettings:w,isEditing:!1,accessToken:a})]}),s&&(0,l.jsx)(td.TabPanel,{children:(0,l.jsxs)(eB.Card,{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(tm.Title,{children:"Guardrail Settings"}),V&&(0,l.jsx)(ef.Tooltip,{title:"Guardrail is defined in the config file and cannot be edited.",children:(0,l.jsx)(eE.InfoCircleOutlined,{})}),!y&&!V&&(o.litellm_params?.guardrail==="custom_code"?(0,l.jsx)(c.Button,{icon:(0,l.jsx)(tl.CodeOutlined,{}),onClick:()=>E(!0),children:"Edit Code"}):(0,l.jsx)(c.Button,{onClick:()=>j(!0),children:"Edit Settings"}))]}),y?(0,l.jsxs)(r.Form,{form:_,onFinish:H,initialValues:{guardrail_name:o.guardrail_name,...o.litellm_params,guardrail_info:o.guardrail_info?JSON.stringify(o.guardrail_info,null,2):"",...o.litellm_params?.optional_params&&{optional_params:o.litellm_params.optional_params}},layout:"vertical",children:[(0,l.jsx)(r.Form.Item,{label:"Guardrail Name",name:"guardrail_name",rules:[{required:!0,message:"Please input a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter guardrail name"})}),(0,l.jsx)(r.Form.Item,{label:"Default On",name:"default_on",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"Yes"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"No"})]})}),o.litellm_params?.guardrail==="presidio"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eF.Divider,{orientation:"left",children:"PII Protection"}),(0,l.jsx)("div",{className:"mb-6",children:w&&(0,l.jsx)(eP,{entities:w.supported_entities,actions:w.supported_actions,selectedEntities:b,selectedActions:N,onEntitySelect:e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},onActionSelect:(e,t)=>{C(a=>({...a,[e]:t}))},entityCategories:w.pii_entity_categories})})]}),(0,l.jsx)(t_,{guardrailData:o,guardrailSettings:w,isEditing:!0,accessToken:a,onDataChange:R,onUnsavedChanges:T}),(o.litellm_params?.guardrail==="tool_permission"||g)&&(0,l.jsx)(eF.Divider,{orientation:"left",children:"Provider Settings"}),o.litellm_params?.guardrail==="tool_permission"?(0,l.jsx)(eR,{value:P,onChange:B}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ex,{selectedProvider:Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail)||null,accessToken:a,providerParams:g,value:o.litellm_params}),g&&(()=>{let e=Object.keys(ea).find(e=>ea[e]===o.litellm_params?.guardrail);if(!e)return null;let t=g[ea[e]?.toLowerCase()];return t&&t.optional_params?(0,l.jsx)(eu,{optionalParams:t.optional_params,parentFieldKey:"optional_params",values:o.litellm_params}):null})()]}),(0,l.jsx)(eF.Divider,{orientation:"left",children:"Advanced Settings"}),(0,l.jsx)(r.Form.Item,{label:"Guardrail Information",name:"guardrail_info",children:(0,l.jsx)(i.Input.TextArea,{rows:5})}),(0,l.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,l.jsx)(c.Button,{onClick:()=>{j(!1),T(!1),K()},children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Guardrail ID"}),(0,l.jsx)("div",{className:"font-mono",children:o.guardrail_id})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Guardrail Name"}),(0,l.jsx)("div",{children:o.guardrail_name||"Unnamed Guardrail"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Provider"}),(0,l.jsx)("div",{children:W})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Mode"}),(0,l.jsx)("div",{children:o.litellm_params?.mode||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Default On"}),(0,l.jsx)(e4.Badge,{color:o.litellm_params?.default_on?"green":"gray",children:o.litellm_params?.default_on?"Yes":"No"})]}),o.litellm_params?.pii_entities_config&&Object.keys(o.litellm_params.pii_entities_config).length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"PII Protection"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsxs)(e4.Badge,{color:"blue",children:[Object.keys(o.litellm_params.pii_entities_config).length," PII entities configured"]})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Created At"}),(0,l.jsx)("div",{children:q(o.created_at)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(eL.Text,{className:"font-medium",children:"Last Updated"}),(0,l.jsx)("div",{children:q(o.updated_at)})]}),o.litellm_params?.guardrail==="tool_permission"&&(0,l.jsx)(eR,{value:P,disabled:!0})]})]})})]})]}),(0,l.jsx)(tF,{visible:$,onClose:()=>E(!1),onSuccess:()=>{E(!1),z()},accessToken:a,editData:o?{guardrail_id:o.guardrail_id,guardrail_name:o.guardrail_name,litellm_params:o.litellm_params}:null})]})}],969641);var t$=e.i(573421),tE=e.i(19732),tM=e.i(928685),tR=e.i(166406),tz=e.i(637235),tG=e.i(755151),tD=e.i(240647);let{Text:tK}=d.Typography,tH=function({results:e,errors:t}){let[a,r]=(0,m.useState)(new Set),i=e=>{let t=new Set(a);t.has(e)?t.delete(e):t.add(e),r(t)},s=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}};return e||t?(0,l.jsxs)("div",{className:"space-y-3 pt-4 border-t border-gray-200",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Results"}),e&&e.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eB.Card,{className:"bg-green-50 border-green-200",children:(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer flex-1",onClick:()=>i(e.guardrailName),children:[t?(0,l.jsx)(tD.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tG.DownOutlined,{className:"text-gray-500 text-xs"}),(0,l.jsx)(tv.CheckCircleOutlined,{className:"text-green-600 text-lg"}),(0,l.jsx)("span",{className:"text-sm font-medium text-green-800",children:e.guardrailName})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tz.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]}),!t&&(0,l.jsx)(eQ.Button,{size:"xs",variant:"secondary",icon:tR.CopyOutlined,onClick:async()=>{await s(e.response_text)?u.default.success("Result copied to clipboard"):u.default.fromBackend("Failed to copy result")},children:"Copy"})]})]}),!t&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"bg-white border border-green-200 rounded p-3",children:[(0,l.jsx)("label",{className:"text-xs font-medium text-gray-600 mb-2 block",children:"Output Text"}),(0,l.jsx)("div",{className:"font-mono text-sm text-gray-900 whitespace-pre-wrap break-words",children:e.response_text})]}),(0,l.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,l.jsx)("span",{className:"font-medium",children:"Characters:"})," ",e.response_text.length]})]})]})},e.guardrailName)}),t&&t.map(e=>{let t=a.has(e.guardrailName);return(0,l.jsx)(eB.Card,{className:"bg-red-50 border-red-200",children:(0,l.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,l.jsx)("div",{className:"cursor-pointer mt-0.5",onClick:()=>i(e.guardrailName),children:t?(0,l.jsx)(tD.RightOutlined,{className:"text-gray-500 text-xs"}):(0,l.jsx)(tG.DownOutlined,{className:"text-gray-500 text-xs"})}),(0,l.jsx)("div",{className:"text-red-600 mt-0.5",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800 cursor-pointer",onClick:()=>i(e.guardrailName),children:[e.guardrailName," - Error"]}),(0,l.jsxs)("div",{className:"flex items-center space-x-1 text-xs text-gray-600",children:[(0,l.jsx)(tz.ClockCircleOutlined,{}),(0,l.jsxs)("span",{className:"font-medium",children:[e.latency,"ms"]})]})]}),!t&&(0,l.jsx)("p",{className:"text-sm text-red-700 mt-1",children:e.error.message})]})]})},e.guardrailName)})]}):null},{TextArea:tq}=i.Input,{Text:tJ}=d.Typography,tW=function({guardrailNames:e,onSubmit:t,isLoading:a,results:r,errors:i,onClose:s}){let[n,o]=(0,m.useState)(""),d=()=>{n.trim()?t(n):u.default.fromBackend("Please enter text to test")},c=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let a=document.execCommand("copy");if(document.body.removeChild(t),!a)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},p=async()=>{await c(n)?u.default.success("Input copied to clipboard"):u.default.fromBackend("Failed to copy input")};return(0,l.jsxs)("div",{className:"space-y-4 h-full flex flex-col",children:[(0,l.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:(0,l.jsx)("div",{className:"flex items-center space-x-3",children:(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,l.jsx)("div",{className:"inline-flex items-center space-x-1 bg-blue-50 px-3 py-1 rounded-md border border-blue-200",children:(0,l.jsx)("span",{className:"font-mono text-blue-700 font-medium text-sm",children:e})},e))})]}),(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Test ",e.length>1?"guardrails":"guardrail"," and compare results"]})]})})}),(0,l.jsxs)("div",{className:"flex-1 overflow-auto space-y-4",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Input Text"}),(0,l.jsx)(ef.Tooltip,{title:"Press Enter to submit. Use Shift+Enter for new line.",children:(0,l.jsx)(eE.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),n&&(0,l.jsx)(eQ.Button,{size:"xs",variant:"secondary",icon:tR.CopyOutlined,onClick:p,children:"Copy Input"})]}),(0,l.jsx)(tq,{value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),d())},placeholder:"Enter text to test with guardrails...",rows:8,className:"font-mono text-sm"}),(0,l.jsxs)("div",{className:"flex justify-between items-center mt-1",children:[(0,l.jsxs)(tJ,{className:"text-xs text-gray-500",children:["Press ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Enter"})," to submit • ",(0,l.jsx)("kbd",{className:"px-1 py-0.5 bg-gray-100 border border-gray-300 rounded text-xs",children:"Shift+Enter"})," for new line"]}),(0,l.jsxs)(tJ,{className:"text-xs text-gray-500",children:["Characters: ",n.length]})]})]}),(0,l.jsx)("div",{className:"pt-2",children:(0,l.jsx)(eQ.Button,{onClick:d,loading:a,disabled:!n.trim(),className:"w-full",children:a?`Testing ${e.length} guardrail${e.length>1?"s":""}...`:`Test ${e.length} guardrail${e.length>1?"s":""}`})})]}),(0,l.jsx)(tH,{results:r,errors:i})]})]})};e.s(["default",0,({guardrailsList:e,isLoading:t,accessToken:a,onClose:r})=>{let[i,s]=(0,m.useState)(new Set),[n,o]=(0,m.useState)(""),[d,c]=(0,m.useState)([]),[g,x]=(0,m.useState)([]),[h,f]=(0,m.useState)(!1),y=e.filter(e=>e.guardrail_name?.toLowerCase().includes(n.toLowerCase())),j=e=>{let t=new Set(i);t.has(e)?t.delete(e):t.add(e),s(t)},_=async e=>{if(0===i.size||!a)return;f(!0),c([]),x([]);let t=[],l=[];await Promise.all(Array.from(i).map(async r=>{let i=Date.now();try{let l=await (0,p.applyGuardrail)(a,r,e,null,null),s=Date.now()-i;t.push({guardrailName:r,response_text:l.response_text,latency:s})}catch(t){let e=Date.now()-i;console.error(`Error testing guardrail ${r}:`,t),l.push({guardrailName:r,error:t,latency:e})}})),c(t),x(l),f(!1),t.length>0&&u.default.success(`${t.length} guardrail${t.length>1?"s":""} applied successfully`),l.length>0&&u.default.fromBackend(`${l.length} guardrail${l.length>1?"s":""} failed`)};return(0,l.jsx)("div",{className:"w-full h-[calc(100vh-200px)]",children:(0,l.jsx)(eB.Card,{className:"h-full",children:(0,l.jsxs)("div",{className:"flex h-full",children:[(0,l.jsxs)("div",{className:"w-1/4 border-r border-gray-200 flex flex-col overflow-hidden",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)(tm.Title,{className:"text-lg font-semibold mb-3",children:"Guardrails"}),(0,l.jsx)(e8.TextInput,{icon:tM.SearchOutlined,placeholder:"Search guardrails...",value:n,onValueChange:o})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto",children:t?(0,l.jsx)("div",{className:"flex items-center justify-center h-32",children:(0,l.jsx)(ep.Spin,{})}):0===y.length?(0,l.jsx)("div",{className:"p-4",children:(0,l.jsx)(e$.Empty,{description:n?"No guardrails match your search":"No guardrails available"})}):(0,l.jsx)(t$.List,{dataSource:y,renderItem:e=>(0,l.jsx)(t$.List.Item,{onClick:()=>{e.guardrail_name&&j(e.guardrail_name)},className:`cursor-pointer hover:bg-gray-50 transition-colors px-4 ${i.has(e.guardrail_name||"")?"bg-blue-50 border-l-4 border-l-blue-500":"border-l-4 border-l-transparent"}`,children:(0,l.jsx)(t$.List.Item.Meta,{avatar:(0,l.jsx)(eh.Checkbox,{checked:i.has(e.guardrail_name||""),onClick:t=>{t.stopPropagation(),e.guardrail_name&&j(e.guardrail_name)}}),title:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(tE.ExperimentOutlined,{className:"text-gray-400"}),(0,l.jsx)("span",{className:"font-medium text-gray-900",children:e.guardrail_name})]}),description:(0,l.jsxs)("div",{className:"text-xs space-y-1 mt-1",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Type: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.guardrail})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-medium",children:"Mode: "}),(0,l.jsx)("span",{className:"text-gray-600",children:e.litellm_params.mode})]})]})})})})}),(0,l.jsx)("div",{className:"p-3 border-t border-gray-200 bg-gray-50",children:(0,l.jsxs)(eL.Text,{className:"text-xs text-gray-600",children:[i.size," of ",y.length," selected"]})})]}),(0,l.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,l.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,l.jsx)(tm.Title,{className:"text-xl font-semibold mb-0",children:"Guardrail Testing Playground"})}),(0,l.jsx)("div",{className:"flex-1 overflow-auto p-4",children:0===i.size?(0,l.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,l.jsx)(tE.ExperimentOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,l.jsx)(eL.Text,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select Guardrails to Test"}),(0,l.jsx)(eL.Text,{className:"text-center text-gray-500 max-w-md",children:"Choose one or more guardrails from the left sidebar to start testing and comparing results."})]}):(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)(tW,{guardrailNames:Array.from(i),onSubmit:_,results:d.length>0?d:null,errors:g.length>0?g:null,isLoading:h,onClose:()=>s(new Set)})})})]})]})})})}],476993),e.s([],824296),e.s(["CustomCodeModal",0,tF],64352);let tU="../ui/assets/logos/",tV=[{id:"cf_denied_financial",name:"Denied Financial Advice",description:"Detects requests for personalized financial advice, investment recommendations, or financial planning.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:207,latency:"<0.1ms"}},{id:"cf_denied_insults",name:"Insults & Personal Attacks",description:"Detects insults, name-calling, and personal attacks directed at the chatbot, staff, or other people.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"],eval:{f1:100,precision:100,recall:100,testCases:299,latency:"<0.1ms"}},{id:"cf_denied_legal",name:"Denied Legal Advice",description:"Detects requests for unauthorized legal advice, case analysis, or legal recommendations.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_denied_medical",name:"Denied Medical Advice",description:"Detects requests for medical diagnosis, treatment recommendations, or health advice.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Topic Blocker"]},{id:"cf_harmful_violence",name:"Harmful Violence",description:"Detects content related to violence, criminal planning, attacks, and violent threats.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_self_harm",name:"Harmful Self-Harm",description:"Detects content related to self-harm, suicide, and dangerous self-destructive behavior.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_child_safety",name:"Harmful Child Safety",description:"Detects content that could endanger child safety or exploit minors.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_harmful_illegal_weapons",name:"Harmful Illegal Weapons",description:"Detects content related to illegal weapons manufacturing, distribution, or acquisition.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Safety"]},{id:"cf_bias_gender",name:"Bias: Gender",description:"Detects gender-based discrimination, stereotypes, and biased language.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_racial",name:"Bias: Racial",description:"Detects racial discrimination, stereotypes, and racially biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_religious",name:"Bias: Religious",description:"Detects religious discrimination, intolerance, and religiously biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_bias_sexual_orientation",name:"Bias: Sexual Orientation",description:"Detects discrimination based on sexual orientation and related biased content.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Bias"]},{id:"cf_prompt_injection_jailbreak",name:"Prompt Injection: Jailbreak",description:"Detects jailbreak attempts designed to bypass AI safety guidelines and restrictions.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_data_exfil",name:"Prompt Injection: Data Exfiltration",description:"Detects attempts to extract sensitive data through prompt manipulation.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_sql",name:"Prompt Injection: SQL",description:"Detects SQL injection attempts embedded in prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_malicious_code",name:"Prompt Injection: Malicious Code",description:"Detects attempts to inject malicious code through prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_prompt_injection_system_prompt",name:"Prompt Injection: System Prompt",description:"Detects attempts to extract or override system prompts.",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Prompt Injection"]},{id:"cf_toxic_abuse",name:"Toxic & Abusive Language",description:"Detects toxic, abusive, and hateful language across multiple languages (EN, AU, DE, ES, FR).",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Toxicity"]},{id:"cf_patterns",name:"Pattern Matching",description:"Detect and block sensitive data patterns like SSNs, credit card numbers, API keys, and custom regex patterns.",category:"litellm",subcategory:"Patterns",logo:`${tU}litellm_logo.jpg`,tags:["PII","Regex","Data Protection"]},{id:"cf_keywords",name:"Keyword Blocking",description:"Block or mask content containing specific keywords or phrases. Upload custom word lists or add individual terms.",category:"litellm",subcategory:"Keywords",logo:`${tU}litellm_logo.jpg`,tags:["Keywords","Blocklist"]},{id:"block_code_execution",name:"Block Code Execution",description:"Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",category:"litellm",subcategory:"Code Safety",logo:`${tU}litellm_logo.jpg`,tags:["Code","Safety","Prompt Injection"]},{id:"cf_competitor_intent",name:"Competitor Name Blocking",description:"Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",category:"litellm",subcategory:"Content Category",logo:`${tU}litellm_logo.jpg`,tags:["Content Category","Competitor","Topic Blocker"]},{id:"presidio",name:"Presidio PII",description:"Microsoft Presidio for PII detection and anonymization. Supports 30+ entity types with configurable actions.",category:"partner",logo:`${tU}microsoft_azure.svg`,tags:["PII","Microsoft"],providerKey:"PresidioPII"},{id:"bedrock",name:"Bedrock Guardrail",description:"AWS Bedrock Guardrails for content filtering, topic avoidance, and sensitive information detection.",category:"partner",logo:`${tU}bedrock.svg`,tags:["AWS","Content Safety"],providerKey:"Bedrock"},{id:"lakera",name:"Lakera",description:"AI security platform protecting against prompt injections, data leakage, and harmful content.",category:"partner",logo:`${tU}lakeraai.jpeg`,tags:["Security","Prompt Injection"],providerKey:"Lakera"},{id:"openai_moderation",name:"OpenAI Moderation",description:"OpenAI's content moderation API for detecting harmful content across multiple categories.",category:"partner",logo:`${tU}openai_small.svg`,tags:["Content Moderation","OpenAI"]},{id:"google_model_armor",name:"Google Cloud Model Armor",description:"Google Cloud's model protection service for safe and responsible AI deployments.",category:"partner",logo:`${tU}google.svg`,tags:["Google Cloud","Safety"]},{id:"guardrails_ai",name:"Guardrails AI",description:"Open-source framework for adding structural, type, and quality guarantees to LLM outputs.",category:"partner",logo:`${tU}guardrails_ai.jpeg`,tags:["Open Source","Validation"]},{id:"zscaler",name:"Zscaler AI Guard",description:"Enterprise AI security from Zscaler for monitoring and protecting AI/ML workloads.",category:"partner",logo:`${tU}zscaler.svg`,tags:["Enterprise","Security"]},{id:"panw",name:"PANW Prisma AIRS",description:"Palo Alto Networks Prisma AI Runtime Security for securing AI applications in production.",category:"partner",logo:`${tU}palo_alto_networks.jpeg`,tags:["Enterprise","Security"]},{id:"noma",name:"Noma Security",description:"AI security platform for detecting and preventing AI-specific threats and vulnerabilities.",category:"partner",logo:`${tU}noma_security.png`,tags:["Security","Threat Detection"]},{id:"aporia",name:"Aporia AI",description:"Real-time AI guardrails for hallucination detection, topic control, and policy enforcement.",category:"partner",logo:`${tU}aporia.png`,tags:["Hallucination","Policy"]},{id:"aim",name:"AIM Guardrail",description:"AIM Security guardrails for comprehensive AI threat detection and mitigation.",category:"partner",logo:`${tU}aim_security.jpeg`,tags:["Security","Threat Detection"]},{id:"prompt_security",name:"Prompt Security",description:"Protect against prompt injection attacks, data leakage, and other LLM security threats.",category:"partner",logo:`${tU}prompt_security.png`,tags:["Prompt Injection","Security"]},{id:"lasso",name:"Lasso Guardrail",description:"Content moderation and safety guardrails for responsible AI deployments.",category:"partner",logo:`${tU}lasso.png`,tags:["Content Moderation"]},{id:"pangea",name:"Pangea Guardrail",description:"Pangea's AI guardrails for secure, compliant, and trustworthy AI applications.",category:"partner",logo:`${tU}pangea.png`,tags:["Compliance","Security"]},{id:"enkryptai",name:"EnkryptAI",description:"AI security and governance platform for enterprise AI safety and compliance.",category:"partner",logo:`${tU}enkrypt_ai.avif`,tags:["Enterprise","Governance"]},{id:"javelin",name:"Javelin Guardrails",description:"AI gateway with built-in guardrails for secure and compliant AI operations.",category:"partner",logo:`${tU}javelin.png`,tags:["Gateway","Security"]},{id:"pillar",name:"Pillar Guardrail",description:"AI safety platform for monitoring, testing, and securing AI systems.",category:"partner",logo:`${tU}pillar.jpeg`,tags:["Monitoring","Safety"]},{id:"akto",name:"Akto Guardrail",description:"AI security platform from Akto.io with automatic monitoring and guardrails for AI/ML applications.",category:"partner",logo:`${tU}akto.svg`,tags:["Security","Safety","Monitoring"]}];e.s(["ALL_CARDS",0,tV],230312)},487304,168118,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(994388),r=e.i(653824),i=e.i(881073),s=e.i(197647),n=e.i(723731),o=e.i(404206),d=e.i(326373),c=e.i(755151),m=e.i(646563),u=e.i(245094),p=e.i(764205),g=e.i(185357),x=e.i(782719),h=e.i(708347),f=e.i(969641),y=e.i(476993),j=e.i(727749),_=e.i(127952),b=e.i(180766);e.i(824296);var v=e.i(64352),N=e.i(311451),C=e.i(928685),w=e.i(266537),S=e.i(230312),k=e.i(826910);let I=({src:e,name:l})=>{let[r,i]=(0,a.useState)(!1);return r||!e?(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:6,backgroundColor:"#e5e7eb",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#6b7280",flexShrink:0},children:l?.charAt(0)||"?"}):(0,t.jsx)("img",{src:e,alt:"",style:{width:28,height:28,borderRadius:6,objectFit:"contain",flexShrink:0},onError:()=>i(!0)})},A=({card:e,onClick:l})=>{let[r,i]=(0,a.useState)(!1);return(0,t.jsxs)("div",{onClick:l,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{borderRadius:12,border:r?"1px solid #93c5fd":"1px solid #e5e7eb",backgroundColor:"#ffffff",padding:"20px 20px 16px 20px",cursor:"pointer",transition:"border-color 0.15s, box-shadow 0.15s",display:"flex",flexDirection:"column",minHeight:170,boxShadow:r?"0 1px 6px rgba(59,130,246,0.08)":"none"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[(0,t.jsx)(I,{src:e.logo,name:e.name}),(0,t.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"#111827",lineHeight:1.3},children:e.name})]}),(0,t.jsx)("p",{className:"line-clamp-3",style:{fontSize:12,color:"#6b7280",lineHeight:1.6,margin:0,flex:1},children:e.description}),e.eval&&(0,t.jsxs)("div",{style:{marginTop:10,display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)(k.CheckCircleFilled,{style:{color:"#16a34a",fontSize:12}}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#16a34a",fontWeight:500},children:["F1: ",e.eval.f1,"% · ",e.eval.testCases," test cases"]})]})]})};var T=e.i(464571),O=e.i(447566);let P={cf_denied_financial:{provider:"LitellmContentFilter",categoryName:"denied_financial_advice",guardrailNameSuggestion:"Denied Financial Advice",mode:"pre_call",defaultOn:!1},cf_denied_legal:{provider:"LitellmContentFilter",categoryName:"denied_legal_advice",guardrailNameSuggestion:"Denied Legal Advice",mode:"pre_call",defaultOn:!1},cf_denied_medical:{provider:"LitellmContentFilter",categoryName:"denied_medical_advice",guardrailNameSuggestion:"Denied Medical Advice",mode:"pre_call",defaultOn:!1},cf_denied_insults:{provider:"LitellmContentFilter",categoryName:"denied_insults",guardrailNameSuggestion:"Insults & Personal Attacks",mode:"pre_call",defaultOn:!1},cf_harmful_violence:{provider:"LitellmContentFilter",categoryName:"harmful_violence",guardrailNameSuggestion:"Harmful Violence",mode:"pre_call",defaultOn:!1},cf_harmful_self_harm:{provider:"LitellmContentFilter",categoryName:"harmful_self_harm",guardrailNameSuggestion:"Harmful Self-Harm",mode:"pre_call",defaultOn:!1},cf_harmful_child_safety:{provider:"LitellmContentFilter",categoryName:"harmful_child_safety",guardrailNameSuggestion:"Harmful Child Safety",mode:"pre_call",defaultOn:!1},cf_harmful_illegal_weapons:{provider:"LitellmContentFilter",categoryName:"harmful_illegal_weapons",guardrailNameSuggestion:"Harmful Illegal Weapons",mode:"pre_call",defaultOn:!1},cf_bias_gender:{provider:"LitellmContentFilter",categoryName:"bias_gender",guardrailNameSuggestion:"Bias: Gender",mode:"pre_call",defaultOn:!1},cf_bias_racial:{provider:"LitellmContentFilter",categoryName:"bias_racial",guardrailNameSuggestion:"Bias: Racial",mode:"pre_call",defaultOn:!1},cf_bias_religious:{provider:"LitellmContentFilter",categoryName:"bias_religious",guardrailNameSuggestion:"Bias: Religious",mode:"pre_call",defaultOn:!1},cf_bias_sexual_orientation:{provider:"LitellmContentFilter",categoryName:"bias_sexual_orientation",guardrailNameSuggestion:"Bias: Sexual Orientation",mode:"pre_call",defaultOn:!1},cf_prompt_injection_jailbreak:{provider:"LitellmContentFilter",categoryName:"prompt_injection_jailbreak",guardrailNameSuggestion:"Prompt Injection: Jailbreak",mode:"pre_call",defaultOn:!1},cf_prompt_injection_data_exfil:{provider:"LitellmContentFilter",categoryName:"prompt_injection_data_exfiltration",guardrailNameSuggestion:"Prompt Injection: Data Exfiltration",mode:"pre_call",defaultOn:!1},cf_prompt_injection_sql:{provider:"LitellmContentFilter",categoryName:"prompt_injection_sql",guardrailNameSuggestion:"Prompt Injection: SQL",mode:"pre_call",defaultOn:!1},cf_prompt_injection_malicious_code:{provider:"LitellmContentFilter",categoryName:"prompt_injection_malicious_code",guardrailNameSuggestion:"Prompt Injection: Malicious Code",mode:"pre_call",defaultOn:!1},cf_prompt_injection_system_prompt:{provider:"LitellmContentFilter",categoryName:"prompt_injection_system_prompt",guardrailNameSuggestion:"Prompt Injection: System Prompt",mode:"pre_call",defaultOn:!1},cf_toxic_abuse:{provider:"LitellmContentFilter",categoryName:"harm_toxic_abuse",guardrailNameSuggestion:"Toxic & Abusive Language",mode:"pre_call",defaultOn:!1},cf_patterns:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Pattern Matching",mode:"pre_call",defaultOn:!1},cf_keywords:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Keyword Blocking",mode:"pre_call",defaultOn:!1},block_code_execution:{provider:"BlockCodeExecution",guardrailNameSuggestion:"Block Code Execution",mode:"pre_call",defaultOn:!1},cf_competitor_intent:{provider:"LitellmContentFilter",guardrailNameSuggestion:"Competitor Name Blocking",mode:"pre_call",defaultOn:!1},presidio:{provider:"PresidioPII",guardrailNameSuggestion:"Presidio PII",mode:"pre_call",defaultOn:!1},bedrock:{provider:"Bedrock",guardrailNameSuggestion:"Bedrock Guardrail",mode:"pre_call",defaultOn:!1},lakera:{provider:"Lakera",guardrailNameSuggestion:"Lakera",mode:"pre_call",defaultOn:!1},openai_moderation:{provider:"OpenaiModeration",guardrailNameSuggestion:"OpenAI Moderation",mode:"pre_call",defaultOn:!1},google_model_armor:{provider:"ModelArmor",guardrailNameSuggestion:"Google Cloud Model Armor",mode:"pre_call",defaultOn:!1},guardrails_ai:{provider:"GuardrailsAi",guardrailNameSuggestion:"Guardrails AI",mode:"pre_call",defaultOn:!1},zscaler:{provider:"ZscalerAiGuard",guardrailNameSuggestion:"Zscaler AI Guard",mode:"pre_call",defaultOn:!1},panw:{provider:"PanwPrismaAirs",guardrailNameSuggestion:"PANW Prisma AIRS",mode:"pre_call",defaultOn:!1},noma:{provider:"Noma",guardrailNameSuggestion:"Noma Security",mode:"pre_call",defaultOn:!1},aporia:{provider:"AporiaAi",guardrailNameSuggestion:"Aporia AI",mode:"pre_call",defaultOn:!1},aim:{provider:"Aim",guardrailNameSuggestion:"AIM Guardrail",mode:"pre_call",defaultOn:!1},prompt_security:{provider:"PromptSecurity",guardrailNameSuggestion:"Prompt Security",mode:"pre_call",defaultOn:!1},lasso:{provider:"Lasso",guardrailNameSuggestion:"Lasso Guardrail",mode:"pre_call",defaultOn:!1},pangea:{provider:"Pangea",guardrailNameSuggestion:"Pangea Guardrail",mode:"pre_call",defaultOn:!1},enkryptai:{provider:"Enkryptai",guardrailNameSuggestion:"EnkryptAI",mode:"pre_call",defaultOn:!1},javelin:{provider:"Javelin",guardrailNameSuggestion:"Javelin Guardrails",mode:"pre_call",defaultOn:!1},pillar:{provider:"Pillar",guardrailNameSuggestion:"Pillar Guardrail",mode:"pre_call",defaultOn:!1},akto:{provider:"Akto",guardrailNameSuggestion:"Akto Guardrail",mode:"pre_call",defaultOn:!1}},B=({card:e,onBack:l,accessToken:r,onGuardrailCreated:i})=>{let[s,n]=(0,a.useState)(!1),[o,d]=(0,a.useState)("overview"),c=[{property:"Provider",value:"litellm"===e.category?"LiteLLM Content Filter":"Partner Guardrail"},...e.subcategory?[{property:"Subcategory",value:e.subcategory}]:[],..."litellm"===e.category?[{property:"Cost",value:"$0 / request"}]:[],..."litellm"===e.category?[{property:"External Dependencies",value:"None"}]:[],..."litellm"===e.category?[{property:"Latency",value:e.eval?.latency||"<1ms"}]:[]],m=e.eval?[{metric:"Precision",value:`${e.eval.precision}%`},{metric:"Recall",value:`${e.eval.recall}%`},{metric:"F1 Score",value:`${e.eval.f1}%`},{metric:"Test Cases",value:String(e.eval.testCases)},{metric:"False Positives",value:"0"},{metric:"False Negatives",value:"0"},{metric:"Latency (p50)",value:e.eval.latency}]:[],u=[{key:"overview",label:"Overview"},...e.eval?[{key:"eval",label:"Eval Results"}]:[]];return(0,t.jsxs)("div",{style:{maxWidth:960,margin:"0 auto"},children:[(0,t.jsxs)("div",{onClick:l,style:{display:"inline-flex",alignItems:"center",gap:6,color:"#5f6368",cursor:"pointer",fontSize:14,marginBottom:24},children:[(0,t.jsx)(O.ArrowLeftOutlined,{style:{fontSize:11}}),(0,t.jsx)("span",{children:e.name})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:8},children:[(0,t.jsx)("img",{src:e.logo,alt:"",style:{width:40,height:40,borderRadius:8,objectFit:"contain"},onError:e=>{e.target.style.display="none"}}),(0,t.jsx)("h1",{style:{fontSize:28,fontWeight:400,color:"#202124",margin:0,lineHeight:1.2},children:e.name})]}),(0,t.jsx)("p",{style:{fontSize:14,color:"#5f6368",margin:"0 0 20px 0",lineHeight:1.6},children:e.description}),(0,t.jsx)("div",{style:{display:"flex",gap:10,marginBottom:32},children:(0,t.jsx)(T.Button,{onClick:()=>n(!0),style:{borderRadius:20,padding:"4px 20px",height:36,borderColor:"#dadce0",color:"#1a73e8",fontWeight:500,fontSize:14},children:"Create Guardrail"})}),(0,t.jsx)("div",{style:{borderBottom:"1px solid #dadce0",marginBottom:28},children:(0,t.jsx)("div",{style:{display:"flex",gap:0},children:u.map(e=>(0,t.jsx)("div",{onClick:()=>d(e.key),style:{padding:"12px 20px",fontSize:14,color:o===e.key?"#1a73e8":"#5f6368",borderBottom:o===e.key?"3px solid #1a73e8":"3px solid transparent",cursor:"pointer",fontWeight:o===e.key?500:400,marginBottom:-1},children:e.label},e.key))})}),"overview"===o&&(0,t.jsxs)("div",{style:{display:"flex",gap:64},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 12px 0"},children:"Overview"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#3c4043",lineHeight:1.7,margin:"0 0 32px 0"},children:e.description}),(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 4px 0"},children:"Guardrail Details"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#5f6368",margin:"0 0 16px 0"},children:"Details are as follows"}),(0,t.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500,width:200},children:"Property"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 0",color:"#5f6368",fontWeight:500},children:e.name})]})}),(0,t.jsx)("tbody",{children:c.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 0",color:"#3c4043"},children:e.property}),(0,t.jsx)("td",{style:{padding:"12px 0",color:"#202124"},children:e.value})]},a))})]})]}),(0,t.jsxs)("div",{style:{width:240,flexShrink:0},children:[(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Guardrail ID"}),(0,t.jsxs)("div",{style:{fontSize:13,color:"#202124",wordBreak:"break-all"},children:["litellm/",e.id]})]}),(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:4},children:"Type"}),(0,t.jsx)("div",{style:{fontSize:13,color:"#202124"},children:"litellm"===e.category?"Content Filter":"Partner"})]}),e.tags.length>0&&(0,t.jsxs)("div",{style:{marginBottom:28},children:[(0,t.jsx)("div",{style:{fontSize:12,color:"#5f6368",marginBottom:8},children:"Tags"}),(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:e.tags.map(e=>(0,t.jsx)("span",{style:{fontSize:12,padding:"4px 12px",borderRadius:16,border:"1px solid #dadce0",color:"#3c4043",backgroundColor:"#fff"},children:e},e))})]})]})]}),"eval"===o&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{style:{fontSize:18,fontWeight:400,color:"#202124",margin:"0 0 16px 0"},children:"Eval Results"}),(0,t.jsxs)("table",{style:{width:"100%",maxWidth:560,borderCollapse:"collapse",fontSize:14},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #dadce0"},children:[(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Metric"}),(0,t.jsx)("th",{style:{textAlign:"left",padding:"12px 16px",color:"#5f6368",fontWeight:500},children:"Value"})]})}),(0,t.jsx)("tbody",{children:m.map((e,a)=>(0,t.jsxs)("tr",{style:{borderBottom:"1px solid #f1f3f4"},children:[(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#3c4043"},children:e.metric}),(0,t.jsx)("td",{style:{padding:"12px 16px",color:"#202124",fontWeight:500},children:e.value})]},a))})]})]}),(0,t.jsx)(g.default,{visible:s,onClose:()=>n(!1),accessToken:r,onSuccess:()=>{n(!1),i()},preset:P[e.id]})]})},L=({accessToken:e,onGuardrailCreated:l})=>{let[r,i]=(0,a.useState)(""),[s,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!1),c=S.ALL_CARDS.filter(e=>{if(!r)return!0;let t=r.toLowerCase();return e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags.some(e=>e.toLowerCase().includes(t))}),m=c.filter(e=>"litellm"===e.category),u=c.filter(e=>"partner"===e.category);return s?(0,t.jsx)(B,{card:s,onBack:()=>n(null),accessToken:e,onGuardrailCreated:l}):(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{marginBottom:24},children:(0,t.jsx)(N.Input,{size:"large",placeholder:"Search guardrails",prefix:(0,t.jsx)(C.SearchOutlined,{style:{color:"#9ca3af"}}),value:r,onChange:e=>i(e.target.value),style:{borderRadius:8}})}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:0},children:"LiteLLM Content Filter"}),(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:14,color:"#1a73e8",cursor:"pointer"},onClick:()=>d(!o),children:o?(0,t.jsx)(t.Fragment,{children:"Show less"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.ArrowRightOutlined,{style:{fontSize:12}}),`Show all (${m.length})`]})})]}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Built-in guardrails powered by LiteLLM. Zero latency, no external dependencies, no additional cost."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:(o?m:m.slice(0,10)).map(e=>(0,t.jsx)(A,{card:e,onClick:()=>n(e)},e.id))})]}),(0,t.jsxs)("div",{style:{marginBottom:40},children:[(0,t.jsx)("h2",{style:{fontSize:20,fontWeight:600,color:"#111827",margin:"0 0 4px 0"},children:"Partner Guardrails"}),(0,t.jsx)("p",{style:{fontSize:13,color:"#6b7280",margin:"4px 0 20px 0"},children:"Third-party guardrail integrations from leading AI security providers."}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:16},children:u.map(e=>(0,t.jsx)(A,{card:e,onClick:()=>n(e)},e.id))})]})]})};var F=e.i(988846),$=e.i(837007),E=e.i(409797),M=e.i(54131),R=e.i(995926),z=e.i(678784),G=e.i(634831),D=e.i(438100),K=e.i(302202),H=e.i(328196),q=e.i(879664);e.s(["InfoIcon",()=>q.default],168118);var q=q;function J(e){var t;let a=e.litellm_params??{},l=e.guardrail_info??{},r=a.headers,i=Array.isArray(r)?r.map(e=>({key:(e.key??e.name??"").toString(),value:String(e.value??"")})):"object"==typeof r&&null!==r?Object.entries(r).map(([e,t])=>({key:e,value:String(t??"")})):[],s=a.api_base??a.url??"",n=l.model??a.model??"—",o=a.forward_api_key??!0,d=Array.isArray(a.extra_headers)?a.extra_headers.filter(e=>"string"==typeof e):[];return{id:e.guardrail_id,team:e.team_id??"—",name:e.guardrail_name,endpoint:s,status:"pending_review"===(t=e.status)?"pending":"active"===t||"rejected"===t?t:"active",model:n,forwardKey:o,description:l.description??"",method:a.method??"POST",customHeaders:i,extraHeaders:d,submittedAt:function(e){if(!e)return"—";try{let t=new Date(e);return isNaN(t.getTime())?e:t.toISOString().slice(0,10)}catch{return e}}(e.submitted_at),submittedBy:e.submitted_by_email??e.submitted_by_user_id??"—",mode:a.mode,unreachable_fallback:a.unreachable_fallback,additionalProviderParams:a.additional_provider_specific_params,guardrailType:a.guardrail}}let W={active:{label:"Active",bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},pending:{label:"Pending Review",bg:"bg-yellow-50",text:"text-yellow-700",dot:"bg-yellow-500"},rejected:{label:"Rejected",bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}},U={"ML Platform":"bg-purple-100 text-purple-700","Data Science":"bg-blue-100 text-blue-700",Security:"bg-red-100 text-red-700","Customer Success":"bg-orange-100 text-orange-700",Legal:"bg-gray-100 text-gray-700",Finance:"bg-green-100 text-green-700"};function V({label:e,value:a,color:l}){return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg px-4 py-3",children:[(0,t.jsx)("div",{className:`text-2xl font-bold ${l}`,children:a}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:e})]})}function Y({enabled:e,onToggle:a}){return(0,t.jsx)("button",{type:"button",onClick:a,role:"switch","aria-checked":e,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 ${e?"bg-blue-500":"bg-gray-200"}`,children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${e?"translate-x-4":"translate-x-0.5"}`})})}function Z({guardrail:e,isSelected:a,isHeadersExpanded:l,onSelect:r,onToggleForwardKey:i,onToggleHeaders:s,onApprove:n,onReject:o}){let d=W[e.status],c=U[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsxs)("div",{className:`bg-white border rounded-lg p-4 transition-all ${a?"border-blue-400 ring-1 ring-blue-200":"border-gray-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${c}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${d.bg} ${d.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${d.dot}`}),d.label]})]}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mb-2 line-clamp-1",children:e.description}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)(K.ServerIcon,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),(0,t.jsx)("code",{className:"text-xs text-gray-500 font-mono truncate",children:e.endpoint})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[(0,t.jsxs)("span",{children:["Model: ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.model})]}),(0,t.jsxs)("span",{children:["Submitted:"," ",(0,t.jsx)("span",{className:"font-medium text-gray-700",children:e.submittedAt})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col items-end gap-2 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:"Forward API Key"}),(0,t.jsx)(Y,{enabled:e.forwardKey,onToggle:i})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"text-xs border border-gray-300 text-gray-600 hover:bg-gray-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:a?"Close":"Review"}),"pending"===e.status&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:n,className:"text-xs bg-green-500 hover:bg-green-600 text-white px-3 py-1.5 rounded-md transition-colors font-medium",children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:o,className:"text-xs border border-red-300 text-red-600 hover:bg-red-50 px-3 py-1.5 rounded-md transition-colors font-medium",children:"Reject"})]})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 text-xs text-gray-500 hover:text-gray-700 transition-colors",children:[l?(0,t.jsx)(M.ChevronUpIcon,{className:"h-3.5 w-3.5"}):(0,t.jsx)(E.ChevronDownIcon,{className:"h-3.5 w-3.5"}),"Static headers",e.customHeaders.length>0&&(0,t.jsx)("span",{className:"ml-1 bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),l&&(0,t.jsx)("div",{className:"mt-2",children:0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic",children:"No static headers configured."}):(0,t.jsx)("div",{className:"space-y-1",children:e.customHeaders.map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-mono",children:[(0,t.jsx)("span",{className:"text-gray-500 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.key}),(0,t.jsx)("span",{className:"text-gray-400",children:":"}),(0,t.jsx)("span",{className:"text-gray-700 bg-gray-50 border border-gray-200 rounded px-2 py-0.5",children:e.value})]},`${e.key}-${a}`))})})]})]})}function Q({label:e,children:a}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),(0,t.jsx)("div",{children:a})]})}function X({guardrail:e,onClose:l,onApprove:r,onReject:i,onToggleForwardKey:s,onUpdateCustomHeaders:n,onUpdateExtraHeaders:o}){let[d,c]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[p,g]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),f=W[e.status],y=U[e.team]??"bg-gray-100 text-gray-700";return(0,t.jsx)("div",{className:"w-96 flex-shrink-0 bg-white overflow-auto",children:(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsxs)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${y}`,children:["Team: ",e.team]}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium px-2 py-0.5 rounded-full ${f.bg} ${f.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${f.dot}`}),f.label]})]}),(0,t.jsx)("h2",{className:"text-base font-semibold text-gray-900",children:e.name}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 mt-0.5",children:["Submitted by ",e.submittedBy," on ",e.submittedAt]})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close detail panel",children:(0,t.jsx)(R.XIcon,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-5",children:e.description}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(Q,{label:"Endpoint",children:(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"text-xs font-mono text-gray-700 break-all",children:e.endpoint}),(0,t.jsx)("a",{href:e.endpoint,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-blue-500 flex-shrink-0",children:(0,t.jsx)(G.ExternalLinkIcon,{className:"h-3.5 w-3.5"})})]})}),(0,t.jsx)(Q,{label:"Method",children:(0,t.jsx)("span",{className:"text-xs font-mono font-medium text-gray-700 bg-gray-100 px-2 py-0.5 rounded",children:e.method})}),(0,t.jsxs)("div",{className:"border border-blue-100 bg-blue-50 rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(D.KeyIcon,{className:"h-3.5 w-3.5 text-blue-500"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-blue-800",children:"Forward LiteLLM API Key"})]}),(0,t.jsx)(Y,{enabled:e.forwardKey,onToggle:s})]}),(0,t.jsxs)("p",{className:"text-xs text-blue-700 leading-relaxed",children:["When enabled, the caller's LiteLLM API key is forwarded as an"," ",(0,t.jsx)("code",{className:"font-mono bg-blue-100 px-1 rounded",children:"Authorization"})," ","header to your guardrail endpoint. This allows your guardrail to authenticate model calls using the original caller's credentials."]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Static headers"}),e.customHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.customHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Sent with every request to the guardrail."}),0===e.customHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No static headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.customHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsxs)("span",{className:"text-gray-700 truncate",children:[a.key,": ",a.value]}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.customHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a.key}`,children:(0,t.jsx)(R.XIcon,{className:"h-3.5 w-3.5"})})]},`${a.key}-${l}`))}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:"Header name (e.g. X-API-Key)",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("input",{type:"text",value:x,onChange:e=>h(e.target.value),placeholder:"Value",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=p.trim(),l=x.trim();a&&!e.customHeaders.some(e=>e.key.toLowerCase()===a.toLowerCase())&&(n([...e.customHeaders,{key:a,value:l}]),g(""),h(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=p.trim(),a=x.trim();t&&!e.customHeaders.some(e=>e.key.toLowerCase()===t.toLowerCase())&&(n([...e.customHeaders,{key:t,value:a}]),g(""),h(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors flex-shrink-0",children:"Add"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-2",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-700",children:"Forward client headers"}),e.extraHeaders.length>0&&(0,t.jsx)("span",{className:"bg-gray-100 text-gray-600 rounded-full px-1.5 py-0.5 text-xs",children:e.extraHeaders.length})]}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Allowed header names to forward from the client request to the guardrail (e.g. x-request-id)."}),0===e.extraHeaders.length?(0,t.jsx)("p",{className:"text-xs text-gray-400 italic mb-2",children:"No forward client headers configured."}):(0,t.jsx)("ul",{className:"list-none space-y-1 mb-2",children:e.extraHeaders.map((a,l)=>(0,t.jsxs)("li",{className:"flex items-center justify-between gap-2 text-xs font-mono bg-gray-50 border border-gray-200 rounded px-2 py-1.5",children:[(0,t.jsx)("span",{className:"text-gray-700 truncate",children:a}),(0,t.jsx)("button",{type:"button",onClick:()=>o(e.extraHeaders.filter((e,t)=>t!==l)),className:"text-gray-400 hover:text-red-600 flex-shrink-0","aria-label":`Remove ${a}`,children:(0,t.jsx)(R.XIcon,{className:"h-3.5 w-3.5"})})]},`${a}-${l}`))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:m,onChange:e=>u(e.target.value),placeholder:"e.g. x-request-id",className:"flex-1 min-w-0 text-xs font-mono border border-gray-200 rounded px-2 py-1.5 text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();let a=m.trim().toLowerCase();a&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(a)&&(o([...e.extraHeaders,a]),u(""))}}}),(0,t.jsx)("button",{type:"button",onClick:()=>{let t=m.trim().toLowerCase();t&&!e.extraHeaders.map(e=>e.toLowerCase()).includes(t)&&(o([...e.extraHeaders,t]),u(""))},className:"text-xs font-medium text-blue-600 hover:text-blue-700 border border-blue-200 bg-blue-50 hover:bg-blue-100 px-2 py-1.5 rounded transition-colors",children:"Add"})]})]}),(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(!d),className:"w-full flex items-center justify-between px-3 py-2 text-left text-xs font-semibold text-gray-700 bg-gray-50 hover:bg-gray-100 transition-colors",children:[(0,t.jsx)("span",{children:"Equivalent config"}),d?(0,t.jsx)(M.ChevronUpIcon,{className:"h-3.5 w-3.5 text-gray-500"}):(0,t.jsx)(E.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-500"})]}),d&&(0,t.jsx)("pre",{className:"p-3 text-xs font-mono text-gray-700 bg-white border-t border-gray-200 overflow-x-auto whitespace-pre-wrap break-all",children:function(e){let t=["litellm_settings:"," guardrails:",` - guardrail_name: "${e.name.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`," litellm_params:",` guardrail: ${e.guardrailType??"generic_guardrail_api"}`,` mode: ${e.mode??"pre_call"} # or post_call, during_call`,` api_base: ${e.endpoint||"https://your-guardrail-api.com"}`," api_key: os.environ/YOUR_GUARDRAIL_API_KEY # optional",` unreachable_fallback: ${e.unreachable_fallback??"fail_closed"} # default: fail_closed. Set to fail_open to proceed if the guardrail endpoint is unreachable.`,` forward_api_key: ${e.forwardKey}`];if(e.model&&"—"!==e.model&&t.push(` model: "${e.model}" # LLM model name sent to the guardrail for context`),e.customHeaders.length>0)for(let a of(t.push(" headers: # static headers (sent with every request)"),e.customHeaders))t.push(` ${a.key}: "${String(a.value).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`);if(e.extraHeaders.length>0)for(let a of(t.push(" extra_headers: # forward these client request headers to the guardrail"),e.extraHeaders))t.push(` - ${a}`);if(e.additionalProviderParams&&Object.keys(e.additionalProviderParams).length>0)for(let[a,l]of(t.push(" additional_provider_specific_params:"),Object.entries(e.additionalProviderParams))){let e="string"==typeof l?`"${l}"`:String(l);t.push(` ${a}: ${e}`)}return t.join("\n")}(e)})]}),(0,t.jsxs)("div",{className:"flex items-start gap-2 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,t.jsx)(q.default,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),(0,t.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["This guardrail runs on a separate instance. It receives the user request and forwards the result to the next step in the pipeline. See"," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/adding_provider/generic_guardrail_api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"LiteLLM Generic Guardrail API docs"})," ","for configuration details."]})]})]}),(0,t.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-100 space-y-2",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center justify-center gap-2 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(G.ExternalLinkIcon,{className:"h-4 w-4"}),"Test Endpoint"]}),"pending"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex-1 flex items-center justify-center gap-1.5 bg-green-500 hover:bg-green-600 text-white text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(z.CheckIcon,{className:"h-4 w-4"}),"Approve"]}),(0,t.jsxs)("button",{type:"button",onClick:i,className:"flex-1 flex items-center justify-center gap-1.5 border border-red-300 text-red-600 hover:bg-red-50 text-sm font-medium py-2 rounded-md transition-colors",children:[(0,t.jsx)(R.XIcon,{className:"h-4 w-4"}),"Reject"]})]})]})]})})}function ee({action:e,guardrailName:a,onConfirm:l,onCancel:r}){let i="approve"===e;return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/30 flex items-center justify-center z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-xl p-6 max-w-sm w-full mx-4",children:[(0,t.jsx)("div",{className:`w-10 h-10 rounded-full flex items-center justify-center mb-4 ${i?"bg-green-100":"bg-red-100"}`,children:i?(0,t.jsx)(z.CheckIcon,{className:"h-5 w-5 text-green-600"}):(0,t.jsx)(H.AlertCircleIcon,{className:"h-5 w-5 text-red-600"})}),(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:i?"Approve Guardrail":"Reject Guardrail"}),(0,t.jsxs)("p",{className:"text-sm text-gray-500 mb-5",children:["Are you sure you want to ",e," ",(0,t.jsxs)("span",{className:"font-medium text-gray-700",children:['"',a,'"']}),"?"," ",i?"This will make it active and available for use.":"This will mark it as rejected and notify the team."]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"flex-1 border border-gray-300 text-gray-700 hover:bg-gray-50 text-sm font-medium py-2 rounded-md transition-colors",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:l,className:`flex-1 text-white text-sm font-medium py-2 rounded-md transition-colors ${i?"bg-green-500 hover:bg-green-600":"bg-red-500 hover:bg-red-600"}`,children:i?"Approve":"Reject"})]})]})})}function et({accessToken:e}){let[l,r]=(0,a.useState)([]),[i,s]=(0,a.useState)({total:0,pending_review:0,active:0,rejected:0}),[n,o]=(0,a.useState)(""),[d,c]=(0,a.useState)("all"),[m,u]=(0,a.useState)(null),[g,x]=(0,a.useState)(new Set),[h,f]=(0,a.useState)(null),[y,_]=(0,a.useState)(!0),[b,v]=(0,a.useState)(null),[N,C]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=setTimeout(()=>C(n),300);return()=>clearTimeout(e)},[n]);let w=(0,a.useCallback)(async()=>{if(!e)return void _(!1);_(!0),v(null);try{let t="all"===d?void 0:"pending"===d?"pending_review":d,a=await (0,p.listGuardrailSubmissions)(e,{status:t,search:N.trim()||void 0});r(a.submissions.map(J)),s(a.summary)}catch(e){v(e instanceof Error?e.message:"Failed to load submissions"),r([])}finally{_(!1)}},[e,d,N]);(0,a.useEffect)(()=>{w()},[w]);let S=l.find(e=>e.id===m)??null,k=i.total,I=i.pending_review,A=i.active,T=i.rejected;async function O(t){if(!e)return;let a=l.find(e=>e.id===t);if(!a)return;let i=!a.forwardKey;try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{forward_api_key:i}}),r(e=>e.map(e=>e.id===t?{...e,forwardKey:i}:e)),j.default.success(i?"Forward API key enabled":"Forward API key disabled")}catch{j.default.fromBackend("Failed to update forward API key")}}async function P(t,a){if(!e)return;let l={};for(let{key:e,value:t}of a)e.trim()&&(l[e.trim()]=t);try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{headers:l}}),r(e=>e.map(e=>e.id===t?{...e,customHeaders:a.filter(e=>e.key.trim())}:e)),j.default.success("Static headers updated")}catch{j.default.fromBackend("Failed to update static headers")}}async function B(t,a){if(e)try{await (0,p.updateGuardrailCall)(e,t,{litellm_params:{extra_headers:a}}),r(e=>e.map(e=>e.id===t?{...e,extraHeaders:a}:e)),j.default.success("Forward client headers updated")}catch{j.default.fromBackend("Failed to update forward client headers")}}async function L(t){if(e)try{await (0,p.approveGuardrailSubmission)(e,t),f(null),m===t&&u(null),await w(),j.default.success("Guardrail approved")}catch{j.default.fromBackend("Failed to approve guardrail")}}async function E(t){if(e)try{await (0,p.rejectGuardrailSubmission)(e,t),f(null),m===t&&u(null),await w(),j.default.success("Guardrail rejected")}catch{j.default.fromBackend("Failed to reject guardrail")}}return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:`flex-1 min-w-0 p-6 overflow-auto ${S?"border-r border-gray-200":""}`,children:[(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[(0,t.jsx)(V,{label:"Total Submitted",value:k,color:"text-gray-900"}),(0,t.jsx)(V,{label:"Pending Review",value:I,color:"text-yellow-600"}),(0,t.jsx)(V,{label:"Active",value:A,color:"text-green-600"}),(0,t.jsx)(V,{label:"Rejected",value:T,color:"text-red-600"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(F.SearchIcon,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,t.jsx)("input",{type:"text",placeholder:"Search guardrails...",value:n,onChange:e=>o(e.target.value),className:"w-full pl-9 pr-4 py-2 border border-gray-200 rounded-md text-sm text-gray-700 placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500"})]}),(0,t.jsxs)("select",{value:d,onChange:e=>c(e.target.value),className:"border border-gray-200 rounded-md px-3 py-2 text-sm text-gray-700 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 bg-white",children:[(0,t.jsx)("option",{value:"all",children:"All Status"}),(0,t.jsx)("option",{value:"pending",children:"Pending Review"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"rejected",children:"Rejected"})]}),(0,t.jsxs)("button",{type:"button",className:"ml-auto flex items-center gap-2 bg-blue-500 hover:bg-blue-600 text-white text-sm font-medium px-4 py-2 rounded-md transition-colors",children:[(0,t.jsx)($.PlusIcon,{className:"h-4 w-4"}),"Add Guardrail"]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[y&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500 text-sm",children:"Loading submissions…"}),b&&(0,t.jsx)("div",{className:"text-center py-12 text-red-600 text-sm",children:b}),!y&&!b&&0===l.length&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-400 text-sm",children:"No guardrails match your filters."}),!y&&!b&&l.map(e=>(0,t.jsx)(Z,{guardrail:e,isSelected:m===e.id,isHeadersExpanded:g.has(e.id),onSelect:()=>u(m===e.id?null:e.id),onToggleForwardKey:()=>O(e.id),onToggleHeaders:()=>{var t;return t=e.id,void x(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},onApprove:()=>f({id:e.id,action:"approve"}),onReject:()=>f({id:e.id,action:"reject"})},e.id))]})]}),S&&(0,t.jsx)(X,{guardrail:S,onClose:()=>u(null),onApprove:()=>f({id:S.id,action:"approve"}),onReject:()=>f({id:S.id,action:"reject"}),onToggleForwardKey:()=>O(S.id),onUpdateCustomHeaders:e=>P(S.id,e),onUpdateExtraHeaders:e=>B(S.id,e)}),h&&(0,t.jsx)(ee,{action:h.action,guardrailName:l.find(e=>e.id===h.id)?.name??"",onConfirm:()=>"approve"===h.action?L(h.id):E(h.id),onCancel:()=>f(null)})]})}e.s(["default",0,({accessToken:e,userRole:N})=>{let[C,w]=(0,a.useState)([]),[S,k]=(0,a.useState)(!1),[I,A]=(0,a.useState)(!1),[T,O]=(0,a.useState)(!1),[P,B]=(0,a.useState)(!1),[F,$]=(0,a.useState)(null),[E,M]=(0,a.useState)(!1),[R,z]=(0,a.useState)(null),[G,D]=(0,a.useState)(0),K=!!N&&(0,h.isAdminRole)(N),H=async()=>{if(e){O(!0);try{let t=await (0,p.getGuardrailsList)(e);console.log(`guardrails: ${JSON.stringify(t)}`),w(t.guardrails)}catch(e){console.error("Error fetching guardrails:",e)}finally{O(!1)}}};(0,a.useEffect)(()=>{H()},[e]);let q=()=>{H()},J=async()=>{if(F&&e){B(!0);try{await (0,p.deleteGuardrailCall)(e,F.guardrail_id),j.default.success(`Guardrail "${F.guardrail_name}" deleted successfully`),await H()}catch(e){console.error("Error deleting guardrail:",e),j.default.fromBackend("Failed to delete guardrail")}finally{B(!1),M(!1),$(null)}}},W=F&&F.litellm_params?(0,b.getGuardrailLogoAndName)(F.litellm_params.guardrail).displayName:void 0;return(0,t.jsx)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:(0,t.jsxs)(r.TabGroup,{index:G,onIndexChange:D,children:[(0,t.jsxs)(i.TabList,{className:"mb-4",children:[(0,t.jsx)(s.Tab,{children:"Guardrail Garden"}),(0,t.jsx)(s.Tab,{children:"Guardrails"}),(0,t.jsx)(s.Tab,{disabled:!e||0===C.length,children:"Test Playground"}),(0,t.jsx)(s.Tab,{children:"Submitted Guardrails"})]}),(0,t.jsxs)(n.TabPanels,{children:[(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(L,{accessToken:e,onGuardrailCreated:q})}),(0,t.jsxs)(o.TabPanel,{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)(d.Dropdown,{menu:{items:[{key:"provider",icon:(0,t.jsx)(m.PlusOutlined,{}),label:"Add Provider Guardrail",onClick:()=>{R&&z(null),k(!0)}},{key:"custom_code",icon:(0,t.jsx)(u.CodeOutlined,{}),label:"Create Custom Code Guardrail",onClick:()=>{R&&z(null),A(!0)}}]},trigger:["click"],disabled:!e,children:(0,t.jsxs)(l.Button,{disabled:!e,children:["+ Add New Guardrail ",(0,t.jsx)(c.DownOutlined,{className:"ml-2"})]})})}),R?(0,t.jsx)(f.default,{guardrailId:R,onClose:()=>z(null),accessToken:e,isAdmin:K}):(0,t.jsx)(x.default,{guardrailsList:C,isLoading:T,onDeleteClick:(e,t)=>{$(C.find(t=>t.guardrail_id===e)||null),M(!0)},accessToken:e,onGuardrailUpdated:H,isAdmin:K,onGuardrailClick:e=>z(e)}),(0,t.jsx)(g.default,{visible:S,onClose:()=>{k(!1)},accessToken:e,onSuccess:q}),(0,t.jsx)(v.CustomCodeModal,{visible:I,onClose:()=>{A(!1)},accessToken:e,onSuccess:q}),(0,t.jsx)(_.default,{isOpen:E,title:"Delete Guardrail",message:`Are you sure you want to delete guardrail: ${F?.guardrail_name}? This action cannot be undone.`,resourceInformationTitle:"Guardrail Information",resourceInformation:[{label:"Name",value:F?.guardrail_name},{label:"ID",value:F?.guardrail_id,code:!0},{label:"Provider",value:W},{label:"Mode",value:F?.litellm_params.mode},{label:"Default On",value:F?.litellm_params.default_on?"Yes":"No"}],onCancel:()=>{M(!1),$(null)},onOk:J,confirmLoading:P})]}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(y.default,{guardrailsList:C,isLoading:T,accessToken:e,onClose:()=>D(0)})}),(0,t.jsx)(o.TabPanel,{children:(0,t.jsx)(et,{accessToken:e})})]})]})})}],487304)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/f97945b5e61da683.js b/litellm/proxy/_experimental/out/_next/static/chunks/f97945b5e61da683.js new file mode 100644 index 00000000000..853d839cfcc --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/f97945b5e61da683.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,214541,e=>{"use strict";var t=e.i(271645),a=e.i(135214),s=e.i(270345);e.s(["default",0,()=>{let[e,r]=(0,t.useState)([]),{accessToken:l,userId:i,userRole:n}=(0,a.default)();return(0,t.useEffect)(()=>{(async()=>{r(await (0,s.fetchTeams)(l,i,n,null))})()},[l,i,n]),{teams:e,setTeams:r}}])},439189,435684,96226,497245,e=>{"use strict";function t(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}function a(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function s(e,s){let r=t(e);return isNaN(s)?a(e,NaN):(s&&r.setDate(r.getDate()+s),r)}function r(e,s){let r=t(e);if(isNaN(s))return a(e,NaN);if(!s)return r;let l=r.getDate(),i=a(e,r.getTime());return(i.setMonth(r.getMonth()+s+1,0),l>=i.getDate())?i:(r.setFullYear(i.getFullYear(),i.getMonth(),l),r)}e.s(["toDate",()=>t],435684),e.s(["constructFrom",()=>a],96226),e.s(["addDays",()=>s],439189),e.s(["addMonths",()=>r],497245)},891547,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);e.s(["default",0,({onChange:e,value:l,className:i,accessToken:n,disabled:o})=>{let[c,d]=(0,a.useState)([]),[m,u]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(n){u(!0);try{let e=await (0,r.getGuardrailsList)(n);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),d(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{u(!1)}}})()},[n]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:t=>{console.log("Selected guardrails:",t),e(t)},value:l,loading:m,className:i,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:`${e.guardrail_name}`,value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}])},921511,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(199133),r=e.i(764205);function l(e){return e.filter(e=>(e.version_status??"draft")!=="draft").map(e=>{var t;let a=e.version_number??1,s=e.version_status??"draft";return{label:`${e.policy_name} — v${a} (${s})${e.description?` — ${e.description}`:""}`,value:"production"===s?e.policy_name:e.policy_id?(t=e.policy_id,`policy_${t}`):e.policy_name}})}e.s(["default",0,({onChange:e,value:i,className:n,accessToken:o,disabled:c,onPoliciesLoaded:d})=>{let[m,u]=(0,a.useState)([]),[p,h]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{if(o){h(!0);try{let e=await (0,r.getPoliciesList)(o);e.policies&&(u(e.policies),d?.(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{h(!1)}}})()},[o,d]),(0,t.jsx)("div",{children:(0,t.jsx)(s.Select,{mode:"multiple",disabled:c,placeholder:c?"Setting policies is a premium feature.":"Select policies (production or published versions)",onChange:t=>{e(t)},value:i,loading:p,className:n,allowClear:!0,options:l(m),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})},"getPolicyOptionEntries",()=>l])},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ClockCircleOutlined",0,l],637235)},646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ArrowLeftOutlined",0,l],447566)},954616,e=>{"use strict";var t=e.i(271645),a=e.i(114272),s=e.i(540143),r=e.i(915823),l=e.i(619273),i=class extends r.Subscribable{#e;#t=void 0;#a;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#r(),this.#l()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#r(){let e=this.#a?.state??(0,a.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#l(e){s.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,a,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,a,s)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,a,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function o(e,a){let r=(0,n.useQueryClient)(a),[o]=t.useState(()=>new i(r,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let c=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=t.useCallback((e,t)=>{o.mutate(e,t).catch(l.noop)},[o]);if(c.error&&(0,l.shouldThrowError)(o.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}e.s(["useMutation",()=>o],954616)},525720,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),s=e.i(529681),r=e.i(908286),l=e.i(242064),i=e.i(246422),n=e.i(838378);let o=["wrap","nowrap","wrap-reverse"],c=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],d=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],m=function(e,t){let s,r,l;return(0,a.default)(Object.assign(Object.assign(Object.assign({},(s=!0===t.wrap?"wrap":t.wrap,{[`${e}-wrap-${s}`]:s&&o.includes(s)})),(r={},d.forEach(a=>{r[`${e}-align-${a}`]=t.align===a}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r)),(l={},c.forEach(a=>{l[`${e}-justify-${a}`]=t.justify===a}),l)))},u=(0,i.genStyleHooks)("Flex",e=>{let{paddingXS:t,padding:a,paddingLG:s}=e,r=(0,n.mergeToken)(e,{flexGapSM:t,flexGap:a,flexGapLG:s});return[(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}})(r),(e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}})(r),(e=>{let{componentCls:t}=e,a={};return o.forEach(e=>{a[`${t}-wrap-${e}`]={flexWrap:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return d.forEach(e=>{a[`${t}-align-${e}`]={alignItems:e}}),a})(r),(e=>{let{componentCls:t}=e,a={};return c.forEach(e=>{a[`${t}-justify-${e}`]={justifyContent:e}}),a})(r)]},()=>({}),{resetStyle:!1});var p=function(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(a[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(e);rt.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a};let h=t.default.forwardRef((e,i)=>{let{prefixCls:n,rootClassName:o,className:c,style:d,flex:h,gap:g,vertical:x=!1,component:f="div",children:y}=e,j=p(e,["prefixCls","rootClassName","className","style","flex","gap","vertical","component","children"]),{flex:b,direction:_,getPrefixCls:v}=t.default.useContext(l.ConfigContext),w=v("flex",n),[N,k,S]=u(w),T=null!=x?x:null==b?void 0:b.vertical,C=(0,a.default)(c,o,null==b?void 0:b.className,w,k,S,m(w,e),{[`${w}-rtl`]:"rtl"===_,[`${w}-gap-${g}`]:(0,r.isPresetSize)(g),[`${w}-vertical`]:T}),I=Object.assign(Object.assign({},null==b?void 0:b.style),d);return h&&(I.flex=h),g&&!(0,r.isPresetSize)(g)&&(I.gap=g),N(t.default.createElement(f,Object.assign({ref:i,className:C,style:I},(0,s.default)(j,["justify","wrap","align"])),y))});e.s(["Flex",0,h],525720)},948401,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["MailOutlined",0,l],948401)},502547,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,a],502547)},250980,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlusCircleIcon",0,a],250980)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},771674,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["UserOutlined",0,l],771674)},292639,e=>{"use strict";var t=e.i(764205),a=e.i(266027);let s=(0,e.i(243652).createQueryKeys)("uiSettings");e.s(["useUISettings",0,()=>(0,a.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,t.getUiSettings)(),staleTime:36e5,gcTime:36e5})])},384767,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(271645),r=e.i(389083);let l=s.forwardRef(function(e,t){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});var i=e.i(764205);let n=function({vectorStores:e,accessToken:n}){let[o,c]=(0,s.useState)([]);return(0,s.useEffect)(()=>{(async()=>{if(n&&0!==e.length)try{let e=await (0,i.vectorStoreListCall)(n);e.data&&c(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[n,e.length]),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,t.jsx)(r.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((e,a)=>{let s;return(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:(s=o.find(t=>t.vector_store_id===e))?`${s.vector_store_name||s.vector_store_id} (${s.vector_store_id})`:e},a)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=s.forwardRef(function(e,t){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});var c=e.i(871943),d=e.i(502547),m=e.i(592968);let u=function({mcpServers:l,mcpAccessGroups:n=[],mcpToolPermissions:u={},accessToken:p}){let[h,g]=(0,s.useState)([]),[x,f]=(0,s.useState)([]),[y,j]=(0,s.useState)(new Set);(0,s.useEffect)(()=>{(async()=>{if(p&&l.length>0)try{let e=await (0,i.fetchMCPServers)(p);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[p,l.length]),(0,s.useEffect)(()=>{(async()=>{if(p&&n.length>0)try{let t=await e.A(601236).then(e=>e.fetchMCPAccessGroups(p));f(Array.isArray(t)?t:t.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[p,n.length]);let b=[...l.map(e=>({type:"server",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],_=b.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(r.Badge,{color:"blue",size:"xs",children:_})]}),_>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:b.map((e,a)=>{let s="server"===e.type?u[e.value]:void 0,r=s&&s.length>0,l=y.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return r&&(t=e.value,void j(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a}))},className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ${r?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,t.jsx)(m.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${a})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),r&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:s.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===s.length?"tool":"tools"}),l?(0,t.jsx)(c.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(d.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),r&&l&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:s.map((e,a)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},a))})})]},a)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},p=s.forwardRef(function(e,t){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))}),h=function({agents:e,agentAccessGroups:l=[],accessToken:n}){let[o,c]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(n&&e.length>0)try{let e=await (0,i.getAgentsList)(n);e&&e.agents&&Array.isArray(e.agents)&&c(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[n,e.length]);let d=[...e.map(e=>({type:"agent",value:e})),...l.map(e=>({type:"accessGroup",value:e}))],u=d.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(r.Badge,{color:"purple",size:"xs",children:u})]}),u>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:d.map((e,a)=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,t.jsx)(m.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=o.find(t=>t.agent_id===e);if(t){let a=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${a})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},a))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(p,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})};e.s(["default",0,function({objectPermission:e,variant:s="card",className:r="",accessToken:l}){let i=e?.vector_stores||[],o=e?.mcp_servers||[],c=e?.mcp_access_groups||[],d=e?.mcp_tool_permissions||{},m=e?.agents||[],p=e?.agent_access_groups||[],g=(0,t.jsxs)("div",{className:"card"===s?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(n,{vectorStores:i,accessToken:l}),(0,t.jsx)(u,{mcpServers:o,mcpAccessGroups:c,mcpToolPermissions:d,accessToken:l}),(0,t.jsx)(h,{agents:m,agentAccessGroups:p,accessToken:l})]});return"card"===s?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${r}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),g]}):(0,t.jsxs)("div",{className:`${r}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),g]})}],384767)},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SyncOutlined",0,l],772345)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["ThunderboltOutlined",0,l],962944)},11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(262218),s=e.i(810757),r=e.i(477386),l=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:i=[],variant:n="card",className:o=""}){let c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(a.Tag,{color:"blue",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var i;let n=(i=e.callback_name,Object.entries(l.callback_map).find(([e,t])=>t===i)?.[0]||i),o=l.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(s.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-blue-800",children:n}),(0,t.jsxs)("span",{className:"block text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(a.Tag,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return}})(e.callback_type),children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(s.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tag,{color:"red",children:i.length})]}),i.length>0?(0,t.jsx)("div",{className:"space-y-3",children:i.map((e,s)=>{let i=l.reverse_callback_map[e]||e,n=l.callbackInfo[i]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[n?(0,t.jsx)("img",{src:n,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-medium text-red-800",children:i}),(0,t.jsx)("span",{className:"block text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(a.Tag,{color:"red",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)("span",{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===n?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${o}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"block font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)("span",{className:"block text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${o}`,children:[(0,t.jsx)("span",{className:"block font-medium text-gray-900 mb-3",children:"Logging Settings"}),c]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:r=[],onDisabledCallbacksChange:l})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:l})])},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["CalendarOutlined",0,l],72713)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var r=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(r.default,(0,t.default)({},e,{ref:l,icon:s}))});e.s(["SafetyCertificateOutlined",0,l],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(r.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function r({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>r])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),r=e.i(592968),l=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),c=e.i(772345),d=e.i(955135),m=e.i(646563),u=e.i(771674),p=e.i(948401),h=e.i(72713),g=e.i(637235),x=e.i(962944),f=e.i(534172),y=e.i(3750),j=e.i(304911);let{Text:b}=s.Typography;function _({label:e,value:a,icon:s,truncate:r=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,c=n&&"default_user_id"===a,d=c?(0,t.jsx)(j.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!c)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:r,style:r?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:d})]})}let{Title:v,Text:w}=s.Typography;function N({data:e,onBack:s,onCreateNew:j,onRegenerate:b,onDelete:N,onResetSpend:k,canModifyKey:S=!0,backButtonText:T="Back to Keys",regenerateDisabled:C=!1,regenerateTooltip:I}){return(0,t.jsxs)("div",{children:[j&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:j,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:T})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(w,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),S&&(0,t.jsxs)(l.Space,{children:[(0,t.jsx)(r.Tooltip,{title:I||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(c.SyncOutlined,{}),onClick:b,disabled:C,children:"Regenerate Key"})})}),k&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(y.TransactionOutlined,{}),onClick:k,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(d.DeleteOutlined,{}),onClick:N,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(_,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(p.MailOutlined,{})}),(0,t.jsx)(_,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(_,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(h.CalendarOutlined,{})}),(0,t.jsx)(_,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(f.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(l.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(_,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(g.ClockCircleOutlined,{})}),(0,t.jsx)(_,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(x.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>N],784647);var k=e.i(599724),S=e.i(389083),T=e.i(278587),C=e.i(271645);let I=C.forwardRef(function(e,t){return C.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:r,nextRotationAt:l,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(k.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(S.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(k.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(k.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||r||l)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(k.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(k.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(r||l)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(k.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(k.Text,{className:"text-sm text-gray-600",children:o(l||r||"")})]})]}),e&&!s&&!r&&!l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(I,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(k.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!r&&!l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(T.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(k.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(k.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(k.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(k.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),c]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),r=e.i(135214),l=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),r=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,l=await fetch(r,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!l.ok){let e=await l.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return l.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,r.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:l.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),c=e.i(309426),d=e.i(350967),m=e.i(599724),u=e.i(779241),p=e.i(629569),h=e.i(808613),g=e.i(28651),x=e.i(212931),f=e.i(439189),y=e.i(497245),j=e.i(96226),b=e.i(435684);function _(e,t){let{years:a=0,months:s=0,weeks:r=0,days:l=0,hours:i=0,minutes:n=0,seconds:o=0}=t,c=(0,b.toDate)(e),d=s||a?(0,y.addMonths)(c,s+12*a):c,m=l||r?(0,f.addDays)(d,l+7*r):d;return(0,j.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),w=e.i(237016),N=e.i(727749);function k({selectedToken:e,visible:t,onClose:a,onKeyUpdate:l}){let{accessToken:i}=(0,r.default)(),[f]=h.Form.useForm(),[y,j]=(0,v.useState)(null),[b,k]=(0,v.useState)(null),[S,T]=(0,v.useState)(null),[C,I]=(0,v.useState)(!1),[A,M]=(0,v.useState)(!1),[F,O]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(f.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),O(i),M(e.key_name===i))},[t,e,f,i]),(0,v.useEffect)(()=>{t||(j(null),I(!1),M(!1),O(null),f.resetFields())},[t,f]);let E=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=_(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=_(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=_(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?T(E(b.duration)):T(null)},[b?.duration]);let L=async()=>{if(e&&F){I(!0);try{let t=await f.validateFields(),a=await (0,s.regenerateKeyCall)(F,e.token||e.token_id,t);j(a.key),N.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let r={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?E(t.duration):e.expires,...a};console.log("Updated key data with new token:",r),l&&l(r),I(!1)}catch(e){console.error("Error regenerating key:",e),N.default.fromBackend(e),I(!1)}}},R=()=>{j(null),I(!1),M(!1),O(null),f.resetFields(),a()};return(0,n.jsx)(x.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:R,footer:y?[(0,n.jsx)(o.Button,{onClick:R,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:R,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:L,disabled:C,children:C?"Regenerating...":"Regenerate"},"regenerate")],children:y?(0,n.jsxs)(d.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(p.Title,{children:"Regenerated Key"}),(0,n.jsx)(c.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(c.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:y})}),(0,n.jsx)(w.CopyToClipboard,{text:y,onCopy:()=>N.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(h.Form,{form:f,layout:"vertical",onValuesChange:e=>{"duration"in e&&k(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(h.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(h.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(g.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(h.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(h.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(g.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(h.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),S&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",S]}),(0,n.jsx)(h.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>k],690284)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),r=e.i(292639),l=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),c=e.i(389083),d=e.i(994388),m=e.i(304967),u=e.i(350967),p=e.i(197647),h=e.i(653824),g=e.i(881073),x=e.i(404206),f=e.i(723731),y=e.i(599724),j=e.i(629569),b=e.i(808613),_=e.i(212931),v=e.i(262218),w=e.i(784647),N=e.i(271645),k=e.i(708347),S=e.i(557662),T=e.i(505022),C=e.i(127952),I=e.i(721929),A=e.i(643449),M=e.i(727749),F=e.i(764205),O=e.i(65932),E=e.i(384767),L=e.i(690284),R=e.i(190702),P=e.i(891547),D=e.i(109799),$=e.i(921511),B=e.i(827252),z=e.i(779241),K=e.i(311451),V=e.i(199133),U=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function er({keyData:e,onCancel:a,onSubmit:l,teams:i,accessToken:n,userID:o,userRole:c,premiumUser:m=!1}){let u=m||null!=c&&k.rolesWithWriteAccess.includes(c),[p]=b.Form.useForm(),[h,g]=(0,N.useState)([]),[x,f]=(0,N.useState)({}),y=i?.find(t=>t.team_id===e.team_id),[j,_]=(0,N.useState)([]),[v,w]=(0,N.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[T,C]=(0,N.useState)(e.organization_id||null),[A,O]=(0,N.useState)(e.auto_rotate||!1),[E,L]=(0,N.useState)(e.rotation_interval||""),[R,er]=(0,N.useState)(!e.expires),[el,ei]=(0,N.useState)(!1),{data:en,isLoading:eo}=(0,D.useOrganizations)(),{data:ec}=(0,s.useProjects)(),{data:ed}=(0,r.useUISettings)(),em=!!ed?.values?.enable_projects_ui,eu=!!e.project_id,ep=(()=>{if(!e.project_id)return null;let t=ec?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,N.useEffect)(()=>{let t=async()=>{if(o&&c&&n)try{if(null===e.team_id){let e=(await (0,F.modelAvailableCall)(n,o,c)).data.map(e=>e.id);_(e)}else if(y?.team_id){let e=await (0,ee.fetchTeamModels)(o,c,n,y.team_id);_(Array.from(new Set([...y.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,F.getPromptsList)(n);g(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,c,n,y,e.team_id]),(0,N.useEffect)(()=>{p.setFieldValue("disabled_callbacks",v)},[p,v]);let eh=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...e,token:e.token||e.token_id,budget_duration:eh(e.budget_duration),metadata:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,I.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,N.useEffect)(()=>{p.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:eh(e.budget_duration),metadata:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,I.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,p]),(0,N.useEffect)(()=>{p.setFieldValue("auto_rotate",A)},[A,p]),(0,N.useEffect)(()=>{E&&p.setFieldValue("rotation_interval",E)},[E,p]),(0,N.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,F.tagListCall)(n);f(e)}catch(e){M.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let ex=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}R&&(e.duration=null),await l(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:p,onFinish:ex,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(z.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",r="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],l=r.includes("management_routes")||r.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(V.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:l,value:l?[]:i,onChange:e=>a("models",e),children:[j.length>0&&(0,t.jsx)(V.Select.Option,{value:"all-team-models",children:"All Team Models"}),j.map(e=>(0,t.jsx)(V.Select.Option,{value:e,children:e},e))]}),l&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let r=e("allowed_routes")||"",l=(s="string"==typeof r&&""!==r.trim()?r.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(V.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:l,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(V.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(V.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(V.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(K.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(V.Select,{placeholder:"n/a",children:[(0,t.jsx)(V.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(V.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(V.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(K.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(K.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(P.default,{onChange:e=>{p.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)(U.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)($.default,{onChange:e=>{p.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(V.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(x).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(V.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:h.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>p.setFieldValue("allowed_passthrough_routes",e),value:p.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>p.setFieldValue("vector_stores",e),value:p.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>p.setFieldValue("mcp_servers_and_groups",e),value:p.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(K.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:p.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:p.getFieldValue("mcp_tool_permissions")||{},onChange:e=>p.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>p.setFieldValue("agents_and_groups",e),value:p.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(B.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==c,onChange:e=>{C(e||null),p.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(V.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(C(t.organization_id),p.setFieldValue("organization_id",t.organization_id)):e||(C(null),p.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=T?i?.filter(e=>e.organization_id===T):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(T?i?.filter(e=>e.organization_id===T):i)?.map(e=>(0,t.jsx)(V.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(K.Input,{value:ep??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:p.getFieldValue("logging_settings"),onChange:e=>p.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{w((0,S.mapInternalToDisplayNames)(e)),p.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(K.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:p,autoRotationEnabled:A,onAutoRotationChange:O,rotationInterval:E,onRotationIntervalChange:L,neverExpire:R,onNeverExpireChange:er}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(K.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(K.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(d.Button,{variant:"secondary",onClick:a,disabled:el,children:"Cancel"}),(0,t.jsx)(d.Button,{type:"submit",loading:el,children:"Save Changes"})]})})]})}function el({onClose:e,keyData:P,teams:D,onKeyDataUpdate:$,onDelete:B,backButtonText:z="Back to Keys"}){let K,{accessToken:V,userId:U,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&k.rolesWithWriteAccess.includes(G),{teams:q}=(0,l.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,r.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,N.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,N.useState)(!1),[es,el]=(0,N.useState)(!1),[ei,en]=(0,N.useState)(""),[eo,ec]=(0,N.useState)(!1),[ed,em]=(0,N.useState)(!1),{mutate:eu,isPending:ep}=(0,O.useResetKeySpend)(),[eh,eg]=(0,N.useState)(P),[ex,ef]=(0,N.useState)(null),[ey,ej]=(0,N.useState)(!1),[eb,e_]=(0,N.useState)({}),[ev,ew]=(0,N.useState)(!1);if((0,N.useEffect)(()=>{P&&eg(P)},[P]),(0,N.useEffect)(()=>{(async()=>{let e=eh?.metadata?.policies;if(!V||!e||!Array.isArray(e)||0===e.length)return;ew(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,F.getPolicyInfoWithGuardrails)(V,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),e_(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ew(!1)}})()},[V,eh?.metadata?.policies]),(0,N.useEffect)(()=>{if(ey){let e=setTimeout(()=>{ej(!1)},5e3);return()=>clearTimeout(e)}},[ey]),!eh)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(d.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:z}),(0,t.jsx)(y.Text,{children:"Key not found"})]});let eN=async e=>{try{if(!V)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...eh.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...eh.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,S.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),M.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,S.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,F.keyUpdateCall)(V,e);eg(e=>e?{...e,...a}:void 0),$&&$(a),M.default.success("Key updated successfully"),Z(!1)}catch(e){M.default.fromBackend((0,R.parseErrorMessage)(e)),console.error("Error updating key:",e)}},ek=async()=>{try{if(el(!0),!V)return;await (0,F.keyDeleteCall)(V,eh.token||eh.token_id),M.default.success("Key deleted successfully"),B&&B(),e()}catch(e){console.error("Error deleting the key:",e),M.default.fromBackend(e)}finally{el(!1),ea(!1),en("")}},eS=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eT=(0,k.isProxyAdminRole)(G||"")||q&&(0,k.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eh.team_id)[0]?.members_with_roles,U||"")||U===eh.user_id&&"Internal Viewer"!==G,eC=(0,k.isProxyAdminRole)(G||"")||q&&(0,k.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eh.team_id)[0]?.members_with_roles,U||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(w.KeyInfoHeader,{data:{keyName:eh.key_alias||"Virtual Key",keyId:eh.token_id||eh.token,userId:eh.user_id||"",userEmail:eh.user_email||"",createdBy:eh.user_email||eh.user_id||"",createdAt:eh.created_at?eS(eh.created_at):"",lastUpdated:eh.updated_at?eS(eh.updated_at):"",lastActive:eh.last_active?eS(eh.last_active):"Never"},onBack:e,onRegenerate:()=>ec(!0),onDelete:()=>ea(!0),onResetSpend:eC?()=>em(!0):void 0,canModifyKey:eT,backButtonText:z,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(L.RegenerateKeyModal,{selectedToken:eh,visible:eo,onClose:()=>ec(!1),onKeyUpdate:e=>{eg(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ef(new Date),ej(!0),$&&$({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(C.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:eh?.key_alias||"-"},{label:"Key ID",value:eh?.token_id||eh?.token||"-",code:!0},{label:"Team ID",value:eh?.team_id||"-",code:!0},{label:"Spend",value:eh?.spend?`$${(0,i.formatNumberWithCommas)(eh.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:ek,confirmLoading:es,requiredConfirmation:eh?.key_alias}),(0,t.jsxs)(_.Modal,{title:"Reset Key Spend",open:ed,onOk:()=>{eu(eh.token||eh.token_id,{onSuccess:()=>{eg(e=>e?{...e,spend:0}:void 0),$&&$({spend:0}),M.default.success("Key spend reset to $0"),em(!1)},onError:e=>{M.default.fromBackend((0,R.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ep,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:eh?.key_alias||eh?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(eh.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(h.TabGroup,{children:[(0,t.jsxs)(g.TabList,{className:"mb-4",children:[(0,t.jsx)(p.Tab,{children:"Overview"}),(0,t.jsx)(p.Tab,{children:"Settings"})]}),(0,t.jsxs)(f.TabPanels,{children:[(0,t.jsx)(x.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(j.Title,{children:["$",(0,i.formatNumberWithCommas)(eh.spend,4)]}),(0,t.jsxs)(y.Text,{children:["of"," ",null!==eh.max_budget?`$${(0,i.formatNumberWithCommas)(eh.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Text,{children:["TPM: ",null!==eh.tpm_limit?eh.tpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["RPM: ",null!==eh.rpm_limit?eh.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:eh.models&&eh.models.length>0?eh.models.map((e,a)=>(0,t.jsx)(c.Badge,{color:"red",children:e},a)):(0,t.jsx)(y.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(E.default,{objectPermission:eh.object_permission,variant:"inline",accessToken:V})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(eh.metadata?.guardrails)&&eh.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eh.metadata.guardrails.map((e,a)=>(0,t.jsx)(c.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(y.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof eh.metadata?.disable_global_guardrails&&!0===eh.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(c.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(y.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(eh.metadata?.policies)&&eh.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:eh.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(y.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(y.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(c.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(y.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,I.extractLoggingSettings)(eh.metadata),disabledCallbacks:Array.isArray(eh.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(eh.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(T.default,{autoRotate:eh.auto_rotate,rotationInterval:eh.rotation_interval,lastRotationAt:eh.last_rotation_at,keyRotationAt:eh.key_rotation_at,nextRotationAt:eh.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(x.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(j.Title,{children:"Key Settings"}),!X&&eT&&(0,t.jsx)(d.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(er,{keyData:eh,onCancel:()=>Z(!1),onSubmit:eN,teams:D,accessToken:V,userID:U,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(y.Text,{className:"font-mono",children:eh.token_id||eh.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(y.Text,{children:eh.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(y.Text,{className:"font-mono",children:eh.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(y.Text,{children:eh.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(y.Text,{children:eh.project_id?(K=J?.find(e=>e.project_id===eh.project_id),K?.project_alias?`${K.project_alias} (${eh.project_id})`:eh.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(y.Text,{children:(eh.organization_id??eh.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(y.Text,{children:eS(eh.created_at)})]}),ex&&(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Text,{children:eS(ex)}),(0,t.jsx)(c.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(y.Text,{children:eh.expires?eS(eh.expires):"Never"})]}),(0,t.jsx)(T.default,{autoRotate:eh.auto_rotate,rotationInterval:eh.rotation_interval,lastRotationAt:eh.last_rotation_at,keyRotationAt:eh.key_rotation_at,nextRotationAt:eh.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(y.Text,{children:["$",(0,i.formatNumberWithCommas)(eh.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(y.Text,{children:null!==eh.max_budget?`$${(0,i.formatNumberWithCommas)(eh.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eh.metadata?.tags)&&eh.metadata.tags.length>0?eh.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(y.Text,{children:Array.isArray(eh.metadata?.prompts)&&eh.metadata.prompts.length>0?eh.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eh.allowed_routes)&&eh.allowed_routes.length>0?eh.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(y.Text,{children:Array.isArray(eh.metadata?.allowed_passthrough_routes)&&eh.metadata.allowed_passthrough_routes.length>0?eh.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(y.Text,{children:eh.metadata?.disable_global_guardrails===!0?(0,t.jsx)(c.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(c.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eh.models&&eh.models.length>0?eh.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(y.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(y.Text,{children:["TPM: ",null!==eh.tpm_limit?eh.tpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["RPM: ",null!==eh.rpm_limit?eh.rpm_limit:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Max Parallel Requests:"," ",null!==eh.max_parallel_requests?eh.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Model TPM Limits:"," ",eh.metadata?.model_tpm_limit?JSON.stringify(eh.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(y.Text,{children:["Model RPM Limits:"," ",eh.metadata?.model_rpm_limit?JSON.stringify(eh.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(y.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,I.formatMetadataForDisplay)((0,I.stripTagsFromMetadata)(eh.metadata))})]}),(0,t.jsx)(E.default,{objectPermission:eh.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:V}),(0,t.jsx)(A.default,{loggingConfigs:(0,I.extractLoggingSettings)(eh.metadata),disabledCallbacks:Array.isArray(eh.metadata?.litellm_disabled_callbacks)?(0,S.mapInternalToDisplayNames)(eh.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>el],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/fc873acd3d409c53.js b/litellm/proxy/_experimental/out/_next/static/chunks/fc873acd3d409c53.js deleted file mode 100644 index f17713a5595..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/fc873acd3d409c53.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11751,e=>{"use strict";function t(e){return""===e?null:e}e.s(["mapEmptyStringToNull",()=>t])},643449,e=>{"use strict";var t=e.i(843476),a=e.i(599724),s=e.i(389083),l=e.i(810757),r=e.i(477386),i=e.i(557662);e.s(["default",0,function({loggingConfigs:e=[],disabledCallbacks:n=[],variant:o="card",className:d=""}){let c=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,r)=>{var n;let o=(n=e.callback_name,Object.entries(i.callback_map).find(([e,t])=>t===n)?.[0]||n),d=i.callbackInfo[o]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:o,className:"w-5 h-5 object-contain"}):(0,t.jsx)(l.CogIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-blue-800",children:o}),(0,t.jsxs)(a.Text,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(s.Badge,{color:(e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}})(e.callback_type),size:"sm",children:(e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}})(e.callback_type)})]},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(l.CogIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(s.Badge,{color:"red",size:"xs",children:n.length})]}),n.length>0?(0,t.jsx)("div",{className:"space-y-3",children:n.map((e,l)=>{let n=i.reverse_callback_map[e]||e,o=i.callbackInfo[n]?.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[o?(0,t.jsx)("img",{src:o,alt:n,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.BanIcon,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-medium text-red-800",children:n}),(0,t.jsx)(a.Text,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(s.Badge,{color:"red",size:"sm",children:"Disabled"})]},l)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.BanIcon,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(a.Text,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===o?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${d}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)(a.Text,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),c]}):(0,t.jsxs)("div",{className:`${d}`,children:[(0,t.jsx)(a.Text,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),c]})}])},183588,e=>{"use strict";var t=e.i(843476),a=e.i(266484);e.s(["default",0,({value:e,onChange:s,disabledCallbacks:l=[],onDisabledCallbacksChange:r})=>(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:l,onDisabledCallbacksChange:r})])},772345,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SyncOutlined",0,r],772345)},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["CalendarOutlined",0,r],72713)},962944,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["ThunderboltOutlined",0,r],962944)},534172,3750,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};var l=e.i(9583),r=a.forwardRef(function(e,r){return a.createElement(l.default,(0,t.default)({},e,{ref:r,icon:s}))});e.s(["SafetyCertificateOutlined",0,r],534172);let i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M668.6 320c0-4.4-3.6-8-8-8h-54.5c-3 0-5.8 1.7-7.1 4.4l-84.7 168.8H511l-84.7-168.8a8 8 0 00-7.1-4.4h-55.7c-1.3 0-2.6.3-3.8 1-3.9 2.1-5.3 7-3.2 10.8l103.9 191.6h-57c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76v39h-76c-4.4 0-8 3.6-8 8v27.1c0 4.4 3.6 8 8 8h76V704c0 4.4 3.6 8 8 8h49.9c4.4 0 8-3.6 8-8v-63.5h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8h-76.3v-39h76.3c4.4 0 8-3.6 8-8v-27.1c0-4.4-3.6-8-8-8H564l103.7-191.6c.5-1.1.9-2.4.9-3.7zM157.9 504.2a352.7 352.7 0 01103.5-242.4c32.5-32.5 70.3-58.1 112.4-75.9 43.6-18.4 89.9-27.8 137.6-27.8 47.8 0 94.1 9.3 137.6 27.8 42.1 17.8 79.9 43.4 112.4 75.9 10 10 19.3 20.5 27.9 31.4l-50 39.1a8 8 0 003 14.1l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3l-47.8 37.4C770.7 146.3 648.6 82 511.5 82 277 82 86.3 270.1 82 503.8a8 8 0 008 8.2h60c4.3 0 7.8-3.5 7.9-7.8zM934 512h-60c-4.3 0-7.9 3.5-8 7.8a352.7 352.7 0 01-103.5 242.4 352.57 352.57 0 01-112.4 75.9c-43.6 18.4-89.9 27.8-137.6 27.8s-94.1-9.3-137.6-27.8a352.57 352.57 0 01-112.4-75.9c-10-10-19.3-20.5-27.9-31.4l49.9-39.1a8 8 0 00-3-14.1l-156.8-38.3c-5-1.2-9.9 2.6-9.9 7.7l-.8 161.7c0 6.7 7.7 10.5 12.9 6.3l47.8-37.4C253.3 877.7 375.4 942 512.5 942 747 942 937.7 753.9 942 520.2a8 8 0 00-8-8.2z"}}]},name:"transaction",theme:"outlined"};var n=a.forwardRef(function(e,s){return a.createElement(l.default,(0,t.default)({},e,{ref:s,icon:i}))});e.s(["TransactionOutlined",0,n],3750)},304911,e=>{"use strict";var t=e.i(843476),a=e.i(262218);let{Text:s}=e.i(898586).Typography;function l({userId:e}){return"default_user_id"===e?(0,t.jsx)(a.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(s,{children:e})}e.s(["default",()=>l])},784647,505022,721929,e=>{"use strict";var t=e.i(843476),a=e.i(464571),s=e.i(898586),l=e.i(592968),r=e.i(770914),i=e.i(312361),n=e.i(525720),o=e.i(447566),d=e.i(772345),c=e.i(955135),m=e.i(646563),u=e.i(771674),x=e.i(948401),g=e.i(72713),p=e.i(637235),h=e.i(962944),j=e.i(534172),_=e.i(3750),y=e.i(304911);let{Text:b}=s.Typography;function f({label:e,value:a,icon:s,truncate:l=!1,copyable:i=!1,defaultUserIdCheck:n=!1}){let o=!a,d=n&&"default_user_id"===a,c=d?(0,t.jsx)(y.default,{userId:a}):(0,t.jsx)(b,{strong:!0,copyable:!!(i&&!o&&!d)&&{tooltips:[`Copy ${e}`,"Copied!"]},ellipsis:l,style:l?{maxWidth:160,display:"block"}:void 0,children:o?"-":a});return(0,t.jsxs)("div",{children:[(0,t.jsxs)(r.Space,{size:4,children:[(0,t.jsx)(b,{type:"secondary",children:s}),(0,t.jsx)(b,{type:"secondary",style:{fontSize:12,textTransform:"uppercase",letterSpacing:"0.05em"},children:e})]}),(0,t.jsx)("div",{children:c})]})}let{Title:v,Text:N}=s.Typography;function k({data:e,onBack:s,onCreateNew:y,onRegenerate:b,onDelete:k,onResetSpend:T,canModifyKey:w=!0,backButtonText:S="Back to Keys",regenerateDisabled:I=!1,regenerateTooltip:C}){return(0,t.jsxs)("div",{children:[y&&(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"primary",icon:(0,t.jsx)(m.PlusOutlined,{}),onClick:y,children:"Create New Key"})}),(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(a.Button,{type:"text",icon:(0,t.jsx)(o.ArrowLeftOutlined,{}),onClick:s,children:S})}),(0,t.jsxs)(n.Flex,{justify:"space-between",align:"start",style:{marginBottom:20},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v,{level:3,copyable:{tooltips:["Copy Key Alias","Copied!"]},style:{margin:0},children:e.keyName}),(0,t.jsxs)(N,{type:"secondary",copyable:{text:e.keyId,tooltips:["Copy Key ID","Copied!"]},children:["Key ID: ",e.keyId]})]}),w&&(0,t.jsxs)(r.Space,{children:[(0,t.jsx)(l.Tooltip,{title:C||"",children:(0,t.jsx)("span",{children:(0,t.jsx)(a.Button,{icon:(0,t.jsx)(d.SyncOutlined,{}),onClick:b,disabled:I,children:"Regenerate Key"})})}),T&&(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(_.TransactionOutlined,{}),onClick:T,children:"Reset Spend"}),(0,t.jsx)(a.Button,{danger:!0,icon:(0,t.jsx)(c.DeleteOutlined,{}),onClick:k,children:"Delete Key"})]})]}),(0,t.jsxs)(n.Flex,{align:"stretch",gap:40,style:{marginBottom:40},children:[(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"User Email",value:e.userEmail,icon:(0,t.jsx)(x.MailOutlined,{})}),(0,t.jsx)(f,{label:"User ID",value:e.userId,icon:(0,t.jsx)(u.UserOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Created At",value:e.createdAt,icon:(0,t.jsx)(g.CalendarOutlined,{})}),(0,t.jsx)(f,{label:"Created By",value:e.createdBy,icon:(0,t.jsx)(j.SafetyCertificateOutlined,{}),truncate:!0,copyable:!0,defaultUserIdCheck:!0})]}),(0,t.jsx)(i.Divider,{type:"vertical",style:{height:"auto"}}),(0,t.jsxs)(r.Space,{direction:"vertical",size:16,children:[(0,t.jsx)(f,{label:"Last Updated",value:e.lastUpdated,icon:(0,t.jsx)(p.ClockCircleOutlined,{})}),(0,t.jsx)(f,{label:"Last Active",value:e.lastActive,icon:(0,t.jsx)(h.ThunderboltOutlined,{})})]})]})]})}e.s(["KeyInfoHeader",()=>k],784647);var T=e.i(599724),w=e.i(389083),S=e.i(278587),I=e.i(271645);let C=I.forwardRef(function(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["default",0,({autoRotate:e=!1,rotationInterval:a,lastRotationAt:s,keyRotationAt:l,nextRotationAt:r,variant:i="card",className:n=""})=>{let o=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},d=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.RefreshIcon,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(w.Badge,{color:e?"green":"gray",size:"xs",children:e?"Enabled":"Disabled"}),e&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.Text,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(T.Text,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(e||s||l||r)&&(0,t.jsxs)("div",{className:"space-y-3",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(s)})]})]}),(l||r)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(T.Text,{className:"text-sm text-gray-600",children:o(r||l||"")})]})]}),e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(C,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"No rotation history available"})]})]}),!e&&!s&&!l&&!r&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(S.RefreshIcon,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(T.Text,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===i?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${n}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(T.Text,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(T.Text,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),d]}):(0,t.jsxs)("div",{className:`${n}`,children:[(0,t.jsx)(T.Text,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),d]})}],505022);let A=["logging"];e.s(["extractLoggingSettings",0,e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],"formatMetadataForDisplay",0,(e,t=2)=>JSON.stringify(e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(([e])=>!A.includes(e))):{},null,t),"stripTagsFromMetadata",0,e=>{if(!e||"object"!=typeof e)return e;let{tags:t,...a}=e;return a}],721929)},65932,690284,e=>{"use strict";var t=e.i(954616),a=e.i(912598),s=e.i(764205),l=e.i(135214),r=e.i(207082);let i=async(e,t)=>{let a=(0,s.getProxyBaseUrl)(),l=`${a?`${a}/key/${t}/reset_spend`:`/key/${t}/reset_spend`}`,r=await fetch(l,{method:"POST",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({reset_to:0})});if(!r.ok){let e=await r.json(),t=(0,s.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return r.json()};e.s(["useResetKeySpend",0,()=>{let{accessToken:e}=(0,l.default)(),s=(0,a.useQueryClient)();return(0,t.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return i(e,t)},onSuccess:()=>{s.invalidateQueries({queryKey:r.keyKeys.all})}})}],65932);var n=e.i(843476),o=e.i(994388),d=e.i(309426),c=e.i(350967),m=e.i(599724),u=e.i(779241),x=e.i(629569),g=e.i(808613),p=e.i(28651),h=e.i(212931),j=e.i(439189),_=e.i(497245),y=e.i(96226),b=e.i(435684);function f(e,t){let{years:a=0,months:s=0,weeks:l=0,days:r=0,hours:i=0,minutes:n=0,seconds:o=0}=t,d=(0,b.toDate)(e),c=s||a?(0,_.addMonths)(d,s+12*a):d,m=r||l?(0,j.addDays)(c,r+7*l):c;return(0,y.constructFrom)(e,m.getTime()+1e3*(o+60*(n+60*i)))}var v=e.i(271645),N=e.i(237016),k=e.i(727749);function T({selectedToken:e,visible:t,onClose:a,onKeyUpdate:r}){let{accessToken:i}=(0,l.default)(),[j]=g.Form.useForm(),[_,y]=(0,v.useState)(null),[b,T]=(0,v.useState)(null),[w,S]=(0,v.useState)(null),[I,C]=(0,v.useState)(!1),[A,F]=(0,v.useState)(!1),[L,M]=(0,v.useState)(null);(0,v.useEffect)(()=>{t&&e&&i&&(j.setFieldsValue({key_alias:e.key_alias,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,duration:e.duration||"",grace_period:""}),M(i),F(e.key_name===i))},[t,e,j,i]),(0,v.useEffect)(()=>{t||(y(null),C(!1),F(!1),M(null),j.resetFields())},[t,j]);let R=e=>{if(!e)return null;try{let t,a=new Date;if(e.endsWith("s"))t=f(a,{seconds:parseInt(e)});else if(e.endsWith("h"))t=f(a,{hours:parseInt(e)});else if(e.endsWith("d"))t=f(a,{days:parseInt(e)});else throw Error("Invalid duration format");return t.toLocaleString()}catch(e){return null}};(0,v.useEffect)(()=>{b?.duration?S(R(b.duration)):S(null)},[b?.duration]);let D=async()=>{if(e&&L){C(!0);try{let t=await j.validateFields(),a=await (0,s.regenerateKeyCall)(L,e.token||e.token_id,t);y(a.key),k.default.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||e.token,key_name:a.key,max_budget:t.max_budget,tpm_limit:t.tpm_limit,rpm_limit:t.rpm_limit,expires:t.duration?R(t.duration):e.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),C(!1)}catch(e){console.error("Error regenerating key:",e),k.default.fromBackend(e),C(!1)}}},B=()=>{y(null),C(!1),F(!1),M(null),j.resetFields(),a()};return(0,n.jsx)(h.Modal,{title:"Regenerate Virtual Key",open:t,onCancel:B,footer:_?[(0,n.jsx)(o.Button,{onClick:B,children:"Close"},"close")]:[(0,n.jsx)(o.Button,{onClick:B,className:"mr-2",children:"Cancel"},"cancel"),(0,n.jsx)(o.Button,{onClick:D,disabled:I,children:I?"Regenerating...":"Regenerate"},"regenerate")],children:_?(0,n.jsxs)(c.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,n.jsx)(x.Title,{children:"Regenerated Key"}),(0,n.jsx)(d.Col,{numColSpan:1,children:(0,n.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,n.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,n.jsxs)(d.Col,{numColSpan:1,children:[(0,n.jsx)(m.Text,{className:"mt-3",children:"Key Alias:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:e?.key_alias||"No alias set"})}),(0,n.jsx)(m.Text,{className:"mt-3",children:"New Virtual Key:"}),(0,n.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,n.jsx)("pre",{className:"break-words whitespace-normal",children:_})}),(0,n.jsx)(N.CopyToClipboard,{text:_,onCopy:()=>k.default.success("Virtual Key copied to clipboard"),children:(0,n.jsx)(o.Button,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,n.jsxs)(g.Form,{form:j,layout:"vertical",onValuesChange:e=>{"duration"in e&&T(t=>({...t,duration:e.duration}))},children:[(0,n.jsx)(g.Form.Item,{name:"key_alias",label:"Key Alias",children:(0,n.jsx)(u.TextInput,{disabled:!0})}),(0,n.jsx)(g.Form.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,n.jsx)(p.InputNumber,{step:.01,precision:2,style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,n.jsx)(p.InputNumber,{style:{width:"100%"}})}),(0,n.jsx)(g.Form.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,n.jsx)(u.TextInput,{placeholder:""})}),(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",e?.expires?new Date(e.expires).toLocaleString():"Never"]}),w&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",w]}),(0,n.jsx)(g.Form.Item,{name:"grace_period",label:"Grace Period (eg: 24h, 2d)",tooltip:"Keep the old key valid for this duration after rotation. Both keys work during this period for seamless cutover. Empty = immediate revoke.",className:"mt-8",rules:[{pattern:/^(\d+(s|m|h|d|w|mo))?$/,message:"Must be a duration like 30s, 30m, 24h, 2d, 1w, or 1mo"}],children:(0,n.jsx)(u.TextInput,{placeholder:"e.g. 24h, 2d (empty = immediate revoke)"})}),(0,n.jsx)("div",{className:"mt-2 text-sm text-gray-500",children:"Recommended: 24h to 72h for production keys to allow seamless client migration."})]})})}e.s(["RegenerateKeyModal",()=>T],690284)},20147,e=>{"use strict";var t=e.i(843476),a=e.i(135214),s=e.i(510674),l=e.i(292639),r=e.i(214541),i=e.i(500330),n=e.i(11751),o=e.i(530212),d=e.i(389083),c=e.i(994388),m=e.i(304967),u=e.i(350967),x=e.i(197647),g=e.i(653824),p=e.i(881073),h=e.i(404206),j=e.i(723731),_=e.i(599724),y=e.i(629569),b=e.i(808613),f=e.i(212931),v=e.i(262218),N=e.i(784647),k=e.i(271645),T=e.i(708347),w=e.i(557662),S=e.i(505022),I=e.i(127952),C=e.i(721929),A=e.i(643449),F=e.i(727749),L=e.i(764205),M=e.i(65932),R=e.i(384767),D=e.i(690284),B=e.i(190702),E=e.i(891547),O=e.i(109799),P=e.i(921511),z=e.i(827252),K=e.i(779241),V=e.i(311451),U=e.i(199133),$=e.i(790848),G=e.i(592968),W=e.i(552130),H=e.i(9314),q=e.i(392110),J=e.i(844565),Q=e.i(939510),Y=e.i(363256),X=e.i(75921),Z=e.i(390605),ee=e.i(702597),et=e.i(435451),ea=e.i(183588),es=e.i(916940);function el({keyData:e,onCancel:a,onSubmit:r,teams:i,accessToken:n,userID:o,userRole:d,premiumUser:m=!1}){let u=m||null!=d&&T.rolesWithWriteAccess.includes(d),[x]=b.Form.useForm(),[g,p]=(0,k.useState)([]),[h,j]=(0,k.useState)({}),_=i?.find(t=>t.team_id===e.team_id),[y,f]=(0,k.useState)([]),[v,N]=(0,k.useState)(Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[]),[S,I]=(0,k.useState)(e.organization_id||null),[A,M]=(0,k.useState)(e.auto_rotate||!1),[R,D]=(0,k.useState)(e.rotation_interval||""),[B,el]=(0,k.useState)(!e.expires),[er,ei]=(0,k.useState)(!1),{data:en,isLoading:eo}=(0,O.useOrganizations)(),{data:ed}=(0,s.useProjects)(),{data:ec}=(0,l.useUISettings)(),em=!!ec?.values?.enable_projects_ui,eu=!!e.project_id,ex=(()=>{if(!e.project_id)return null;let t=ed?.find(t=>t.project_id===e.project_id);return t?.project_alias?`${t.project_alias} (${e.project_id})`:e.project_id})();(0,k.useEffect)(()=>{let t=async()=>{if(o&&d&&n)try{if(null===e.team_id){let e=(await (0,L.modelAvailableCall)(n,o,d)).data.map(e=>e.id);f(e)}else if(_?.team_id){let e=await (0,ee.fetchTeamModels)(o,d,n,_.team_id);f(Array.from(new Set([..._.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(n)try{let e=await (0,L.getPromptsList)(n);p(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),t()},[o,d,n,_,e.team_id]),(0,k.useEffect)(()=>{x.setFieldValue("disabled_callbacks",v)},[x,v]);let eg=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,ep={...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},agents_and_groups:{agents:e.object_permission?.agents||[],accessGroups:e.object_permission?.agent_access_groups||[]},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""};(0,k.useEffect)(()=>{x.setFieldsValue({...e,token:e.token||e.token_id,budget_duration:eg(e.budget_duration),metadata:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(e.metadata)),guardrails:e.metadata?.guardrails,disable_global_guardrails:e.metadata?.disable_global_guardrails||!1,prompts:e.metadata?.prompts,tags:e.metadata?.tags,vector_stores:e.object_permission?.vector_stores||[],mcp_servers_and_groups:{servers:e.object_permission?.mcp_servers||[],accessGroups:e.object_permission?.mcp_access_groups||[]},mcp_tool_permissions:e.object_permission?.mcp_tool_permissions||{},logging_settings:(0,C.extractLoggingSettings)(e.metadata),disabled_callbacks:Array.isArray(e.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(e.metadata.litellm_disabled_callbacks):[],access_group_ids:e.access_group_ids||[],auto_rotate:e.auto_rotate||!1,...e.rotation_interval&&{rotation_interval:e.rotation_interval},allowed_routes:Array.isArray(e.allowed_routes)&&e.allowed_routes.length>0?e.allowed_routes.join(", "):""})},[e,x]),(0,k.useEffect)(()=>{x.setFieldValue("auto_rotate",A)},[A,x]),(0,k.useEffect)(()=>{R&&x.setFieldValue("rotation_interval",R)},[R,x]),(0,k.useEffect)(()=>{(async()=>{if(n)try{let e=await (0,L.tagListCall)(n);j(e)}catch(e){F.default.fromBackend("Error fetching tags: "+e)}})()},[n]);let eh=async e=>{try{if(ei(!0),"string"==typeof e.allowed_routes){let t=e.allowed_routes.trim();""===t?e.allowed_routes=[]:e.allowed_routes=t.split(",").map(e=>e.trim()).filter(e=>e.length>0)}B&&(e.duration=null),await r(e)}finally{ei(!1)}};return(0,t.jsxs)(b.Form,{form:x,onFinish:eh,initialValues:ep,layout:"vertical",children:[(0,t.jsx)(b.Form.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(K.TextInput,{})}),(0,t.jsx)(b.Form.Item,{label:"Models",name:"models",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes||e.models!==t.models,children:({getFieldValue:e,setFieldValue:a})=>{let s=e("allowed_routes")||"",l="string"==typeof s&&""!==s.trim()?s.split(",").map(e=>e.trim()).filter(e=>e.length>0):[],r=l.includes("management_routes")||l.includes("info_routes"),i=e("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[y.length>0&&(0,t.jsx)(U.Select.Option,{value:"all-team-models",children:"All Team Models"}),y.map(e=>(0,t.jsx)(U.Select.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(b.Form.Item,{label:"Key Type",children:(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_routes!==t.allowed_routes,children:({getFieldValue:e,setFieldValue:a})=>{var s;let l=e("allowed_routes")||"",r=(s="string"==typeof l&&""!==l.trim()?l.split(",").map(e=>e.trim()).filter(e=>e.length>0):[])&&0!==s.length?s.includes("llm_api_routes")?"llm_api":s.includes("management_routes")?"management":s.includes("info_routes")?"read_only":"default":"default";return(0,t.jsxs)(U.Select,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:r,onChange:e=>{switch(e){case"default":a("allowed_routes","");break;case"llm_api":a("allowed_routes","llm_api_routes");break;case"management":a("allowed_routes","management_routes"),a("models",[])}},children:[(0,t.jsx)(U.Select.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call AI APIs + Management routes"})]})}),(0,t.jsx)(U.Select.Option,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"AI APIs"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(U.Select.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Routes"," ",(0,t.jsx)(G.Tooltip,{title:"List of allowed routes for the key (comma-separated). Can be specific routes (e.g., '/chat/completions') or route patterns (e.g., 'llm_api_routes', 'management_routes', '/keys/*'). Leave empty to allow all routes.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_routes",children:(0,t.jsx)(V.Input,{placeholder:"Enter allowed routes (comma-separated). Special values: llm_api_routes, management_routes. Examples: llm_api_routes, /chat/completions, /keys/*. Leave empty to allow all routes"})}),(0,t.jsx)(b.Form.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(et.default,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(b.Form.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(U.Select,{placeholder:"n/a",children:[(0,t.jsx)(U.Select.Option,{value:"daily",children:"Daily"}),(0,t.jsx)(U.Select.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)(U.Select.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(b.Form.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(Q.default,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(b.Form.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(et.default,{min:0})}),(0,t.jsx)(b.Form.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(V.Input.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(b.Form.Item,{label:"Guardrails",name:"guardrails",children:n&&(0,t.jsx)(E.default,{onChange:e=>{x.setFieldValue("guardrails",e)},accessToken:n,disabled:!u})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(G.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)($.Switch,{disabled:!u,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(G.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"policies",children:n&&(0,t.jsx)(P.default,{onChange:e=>{x.setFieldValue("policies",e)},accessToken:n,disabled:!m})}),(0,t.jsx)(b.Form.Item,{label:"Tags",name:"tags",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(h).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(b.Form.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)(U.Select,{mode:"tags",style:{width:"100%"},disabled:!m,placeholder:m?Array.isArray(e.metadata?.prompts)&&e.metadata.prompts.length>0?`Current: ${e.metadata.prompts.join(", ")}`:"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:g.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(G.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",children:(0,t.jsx)(H.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(G.Tooltip,{title:m?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(J.default,{onChange:e=>x.setFieldValue("allowed_passthrough_routes",e),value:x.getFieldValue("allowed_passthrough_routes"),accessToken:n||"",placeholder:m?Array.isArray(e.metadata?.allowed_passthrough_routes)&&e.metadata.allowed_passthrough_routes.length>0?`Current: ${e.metadata.allowed_passthrough_routes.join(", ")}`:"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!m})})}),(0,t.jsx)(b.Form.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(es.default,{onChange:e=>x.setFieldValue("vector_stores",e),value:x.getFieldValue("vector_stores"),accessToken:n||"",placeholder:"Select vector stores"})}),(0,t.jsx)(b.Form.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(X.default,{onChange:e=>x.setFieldValue("mcp_servers_and_groups",e),value:x.getFieldValue("mcp_servers_and_groups"),accessToken:n||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(V.Input,{type:"hidden"})}),(0,t.jsx)(b.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(Z.default,{accessToken:n||"",selectedServers:x.getFieldValue("mcp_servers_and_groups")?.servers||[],toolPermissions:x.getFieldValue("mcp_tool_permissions")||{},onChange:e=>x.setFieldsValue({mcp_tool_permissions:e})})})}),(0,t.jsx)(b.Form.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(W.default,{onChange:e=>x.setFieldValue("agents_and_groups",e),value:x.getFieldValue("agents_and_groups"),accessToken:n||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(G.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(z.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",children:(0,t.jsx)(Y.default,{organizations:en,loading:eo,disabled:"Admin"!==d,onChange:e=>{I(e||null),x.setFieldValue("team_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:"Team ID",name:"team_id",help:em&&eu?"Team is locked because this key belongs to a project":void 0,children:(0,t.jsx)(U.Select,{placeholder:"Select team",showSearch:!0,disabled:em&&eu,style:{width:"100%"},onChange:e=>{let t=i?.find(t=>t.team_id===e)||null;t?.organization_id?(I(t.organization_id),x.setFieldValue("organization_id",t.organization_id)):e||(I(null),x.setFieldValue("organization_id",void 0))},filterOption:(e,t)=>{let a=S?i?.filter(e=>e.organization_id===S):i,s=a?.find(e=>e.team_id===t?.value);return!!s&&(s.team_alias?.toLowerCase().includes(e.toLowerCase())??!1)},children:(S?i?.filter(e=>e.organization_id===S):i)?.map(e=>(0,t.jsx)(U.Select.Option,{value:e.team_id,children:`${e.team_alias} (${e.team_id})`},e.team_id))})}),em&&eu&&(0,t.jsx)(b.Form.Item,{label:"Project",children:(0,t.jsx)(V.Input,{value:ex??"",disabled:!0})}),(0,t.jsx)(b.Form.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ea.default,{value:x.getFieldValue("logging_settings"),onChange:e=>x.setFieldValue("logging_settings",e),disabledCallbacks:v,onDisabledCallbacksChange:e=>{N((0,w.mapInternalToDisplayNames)(e)),x.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(b.Form.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(V.Input.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(q.default,{form:x,autoRotationEnabled:A,onAutoRotationChange:M,rotationInterval:R,onRotationIntervalChange:D,neverExpire:B,onNeverExpireChange:el}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(V.Input,{})})]}),(0,t.jsx)(b.Form.Item,{name:"token",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)(b.Form.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(V.Input,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"secondary",onClick:a,disabled:er,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"submit",loading:er,children:"Save Changes"})]})})]})}function er({onClose:e,keyData:E,teams:O,onKeyDataUpdate:P,onDelete:z,backButtonText:K="Back to Keys"}){let V,{accessToken:U,userId:$,userRole:G,premiumUser:W}=(0,a.default)(),H=W||null!=G&&T.rolesWithWriteAccess.includes(G),{teams:q}=(0,r.default)(),{data:J}=(0,s.useProjects)(),{data:Q}=(0,l.useUISettings)(),Y=!!Q?.values?.enable_projects_ui,[X,Z]=(0,k.useState)(!1),[ee]=b.Form.useForm(),[et,ea]=(0,k.useState)(!1),[es,er]=(0,k.useState)(!1),[ei,en]=(0,k.useState)(""),[eo,ed]=(0,k.useState)(!1),[ec,em]=(0,k.useState)(!1),{mutate:eu,isPending:ex}=(0,M.useResetKeySpend)(),[eg,ep]=(0,k.useState)(E),[eh,ej]=(0,k.useState)(null),[e_,ey]=(0,k.useState)(!1),[eb,ef]=(0,k.useState)({}),[ev,eN]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{E&&ep(E)},[E]),(0,k.useEffect)(()=>{(async()=>{let e=eg?.metadata?.policies;if(!U||!e||!Array.isArray(e)||0===e.length)return;eN(!0);let t={};try{await Promise.all(e.map(async e=>{try{let a=await (0,L.getPolicyInfoWithGuardrails)(U,e);t[e]=a.resolved_guardrails||[]}catch(a){console.error(`Failed to fetch guardrails for policy ${e}:`,a),t[e]=[]}})),ef(t)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{eN(!1)}})()},[U,eg?.metadata?.policies]),(0,k.useEffect)(()=>{if(e_){let e=setTimeout(()=>{ey(!1)},5e3);return()=>clearTimeout(e)}},[e_]),!eg)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.Button,{icon:o.ArrowLeftIcon,variant:"light",onClick:e,className:"mb-4",children:K}),(0,t.jsx)(_.Text,{children:"Key not found"})]});let ek=async e=>{try{if(!U)return;let t=e.token;if(e.key=t,H||(delete e.guardrails,delete e.prompts),e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...eg.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:t,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...eg.object_permission,mcp_servers:t||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let t=e.mcp_tool_permissions||{};Object.keys(t).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:t}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:t,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:t||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,n.mapEmptyStringToNull)(e.max_budget),e.tpm_limit=(0,n.mapEmptyStringToNull)(e.tpm_limit),e.rpm_limit=(0,n.mapEmptyStringToNull)(e.rpm_limit),e.max_parallel_requests=(0,n.mapEmptyStringToNull)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),F.default.error("Invalid metadata JSON");return}else{let{tags:t,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...e.guardrails?.length>0?{guardrails:e.guardrails}:{},...Array.isArray(e.logging_settings)&&e.logging_settings.length>0?{logging:e.logging_settings}:{},...e.disabled_callbacks?.length>0?{litellm_disabled_callbacks:(0,w.mapDisplayToInternalNames)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let a=await (0,L.keyUpdateCall)(U,e);ep(e=>e?{...e,...a}:void 0),P&&P(a),F.default.success("Key updated successfully"),Z(!1)}catch(e){F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error updating key:",e)}},eT=async()=>{try{if(er(!0),!U)return;await (0,L.keyDeleteCall)(U,eg.token||eg.token_id),F.default.success("Key deleted successfully"),z&&z(),e()}catch(e){console.error("Error deleting the key:",e),F.default.fromBackend(e)}finally{er(!1),ea(!1),en("")}},ew=e=>{let t=new Date(e),a=t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),s=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${a} at ${s}`},eS=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"")||$===eg.user_id&&"Internal Viewer"!==G,eI=(0,T.isProxyAdminRole)(G||"")||q&&(0,T.isUserTeamAdminForSingleTeam)(q?.filter(e=>e.team_id===eg.team_id)[0]?.members_with_roles,$||"");return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsx)(N.KeyInfoHeader,{data:{keyName:eg.key_alias||"Virtual Key",keyId:eg.token_id||eg.token,userId:eg.user_id||"",userEmail:eg.user_email||"",createdBy:eg.user_email||eg.user_id||"",createdAt:eg.created_at?ew(eg.created_at):"",lastUpdated:eg.updated_at?ew(eg.updated_at):"",lastActive:eg.last_active?ew(eg.last_active):"Never"},onBack:e,onRegenerate:()=>ed(!0),onDelete:()=>ea(!0),onResetSpend:eI?()=>em(!0):void 0,canModifyKey:eS,backButtonText:K,regenerateDisabled:!W,regenerateTooltip:W?void 0:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,t.jsx)(D.RegenerateKeyModal,{selectedToken:eg,visible:eo,onClose:()=>ed(!1),onKeyUpdate:e=>{ep(t=>{if(t)return{...t,...e,created_at:new Date().toLocaleString()}}),ej(new Date),ey(!0),P&&P({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(I.default,{isOpen:et,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:eg?.key_alias||"-"},{label:"Key ID",value:eg?.token_id||eg?.token||"-",code:!0},{label:"Team ID",value:eg?.team_id||"-",code:!0},{label:"Spend",value:eg?.spend?`$${(0,i.formatNumberWithCommas)(eg.spend,4)}`:"$0.0000"}],onCancel:()=>{ea(!1),en("")},onOk:eT,confirmLoading:es,requiredConfirmation:eg?.key_alias}),(0,t.jsxs)(f.Modal,{title:"Reset Key Spend",open:ec,onOk:()=>{eu(eg.token||eg.token_id,{onSuccess:()=>{ep(e=>e?{...e,spend:0}:void 0),P&&P({spend:0}),F.default.success("Key spend reset to $0"),em(!1)},onError:e=>{F.default.fromBackend((0,B.parseErrorMessage)(e)),console.error("Error resetting key spend:",e)}})},onCancel:()=>em(!1),okText:"Reset",okButtonProps:{danger:!0},confirmLoading:ex,children:[(0,t.jsxs)("p",{children:["Reset spend for ",(0,t.jsx)("strong",{children:eg?.key_alias||eg?.token_id||"this key"})," to"," ",(0,t.jsx)("strong",{children:"$0"}),"?"]}),(0,t.jsxs)("p",{style:{color:"#666",fontSize:"0.875rem",marginTop:8},children:["Current spend: ",(0,t.jsxs)("strong",{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),". Spend history is preserved in logs. This resets the current period spend counter, the same as an automatic budget reset."]})]}),(0,t.jsxs)(g.TabGroup,{children:[(0,t.jsxs)(p.TabList,{className:"mb-4",children:[(0,t.jsx)(x.Tab,{children:"Overview"}),(0,t.jsx)(x.Tab,{children:"Settings"})]}),(0,t.jsxs)(j.TabPanels,{children:[(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(u.Grid,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(y.Title,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)]}),(0,t.jsxs)(_.Text,{children:["of"," ",null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget)}`:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)(d.Badge,{color:"red",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsx)(m.Card,{children:(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",accessToken:U})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(eg.metadata?.guardrails)&&eg.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:eg.metadata.guardrails.map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",children:e},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof eg.metadata?.disable_global_guardrails&&!0===eg.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(d.Badge,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(_.Text,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(eg.metadata?.policies)&&eg.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:eg.metadata.policies.map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Badge,{color:"purple",children:e}),ev&&(0,t.jsx)(_.Text,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!ev&&eb[e]&&eb[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(_.Text,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:eb[e].map((e,a)=>(0,t.jsx)(d.Badge,{color:"blue",size:"xs",children:e},a))})]})]},a))}):(0,t.jsx)(_.Text,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(h.TabPanel,{children:(0,t.jsxs)(m.Card,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(y.Title,{children:"Key Settings"}),!X&&eS&&(0,t.jsx)(c.Button,{onClick:()=>Z(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(el,{keyData:eg,onCancel:()=>Z(!1),onSubmit:ek,teams:O,accessToken:U,userID:$,userRole:G,premiumUser:W}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.token_id||eg.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(_.Text,{children:eg.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(_.Text,{className:"font-mono",children:eg.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(_.Text,{children:eg.team_id||"Not Set"})]}),Y&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Project"}),(0,t.jsx)(_.Text,{children:eg.project_id?(V=J?.find(e=>e.project_id===eg.project_id),V?.project_alias?`${V.project_alias} (${eg.project_id})`:eg.project_id):"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Organization"}),(0,t.jsx)(_.Text,{children:(eg.organization_id??eg.org_id)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Created"}),(0,t.jsx)(_.Text,{children:ew(eg.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Text,{children:ew(eh)}),(0,t.jsx)(d.Badge,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Expires"}),(0,t.jsx)(_.Text,{children:eg.expires?ew(eg.expires):"Never"})]}),(0,t.jsx)(S.default,{autoRotate:eg.auto_rotate,rotationInterval:eg.rotation_interval,lastRotationAt:eg.last_rotation_at,keyRotationAt:eg.key_rotation_at,nextRotationAt:eg.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(_.Text,{children:["$",(0,i.formatNumberWithCommas)(eg.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Budget"}),(0,t.jsx)(_.Text,{children:null!==eg.max_budget?`$${(0,i.formatNumberWithCommas)(eg.max_budget,2)}`:"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.metadata?.tags)&&eg.metadata.tags.length>0?eg.metadata.tags.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.prompts)&&eg.metadata.prompts.length>0?eg.metadata.prompts.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Routes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(eg.allowed_routes)&&eg.allowed_routes.length>0?eg.allowed_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(v.Tag,{color:"green",children:"All routes allowed"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(_.Text,{children:Array.isArray(eg.metadata?.allowed_passthrough_routes)&&eg.metadata.allowed_passthrough_routes.length>0?eg.metadata.allowed_passthrough_routes.map((e,a)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(_.Text,{children:eg.metadata?.disable_global_guardrails===!0?(0,t.jsx)(d.Badge,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(d.Badge,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eg.models&&eg.models.length>0?eg.models.map((e,a)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},a)):(0,t.jsx)(_.Text,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(_.Text,{children:["TPM: ",null!==eg.tpm_limit?eg.tpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["RPM: ",null!==eg.rpm_limit?eg.rpm_limit:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Max Parallel Requests:"," ",null!==eg.max_parallel_requests?eg.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model TPM Limits:"," ",eg.metadata?.model_tpm_limit?JSON.stringify(eg.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(_.Text,{children:["Model RPM Limits:"," ",eg.metadata?.model_rpm_limit?JSON.stringify(eg.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Text,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:(0,C.formatMetadataForDisplay)((0,C.stripTagsFromMetadata)(eg.metadata))})]}),(0,t.jsx)(R.default,{objectPermission:eg.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:U}),(0,t.jsx)(A.default,{loggingConfigs:(0,C.extractLoggingSettings)(eg.metadata),disabledCallbacks:Array.isArray(eg.metadata?.litellm_disabled_callbacks)?(0,w.mapInternalToDisplayNames)(eg.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}e.s(["default",()=>er],20147)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/db928c0f158d84b3.js b/litellm/proxy/_experimental/out/_next/static/chunks/fd48ca55b9713b5b.js similarity index 99% rename from litellm/proxy/_experimental/out/_next/static/chunks/db928c0f158d84b3.js rename to litellm/proxy/_experimental/out/_next/static/chunks/fd48ca55b9713b5b.js index e38dfa2a4a7..f96db34bb6b 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/db928c0f158d84b3.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/fd48ca55b9713b5b.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["ArrowLeftOutlined",0,l],447566)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),i=e.i(915823),l=e.i(619273),o=class extends i.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#l()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#i(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#l(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function s(e,r){let i=(0,n.useQueryClient)(r),[s]=t.useState(()=>new o(i,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let d=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(a.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=t.useCallback((e,t)=>{s.mutate(e,t).catch(l.noop)},[s]);if(d.error&&(0,l.shouldThrowError)(s.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>s],954616)},244451,e=>{"use strict";let t;e.i(247167);var r=e.i(271645),a=e.i(343794),i=e.i(242064),l=e.i(763731),o=e.i(174428);let n=80*Math.PI,s=e=>{let{dotClassName:t,style:i,hasCircleCls:l}=e;return r.createElement("circle",{className:(0,a.default)(`${t}-circle`,{[`${t}-circle-bg`]:l}),r:40,cx:50,cy:50,strokeWidth:20,style:i})},d=({percent:e,prefixCls:t})=>{let i=`${t}-dot`,l=`${i}-holder`,d=`${l}-hidden`,[c,u]=r.useState(!1);(0,o.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let g={strokeDashoffset:`${n/4}`,strokeDasharray:`${n*m/100} ${n*(100-m)/100}`};return r.createElement("span",{className:(0,a.default)(l,`${i}-progress`,m<=0&&d)},r.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},r.createElement(s,{dotClassName:i,hasCircleCls:!0}),r.createElement(s,{dotClassName:i,style:g})))};function c(e){let{prefixCls:t,percent:i=0}=e,l=`${t}-dot`,o=`${l}-holder`,n=`${o}-hidden`;return r.createElement(r.Fragment,null,r.createElement("span",{className:(0,a.default)(o,i>0&&n)},r.createElement("span",{className:(0,a.default)(l,`${t}-dot-spin`)},[1,2,3,4].map(e=>r.createElement("i",{className:`${t}-dot-item`,key:e})))),r.createElement(d,{prefixCls:t,percent:i}))}function u(e){var t;let{prefixCls:i,indicator:o,percent:n}=e,s=`${i}-dot`;return o&&r.isValidElement(o)?(0,l.cloneElement)(o,{className:(0,a.default)(null==(t=o.props)?void 0:t.className,s),percent:n}):r.createElement(c,{prefixCls:i,percent:n})}e.i(296059);var m=e.i(694758),g=e.i(183293),p=e.i(246422),h=e.i(838378);let b=new m.Keyframes("antSpinMove",{to:{opacity:1}}),f=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),v=(0,p.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:b,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:f,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,h.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:r}}),x=[[30,.05],[70,.03],[96,.01]];var C=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);it.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};let w=e=>{var l;let{prefixCls:o,spinning:n=!0,delay:s=0,className:d,rootClassName:c,size:m="default",tip:g,wrapperClassName:p,style:h,children:b,fullscreen:f=!1,indicator:w,percent:y}=e,$=C(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:k,direction:S,className:N,style:j,indicator:O}=(0,i.useComponentConfig)("spin"),E=k("spin",o),[M,T,R]=v(E),[z,I]=r.useState(()=>n&&(!n||!s||!!Number.isNaN(Number(s)))),q=function(e,t){let[a,i]=r.useState(0),l=r.useRef(null),o="auto"===t;return r.useEffect(()=>(o&&e&&(i(0),l.current=setInterval(()=>{i(e=>{let t=100-e;for(let r=0;r{l.current&&(clearInterval(l.current),l.current=null)}),[o,e]),o?a:t}(z,y);r.useEffect(()=>{if(n){let e=function(e,t,r){var a,i=r||{},l=i.noTrailing,o=void 0!==l&&l,n=i.noLeading,s=void 0!==n&&n,d=i.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function g(){a&&clearTimeout(a)}function p(){for(var r=arguments.length,i=Array(r),l=0;le?s?(m=Date.now(),o||(a=setTimeout(c?h:p,e))):p():!0!==o&&(a=setTimeout(c?h:p,void 0===c?e-d:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly;g(),u=!(void 0!==t&&t)},p}(s,()=>{I(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}I(!1)},[s,n]);let L=r.useMemo(()=>void 0!==b&&!f,[b,f]),D=(0,a.default)(E,N,{[`${E}-sm`]:"small"===m,[`${E}-lg`]:"large"===m,[`${E}-spinning`]:z,[`${E}-show-text`]:!!g,[`${E}-rtl`]:"rtl"===S},d,!f&&c,T,R),P=(0,a.default)(`${E}-container`,{[`${E}-blur`]:z}),H=null!=(l=null!=w?w:O)?l:t,B=Object.assign(Object.assign({},j),h),A=r.createElement("div",Object.assign({},$,{style:B,className:D,"aria-live":"polite","aria-busy":z}),r.createElement(u,{prefixCls:E,indicator:H,percent:q}),g&&(L||f)?r.createElement("div",{className:`${E}-text`},g):null);return M(L?r.createElement("div",Object.assign({},$,{className:(0,a.default)(`${E}-nested-loading`,p,T,R)}),z&&r.createElement("div",{key:"loading"},A),r.createElement("div",{className:P,key:"container"},b)):f?r.createElement("div",{className:(0,a.default)(`${E}-fullscreen`,{[`${E}-fullscreen-show`]:z},c,T,R)},A):A)};w.setDefaultIndicator=e=>{t=e},e.s(["default",0,w],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},350967,46757,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),i=e.i(271645);let l={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},n={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},s={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},d={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},c={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},u={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},m={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"};e.s(["colSpan",()=>d,"colSpanLg",()=>m,"colSpanMd",()=>u,"colSpanSm",()=>c,"gridCols",()=>l,"gridColsLg",()=>s,"gridColsMd",()=>n,"gridColsSm",()=>o],46757);let g=(0,a.makeClassName)("Grid"),p=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",h=i.default.forwardRef((e,a)=>{let{numItems:d=1,numItemsSm:c,numItemsMd:u,numItemsLg:m,children:h,className:b}=e,f=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),v=p(d,l),x=p(c,o),C=p(u,n),w=p(m,s),y=(0,r.tremorTwMerge)(v,x,C,w);return i.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(g("root"),"grid",y,b)},f),h)});h.displayName="Grid",e.s(["Grid",()=>h],350967)},530212,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,a]of Object.entries(t))e in r&&(r[e]=a);return r}let a=(e,t=0,r=!1,a=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!a)return"-";let i={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",i);let l=e<0?"-":"",o=Math.abs(e),n=o,s="";return o>=1e6?(n=o/1e6,s="M"):o>=1e3&&(n=o/1e3,s="K"),`${l}${n.toLocaleString("en-US",i)}${s}`},i=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return l(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),l(e,r)}},l=(e,r)=>{try{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",a.setAttribute("readonly",""),document.body.appendChild(a),a.focus(),a.select();let i=document.execCommand("copy");if(document.body.removeChild(a),i)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,i,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=a(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),i=e.i(682830),l=e.i(269200),o=e.i(427612),n=e.i(64848),s=e.i(942232),d=e.i(496020),c=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:g,renderChildRows:p,getRowCanExpand:h,isLoading:b=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:v="No logs found",enableSorting:x=!1}){let C=!!(g||p)&&!!h,[w,y]=(0,r.useState)([]),$=(0,a.useReactTable)({data:e,columns:u,...x&&{state:{sorting:w},onSortingChange:y,enableSortingRemoval:!1},...C&&{getRowCanExpand:h},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,i.getCoreRowModel)(),...x&&{getSortedRowModel:(0,i.getSortedRowModel)()},...C&&{getExpandedRowModel:(0,i.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(l.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(o.TableHead,{children:$.getHeaderGroups().map(e=>(0,t.jsx)(d.TableRow,{children:e.headers.map(e=>{let r=x&&e.column.getCanSort(),i=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===i?"↑":"desc"===i?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(s.TableBody,{children:b?(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):$.getRowModel().rows.length>0?$.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(d.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),C&&e.getIsExpanded()&&p&&p({row:e}),C&&e.getIsExpanded()&&g&&!p&&(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:g({row:e})})})})]},e.id)):(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:v})})})})})]})})}e.s(["DataTable",()=>u])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["ReloadOutlined",0,l],91979)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),i=e.i(529681);let l=e=>{let{prefixCls:a,className:i,style:l,size:o,shape:n}=e,s=(0,r.default)({[`${a}-lg`]:"large"===o,[`${a}-sm`]:"small"===o}),d=(0,r.default)({[`${a}-circle`]:"circle"===n,[`${a}-square`]:"square"===n,[`${a}-round`]:"round"===n}),c=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,r.default)(a,s,d,i),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var o=e.i(694758),n=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,n.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),p=e=>Object.assign({width:e},u(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),f=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:i,skeletonButtonCls:l,skeletonInputCls:o,skeletonImageCls:n,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:f,padding:v,marginSM:x,borderRadius:C,titleHeight:w,blockRadius:y,paragraphLiHeight:$,controlHeightXS:k,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:v,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:f},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:w,background:f,borderRadius:y,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:$,listStyle:"none",background:f,borderRadius:y,"+ li":{marginBlockStart:k}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${i} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:x,[`+ ${i}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:i,controlHeightSM:l,gradientFromColor:o,calc:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:n(a).mul(2).equal(),minWidth:n(a).mul(2).equal()},b(a,n))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},b(i,n))}),h(e,i,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(l,n))}),h(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:i,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(i)),[`${t}${t}-sm`]:Object.assign({},m(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:i,controlHeightSM:l,gradientFromColor:o,calc:n}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:r},g(t,n)),[`${a}-lg`]:Object.assign({},g(i,n)),[`${a}-sm`]:Object.assign({},g(l,n))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:i,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:i},p(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},p(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[` +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,646563,e=>{"use strict";var t=e.i(959013);e.s(["PlusOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["ArrowLeftOutlined",0,l],447566)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),a=e.i(540143),i=e.i(915823),l=e.i(619273),o=class extends i.Subscribable{#e;#t=void 0;#r;#a;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#l(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#l()}mutate(e,t){return this.#a=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#i(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#l(e){a.notifyManager.batch(()=>{if(this.#a&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#a.onSuccess?.(e.data,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(e.data,null,t,r,a)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#a.onError?.(e.error,t,r,a)}catch(e){Promise.reject(e)}try{this.#a.onSettled?.(void 0,e.error,t,r,a)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},n=e.i(912598);function s(e,r){let i=(0,n.useQueryClient)(r),[s]=t.useState(()=>new o(i,e));t.useEffect(()=>{s.setOptions(e)},[s,e]);let d=t.useSyncExternalStore(t.useCallback(e=>s.subscribe(a.notifyManager.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=t.useCallback((e,t)=>{s.mutate(e,t).catch(l.noop)},[s]);if(d.error&&(0,l.shouldThrowError)(s.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:c,mutateAsync:d.mutate}}e.s(["useMutation",()=>s],954616)},244451,e=>{"use strict";let t;e.i(247167);var r=e.i(271645),a=e.i(343794),i=e.i(242064),l=e.i(763731),o=e.i(174428);let n=80*Math.PI,s=e=>{let{dotClassName:t,style:i,hasCircleCls:l}=e;return r.createElement("circle",{className:(0,a.default)(`${t}-circle`,{[`${t}-circle-bg`]:l}),r:40,cx:50,cy:50,strokeWidth:20,style:i})},d=({percent:e,prefixCls:t})=>{let i=`${t}-dot`,l=`${i}-holder`,d=`${l}-hidden`,[c,u]=r.useState(!1);(0,o.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let g={strokeDashoffset:`${n/4}`,strokeDasharray:`${n*m/100} ${n*(100-m)/100}`};return r.createElement("span",{className:(0,a.default)(l,`${i}-progress`,m<=0&&d)},r.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},r.createElement(s,{dotClassName:i,hasCircleCls:!0}),r.createElement(s,{dotClassName:i,style:g})))};function c(e){let{prefixCls:t,percent:i=0}=e,l=`${t}-dot`,o=`${l}-holder`,n=`${o}-hidden`;return r.createElement(r.Fragment,null,r.createElement("span",{className:(0,a.default)(o,i>0&&n)},r.createElement("span",{className:(0,a.default)(l,`${t}-dot-spin`)},[1,2,3,4].map(e=>r.createElement("i",{className:`${t}-dot-item`,key:e})))),r.createElement(d,{prefixCls:t,percent:i}))}function u(e){var t;let{prefixCls:i,indicator:o,percent:n}=e,s=`${i}-dot`;return o&&r.isValidElement(o)?(0,l.cloneElement)(o,{className:(0,a.default)(null==(t=o.props)?void 0:t.className,s),percent:n}):r.createElement(c,{prefixCls:i,percent:n})}e.i(296059);var m=e.i(694758),g=e.i(183293),p=e.i(246422),h=e.i(838378);let b=new m.Keyframes("antSpinMove",{to:{opacity:1}}),f=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),v=(0,p.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},(0,g.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:b,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:f,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,h.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:r}}),x=[[30,.05],[70,.03],[96,.01]];var C=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);it.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};let w=e=>{var l;let{prefixCls:o,spinning:n=!0,delay:s=0,className:d,rootClassName:c,size:m="default",tip:g,wrapperClassName:p,style:h,children:b,fullscreen:f=!1,indicator:w,percent:y}=e,$=C(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:k,direction:S,className:N,style:j,indicator:O}=(0,i.useComponentConfig)("spin"),E=k("spin",o),[M,T,R]=v(E),[z,I]=r.useState(()=>n&&(!n||!s||!!Number.isNaN(Number(s)))),q=function(e,t){let[a,i]=r.useState(0),l=r.useRef(null),o="auto"===t;return r.useEffect(()=>(o&&e&&(i(0),l.current=setInterval(()=>{i(e=>{let t=100-e;for(let r=0;r{l.current&&(clearInterval(l.current),l.current=null)}),[o,e]),o?a:t}(z,y);r.useEffect(()=>{if(n){let e=function(e,t,r){var a,i=r||{},l=i.noTrailing,o=void 0!==l&&l,n=i.noLeading,s=void 0!==n&&n,d=i.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function g(){a&&clearTimeout(a)}function p(){for(var r=arguments.length,i=Array(r),l=0;le?s?(m=Date.now(),o||(a=setTimeout(c?h:p,e))):p():!0!==o&&(a=setTimeout(c?h:p,void 0===c?e-d:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly;g(),u=!(void 0!==t&&t)},p}(s,()=>{I(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}I(!1)},[s,n]);let L=r.useMemo(()=>void 0!==b&&!f,[b,f]),D=(0,a.default)(E,N,{[`${E}-sm`]:"small"===m,[`${E}-lg`]:"large"===m,[`${E}-spinning`]:z,[`${E}-show-text`]:!!g,[`${E}-rtl`]:"rtl"===S},d,!f&&c,T,R),P=(0,a.default)(`${E}-container`,{[`${E}-blur`]:z}),H=null!=(l=null!=w?w:O)?l:t,B=Object.assign(Object.assign({},j),h),A=r.createElement("div",Object.assign({},$,{style:B,className:D,"aria-live":"polite","aria-busy":z}),r.createElement(u,{prefixCls:E,indicator:H,percent:q}),g&&(L||f)?r.createElement("div",{className:`${E}-text`},g):null);return M(L?r.createElement("div",Object.assign({},$,{className:(0,a.default)(`${E}-nested-loading`,p,T,R)}),z&&r.createElement("div",{key:"loading"},A),r.createElement("div",{className:P,key:"container"},b)):f?r.createElement("div",{className:(0,a.default)(`${E}-fullscreen`,{[`${E}-fullscreen-show`]:z},c,T,R)},A):A)};w.setDefaultIndicator=e=>{t=e},e.s(["default",0,w],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},350967,46757,e=>{"use strict";var t=e.i(290571),r=e.i(444755),a=e.i(673706),i=e.i(271645);let l={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},n={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},s={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},d={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},c={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},u={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},m={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"};e.s(["colSpan",()=>d,"colSpanLg",()=>m,"colSpanMd",()=>u,"colSpanSm",()=>c,"gridCols",()=>l,"gridColsLg",()=>s,"gridColsMd",()=>n,"gridColsSm",()=>o],46757);let g=(0,a.makeClassName)("Grid"),p=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",h=i.default.forwardRef((e,a)=>{let{numItems:d=1,numItemsSm:c,numItemsMd:u,numItemsLg:m,children:h,className:b}=e,f=(0,t.__rest)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),v=p(d,l),x=p(c,o),C=p(u,n),w=p(m,s),y=(0,r.tremorTwMerge)(v,x,C,w);return i.default.createElement("div",Object.assign({ref:a,className:(0,r.tremorTwMerge)(g("root"),"grid",y,b)},f),h)});h.displayName="Grid",e.s(["Grid",()=>h],350967)},530212,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.s(["ArrowLeftIcon",0,r],530212)},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},500330,e=>{"use strict";var t=e.i(727749);function r(e,t){let r=structuredClone(e);for(let[e,a]of Object.entries(t))e in r&&(r[e]=a);return r}let a=(e,t=0,r=!1,a=!0)=>{if(null==e||!Number.isFinite(e)||0===e&&!a)return"-";let i={minimumFractionDigits:t,maximumFractionDigits:t};if(!r)return e.toLocaleString("en-US",i);let l=e<0?"-":"",o=Math.abs(e),n=o,s="";return o>=1e6?(n=o/1e6,s="M"):o>=1e3&&(n=o/1e3,s="K"),`${l}${n.toLocaleString("en-US",i)}${s}`},i=async(e,r="Copied to clipboard")=>{if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return l(e,r);try{return await navigator.clipboard.writeText(e),t.default.success(r),!0}catch(t){return console.error("Clipboard API failed: ",t),l(e,r)}},l=(e,r)=>{try{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",a.setAttribute("readonly",""),document.body.appendChild(a),a.focus(),a.select();let i=document.execCommand("copy");if(document.body.removeChild(a),i)return t.default.success(r),!0;throw Error("execCommand failed")}catch(e){return t.default.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}};e.s(["copyToClipboard",0,i,"formatNumberWithCommas",0,a,"getSpendString",0,(e,t=6)=>{if(null==e||!Number.isFinite(e)||0===e)return"-";let r=a(e,t,!1,!1);if(0===Number(r.replace(/,/g,""))){let e=(1/10**t).toFixed(t);return`< $${e}`}return`$${r}`},"updateExistingKeys",()=>r])},149121,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(152990),i=e.i(682830),l=e.i(269200),o=e.i(427612),n=e.i(64848),s=e.i(942232),d=e.i(496020),c=e.i(977572);function u({data:e=[],columns:u,onRowClick:m,renderSubComponent:g,renderChildRows:p,getRowCanExpand:h,isLoading:b=!1,loadingMessage:f="🚅 Loading logs...",noDataMessage:v="No logs found",enableSorting:x=!1}){let C=!!(g||p)&&!!h,[w,y]=(0,r.useState)([]),$=(0,a.useReactTable)({data:e,columns:u,...x&&{state:{sorting:w},onSortingChange:y,enableSortingRemoval:!1},...C&&{getRowCanExpand:h},getRowId:(e,t)=>e?.request_id??String(t),getCoreRowModel:(0,i.getCoreRowModel)(),...x&&{getSortedRowModel:(0,i.getSortedRowModel)()},...C&&{getExpandedRowModel:(0,i.getExpandedRowModel)()}});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(l.Table,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(o.TableHead,{children:$.getHeaderGroups().map(e=>(0,t.jsx)(d.TableRow,{children:e.headers.map(e=>{let r=x&&e.column.getCanSort(),i=e.column.getIsSorted();return(0,t.jsx)(n.TableHeaderCell,{className:`py-1 h-8 ${r?"cursor-pointer select-none hover:bg-gray-50":""}`,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-gray-400",children:"asc"===i?"↑":"desc"===i?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(s.TableBody,{children:b?(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})}):$.getRowModel().rows.length>0?$.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(d.TableRow,{className:`h-8 ${m?"cursor-pointer hover:bg-gray-50":""}`,onClick:()=>m?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(c.TableCell,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),C&&e.getIsExpanded()&&p&&p({row:e}),C&&e.getIsExpanded()&&g&&!p&&(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:g({row:e})})})})]},e.id)):(0,t.jsx)(d.TableRow,{children:(0,t.jsx)(c.TableCell,{colSpan:u.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:v})})})})})]})})}e.s(["DataTable",()=>u])},751904,e=>{"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var i=e.i(9583),l=r.forwardRef(function(e,l){return r.createElement(i.default,(0,t.default)({},e,{ref:l,icon:a}))});e.s(["ReloadOutlined",0,l],91979)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},185793,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(242064),i=e.i(529681);let l=e=>{let{prefixCls:a,className:i,style:l,size:o,shape:n}=e,s=(0,r.default)({[`${a}-lg`]:"large"===o,[`${a}-sm`]:"small"===o}),d=(0,r.default)({[`${a}-circle`]:"circle"===n,[`${a}-square`]:"square"===n,[`${a}-round`]:"round"===n}),c=t.useMemo(()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return t.createElement("span",{className:(0,r.default)(a,s,d,i),style:Object.assign(Object.assign({},c),l)})};e.i(296059);var o=e.i(694758),n=e.i(915654),s=e.i(246422),d=e.i(838378);let c=new o.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u=e=>({height:e,lineHeight:(0,n.unit)(e)}),m=e=>Object.assign({width:e},u(e)),g=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},u(e)),p=e=>Object.assign({width:e},u(e)),h=(e,t,r)=>{let{skeletonButtonCls:a}=e;return{[`${r}${a}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${a}-round`]:{borderRadius:t}}},b=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},u(e)),f=(0,s.genStyleHooks)("Skeleton",e=>{let{componentCls:t,calc:r}=e;return(e=>{let{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:a,skeletonParagraphCls:i,skeletonButtonCls:l,skeletonInputCls:o,skeletonImageCls:n,controlHeight:s,controlHeightLG:d,controlHeightSM:u,gradientFromColor:f,padding:v,marginSM:x,borderRadius:C,titleHeight:w,blockRadius:y,paragraphLiHeight:$,controlHeightXS:k,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:v,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:f},m(s)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},m(d)),[`${r}-sm`]:Object.assign({},m(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[a]:{width:"100%",height:w,background:f,borderRadius:y,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:$,listStyle:"none",background:f,borderRadius:y,"+ li":{marginBlockStart:k}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${a}, ${i} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[a]:{marginBlockStart:x,[`+ ${i}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},(e=>{let{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:a,controlHeightLG:i,controlHeightSM:l,gradientFromColor:o,calc:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:n(a).mul(2).equal(),minWidth:n(a).mul(2).equal()},b(a,n))},h(e,a,r)),{[`${r}-lg`]:Object.assign({},b(i,n))}),h(e,i,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},b(l,n))}),h(e,l,`${r}-sm`))})(e)),(e=>{let{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:a,controlHeightLG:i,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},m(a)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},m(i)),[`${t}${t}-sm`]:Object.assign({},m(l))}})(e)),(e=>{let{controlHeight:t,borderRadiusSM:r,skeletonInputCls:a,controlHeightLG:i,controlHeightSM:l,gradientFromColor:o,calc:n}=e;return{[a]:Object.assign({display:"inline-block",verticalAlign:"top",background:o,borderRadius:r},g(t,n)),[`${a}-lg`]:Object.assign({},g(i,n)),[`${a}-sm`]:Object.assign({},g(l,n))}})(e)),(e=>{let{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:a,borderRadiusSM:i,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:a,borderRadius:i},p(l(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},p(r)),{maxWidth:l(r).mul(4).equal(),maxHeight:l(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}})(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[` ${a}, ${i} > li, ${r}, diff --git a/litellm/proxy/_experimental/out/_not-found/index.html b/litellm/proxy/_experimental/out/_not-found.html similarity index 95% rename from litellm/proxy/_experimental/out/_not-found/index.html rename to litellm/proxy/_experimental/out/_not-found.html index c9df4fb9145..13c7263f936 100644 --- a/litellm/proxy/_experimental/out/_not-found/index.html +++ b/litellm/proxy/_experimental/out/_not-found.html @@ -1 +1 @@ -404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ 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 a0b4f87eb15..1d0adbc4371 100644 --- a/litellm/proxy/_experimental/out/_not-found.txt +++ b/litellm/proxy/_experimental/out/_not-found.txt @@ -1,6 +1,6 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] @@ -10,7 +10,7 @@ b:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li d: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/cab8d46a8c32ec36.css","style"] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] e:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] 8:null diff --git a/litellm/proxy/_experimental/out/_not-found/__next._full.txt b/litellm/proxy/_experimental/out/_not-found/__next._full.txt index a0b4f87eb15..1d0adbc4371 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._full.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._full.txt @@ -1,6 +1,6 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] @@ -10,7 +10,7 @@ b:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li d: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/cab8d46a8c32ec36.css","style"] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$7",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"S":true} a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] e:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] 8:null diff --git a/litellm/proxy/_experimental/out/_not-found/__next._head.txt b/litellm/proxy/_experimental/out/_not-found/__next._head.txt index 124aee003fb..4d3c131f7cb 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._head.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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 d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/_not-found/__next._index.txt +++ b/litellm/proxy/_experimental/out/_not-found/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"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 37294731304..b04c30aa9d5 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"] 3:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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 e6f951aa599..c8a00779c6d 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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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 94d3f402e36..feb5dd41234 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/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/api-reference/index.html b/litellm/proxy/_experimental/out/api-reference.html similarity index 93% rename from litellm/proxy/_experimental/out/api-reference/index.html rename to litellm/proxy/_experimental/out/api-reference.html index c125221a6d3..83427063fb4 100644 --- a/litellm/proxy/_experimental/out/api-reference/index.html +++ b/litellm/proxy/_experimental/out/api-reference.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ 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 e2b549c110e..14f8dae0d63 100644 --- a/litellm/proxy/_experimental/out/api-reference.txt +++ b/litellm/proxy/_experimental/out/api-reference.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[191905,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +e:I[191905,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 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 b2cba5e03d2..3df578389b2 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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[191905,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.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"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.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":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.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} 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 e6f951aa599..c8a00779c6d 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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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 3a37599159a..4baeca43e28 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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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 e2b549c110e..14f8dae0d63 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._full.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[191905,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +e:I[191905,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/673d847ad9c91666.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/api-reference/__next._head.txt b/litellm/proxy/_experimental/out/api-reference/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._head.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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 d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/api-reference/__next._index.txt +++ b/litellm/proxy/_experimental/out/api-reference/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"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 78dafca8c9b..acb4b3a8b9b 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/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/chat/index.html b/litellm/proxy/_experimental/out/chat.html similarity index 92% rename from litellm/proxy/_experimental/out/chat/index.html rename to litellm/proxy/_experimental/out/chat.html index bacdc907fb3..1f5c7780d17 100644 --- a/litellm/proxy/_experimental/out/chat/index.html +++ b/litellm/proxy/_experimental/out/chat.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/chat.txt b/litellm/proxy/_experimental/out/chat.txt index acf086b3258..9056b91ac8d 100644 --- a/litellm/proxy/_experimental/out/chat.txt +++ b/litellm/proxy/_experimental/out/chat.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[321443,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[321443,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/chat/__next._full.txt b/litellm/proxy/_experimental/out/chat/__next._full.txt index acf086b3258..9056b91ac8d 100644 --- a/litellm/proxy/_experimental/out/chat/__next._full.txt +++ b/litellm/proxy/_experimental/out/chat/__next._full.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[321443,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[321443,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","chat"],"q":"","i":false,"f":[[["",{"children":["chat",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/chat/__next._head.txt b/litellm/proxy/_experimental/out/chat/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/chat/__next._head.txt +++ b/litellm/proxy/_experimental/out/chat/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/chat/__next._index.txt b/litellm/proxy/_experimental/out/chat/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/chat/__next._index.txt +++ b/litellm/proxy/_experimental/out/chat/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/chat/__next._tree.txt b/litellm/proxy/_experimental/out/chat/__next._tree.txt index 20a4eada66d..57aeb11d659 100644 --- a/litellm/proxy/_experimental/out/chat/__next._tree.txt +++ b/litellm/proxy/_experimental/out/chat/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"chat","paramType":null,"paramKey":"chat","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"chat","paramType":null,"paramKey":"chat","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/chat/__next.chat.__PAGE__.txt b/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt index c4fa10b399f..acfcfe2eed4 100644 --- a/litellm/proxy/_experimental/out/chat/__next.chat.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/chat/__next.chat.__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[321443,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[321443,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/994a6506f0e0b01f.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/10b2c4546ee6aca1.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/39bdd72c165f9ec0.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/49e9dce7df902771.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/b5ce76dc420561cc.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/chat/__next.chat.txt b/litellm/proxy/_experimental/out/chat/__next.chat.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/chat/__next.chat.txt +++ b/litellm/proxy/_experimental/out/chat/__next.chat.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/index.html b/litellm/proxy/_experimental/out/experimental/api-playground.html similarity index 93% rename from litellm/proxy/_experimental/out/experimental/api-playground/index.html rename to litellm/proxy/_experimental/out/experimental/api-playground.html index abdb76b40a9..3b65e87da6b 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/index.html +++ b/litellm/proxy/_experimental/out/experimental/api-playground.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/api-playground.txt b/litellm/proxy/_experimental/out/experimental/api-playground.txt index 6cfb21656a6..b8f3b65bbe7 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[715288,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +f:I[715288,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt index b583f7bdb22..d1eeaafc2e8 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.__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[715288,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +3:I[715288,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.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/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.api-playground.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.experimental.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/experimental/api-playground/__next._full.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt index 6cfb21656a6..b8f3b65bbe7 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","api-playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[715288,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] +f:I[715288,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/ca22b37c24b4d34a.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/experimental/api-playground/__next._index.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt index b7c508c047c..d4b206adc41 100644 --- a/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/api-playground/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-playground","paramType":null,"paramKey":"api-playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-playground","paramType":null,"paramKey":"api-playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/index.html b/litellm/proxy/_experimental/out/experimental/budgets.html similarity index 90% rename from litellm/proxy/_experimental/out/experimental/budgets/index.html rename to litellm/proxy/_experimental/out/experimental/budgets.html index 92a2abafd25..9d4518f7e10 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/index.html +++ b/litellm/proxy/_experimental/out/experimental/budgets.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/budgets.txt b/litellm/proxy/_experimental/out/experimental/budgets.txt index 2fb0b7856dd..f23d7716c87 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[267167,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/2d313397aa3e57de.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +f:I[267167,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/1488f40c80200d6a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2d313397aa3e57de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1488f40c80200d6a.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.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/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt index 276aa8d2f1a..803ca9f03d4 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.__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[267167,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/2d313397aa3e57de.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +3:I[267167,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/1488f40c80200d6a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2d313397aa3e57de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1488f40c80200d6a.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.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/7e417dd24c8becd0.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/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.budgets.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.experimental.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/experimental/budgets/__next._full.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt index 2fb0b7856dd..f23d7716c87 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._full.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","budgets"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[267167,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/2d313397aa3e57de.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] +f:I[267167,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/1488f40c80200d6a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/2d313397aa3e57de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1488f40c80200d6a.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/179f4b987bc9083f.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.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/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/experimental/budgets/__next._index.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt index 0053a754dc2..b7d4e34ba31 100644 --- a/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/budgets/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"budgets","paramType":null,"paramKey":"budgets","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"budgets","paramType":null,"paramKey":"budgets","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/caching/index.html b/litellm/proxy/_experimental/out/experimental/caching.html similarity index 94% rename from litellm/proxy/_experimental/out/experimental/caching/index.html rename to litellm/proxy/_experimental/out/experimental/caching.html index a48ed0a251d..991aa37df03 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/index.html +++ b/litellm/proxy/_experimental/out/experimental/caching.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/caching.txt b/litellm/proxy/_experimental/out/experimental/caching.txt index eb702c789b5..cef2ee7655f 100644 --- a/litellm/proxy/_experimental/out/experimental/caching.txt +++ b/litellm/proxy/_experimental/out/experimental/caching.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[891881,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/900e393d6a9d7b12.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js"],"default"] +f:I[891881,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/900e393d6a9d7b12.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt index 5a098fd3264..fa3f659d97b 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.__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[891881,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/900e393d6a9d7b12.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js"],"default"] +3:I[891881,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/900e393d6a9d7b12.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/900e393d6a9d7b12.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/900e393d6a9d7b12.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.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/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.caching.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.experimental.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/experimental/caching/__next._full.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt index eb702c789b5..cef2ee7655f 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","caching"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[891881,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/900e393d6a9d7b12.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js"],"default"] +f:I[891881,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/27c7596aa0326b71.js","/litellm-asset-prefix/_next/static/chunks/900e393d6a9d7b12.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/experimental/caching/__next._index.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt index dc06773a762..e3561bf7509 100644 --- a/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/caching/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"caching","paramType":null,"paramKey":"caching","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"caching","paramType":null,"paramKey":"caching","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html similarity index 95% rename from litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html rename to litellm/proxy/_experimental/out/experimental/claude-code-plugins.html index 326689228c2..d85c449d0c0 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.html +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt index 8982c268fce..dd14647677a 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[883109,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/836c30941dbab57e.js","/litellm-asset-prefix/_next/static/chunks/64aa6550ca9c92d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +f:I[883109,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/836c30941dbab57e.js","/litellm-asset-prefix/_next/static/chunks/64aa6550ca9c92d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt index 44bd725578c..7e0bd4003c6 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.__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[883109,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/836c30941dbab57e.js","/litellm-asset-prefix/_next/static/chunks/64aa6550ca9c92d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +3:I[883109,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/836c30941dbab57e.js","/litellm-asset-prefix/_next/static/chunks/64aa6550ca9c92d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/836c30941dbab57e.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/64aa6550ca9c92d3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/836c30941dbab57e.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/64aa6550ca9c92d3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.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/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.claude-code-plugins.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.experimental.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/experimental/claude-code-plugins/__next._full.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt index 8982c268fce..dd14647677a 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","claude-code-plugins"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["claude-code-plugins",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[883109,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/836c30941dbab57e.js","/litellm-asset-prefix/_next/static/chunks/64aa6550ca9c92d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +f:I[883109,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/836c30941dbab57e.js","/litellm-asset-prefix/_next/static/chunks/64aa6550ca9c92d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/experimental/claude-code-plugins/__next._index.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt index 9c91c541fa4..d3f0d0b61aa 100644 --- a/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"claude-code-plugins","paramType":null,"paramKey":"claude-code-plugins","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"claude-code-plugins","paramType":null,"paramKey":"claude-code-plugins","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/index.html b/litellm/proxy/_experimental/out/experimental/old-usage.html similarity index 94% rename from litellm/proxy/_experimental/out/experimental/old-usage/index.html rename to litellm/proxy/_experimental/out/experimental/old-usage.html index 7f4d8dd7d1b..cff93a62547 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/index.html +++ b/litellm/proxy/_experimental/out/experimental/old-usage.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/old-usage.txt b/litellm/proxy/_experimental/out/experimental/old-usage.txt index bdff2d5cbae..c5d60b8e64f 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[999333,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5ab3a0c9cca409f3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js"],"default"] +f:I[999333,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/4a04d70d4b38780d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5ab3a0c9cca409f3.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4a04d70d4b38780d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt index a46231e842e..2b31e1720d1 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.__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[999333,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5ab3a0c9cca409f3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js"],"default"] +3:I[999333,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/4a04d70d4b38780d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5ab3a0c9cca409f3.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4a04d70d4b38780d.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.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/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.old-usage.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.experimental.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/experimental/old-usage/__next._full.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt index bdff2d5cbae..c5d60b8e64f 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._full.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","old-usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[999333,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5ab3a0c9cca409f3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js"],"default"] +f:I[999333,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/4a04d70d4b38780d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5ab3a0c9cca409f3.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/62261c4511c6ef17.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4a04d70d4b38780d.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/67570d9401e62846.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/a0f302271a793712.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/5b9c0b6d6c814e58.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/9dd60322d5d00073.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/experimental/old-usage/__next._index.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt index 78f82ecf049..5d500abc2cf 100644 --- a/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/old-usage/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"old-usage","paramType":null,"paramKey":"old-usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"old-usage","paramType":null,"paramKey":"old-usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/index.html b/litellm/proxy/_experimental/out/experimental/prompts.html similarity index 94% rename from litellm/proxy/_experimental/out/experimental/prompts/index.html rename to litellm/proxy/_experimental/out/experimental/prompts.html index 1066a2e3f6b..68fb444851f 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/index.html +++ b/litellm/proxy/_experimental/out/experimental/prompts.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/prompts.txt b/litellm/proxy/_experimental/out/experimental/prompts.txt index d5ba16e750f..9d592ecfdaa 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[675879,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/63aff161ddf8e0ba.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js"],"default"] +f:I[675879,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/63aff161ddf8e0ba.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt index c027d411755..1bf0db5c3fd 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.__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[675879,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/63aff161ddf8e0ba.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js"],"default"] +3:I[675879,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/63aff161ddf8e0ba.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.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/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.prompts.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.experimental.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/experimental/prompts/__next._full.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt index d5ba16e750f..9d592ecfdaa 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._full.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","prompts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[675879,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/63aff161ddf8e0ba.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js"],"default"] +f:I[675879,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/63aff161ddf8e0ba.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/92cf5d832080641f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/daa333bfd68e6362.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/5023bf9fd490e7e0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/f059e45298abbf27.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/experimental/prompts/__next._index.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt index d6ce99a1496..ad014e7147d 100644 --- a/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/prompts/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"prompts","paramType":null,"paramKey":"prompts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"prompts","paramType":null,"paramKey":"prompts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/index.html b/litellm/proxy/_experimental/out/experimental/tag-management.html similarity index 95% rename from litellm/proxy/_experimental/out/experimental/tag-management/index.html rename to litellm/proxy/_experimental/out/experimental/tag-management.html index bffcb958a74..9755c795b39 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/index.html +++ b/litellm/proxy/_experimental/out/experimental/tag-management.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/experimental/tag-management.txt b/litellm/proxy/_experimental/out/experimental/tag-management.txt index ca12bc8c8df..dea7d55a0bb 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[954210,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/491d92760452057a.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/73607810c5e7ca9a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/c7c5a941c9e13136.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +f:I[954210,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/491d92760452057a.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/73607810c5e7ca9a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/c7c5a941c9e13136.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt index e66c787c766..3297f8830aa 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.__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[954210,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/491d92760452057a.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/73607810c5e7ca9a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/c7c5a941c9e13136.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +3:I[954210,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/491d92760452057a.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/73607810c5e7ca9a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/c7c5a941c9e13136.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/491d92760452057a.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/73607810c5e7ca9a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c7c5a941c9e13136.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/491d92760452057a.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/73607810c5e7ca9a.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c7c5a941c9e13136.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.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/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.tag-management.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.experimental.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/experimental/tag-management/__next._full.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt index ca12bc8c8df..dea7d55a0bb 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","experimental","tag-management"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[954210,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/491d92760452057a.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/73607810c5e7ca9a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/c7c5a941c9e13136.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +f:I[954210,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/491d92760452057a.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/73607810c5e7ca9a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/c7c5a941c9e13136.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/experimental/tag-management/__next._index.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt b/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt index c5bfbddf408..7634e32a0ae 100644 --- a/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt +++ b/litellm/proxy/_experimental/out/experimental/tag-management/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"tag-management","paramType":null,"paramKey":"tag-management","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"experimental","paramType":null,"paramKey":"experimental","hasRuntimePrefetch":false,"slots":{"children":{"name":"tag-management","paramType":null,"paramKey":"tag-management","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/guardrails/index.html b/litellm/proxy/_experimental/out/guardrails.html similarity index 93% rename from litellm/proxy/_experimental/out/guardrails/index.html rename to litellm/proxy/_experimental/out/guardrails.html index 33763e51be1..b052c071e5c 100644 --- a/litellm/proxy/_experimental/out/guardrails/index.html +++ b/litellm/proxy/_experimental/out/guardrails.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/guardrails.txt b/litellm/proxy/_experimental/out/guardrails.txt index d1475dd673d..74af593d436 100644 --- a/litellm/proxy/_experimental/out/guardrails.txt +++ b/litellm/proxy/_experimental/out/guardrails.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[509345,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/82bc4bb51160556f.js"],"default"] +e:I[509345,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a4d4181427de43af.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/82bc4bb51160556f.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a4d4181427de43af.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt index 40eeeafddfb..0f351b7a855 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.__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[509345,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/82bc4bb51160556f.js"],"default"] +3:I[509345,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a4d4181427de43af.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/82bc4bb51160556f.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a4d4181427de43af.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/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.guardrails.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/guardrails/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/guardrails/__next._full.txt b/litellm/proxy/_experimental/out/guardrails/__next._full.txt index d1475dd673d..74af593d436 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._full.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._full.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","guardrails"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["guardrails",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[509345,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/82bc4bb51160556f.js"],"default"] +e:I[509345,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a4d4181427de43af.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/82bc4bb51160556f.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/cd9e9161805efaa3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ef0229fdf6391b0f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/a4d4181427de43af.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/guardrails/__next._head.txt b/litellm/proxy/_experimental/out/guardrails/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._head.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/guardrails/__next._index.txt b/litellm/proxy/_experimental/out/guardrails/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._index.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/guardrails/__next._tree.txt b/litellm/proxy/_experimental/out/guardrails/__next._tree.txt index 5a7c54d654d..f280ea289b8 100644 --- a/litellm/proxy/_experimental/out/guardrails/__next._tree.txt +++ b/litellm/proxy/_experimental/out/guardrails/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"guardrails","paramType":null,"paramKey":"guardrails","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"guardrails","paramType":null,"paramKey":"guardrails","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/index.html b/litellm/proxy/_experimental/out/index.html index 7c4300c7091..ff25e6c05e5 100644 --- a/litellm/proxy/_experimental/out/index.html +++ b/litellm/proxy/_experimental/out/index.html @@ -1 +1 @@ -LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file +LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/index.txt b/litellm/proxy/_experimental/out/index.txt index ab78aa2c6cf..cfc0650a0b1 100644 --- a/litellm/proxy/_experimental/out/index.txt +++ b/litellm/proxy/_experimental/out/index.txt @@ -1,16 +1,16 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[952683,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/e627c7aa5ead52b3.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/99d715502d5069f4.js","/litellm-asset-prefix/_next/static/chunks/53a707a5829899ed.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","/litellm-asset-prefix/_next/static/chunks/9606513e20bc3d4f.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","/litellm-asset-prefix/_next/static/chunks/e1e3f652dbc5be03.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","/litellm-asset-prefix/_next/static/chunks/8c13023d89b01566.js","/litellm-asset-prefix/_next/static/chunks/338e84191fe615bf.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","/litellm-asset-prefix/_next/static/chunks/99109c78121231a0.js","/litellm-asset-prefix/_next/static/chunks/5929da573d876909.js","/litellm-asset-prefix/_next/static/chunks/58461a445becf104.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/6b2bc4046c4cbfc8.js","/litellm-asset-prefix/_next/static/chunks/5400ee883dfa8c43.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1da362a651d209bd.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/0b8ec8bf90ea9721.js"],"default"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/e627c7aa5ead52b3.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/995220c77ab93732.js","/litellm-asset-prefix/_next/static/chunks/7834a5efb7b5f959.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","/litellm-asset-prefix/_next/static/chunks/f97945b5e61da683.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","/litellm-asset-prefix/_next/static/chunks/4fc5bd834120bcc4.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","/litellm-asset-prefix/_next/static/chunks/4fc2d71e511309ab.js","/litellm-asset-prefix/_next/static/chunks/6e0ab2908f7cc2a6.js","/litellm-asset-prefix/_next/static/chunks/f19a24d7e7fafd09.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/adfb239c02cec598.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/6b2bc4046c4cbfc8.js","/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/169b34fe8aeee0c7.js","/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","/litellm-asset-prefix/_next/static/chunks/db0ac43a898048e2.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/b69db537c2cf883e.js"],"default"] 2f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.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":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","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/e627c7aa5ead52b3.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.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/99d715502d5069f4.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/53a707a5829899ed.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/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/9606513e20bc3d4f.js","async":true,"nonce":"$undefined"}],"$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"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","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/e627c7aa5ead52b3.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.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/995220c77ab93732.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7834a5efb7b5f959.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/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ed90bf177ad61e18.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b4bd164f5553a31d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/b6cdb9a433f054f3.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/af8668386d7005fe.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/f97945b5e61da683.js","async":true,"nonce":"$undefined"}],"$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"]}],{},null,false,false]},null,false,false],"$L2e",false]],"m":"$undefined","G":["$2f",[]],"S":true} 30:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 31:"$Sreact.suspense" 33:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -18,38 +18,38 @@ a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}] b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/d512ca3b7169bef6.js","async":true,"nonce":"$undefined"}] -d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/e1e3f652dbc5be03.js","async":true,"nonce":"$undefined"}] +d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/4fc5bd834120bcc4.js","async":true,"nonce":"$undefined"}] e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}] 10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] 11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/f3e0cbc0e84e0a5d.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/8c13023d89b01566.js","async":true,"nonce":"$undefined"}] -13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/338e84191fe615bf.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/60d899dd52430ef8.js","async":true,"nonce":"$undefined"}] +13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] 14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/c53c9c7afec96700.js","async":true,"nonce":"$undefined"}] -15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true,"nonce":"$undefined"}] -17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/99109c78121231a0.js","async":true,"nonce":"$undefined"}] -18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/5929da573d876909.js","async":true,"nonce":"$undefined"}] -19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/58461a445becf104.js","async":true,"nonce":"$undefined"}] +15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","async":true,"nonce":"$undefined"}] +17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/4fc2d71e511309ab.js","async":true,"nonce":"$undefined"}] +18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/6e0ab2908f7cc2a6.js","async":true,"nonce":"$undefined"}] +19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/f19a24d7e7fafd09.js","async":true,"nonce":"$undefined"}] 1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] 1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] 1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","async":true,"nonce":"$undefined"}] -1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}] +1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/adfb239c02cec598.js","async":true,"nonce":"$undefined"}] 1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] 1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/6b2bc4046c4cbfc8.js","async":true,"nonce":"$undefined"}] -20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/5400ee883dfa8c43.js","async":true,"nonce":"$undefined"}] +20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/ed901fab61dc16dc.js","async":true,"nonce":"$undefined"}] 21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true,"nonce":"$undefined"}] 22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}] -23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] +23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/169b34fe8aeee0c7.js","async":true,"nonce":"$undefined"}] 24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/7a2dc852f68481ea.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}] 26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","async":true,"nonce":"$undefined"}] 27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/7c797521435cb59c.js","async":true,"nonce":"$undefined"}] -28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/5855ff7033bd4d2e.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] -2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/1da362a651d209bd.js","async":true,"nonce":"$undefined"}] -2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] -2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/0b8ec8bf90ea9721.js","async":true,"nonce":"$undefined"}] +28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/db0ac43a898048e2.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] +2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true,"nonce":"$undefined"}] +2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] +2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/b69db537c2cf883e.js","async":true,"nonce":"$undefined"}] 2d:["$","$L30",null,{"children":["$","$31",null,{"name":"Next.MetadataOutlet","children":"$@32"}]}] 2e:["$","$1","h",{"children":[null,["$","$L33",null,{"children":"$L34"}],["$","div",null,{"hidden":true,"children":["$","$L35",null,{"children":["$","$31",null,{"name":"Next.Metadata","children":"$L36"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:{} diff --git a/litellm/proxy/_experimental/out/login/index.html b/litellm/proxy/_experimental/out/login.html similarity index 91% rename from litellm/proxy/_experimental/out/login/index.html rename to litellm/proxy/_experimental/out/login.html index dc74ad05cbe..2b75084b4ac 100644 --- a/litellm/proxy/_experimental/out/login/index.html +++ b/litellm/proxy/_experimental/out/login.html @@ -1 +1 @@ -LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file +LiteLLM Dashboard
🚅 LiteLLM
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/login.txt b/litellm/proxy/_experimental/out/login.txt index 6bebc160d07..775260d8b7d 100644 --- a/litellm/proxy/_experimental/out/login.txt +++ b/litellm/proxy/_experimental/out/login.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[594542,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/4cc2a4292409c9b3.js"],"default"] +7:I[594542,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/c593ac1f978fcc64.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/4cc2a4292409c9b3.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/c593ac1f978fcc64.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/login/__next._full.txt b/litellm/proxy/_experimental/out/login/__next._full.txt index 6bebc160d07..775260d8b7d 100644 --- a/litellm/proxy/_experimental/out/login/__next._full.txt +++ b/litellm/proxy/_experimental/out/login/__next._full.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[594542,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/4cc2a4292409c9b3.js"],"default"] +7:I[594542,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/c593ac1f978fcc64.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/4cc2a4292409c9b3.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","login"],"q":"","i":false,"f":[[["",{"children":["login",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/c593ac1f978fcc64.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/login/__next._head.txt b/litellm/proxy/_experimental/out/login/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/login/__next._head.txt +++ b/litellm/proxy/_experimental/out/login/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/login/__next._index.txt b/litellm/proxy/_experimental/out/login/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/login/__next._index.txt +++ b/litellm/proxy/_experimental/out/login/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/login/__next._tree.txt b/litellm/proxy/_experimental/out/login/__next._tree.txt index 8df6519992c..1894efc4871 100644 --- a/litellm/proxy/_experimental/out/login/__next._tree.txt +++ b/litellm/proxy/_experimental/out/login/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"login","paramType":null,"paramKey":"login","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"login","paramType":null,"paramKey":"login","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/login/__next.login.__PAGE__.txt b/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt index 664ce0a62a5..20ec1a1f3cc 100644 --- a/litellm/proxy/_experimental/out/login/__next.login.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/login/__next.login.__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[594542,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/4cc2a4292409c9b3.js"],"default"] +3:I[594542,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/c593ac1f978fcc64.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/4cc2a4292409c9b3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/caf98722823e1b40.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/c593ac1f978fcc64.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/login/__next.login.txt b/litellm/proxy/_experimental/out/login/__next.login.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/login/__next.login.txt +++ b/litellm/proxy/_experimental/out/login/__next.login.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/index.html b/litellm/proxy/_experimental/out/logs.html similarity index 80% rename from litellm/proxy/_experimental/out/logs/index.html rename to litellm/proxy/_experimental/out/logs.html index a454e6c75b3..41b0493f38c 100644 --- a/litellm/proxy/_experimental/out/logs/index.html +++ b/litellm/proxy/_experimental/out/logs.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/logs.txt b/litellm/proxy/_experimental/out/logs.txt index 32b7baa3e69..4dbdc8c8bcd 100644 --- a/litellm/proxy/_experimental/out/logs.txt +++ b/litellm/proxy/_experimental/out/logs.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.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":"Hp-LQxDEAEt-JSJFExm-i","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[799062,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/23e34a8c920ebd31.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/262c0742212bf6d1.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","/litellm-asset-prefix/_next/static/chunks/ea80fa81416a4ac8.js","/litellm-asset-prefix/_next/static/chunks/42c127841d8c1bd3.js"],"default"] +e:I[799062,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3030a60a51383269.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/821dff643d2d89b9.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/be6ec8af98853ec3.js","/litellm-asset-prefix/_next/static/chunks/b7c135d847609948.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","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/23e34a8c920ebd31.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/262c0742212bf6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/ea80fa81416a4ac8.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/42c127841d8c1bd3.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","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/3030a60a51383269.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/821dff643d2d89b9.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/be6ec8af98853ec3.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/b7c135d847609948.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt index 00eb542d1c3..735131e1433 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt @@ -1,10 +1,10 @@ 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[799062,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/23e34a8c920ebd31.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/262c0742212bf6d1.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","/litellm-asset-prefix/_next/static/chunks/ea80fa81416a4ac8.js","/litellm-asset-prefix/_next/static/chunks/42c127841d8c1bd3.js"],"default"] +3:I[799062,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3030a60a51383269.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/821dff643d2d89b9.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/be6ec8af98853ec3.js","/litellm-asset-prefix/_next/static/chunks/b7c135d847609948.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" :HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/23e34a8c920ebd31.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/262c0742212bf6d1.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/ea80fa81416a4ac8.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/42c127841d8c1bd3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/3030a60a51383269.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/821dff643d2d89b9.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/be6ec8af98853ec3.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/b7c135d847609948.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/logs/__next.!KGRhc2hib2FyZCk.logs.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.txt +++ b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.logs.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/logs/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/logs/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/logs/__next._full.txt b/litellm/proxy/_experimental/out/logs/__next._full.txt index 32b7baa3e69..4dbdc8c8bcd 100644 --- a/litellm/proxy/_experimental/out/logs/__next._full.txt +++ b/litellm/proxy/_experimental/out/logs/__next._full.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.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":"Hp-LQxDEAEt-JSJFExm-i","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","logs"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["logs",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[799062,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/23e34a8c920ebd31.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/262c0742212bf6d1.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","/litellm-asset-prefix/_next/static/chunks/ea80fa81416a4ac8.js","/litellm-asset-prefix/_next/static/chunks/42c127841d8c1bd3.js"],"default"] +e:I[799062,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3030a60a51383269.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/821dff643d2d89b9.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","/litellm-asset-prefix/_next/static/chunks/be6ec8af98853ec3.js","/litellm-asset-prefix/_next/static/chunks/b7c135d847609948.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","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/23e34a8c920ebd31.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/262c0742212bf6d1.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/2e7ede393477220f.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/ea80fa81416a4ac8.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/42c127841d8c1bd3.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","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/3030a60a51383269.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/89274859d3d9d1de.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/46b252adc34d9549.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/77bf62fbc704d017.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/821dff643d2d89b9.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/b29935c7828860b4.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/82426ffeda186236.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5583bc893837fdf8.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/be6ec8af98853ec3.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/b7c135d847609948.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/logs/__next._head.txt b/litellm/proxy/_experimental/out/logs/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/logs/__next._head.txt +++ b/litellm/proxy/_experimental/out/logs/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/logs/__next._index.txt b/litellm/proxy/_experimental/out/logs/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/logs/__next._index.txt +++ b/litellm/proxy/_experimental/out/logs/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/logs/__next._tree.txt b/litellm/proxy/_experimental/out/logs/__next._tree.txt index 6f2aee7b3c5..5378a862898 100644 --- a/litellm/proxy/_experimental/out/logs/__next._tree.txt +++ b/litellm/proxy/_experimental/out/logs/__next._tree.txt @@ -2,4 +2,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.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:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"logs","paramType":null,"paramKey":"logs","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"logs","paramType":null,"paramKey":"logs","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/mcp/oauth/callback/index.html b/litellm/proxy/_experimental/out/mcp/oauth/callback.html similarity index 94% rename from litellm/proxy/_experimental/out/mcp/oauth/callback/index.html rename to litellm/proxy/_experimental/out/mcp/oauth/callback.html index 99c63a432cb..1584c8fea52 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/index.html +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback.txt index 1019e564205..6e111cce6c6 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[346328,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js"],"default"] +7:I[346328,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt index 1019e564205..6e111cce6c6 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._full.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[346328,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js"],"default"] +7:I[346328,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","mcp","oauth","callback"],"q":"","i":false,"f":[[["",{"children":["mcp",{"children":["oauth",{"children":["callback",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/mcp/oauth/callback/__next._index.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt index 2f459ef9472..4d58c922a98 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp","paramType":null,"paramKey":"mcp","hasRuntimePrefetch":false,"slots":{"children":{"name":"oauth","paramType":null,"paramKey":"oauth","hasRuntimePrefetch":false,"slots":{"children":{"name":"callback","paramType":null,"paramKey":"callback","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp","paramType":null,"paramKey":"mcp","hasRuntimePrefetch":false,"slots":{"children":{"name":"oauth","paramType":null,"paramKey":"oauth","hasRuntimePrefetch":false,"slots":{"children":{"name":"callback","paramType":null,"paramKey":"callback","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt index ef4b0751a09..8aaede5c970 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.__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[346328,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js"],"default"] +3:I[346328,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/ec7bc708a7afa043.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.callback.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.oauth.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.txt +++ b/litellm/proxy/_experimental/out/mcp/oauth/callback/__next.mcp.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/index.html b/litellm/proxy/_experimental/out/model-hub.html similarity index 93% rename from litellm/proxy/_experimental/out/model-hub/index.html rename to litellm/proxy/_experimental/out/model-hub.html index 3e44000ce7e..b7301fbbdff 100644 --- a/litellm/proxy/_experimental/out/model-hub/index.html +++ b/litellm/proxy/_experimental/out/model-hub.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model-hub.txt b/litellm/proxy/_experimental/out/model-hub.txt index 58e8dfa9f7e..d63f78fc573 100644 --- a/litellm/proxy/_experimental/out/model-hub.txt +++ b/litellm/proxy/_experimental/out/model-hub.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[195529,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/9d3522e82d255059.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +e:I[195529,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8a00371921c281d5.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9d3522e82d255059.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/8a00371921c281d5.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt index dd05b826a65..1f31bc32787 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.__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[195529,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/9d3522e82d255059.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +3:I[195529,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8a00371921c281d5.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.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"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9d3522e82d255059.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","async":true}],["$","script","script-9",{"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":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/8a00371921c281d5.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","async":true}],["$","script","script-9",{"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} 4:{} 5:{} 8:null diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.model-hub.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/model-hub/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/model-hub/__next._full.txt b/litellm/proxy/_experimental/out/model-hub/__next._full.txt index 58e8dfa9f7e..d63f78fc573 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._full.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._full.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","model-hub"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["model-hub",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[195529,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/9d3522e82d255059.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] +e:I[195529,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/8a00371921c281d5.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9d3522e82d255059.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/8a00371921c281d5.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f999578e522a7f9e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/model-hub/__next._head.txt b/litellm/proxy/_experimental/out/model-hub/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._head.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/model-hub/__next._index.txt b/litellm/proxy/_experimental/out/model-hub/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._index.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model-hub/__next._tree.txt b/litellm/proxy/_experimental/out/model-hub/__next._tree.txt index 07851600996..883108cee89 100644 --- a/litellm/proxy/_experimental/out/model-hub/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model-hub/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"model-hub","paramType":null,"paramKey":"model-hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"model-hub","paramType":null,"paramKey":"model-hub","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/model_hub/index.html b/litellm/proxy/_experimental/out/model_hub.html similarity index 91% rename from litellm/proxy/_experimental/out/model_hub/index.html rename to litellm/proxy/_experimental/out/model_hub.html index b927ae1538b..e0c570e4ff5 100644 --- a/litellm/proxy/_experimental/out/model_hub/index.html +++ b/litellm/proxy/_experimental/out/model_hub.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model_hub.txt b/litellm/proxy/_experimental/out/model_hub.txt index 1e696f4be4b..e31d289b3bd 100644 --- a/litellm/proxy/_experimental/out/model_hub.txt +++ b/litellm/proxy/_experimental/out/model_hub.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[560280,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dad8b43751822f79.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js"],"default"] +7:I[560280,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/b1d6b16bfc1eabf5.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dad8b43751822f79.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b1d6b16bfc1eabf5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/model_hub/__next._full.txt b/litellm/proxy/_experimental/out/model_hub/__next._full.txt index 1e696f4be4b..e31d289b3bd 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._full.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._full.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[560280,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dad8b43751822f79.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js"],"default"] +7:I[560280,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/b1d6b16bfc1eabf5.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dad8b43751822f79.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","model_hub"],"q":"","i":false,"f":[[["",{"children":["model_hub",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b1d6b16bfc1eabf5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/model_hub/__next._head.txt b/litellm/proxy/_experimental/out/model_hub/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._head.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/model_hub/__next._index.txt b/litellm/proxy/_experimental/out/model_hub/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._index.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub/__next._tree.txt b/litellm/proxy/_experimental/out/model_hub/__next._tree.txt index 2639c585a50..9a1f0eb57cf 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub","paramType":null,"paramKey":"model_hub","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub","paramType":null,"paramKey":"model_hub","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/model_hub/__next.model_hub.__PAGE__.txt b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt index eddf23e7af2..bd9cb5ae5f4 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.__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[560280,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dad8b43751822f79.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js"],"default"] +3:I[560280,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/b1d6b16bfc1eabf5.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dad8b43751822f79.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/b1d6b16bfc1eabf5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/c2bda16ec35d1a65.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/model_hub/__next.model_hub.txt +++ b/litellm/proxy/_experimental/out/model_hub/__next.model_hub.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub_table/index.html b/litellm/proxy/_experimental/out/model_hub_table.html similarity index 90% rename from litellm/proxy/_experimental/out/model_hub_table/index.html rename to litellm/proxy/_experimental/out/model_hub_table.html index 146b79930f4..97178a6e95b 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/index.html +++ b/litellm/proxy/_experimental/out/model_hub_table.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/model_hub_table.txt b/litellm/proxy/_experimental/out/model_hub_table.txt index 04a68ace314..c83e56cccfa 100644 --- a/litellm/proxy/_experimental/out/model_hub_table.txt +++ b/litellm/proxy/_experimental/out/model_hub_table.txt @@ -1,20 +1,20 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[86408,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/2793ac912badcf02.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/cc1429f96b037302.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +7:I[86408,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/03a89a64d082af20.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/5cce5cd9386751d1.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2793ac912badcf02.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/cc1429f96b037302.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/03a89a64d082af20.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5cce5cd9386751d1.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true,"nonce":"$undefined"}] +a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true,"nonce":"$undefined"}] b:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}] c:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] d:["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}] diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt index 04a68ace314..c83e56cccfa 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._full.txt @@ -1,20 +1,20 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[86408,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/2793ac912badcf02.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/cc1429f96b037302.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +7:I[86408,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/03a89a64d082af20.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/5cce5cd9386751d1.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] f:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2793ac912badcf02.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/cc1429f96b037302.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","model_hub_table"],"q":"","i":false,"f":[[["",{"children":["model_hub_table",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/03a89a64d082af20.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5cce5cd9386751d1.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],"$La","$Lb","$Lc"],"$Ld"]}],{},null,false,false]},null,false,false]},null,false,false],"$Le",false]],"m":"$undefined","G":["$f",[]],"S":true} 10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true,"nonce":"$undefined"}] +a:["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true,"nonce":"$undefined"}] b:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}] c:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] d:["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}] diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/model_hub_table/__next._index.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt b/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt index 046d5e59db1..4dadaac0017 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub_table","paramType":null,"paramKey":"model_hub_table","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"model_hub_table","paramType":null,"paramKey":"model_hub_table","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/model_hub_table/__next.model_hub_table.__PAGE__.txt b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt index 7d171ac8b8e..45c7c19345c 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.__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[86408,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/2793ac912badcf02.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/cc1429f96b037302.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +3:I[86408,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/03a89a64d082af20.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/5cce5cd9386751d1.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2793ac912badcf02.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/cc1429f96b037302.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/9b281b0ff32cbdac.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/43404a268a45c17a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/03a89a64d082af20.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/ee3a30e704bf7c47.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ee80c765f82c1de2.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1d6119b4214ab712.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/5cce5cd9386751d1.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/6e42aecc62a828a4.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.txt +++ b/litellm/proxy/_experimental/out/model_hub_table/__next.model_hub_table.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/index.html b/litellm/proxy/_experimental/out/models-and-endpoints.html similarity index 90% rename from litellm/proxy/_experimental/out/models-and-endpoints/index.html rename to litellm/proxy/_experimental/out/models-and-endpoints.html index 2d14bba85bc..b12b687ceaf 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/index.html +++ b/litellm/proxy/_experimental/out/models-and-endpoints.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/models-and-endpoints.txt b/litellm/proxy/_experimental/out/models-and-endpoints.txt index e0b625bb6c7..69e879cd883 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[664307,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/203dde2108f3f1ac.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/8a76c69fc7bff9fe.js"],"default"] +e:I[664307,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/1af83529c1ca7a96.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/8bbdbfcebe75b16a.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/203dde2108f3f1ac.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/8a76c69fc7bff9fe.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1af83529c1ca7a96.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/8bbdbfcebe75b16a.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt index d28e4daf09d..2f8f8666755 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.__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[664307,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/203dde2108f3f1ac.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/8a76c69fc7bff9fe.js"],"default"] +3:I[664307,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/1af83529c1ca7a96.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/8bbdbfcebe75b16a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/203dde2108f3f1ac.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/8a76c69fc7bff9fe.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1af83529c1ca7a96.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/8bbdbfcebe75b16a.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/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.models-and-endpoints.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/models-and-endpoints/__next._full.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt index e0b625bb6c7..69e879cd883 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._full.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","models-and-endpoints"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[664307,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/203dde2108f3f1ac.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/8a76c69fc7bff9fe.js"],"default"] +e:I[664307,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/1af83529c1ca7a96.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/8bbdbfcebe75b16a.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/203dde2108f3f1ac.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/5f4170980a69ffa3.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/8a76c69fc7bff9fe.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/6285575743097e8a.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/2d44417ec0ed6970.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/354ca537c6c0601c.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1af83529c1ca7a96.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/3c27749aaf30135a.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/aca9c2b0aa46b0d7.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/8bbdbfcebe75b16a.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/models-and-endpoints/__next._index.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt b/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt index c25917391a3..23bba3a874b 100644 --- a/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt +++ b/litellm/proxy/_experimental/out/models-and-endpoints/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"models-and-endpoints","paramType":null,"paramKey":"models-and-endpoints","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"models-and-endpoints","paramType":null,"paramKey":"models-and-endpoints","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/onboarding/index.html b/litellm/proxy/_experimental/out/onboarding.html similarity index 92% rename from litellm/proxy/_experimental/out/onboarding/index.html rename to litellm/proxy/_experimental/out/onboarding.html index 24df7062135..881d92b09c9 100644 --- a/litellm/proxy/_experimental/out/onboarding/index.html +++ b/litellm/proxy/_experimental/out/onboarding.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/onboarding.txt b/litellm/proxy/_experimental/out/onboarding.txt index d5957f178bf..838a08d9442 100644 --- a/litellm/proxy/_experimental/out/onboarding.txt +++ b/litellm/proxy/_experimental/out/onboarding.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[566606,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[566606,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/onboarding/__next._full.txt b/litellm/proxy/_experimental/out/onboarding/__next._full.txt index d5957f178bf..838a08d9442 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._full.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._full.txt @@ -1,10 +1,10 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -7:I[566606,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[566606,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] b:"$Sreact.suspense" d:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] @@ -13,7 +13,7 @@ f:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/li :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","onboarding"],"q":"","i":false,"f":[[["",{"children":["onboarding",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$11",[]],"S":true} 8:{} 9:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params" e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] diff --git a/litellm/proxy/_experimental/out/onboarding/__next._head.txt b/litellm/proxy/_experimental/out/onboarding/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._head.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/onboarding/__next._index.txt b/litellm/proxy/_experimental/out/onboarding/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._index.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/onboarding/__next._tree.txt b/litellm/proxy/_experimental/out/onboarding/__next._tree.txt index 35350df3a64..71013ea6026 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next._tree.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"onboarding","paramType":null,"paramKey":"onboarding","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"onboarding","paramType":null,"paramKey":"onboarding","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/onboarding/__next.onboarding.__PAGE__.txt b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt index 45b57c3aa39..e7acbcb3ae5 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.__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[566606,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[566606,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/dc23b2a2258ffad1.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/66d9e3ba8b8aeb00.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/570b2e10aa856e54.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/onboarding/__next.onboarding.txt +++ b/litellm/proxy/_experimental/out/onboarding/__next.onboarding.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/index.html b/litellm/proxy/_experimental/out/organizations.html similarity index 95% rename from litellm/proxy/_experimental/out/organizations/index.html rename to litellm/proxy/_experimental/out/organizations.html index c28488435f3..78823406376 100644 --- a/litellm/proxy/_experimental/out/organizations/index.html +++ b/litellm/proxy/_experimental/out/organizations.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/organizations.txt b/litellm/proxy/_experimental/out/organizations.txt index ca0a9241cef..67d4c828d57 100644 --- a/litellm/proxy/_experimental/out/organizations.txt +++ b/litellm/proxy/_experimental/out/organizations.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[526612,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/3dad14bcec641ba8.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/e1da6931dfaabba1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0a80887cd471a6cc.js","/litellm-asset-prefix/_next/static/chunks/d104f25e5302e120.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/e884277804d6854d.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/92e50c28acb1e29e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +e:I[526612,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3dad14bcec641ba8.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/e1da6931dfaabba1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0a80887cd471a6cc.js","/litellm-asset-prefix/_next/static/chunks/d104f25e5302e120.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/e884277804d6854d.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/92e50c28acb1e29e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt index 825d9d622ca..bd551542bba 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.__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[526612,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/3dad14bcec641ba8.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/e1da6931dfaabba1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0a80887cd471a6cc.js","/litellm-asset-prefix/_next/static/chunks/d104f25e5302e120.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/e884277804d6854d.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/92e50c28acb1e29e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +3:I[526612,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3dad14bcec641ba8.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/e1da6931dfaabba1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0a80887cd471a6cc.js","/litellm-asset-prefix/_next/static/chunks/d104f25e5302e120.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/e884277804d6854d.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/92e50c28acb1e29e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3dad14bcec641ba8.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e1da6931dfaabba1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0a80887cd471a6cc.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/d104f25e5302e120.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e884277804d6854d.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/92e50c28acb1e29e.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3dad14bcec641ba8.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/e1da6931dfaabba1.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0a80887cd471a6cc.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/d104f25e5302e120.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e884277804d6854d.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/92e50c28acb1e29e.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.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/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.txt +++ b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.organizations.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/organizations/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/organizations/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/organizations/__next._full.txt b/litellm/proxy/_experimental/out/organizations/__next._full.txt index ca0a9241cef..67d4c828d57 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._full.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","organizations"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["organizations",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[526612,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/3dad14bcec641ba8.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/e1da6931dfaabba1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0a80887cd471a6cc.js","/litellm-asset-prefix/_next/static/chunks/d104f25e5302e120.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/e884277804d6854d.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/92e50c28acb1e29e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +e:I[526612,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3dad14bcec641ba8.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/e1da6931dfaabba1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0a80887cd471a6cc.js","/litellm-asset-prefix/_next/static/chunks/d104f25e5302e120.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/e884277804d6854d.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/92e50c28acb1e29e.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/organizations/__next._head.txt b/litellm/proxy/_experimental/out/organizations/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._head.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/organizations/__next._index.txt b/litellm/proxy/_experimental/out/organizations/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._index.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/organizations/__next._tree.txt b/litellm/proxy/_experimental/out/organizations/__next._tree.txt index 7700d29ca59..9aaec37dc7e 100644 --- a/litellm/proxy/_experimental/out/organizations/__next._tree.txt +++ b/litellm/proxy/_experimental/out/organizations/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"organizations","paramType":null,"paramKey":"organizations","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"organizations","paramType":null,"paramKey":"organizations","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/playground/index.html b/litellm/proxy/_experimental/out/playground.html similarity index 93% rename from litellm/proxy/_experimental/out/playground/index.html rename to litellm/proxy/_experimental/out/playground.html index 864c7421bc8..719a5ccf805 100644 --- a/litellm/proxy/_experimental/out/playground/index.html +++ b/litellm/proxy/_experimental/out/playground.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/playground.txt b/litellm/proxy/_experimental/out/playground.txt index 1c31fe8a4eb..8c2f727d94f 100644 --- a/litellm/proxy/_experimental/out/playground.txt +++ b/litellm/proxy/_experimental/out/playground.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[213970,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/29f944b40b65da0a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js"],"default"] +e:I[213970,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/7afbccf8e83ba7e3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/29f944b40b65da0a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7afbccf8e83ba7e3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt index 37ec18abb7b..c2bb3290e96 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.__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[213970,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/29f944b40b65da0a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js"],"default"] +3:I[213970,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/7afbccf8e83ba7e3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/29f944b40b65da0a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7afbccf8e83ba7e3.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.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/playground/__next.!KGRhc2hib2FyZCk.playground.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.txt +++ b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.playground.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/playground/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/playground/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/playground/__next._full.txt b/litellm/proxy/_experimental/out/playground/__next._full.txt index 1c31fe8a4eb..8c2f727d94f 100644 --- a/litellm/proxy/_experimental/out/playground/__next._full.txt +++ b/litellm/proxy/_experimental/out/playground/__next._full.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","playground"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["playground",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[213970,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/29f944b40b65da0a.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js"],"default"] +e:I[213970,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/7afbccf8e83ba7e3.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/29f944b40b65da0a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/53a3a23605a87ee1.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/7afbccf8e83ba7e3.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/b1cfb52125c1395e.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/26542a70b9512f71.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/eb659e9b99d203f2.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/c74f3813068add76.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/playground/__next._head.txt b/litellm/proxy/_experimental/out/playground/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/playground/__next._head.txt +++ b/litellm/proxy/_experimental/out/playground/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/playground/__next._index.txt b/litellm/proxy/_experimental/out/playground/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/playground/__next._index.txt +++ b/litellm/proxy/_experimental/out/playground/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/playground/__next._tree.txt b/litellm/proxy/_experimental/out/playground/__next._tree.txt index 070dc3f821d..94f516b54c4 100644 --- a/litellm/proxy/_experimental/out/playground/__next._tree.txt +++ b/litellm/proxy/_experimental/out/playground/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"playground","paramType":null,"paramKey":"playground","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"playground","paramType":null,"paramKey":"playground","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/policies/index.html b/litellm/proxy/_experimental/out/policies.html similarity index 95% rename from litellm/proxy/_experimental/out/policies/index.html rename to litellm/proxy/_experimental/out/policies.html index 896b2c820b5..f5a97bc2122 100644 --- a/litellm/proxy/_experimental/out/policies/index.html +++ b/litellm/proxy/_experimental/out/policies.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/policies.txt b/litellm/proxy/_experimental/out/policies.txt index 28d35469d91..c7646e2e4ed 100644 --- a/litellm/proxy/_experimental/out/policies.txt +++ b/litellm/proxy/_experimental/out/policies.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[102616,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/0be054dbc84bd8be.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/92c3c06057498511.js","/litellm-asset-prefix/_next/static/chunks/ad46beac3df3dba5.js"],"default"] +e:I[102616,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/0be054dbc84bd8be.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/92c3c06057498511.js","/litellm-asset-prefix/_next/static/chunks/ad46beac3df3dba5.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt index c3b0585b8a2..db30a5fa18f 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.__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[102616,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/0be054dbc84bd8be.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/92c3c06057498511.js","/litellm-asset-prefix/_next/static/chunks/ad46beac3df3dba5.js"],"default"] +3:I[102616,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/0be054dbc84bd8be.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/92c3c06057498511.js","/litellm-asset-prefix/_next/static/chunks/ad46beac3df3dba5.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0be054dbc84bd8be.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/92c3c06057498511.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ad46beac3df3dba5.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0be054dbc84bd8be.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/92c3c06057498511.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ad46beac3df3dba5.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/policies/__next.!KGRhc2hib2FyZCk.policies.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.txt +++ b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.policies.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/policies/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/policies/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/policies/__next._full.txt b/litellm/proxy/_experimental/out/policies/__next._full.txt index 28d35469d91..c7646e2e4ed 100644 --- a/litellm/proxy/_experimental/out/policies/__next._full.txt +++ b/litellm/proxy/_experimental/out/policies/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","policies"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["policies",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[102616,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/0be054dbc84bd8be.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/92c3c06057498511.js","/litellm-asset-prefix/_next/static/chunks/ad46beac3df3dba5.js"],"default"] +e:I[102616,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/0be054dbc84bd8be.js","/litellm-asset-prefix/_next/static/chunks/cb8d72a0c642f1d3.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/92c3c06057498511.js","/litellm-asset-prefix/_next/static/chunks/ad46beac3df3dba5.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/policies/__next._head.txt b/litellm/proxy/_experimental/out/policies/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/policies/__next._head.txt +++ b/litellm/proxy/_experimental/out/policies/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/policies/__next._index.txt b/litellm/proxy/_experimental/out/policies/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/policies/__next._index.txt +++ b/litellm/proxy/_experimental/out/policies/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/policies/__next._tree.txt b/litellm/proxy/_experimental/out/policies/__next._tree.txt index 82040a62d0c..d97605f1476 100644 --- a/litellm/proxy/_experimental/out/policies/__next._tree.txt +++ b/litellm/proxy/_experimental/out/policies/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"policies","paramType":null,"paramKey":"policies","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"policies","paramType":null,"paramKey":"policies","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/settings/admin-settings/index.html b/litellm/proxy/_experimental/out/settings/admin-settings.html similarity index 92% rename from litellm/proxy/_experimental/out/settings/admin-settings/index.html rename to litellm/proxy/_experimental/out/settings/admin-settings.html index 6e7124fffa3..80a25b2d641 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/index.html +++ b/litellm/proxy/_experimental/out/settings/admin-settings.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/admin-settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings.txt index cc0b8f2eca6..203432b8c92 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[514236,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a09d5d7fd3464016.js","/litellm-asset-prefix/_next/static/chunks/d1ddfd3f3d5b2449.js","/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js"],"default"] +f:I[514236,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/7482f483a53ef533.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a09d5d7fd3464016.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d1ddfd3f3d5b2449.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7482f483a53ef533.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt index fdcf5e66f9f..1b7534767e1 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.__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[514236,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a09d5d7fd3464016.js","/litellm-asset-prefix/_next/static/chunks/d1ddfd3f3d5b2449.js","/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js"],"default"] +3:I[514236,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/7482f483a53ef533.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a09d5d7fd3464016.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d1ddfd3f3d5b2449.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7482f483a53ef533.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.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/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.admin-settings.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.settings.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/settings/admin-settings/__next._full.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt index cc0b8f2eca6..203432b8c92 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._full.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","settings","admin-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[514236,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a09d5d7fd3464016.js","/litellm-asset-prefix/_next/static/chunks/d1ddfd3f3d5b2449.js","/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js"],"default"] +f:I[514236,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/7482f483a53ef533.js","/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a09d5d7fd3464016.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/d1ddfd3f3d5b2449.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7482f483a53ef533.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/efc1a6ef38353eda.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a4885ec394488f67.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/cf6d63c0175d44db.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/877101abed503ab2.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/settings/admin-settings/__next._index.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt b/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt index 78455205dad..b0593ff0e4d 100644 --- a/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/admin-settings/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"admin-settings","paramType":null,"paramKey":"admin-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"admin-settings","paramType":null,"paramKey":"admin-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html b/litellm/proxy/_experimental/out/settings/logging-and-alerts.html similarity index 94% rename from litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html rename to litellm/proxy/_experimental/out/settings/logging-and-alerts.html index 7c0da44784a..a581fed5c22 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/index.html +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt index f1dfb65d156..5987d2c276e 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[764367,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/e16f3c0c54307cc7.js","/litellm-asset-prefix/_next/static/chunks/4e0ee3124dcdc85b.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/70448f37d17f36ae.js","/litellm-asset-prefix/_next/static/chunks/ba0b0ec2cfedbf03.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] +f:I[764367,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/e16f3c0c54307cc7.js","/litellm-asset-prefix/_next/static/chunks/4e0ee3124dcdc85b.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/70448f37d17f36ae.js","/litellm-asset-prefix/_next/static/chunks/ba0b0ec2cfedbf03.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt index 8e6fb5aa448..be6bb83fbe6 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.__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[764367,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/e16f3c0c54307cc7.js","/litellm-asset-prefix/_next/static/chunks/4e0ee3124dcdc85b.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/70448f37d17f36ae.js","/litellm-asset-prefix/_next/static/chunks/ba0b0ec2cfedbf03.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] +3:I[764367,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/e16f3c0c54307cc7.js","/litellm-asset-prefix/_next/static/chunks/4e0ee3124dcdc85b.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/70448f37d17f36ae.js","/litellm-asset-prefix/_next/static/chunks/ba0b0ec2cfedbf03.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/e16f3c0c54307cc7.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/4e0ee3124dcdc85b.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/70448f37d17f36ae.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ba0b0ec2cfedbf03.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/e16f3c0c54307cc7.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/4e0ee3124dcdc85b.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/70448f37d17f36ae.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/ba0b0ec2cfedbf03.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.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/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.logging-and-alerts.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.settings.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/settings/logging-and-alerts/__next._full.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt index f1dfb65d156..5987d2c276e 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","settings","logging-and-alerts"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[764367,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/e16f3c0c54307cc7.js","/litellm-asset-prefix/_next/static/chunks/4e0ee3124dcdc85b.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/70448f37d17f36ae.js","/litellm-asset-prefix/_next/static/chunks/ba0b0ec2cfedbf03.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] +f:I[764367,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/e16f3c0c54307cc7.js","/litellm-asset-prefix/_next/static/chunks/4e0ee3124dcdc85b.js","/litellm-asset-prefix/_next/static/chunks/84dd260c7412819c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/cb8e6ba28461af15.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/70448f37d17f36ae.js","/litellm-asset-prefix/_next/static/chunks/ba0b0ec2cfedbf03.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/settings/logging-and-alerts/__next._index.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt index 091117864ac..53b4fe6aac6 100644 --- a/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/logging-and-alerts/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"logging-and-alerts","paramType":null,"paramKey":"logging-and-alerts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"logging-and-alerts","paramType":null,"paramKey":"logging-and-alerts","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/index.html b/litellm/proxy/_experimental/out/settings/router-settings.html similarity index 95% rename from litellm/proxy/_experimental/out/settings/router-settings/index.html rename to litellm/proxy/_experimental/out/settings/router-settings.html index 909885017ce..557486bf13b 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/index.html +++ b/litellm/proxy/_experimental/out/settings/router-settings.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/router-settings.txt b/litellm/proxy/_experimental/out/settings/router-settings.txt index 8048fa2425d..2de0c7d96d3 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[511715,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/949fa90ad69e3ffa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5963ae3163ecd9b6.js"],"default"] +f:I[511715,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/949fa90ad69e3ffa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5963ae3163ecd9b6.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt index ffb9ee9e0d2..f096ff381f0 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.__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[511715,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/949fa90ad69e3ffa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5963ae3163ecd9b6.js"],"default"] +3:I[511715,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/949fa90ad69e3ffa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5963ae3163ecd9b6.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/949fa90ad69e3ffa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5963ae3163ecd9b6.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/949fa90ad69e3ffa.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5963ae3163ecd9b6.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/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.router-settings.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.settings.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/settings/router-settings/__next._full.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt index 8048fa2425d..2de0c7d96d3 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","settings","router-settings"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[511715,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/949fa90ad69e3ffa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5963ae3163ecd9b6.js"],"default"] +f:I[511715,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/949fa90ad69e3ffa.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/6764a89c3c614835.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5963ae3163ecd9b6.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/settings/router-settings/__next._index.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt b/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt index 6fbbd89f161..568efd670e6 100644 --- a/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/router-settings/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"router-settings","paramType":null,"paramKey":"router-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"router-settings","paramType":null,"paramKey":"router-settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/index.html b/litellm/proxy/_experimental/out/settings/ui-theme.html similarity index 94% rename from litellm/proxy/_experimental/out/settings/ui-theme/index.html rename to litellm/proxy/_experimental/out/settings/ui-theme.html index 357527579b7..83aceb9184b 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/index.html +++ b/litellm/proxy/_experimental/out/settings/ui-theme.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/settings/ui-theme.txt b/litellm/proxy/_experimental/out/settings/ui-theme.txt index 2d7cab2bb94..d4b8f7e5170 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[922049,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a929674ad23dc234.js"],"default"] +f:I[922049,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/a929674ad23dc234.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt index d5358917b93..015558e17e0 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.__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[922049,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a929674ad23dc234.js"],"default"] +3:I[922049,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/a929674ad23dc234.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a929674ad23dc234.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a929674ad23dc234.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/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.settings.ui-theme.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/settings/ui-theme/__next._full.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt index 2d7cab2bb94..d4b8f7e5170 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","settings","ui-theme"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[922049,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a929674ad23dc234.js"],"default"] +f:I[922049,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/a929674ad23dc234.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/settings/ui-theme/__next._index.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt b/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt index 07481d5bc10..94a4fefe2e1 100644 --- a/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt +++ b/litellm/proxy/_experimental/out/settings/ui-theme/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"ui-theme","paramType":null,"paramKey":"ui-theme","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"settings","paramType":null,"paramKey":"settings","hasRuntimePrefetch":false,"slots":{"children":{"name":"ui-theme","paramType":null,"paramKey":"ui-theme","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/teams/index.html b/litellm/proxy/_experimental/out/teams.html similarity index 90% rename from litellm/proxy/_experimental/out/teams/index.html rename to litellm/proxy/_experimental/out/teams.html index 73d5eac2fa4..823377bd189 100644 --- a/litellm/proxy/_experimental/out/teams/index.html +++ b/litellm/proxy/_experimental/out/teams.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/teams.txt b/litellm/proxy/_experimental/out/teams.txt index af42578286d..e11fab4db6f 100644 --- a/litellm/proxy/_experimental/out/teams.txt +++ b/litellm/proxy/_experimental/out/teams.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[596115,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/5b44cdfc729a6dc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/9984a74a61012f00.js","/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","/litellm-asset-prefix/_next/static/chunks/fc873acd3d409c53.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js"],"default"] +e:I[596115,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/9c8f0f460dea2bbd.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/191ca3be6b9ca27f.js","/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","/litellm-asset-prefix/_next/static/chunks/4354945bbe4befc9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b44cdfc729a6dc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/9984a74a61012f00.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fc873acd3d409c53.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8f0f460dea2bbd.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/191ca3be6b9ca27f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/4354945bbe4befc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt index ccaa8fbb893..3312b078044 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.__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[596115,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/5b44cdfc729a6dc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/9984a74a61012f00.js","/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","/litellm-asset-prefix/_next/static/chunks/fc873acd3d409c53.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js"],"default"] +3:I[596115,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/9c8f0f460dea2bbd.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/191ca3be6b9ca27f.js","/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","/litellm-asset-prefix/_next/static/chunks/4354945bbe4befc9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b44cdfc729a6dc9.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/9984a74a61012f00.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fc873acd3d409c53.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8f0f460dea2bbd.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/191ca3be6b9ca27f.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/4354945bbe4befc9.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.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/teams/__next.!KGRhc2hib2FyZCk.teams.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.txt +++ b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.teams.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/teams/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/teams/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/teams/__next._full.txt b/litellm/proxy/_experimental/out/teams/__next._full.txt index af42578286d..e11fab4db6f 100644 --- a/litellm/proxy/_experimental/out/teams/__next._full.txt +++ b/litellm/proxy/_experimental/out/teams/__next._full.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","teams"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["teams",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[596115,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/5b44cdfc729a6dc9.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/9984a74a61012f00.js","/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","/litellm-asset-prefix/_next/static/chunks/fc873acd3d409c53.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js"],"default"] +e:I[596115,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/9c8f0f460dea2bbd.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/191ca3be6b9ca27f.js","/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","/litellm-asset-prefix/_next/static/chunks/4354945bbe4befc9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/5b44cdfc729a6dc9.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/9984a74a61012f00.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fc873acd3d409c53.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/528456b9ec2e4413.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/02158aed2f4518e2.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/3b19a8bdc8d26868.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/56a8bf43ce752d47.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/4e5da3c236abd875.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/9c8f0f460dea2bbd.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/191ca3be6b9ca27f.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/cecdaabafa264083.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/4354945bbe4befc9.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/7f0381a4d6c37cf2.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/2cce5b8de81c2310.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/ad08830c666dfc68.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/f9560c32394a893f.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/teams/__next._head.txt b/litellm/proxy/_experimental/out/teams/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/teams/__next._head.txt +++ b/litellm/proxy/_experimental/out/teams/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/teams/__next._index.txt b/litellm/proxy/_experimental/out/teams/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/teams/__next._index.txt +++ b/litellm/proxy/_experimental/out/teams/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/teams/__next._tree.txt b/litellm/proxy/_experimental/out/teams/__next._tree.txt index 88275f25a00..1e969d93d54 100644 --- a/litellm/proxy/_experimental/out/teams/__next._tree.txt +++ b/litellm/proxy/_experimental/out/teams/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"teams","paramType":null,"paramKey":"teams","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"teams","paramType":null,"paramKey":"teams","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/test-key/index.html b/litellm/proxy/_experimental/out/test-key.html similarity index 93% rename from litellm/proxy/_experimental/out/test-key/index.html rename to litellm/proxy/_experimental/out/test-key.html index b816ac71727..4ef2fded6a5 100644 --- a/litellm/proxy/_experimental/out/test-key/index.html +++ b/litellm/proxy/_experimental/out/test-key.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/test-key.txt b/litellm/proxy/_experimental/out/test-key.txt index bde47ad3616..a165be572b6 100644 --- a/litellm/proxy/_experimental/out/test-key.txt +++ b/litellm/proxy/_experimental/out/test-key.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[133574,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/ad682fd0bc31a0da.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +e:I[133574,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/84c717b1ad096487.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ad682fd0bc31a0da.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/84c717b1ad096487.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt index b6ea5bc3fe6..efc9a0c24b5 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.__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[133574,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/ad682fd0bc31a0da.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +3:I[133574,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/84c717b1ad096487.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ad682fd0bc31a0da.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/84c717b1ad096487.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.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/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.txt +++ b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.test-key.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/test-key/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/test-key/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/test-key/__next._full.txt b/litellm/proxy/_experimental/out/test-key/__next._full.txt index bde47ad3616..a165be572b6 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._full.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._full.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","test-key"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["test-key",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[133574,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/ad682fd0bc31a0da.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] +e:I[133574,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/84c717b1ad096487.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/ad682fd0bc31a0da.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c24ccfc46ac95900.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/bc7bf6030f235d21.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/3397155a65b7d83c.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/6b870abe3093799a.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/440d96637d3ff94d.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/84c717b1ad096487.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/test-key/__next._head.txt b/litellm/proxy/_experimental/out/test-key/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._head.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/test-key/__next._index.txt b/litellm/proxy/_experimental/out/test-key/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._index.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/test-key/__next._tree.txt b/litellm/proxy/_experimental/out/test-key/__next._tree.txt index b8d95bfe04e..ad54c41e6d4 100644 --- a/litellm/proxy/_experimental/out/test-key/__next._tree.txt +++ b/litellm/proxy/_experimental/out/test-key/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"test-key","paramType":null,"paramKey":"test-key","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"test-key","paramType":null,"paramKey":"test-key","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/tools/mcp-servers/index.html b/litellm/proxy/_experimental/out/tools/mcp-servers.html similarity index 92% rename from litellm/proxy/_experimental/out/tools/mcp-servers/index.html rename to litellm/proxy/_experimental/out/tools/mcp-servers.html index f77a947e84b..c2514ccff89 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/index.html +++ b/litellm/proxy/_experimental/out/tools/mcp-servers.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers.txt b/litellm/proxy/_experimental/out/tools/mcp-servers.txt index a85ce0ae71b..5a6c9f5713a 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[338468,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/f4eadf7003875fab.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/db928c0f158d84b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +f:I[338468,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/170d633bc8d9b797.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fd48ca55b9713b5b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f4eadf7003875fab.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/db928c0f158d84b3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/170d633bc8d9b797.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fd48ca55b9713b5b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt index f207beec569..1207256d61f 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.__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[338468,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/f4eadf7003875fab.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/db928c0f158d84b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +3:I[338468,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/170d633bc8d9b797.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fd48ca55b9713b5b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f4eadf7003875fab.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/db928c0f158d84b3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/170d633bc8d9b797.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fd48ca55b9713b5b.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.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/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.mcp-servers.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.tools.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/tools/mcp-servers/__next._full.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt index a85ce0ae71b..5a6c9f5713a 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._full.txt @@ -1,24 +1,24 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","tools","mcp-servers"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[338468,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/f4eadf7003875fab.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/db928c0f158d84b3.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +f:I[338468,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/170d633bc8d9b797.js","/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/fd48ca55b9713b5b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 17:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] a:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/f4eadf7003875fab.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/db928c0f158d84b3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] +b:["$","$1","c",{"children":[["$","$Le",null,{"Component":"$f","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@10","$@11"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/170d633bc8d9b797.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/6511168aa335c4db.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/f9b9defe307eeda9.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/bd94e2fe34d8a187.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/54da342a06baf122.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/fd48ca55b9713b5b.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]],["$","$L12",null,{"children":["$","$13",null,{"name":"Next.MetadataOutlet","children":"$@14"}]}]]}] c:["$","$1","h",{"children":[null,["$","$L15",null,{"children":"$L16"}],["$","div",null,{"hidden":true,"children":["$","$L17",null,{"children":["$","$13",null,{"name":"Next.Metadata","children":"$L18"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" 10:{} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/tools/mcp-servers/__next._index.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt index d71036026d3..b19654cd362 100644 --- a/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt +++ b/litellm/proxy/_experimental/out/tools/mcp-servers/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp-servers","paramType":null,"paramKey":"mcp-servers","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"mcp-servers","paramType":null,"paramKey":"mcp-servers","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/index.html b/litellm/proxy/_experimental/out/tools/vector-stores.html similarity index 96% rename from litellm/proxy/_experimental/out/tools/vector-stores/index.html rename to litellm/proxy/_experimental/out/tools/vector-stores.html index 281cc757241..7e6e7eac633 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/index.html +++ b/litellm/proxy/_experimental/out/tools/vector-stores.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/tools/vector-stores.txt b/litellm/proxy/_experimental/out/tools/vector-stores.txt index 76d4c39ed2b..f3ad3515544 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[800944,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/321168be6521c38b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/305a1cf07cfab07b.js"],"default"] +f:I[800944,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/321168be6521c38b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/305a1cf07cfab07b.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt index 894932e37fb..1ca0fe24953 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.__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[800944,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/321168be6521c38b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/305a1cf07cfab07b.js"],"default"] +3:I[800944,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/321168be6521c38b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/305a1cf07cfab07b.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/321168be6521c38b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/305a1cf07cfab07b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/321168be6521c38b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/305a1cf07cfab07b.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/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.tools.vector-stores.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/tools/vector-stores/__next._full.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt index 76d4c39ed2b..f3ad3515544 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] d:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","tools","vector-stores"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{"children":["$Lb",{},null,false,false]},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lc",false]],"m":"$undefined","G":["$d",[]],"S":true} e:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -f:I[800944,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/321168be6521c38b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/305a1cf07cfab07b.js"],"default"] +f:I[800944,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/321168be6521c38b.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/36ccc2b555a26ad4.js","/litellm-asset-prefix/_next/static/chunks/f9c24d6e7ec43046.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/305a1cf07cfab07b.js"],"default"] 12:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 13:"$Sreact.suspense" 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/tools/vector-stores/__next._index.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt b/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt index a12d9579079..79acab96bb0 100644 --- a/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt +++ b/litellm/proxy/_experimental/out/tools/vector-stores/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"vector-stores","paramType":null,"paramKey":"vector-stores","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"tools","paramType":null,"paramKey":"tools","hasRuntimePrefetch":false,"slots":{"children":{"name":"vector-stores","paramType":null,"paramKey":"vector-stores","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/litellm/proxy/_experimental/out/usage/index.html b/litellm/proxy/_experimental/out/usage.html similarity index 92% rename from litellm/proxy/_experimental/out/usage/index.html rename to litellm/proxy/_experimental/out/usage.html index c895fffdd49..8fbbaea4b5d 100644 --- a/litellm/proxy/_experimental/out/usage/index.html +++ b/litellm/proxy/_experimental/out/usage.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/usage.txt b/litellm/proxy/_experimental/out/usage.txt index cb3ad9995b4..9cf225b31d2 100644 --- a/litellm/proxy/_experimental/out/usage.txt +++ b/litellm/proxy/_experimental/out/usage.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[986888,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/5c0ed5c66b49ddbe.js","/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/8a6de9a16d49b44f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/e9de3f8db541361f.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +e:I[986888,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/867f4c13fb446e41.js","/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/be2cb00f03cf83ec.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/0883597e31423b5b.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0ed5c66b49ddbe.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/8a6de9a16d49b44f.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e9de3f8db541361f.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/867f4c13fb446e41.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/be2cb00f03cf83ec.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/0883597e31423b5b.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/usage/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt index 4afdfe8f0dd..943662a9781 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.__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[986888,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/5c0ed5c66b49ddbe.js","/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/8a6de9a16d49b44f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/e9de3f8db541361f.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +3:I[986888,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/867f4c13fb446e41.js","/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/be2cb00f03cf83ec.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/0883597e31423b5b.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0ed5c66b49ddbe.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/8a6de9a16d49b44f.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e9de3f8db541361f.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/867f4c13fb446e41.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/be2cb00f03cf83ec.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/0883597e31423b5b.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.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/usage/__next.!KGRhc2hib2FyZCk.usage.txt b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.txt +++ b/litellm/proxy/_experimental/out/usage/__next.!KGRhc2hib2FyZCk.usage.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/usage/__next._full.txt b/litellm/proxy/_experimental/out/usage/__next._full.txt index cb3ad9995b4..9cf225b31d2 100644 --- a/litellm/proxy/_experimental/out/usage/__next._full.txt +++ b/litellm/proxy/_experimental/out/usage/__next._full.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","usage"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["usage",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[986888,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/5c0ed5c66b49ddbe.js","/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/8a6de9a16d49b44f.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/e9de3f8db541361f.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] +e:I[986888,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/867f4c13fb446e41.js","/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/be2cb00f03cf83ec.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/0883597e31423b5b.js","/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0ed5c66b49ddbe.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/8a6de9a16d49b44f.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/e9de3f8db541361f.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/5c0770ecd9172a56.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/c599cfb1e6aec71d.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/867f4c13fb446e41.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/8a7b6051146adfe4.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/be2cb00f03cf83ec.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/0883597e31423b5b.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/5e3320d8941d60f3.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/b0286888a3293fd9.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/usage/__next._head.txt b/litellm/proxy/_experimental/out/usage/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/usage/__next._head.txt +++ b/litellm/proxy/_experimental/out/usage/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/usage/__next._index.txt b/litellm/proxy/_experimental/out/usage/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/usage/__next._index.txt +++ b/litellm/proxy/_experimental/out/usage/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/usage/__next._tree.txt b/litellm/proxy/_experimental/out/usage/__next._tree.txt index 7d2544fe4a0..4ffc269d7bb 100644 --- a/litellm/proxy/_experimental/out/usage/__next._tree.txt +++ b/litellm/proxy/_experimental/out/usage/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"usage","paramType":null,"paramKey":"usage","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"usage","paramType":null,"paramKey":"usage","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/users/index.html b/litellm/proxy/_experimental/out/users.html similarity index 95% rename from litellm/proxy/_experimental/out/users/index.html rename to litellm/proxy/_experimental/out/users.html index ba1613b43d0..c24c1c2fd8d 100644 --- a/litellm/proxy/_experimental/out/users/index.html +++ b/litellm/proxy/_experimental/out/users.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/users.txt b/litellm/proxy/_experimental/out/users.txt index 66af77fc566..fb497fa2ba3 100644 --- a/litellm/proxy/_experimental/out/users.txt +++ b/litellm/proxy/_experimental/out/users.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[198134,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/04a7af91517db55b.js","/litellm-asset-prefix/_next/static/chunks/7bcc54a58176051b.js","/litellm-asset-prefix/_next/static/chunks/971039039ee153f1.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/08d5ac6e0b6220c0.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +e:I[198134,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/04a7af91517db55b.js","/litellm-asset-prefix/_next/static/chunks/7bcc54a58176051b.js","/litellm-asset-prefix/_next/static/chunks/971039039ee153f1.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/08d5ac6e0b6220c0.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/users/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt index aeb6668d7da..9150ee21225 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.__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[198134,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/04a7af91517db55b.js","/litellm-asset-prefix/_next/static/chunks/7bcc54a58176051b.js","/litellm-asset-prefix/_next/static/chunks/971039039ee153f1.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/08d5ac6e0b6220c0.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +3:I[198134,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/04a7af91517db55b.js","/litellm-asset-prefix/_next/static/chunks/7bcc54a58176051b.js","/litellm-asset-prefix/_next/static/chunks/971039039ee153f1.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/08d5ac6e0b6220c0.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/04a7af91517db55b.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7bcc54a58176051b.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/971039039ee153f1.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/08d5ac6e0b6220c0.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/04a7af91517db55b.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7bcc54a58176051b.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/971039039ee153f1.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/08d5ac6e0b6220c0.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.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/users/__next.!KGRhc2hib2FyZCk.users.txt b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.txt +++ b/litellm/proxy/_experimental/out/users/__next.!KGRhc2hib2FyZCk.users.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/users/__next._full.txt b/litellm/proxy/_experimental/out/users/__next._full.txt index 66af77fc566..fb497fa2ba3 100644 --- a/litellm/proxy/_experimental/out/users/__next._full.txt +++ b/litellm/proxy/_experimental/out/users/__next._full.txt @@ -1,17 +1,17 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","users"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["users",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":[["$","$1","c",{"children":[null,"$L9"]}],{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[198134,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/04a7af91517db55b.js","/litellm-asset-prefix/_next/static/chunks/7bcc54a58176051b.js","/litellm-asset-prefix/_next/static/chunks/971039039ee153f1.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/08d5ac6e0b6220c0.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] +e:I[198134,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/04a7af91517db55b.js","/litellm-asset-prefix/_next/static/chunks/7bcc54a58176051b.js","/litellm-asset-prefix/_next/static/chunks/971039039ee153f1.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/defd1fba0f5d7f11.js","/litellm-asset-prefix/_next/static/chunks/a0871b3a8352592c.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/2faf62c238d105eb.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/08d5ac6e0b6220c0.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] diff --git a/litellm/proxy/_experimental/out/users/__next._head.txt b/litellm/proxy/_experimental/out/users/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/users/__next._head.txt +++ b/litellm/proxy/_experimental/out/users/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/users/__next._index.txt b/litellm/proxy/_experimental/out/users/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/users/__next._index.txt +++ b/litellm/proxy/_experimental/out/users/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/users/__next._tree.txt b/litellm/proxy/_experimental/out/users/__next._tree.txt index 9d8d0a03392..a43114b9e36 100644 --- a/litellm/proxy/_experimental/out/users/__next._tree.txt +++ b/litellm/proxy/_experimental/out/users/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"users","paramType":null,"paramKey":"users","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"users","paramType":null,"paramKey":"users","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/virtual-keys/index.html b/litellm/proxy/_experimental/out/virtual-keys.html similarity index 90% rename from litellm/proxy/_experimental/out/virtual-keys/index.html rename to litellm/proxy/_experimental/out/virtual-keys.html index 4a714b35ebb..8050d5904c9 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/index.html +++ b/litellm/proxy/_experimental/out/virtual-keys.html @@ -1 +1 @@ -LiteLLM Dashboard
Loading...
\ No newline at end of file +LiteLLM Dashboard
Loading...
\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/virtual-keys.txt b/litellm/proxy/_experimental/out/virtual-keys.txt index c0a4970d302..b7fb864d4ff 100644 --- a/litellm/proxy/_experimental/out/virtual-keys.txt +++ b/litellm/proxy/_experimental/out/virtual-keys.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[995118,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/065cbe2de8230973.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3f320784d80bed94.js","/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +e:I[995118,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/48afb9a3be2b985f.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/aa393ca378b22a92.js","/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/915b8c8ed28753ec.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/065cbe2de8230973.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3f320784d80bed94.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/48afb9a3be2b985f.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/aa393ca378b22a92.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/915b8c8ed28753ec.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt index 3a37599159a..4baeca43e28 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__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/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.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/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt index 322eb1cb23e..49437e24403 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.__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[995118,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/065cbe2de8230973.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3f320784d80bed94.js","/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +3:I[995118,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/48afb9a3be2b985f.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/aa393ca378b22a92.js","/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/915b8c8ed28753ec.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/065cbe2de8230973.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3f320784d80bed94.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/48afb9a3be2b985f.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/aa393ca378b22a92.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/915b8c8ed28753ec.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.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/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt index e6f951aa599..c8a00779c6d 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next.!KGRhc2hib2FyZCk.virtual-keys.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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt index c0a4970d302..b7fb864d4ff 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._full.txt @@ -1,23 +1,23 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] 6:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"] -7:I[216370,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js"],"default"] +7:I[216370,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js"],"default"] c:I[168027,[],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"Hp-LQxDEAEt-JSJFExm-i","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} +0:{"P":null,"b":"IzkoIVgvfXHyOBVGLH_aI","c":["","virtual-keys"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"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/cab8d46a8c32ec36.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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/7f59802b710501d5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.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/0713a1954ae8db53.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","async":true,"nonce":"$undefined"}]],["$","$L6",null,{"Component":"$7","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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: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: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: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: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":["$@8"]}}]]}],{"children":["$L9",{"children":["$La",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$Lb",false]],"m":"$undefined","G":["$c",[]],"S":true} d:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"] -e:I[995118,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/ce9cf9f407f4b359.js","/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/065cbe2de8230973.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3f320784d80bed94.js","/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] +e:I[995118,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","/litellm-asset-prefix/_next/static/chunks/7f59802b710501d5.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/0713a1954ae8db53.js","/litellm-asset-prefix/_next/static/chunks/9474f2e878525bf7.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/ed4c3592cb02914b.js","/litellm-asset-prefix/_next/static/chunks/72c3e48f096ce28f.js","/litellm-asset-prefix/_next/static/chunks/76e98b80e3e54a38.js","/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","/litellm-asset-prefix/_next/static/chunks/48afb9a3be2b985f.js","/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","/litellm-asset-prefix/_next/static/chunks/aa393ca378b22a92.js","/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","/litellm-asset-prefix/_next/static/chunks/915b8c8ed28753ec.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js"],"default"] 11:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] 12:"$Sreact.suspense" 14:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] 16:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] 9:["$","$1","c",{"children":[null,["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}] -a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/065cbe2de8230973.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3f320784d80bed94.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/ada57dab6523afc4.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] +a:["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/21805026fc1b82c5.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/75c0e2a9c99fbaf9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6f6d3e604e986144.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/a1ef280b7ad5ae6a.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/a0b814e0f184a60a.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/48afb9a3be2b985f.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/5b2b7fd4dd9a44f3.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c058ac3e89dc33df.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/aa393ca378b22a92.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/30c33cea8541a2f1.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/542a1a209eb732c6.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/3de1b6df2372e93b.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/915b8c8ed28753ec.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}] b:["$","$1","h",{"children":[null,["$","$L14",null,{"children":"$L15"}],["$","div",null,{"hidden":true,"children":["$","$L16",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L17"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] 8:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params" f:{} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt index 83ba7e6433f..99a0113d076 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_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"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/virtual-keys/__next._index.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt index d72dd921b53..731963c92ac 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._index.txt @@ -1,8 +1,8 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.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"] :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/112ad77f3dd2e3cd.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","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/cab8d46a8c32ec36.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/c562cdbf19a2d9de.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/65f709264734a9bf.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"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."}]}]]}]}]],[]]}]}]}]}]}]]}],"loading":null,"isPartial":false} diff --git a/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt b/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt index 781b85b908a..580e1befb7a 100644 --- a/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt +++ b/litellm/proxy/_experimental/out/virtual-keys/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/cab8d46a8c32ec36.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"buildId":"Hp-LQxDEAEt-JSJFExm-i","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"virtual-keys","paramType":null,"paramKey":"virtual-keys","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} +0:{"buildId":"IzkoIVgvfXHyOBVGLH_aI","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"virtual-keys","paramType":null,"paramKey":"virtual-keys","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300}