From cb21e1cd39e92705bc00acf3685c3b89684fd93d Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Tue, 23 Jun 2026 20:12:04 -0700 Subject: [PATCH] chore: update Next.js build artifacts (2026-06-24 03:12 UTC, node v20.20.2) --- litellm/proxy/_experimental/out/404.html | 2 +- .../_experimental/out/__next.__PAGE__.txt | 48 +- .../proxy/_experimental/out/__next._full.txt | 121 ++-- .../proxy/_experimental/out/__next._head.txt | 8 +- .../proxy/_experimental/out/__next._index.txt | 14 +- .../proxy/_experimental/out/__next._tree.txt | 10 +- .../_clientMiddlewareManifest.json | 1 - .../out/_next/static/chunks/0-2-9tcizw.kv.js | 1 + .../out/_next/static/chunks/0-4-0.z8w6y27.js | 1 + .../{659ce28f2cb74401.js => 0-dwjzo6mg1t7.js} | 2 +- .../out/_next/static/chunks/0-ne4el5qxs1z.js | 40 ++ .../out/_next/static/chunks/0.6dhordmknmz.js | 1 + .../{a1ef280b7ad5ae6a.js => 0.75_v4.brf7u.js} | 0 .../out/_next/static/chunks/0.d2a_5_6-5pn.js | 2 + .../out/_next/static/chunks/0.je~3iy~k4ss.js | 1 + .../out/_next/static/chunks/0.kfwj93~uvc5.js | 8 + .../out/_next/static/chunks/0.u~fsd.paivu.js | 1 + .../out/_next/static/chunks/008w4tqm~9~ds.js | 420 ++++++++++++ .../out/_next/static/chunks/00bicsqsx~erf.js | 1 + .../out/_next/static/chunks/00dq_sa6qt2eg.js | 1 + .../_next/static/chunks/00ff280cdb7d7ee5.js | 1 - .../out/_next/static/chunks/00mx~d442jr~o.js | 8 + .../out/_next/static/chunks/00n_262-goqx6.js | 3 + .../{67570d9401e62846.js => 00p.gft-l.6p..js} | 4 +- .../{3b30ab8eaa03bc21.js => 00q4mtjboprhm.js} | 2 +- .../out/_next/static/chunks/00rvson..zjub.js | 10 + .../out/_next/static/chunks/00ym60oj49oo5.js | 1 + .../out/_next/static/chunks/015yfy38oh-h8.js | 1 + .../out/_next/static/chunks/01bk9s-ky6_e..js | 8 + .../out/_next/static/chunks/01eoe.0n-q6.q.js | 1 + .../out/_next/static/chunks/01g5ls2__cy9q.js | 1 + .../out/_next/static/chunks/01n1bg17oxp8l.js | 12 + .../{754fc49bd90d2980.js => 01ne7gi3z97di.js} | 0 .../out/_next/static/chunks/01pr-g28x~.uu.js | 14 + .../out/_next/static/chunks/01u0i~l49qpdz.js | 1 + .../out/_next/static/chunks/01xm1xt.gmrff.js | 3 + .../out/_next/static/chunks/01y._o853f7le.js | 4 + .../out/_next/static/chunks/022.sz94ycw4x.js | 4 + .../out/_next/static/chunks/0229ic_5ff586.js | 7 + .../{542a1a209eb732c6.js => 02_ols0zt.cn1.js} | 2 +- .../{7b788dd93ad868b3.js => 02ihc5xweq16v.js} | 0 .../{b1c98cc932a0ab19.js => 02v412-qgvyfr.js} | 0 .../_next/static/chunks/030fbd1b8bfd0d5f.js | 98 --- .../{99cf9cf99df5ccfc.js => 036wlkuzplhfz.js} | 2 +- .../_next/static/chunks/0377ae18aae60c57.js | 1 - .../out/_next/static/chunks/03kdcij4tsege.js | 1 + .../{a6dad97d9634a72d.js => 03~yq9q893hmn.js} | 0 .../out/_next/static/chunks/04.aj3k78v7ut.js | 8 + .../out/_next/static/chunks/047wghe2gva_o.js | 1 + .../_next/static/chunks/0493aafc4891dd29.js | 1 - .../out/_next/static/chunks/04o4lz~y91s1r.css | 1 + .../{0c3e8651e0e97232.js => 05b_~th4crri2.js} | 0 .../_next/static/chunks/05fcbaa2a2d4ce24.js | 1 - .../out/_next/static/chunks/05iha4cgkkxu1.js | 7 + .../{9cca003867a68aa9.js => 05nip7kd~pjv1.js} | 2 +- .../out/_next/static/chunks/05qmwjqau64bz.css | 1 + .../_next/static/chunks/0606c92ecd600e0c.js | 420 ------------ .../_next/static/chunks/06b2ea8c776c2e9b.js | 1 - .../out/_next/static/chunks/06es90~yrkd00.js | 1 + .../out/_next/static/chunks/06gao0u0xy9th.js | 1 + .../{ecbe4d32f0d0ccd3.js => 06kpwf4i0qv9q.js} | 0 .../out/_next/static/chunks/06l162pg8h_k5.js | 2 + .../out/_next/static/chunks/06oag4x9~8vif.js | 98 +++ .../out/_next/static/chunks/06vhmp61k2a89.js | 1 + .../out/_next/static/chunks/06~kt_oo6pz6v.js | 68 ++ .../out/_next/static/chunks/07.fwfv-sinb5.js | 4 + .../out/_next/static/chunks/070q-kt12zun~.js | 1 + .../out/_next/static/chunks/0746reu0n0hsv.js | 1 + .../{eea976cf4a05fc92.js => 07m0uxheepw8a.js} | 2 +- .../out/_next/static/chunks/07ok39ppl.vl1.js | 1 + .../out/_next/static/chunks/08401f_hwndsf.js | 598 ++++++++++++++++++ .../{934dbc43f8c1abde.js => 08cbskerpmujn.js} | 2 +- .../out/_next/static/chunks/09.lm5dax~l7e.js | 2 + .../out/_next/static/chunks/092z01ntb5nu~.js | 1 + .../out/_next/static/chunks/098j5eweuy__x.js | 8 + .../out/_next/static/chunks/09h04rv0~.g9j.js | 10 + .../{c847ecdf8c790b0b.js => 09n64dqzn.le~.js} | 2 +- .../out/_next/static/chunks/09o_h3e0fwffd.js | 1 + .../out/_next/static/chunks/09op-t36a-zxm.js | 8 + .../out/_next/static/chunks/09w3xhc94wa5b.js | 1 + .../out/_next/static/chunks/0_7p_0twqq2dv.js | 8 + .../out/_next/static/chunks/0_ex-stk7ibf_.js | 31 + .../{adb8beb738574863.js => 0_p625as00xbq.js} | 0 .../out/_next/static/chunks/0_wp7tq3f6six.js | 8 + .../_next/static/chunks/0a65da2cd24e2ab6.js | 3 - .../{ce44d74054c76c03.js => 0aa08wo9_4k-o.js} | 4 +- .../out/_next/static/chunks/0aivi0og~sj6k.js | 1 + .../out/_next/static/chunks/0ar6956xz0njn.js | 1 + .../out/_next/static/chunks/0ayg3m_5s_z2w.js | 4 + .../out/_next/static/chunks/0b376ph2~1g5l.js | 1 + .../_next/static/chunks/0b3d09ff6c6e4335.js | 1 - .../_next/static/chunks/0b470ffc60999bf4.js | 1 - .../out/_next/static/chunks/0bkk~1l186k4g.js | 1 + .../out/_next/static/chunks/0bzika30gg9sv.js | 1 + .../out/_next/static/chunks/0c.vtc8uofg.h.js | 1 + .../out/_next/static/chunks/0c20.u.cu4ruj.js | 8 + .../out/_next/static/chunks/0c4pfjjue0uc-.js | 86 +++ .../{ca7a3fdb635fb7dc.js => 0cbiddnyyt-22.js} | 2 +- .../out/_next/static/chunks/0cv239bgotud_.js | 1 + .../out/_next/static/chunks/0da~.l_uihpug.js | 1 + .../out/_next/static/chunks/0dit6d5rb4h85.js | 420 ++++++++++++ .../out/_next/static/chunks/0dmfhvqon~mn~.js | 1 + .../out/_next/static/chunks/0dt4fjjwbrov2.js | 1 + .../out/_next/static/chunks/0dz69vhu32vzp.js | 1 + .../out/_next/static/chunks/0e6cra27t9c6b.js | 420 ++++++++++++ .../{cbfd53da3104be2a.js => 0e7nuqlfah86n.js} | 4 +- .../out/_next/static/chunks/0eeoyv3fh--5v.js | 14 + .../out/_next/static/chunks/0ek7vfd1hrb4_.js | 7 + .../out/_next/static/chunks/0em0654rb513m.js | 4 + .../out/_next/static/chunks/0exy~ua1-3m4l.js | 420 ++++++++++++ .../out/_next/static/chunks/0eym_z87ts-j8.js | 1 + .../out/_next/static/chunks/0f6t.sli9v9zt.js | 8 + .../out/_next/static/chunks/0fnkbcxr~4hwq.js | 1 + .../out/_next/static/chunks/0fns6vsccj10h.js | 1 + .../out/_next/static/chunks/0gb9pui.r~-sy.js | 1 + .../out/_next/static/chunks/0goq2snzui.n8.js | 1 + .../{403c4d96324c23a6.js => 0gqqvjn11_pp3.js} | 0 .../{1bc2898be56acd1b.js => 0gs8.sc1ds7.w.js} | 4 +- .../out/_next/static/chunks/0gszmhudlm6lw.js | 46 ++ .../out/_next/static/chunks/0h8dqeg931c1f.js | 8 + .../{84dd260c7412819c.js => 0hjh1x7qo041f.js} | 0 .../{68e50a37159f7d9a.js => 0hmiwn2p8zrxp.js} | 2 +- .../out/_next/static/chunks/0hpcwzoygs-ke.js | 8 + .../out/_next/static/chunks/0i6g.~vhywo3h.js | 98 +++ .../out/_next/static/chunks/0i7ndeqr5w1sc.js | 7 + .../{ca22b37c24b4d34a.js => 0igutkl9r09kl.js} | 2 +- .../out/_next/static/chunks/0ivj_wax-joap.js | 31 + .../out/_next/static/chunks/0j.~bvp831kae.js | 1 + .../out/_next/static/chunks/0j2g7af6k4x7m.js | 72 +++ .../out/_next/static/chunks/0je63_yy.8i72.js | 1 + ...3f3fa56b5786d58c.css => 0jib1e4hgitwz.css} | 0 .../out/_next/static/chunks/0kcdscyjx5upf.js | 2 + .../out/_next/static/chunks/0kf8wlk637e6v.js | 1 + .../out/_next/static/chunks/0kle3tqsakb-1.js | 8 + .../out/_next/static/chunks/0ks4zvc_6qump.js | 1 + .../out/_next/static/chunks/0lkwlvo53lk5c.js | 8 + .../out/_next/static/chunks/0lo51j3d423yv.js | 1 + .../out/_next/static/chunks/0lp0qkj93s9n6.js | 1 + .../out/_next/static/chunks/0m._ijxus~ryi.js | 4 + .../out/_next/static/chunks/0m6zdocif1gl4.js | 1 + .../{d3ac82723ec9e30d.js => 0mb3erwqomzal.js} | 2 +- .../out/_next/static/chunks/0mh1wnrvmv_y7.js | 4 + .../out/_next/static/chunks/0mzw3maijoev6.js | 1 + .../out/_next/static/chunks/0n279xd8co40q.js | 98 +++ .../out/_next/static/chunks/0nfpc775w0b8-.js | 2 + .../{0549bc9afa7d4888.js => 0niabq1py.bpc.js} | 0 .../{4980372eaa37b78b.js => 0nnx~7-7e5t~1.js} | 5 +- .../out/_next/static/chunks/0o4pnwq6k8q4w.js | 98 +++ .../out/_next/static/chunks/0o7mue3uybfhi.js | 1 + .../out/_next/static/chunks/0oefy62cva53s.js | 8 + .../out/_next/static/chunks/0pelwlztq2kwy.js | 7 + .../{c3c84f2fc1b1e9db.js => 0pfc18cphnnhd.js} | 2 +- .../out/_next/static/chunks/0pg.kj49bd73_.js | 1 + .../out/_next/static/chunks/0pidya1qvuvx8.js | 1 + .../out/_next/static/chunks/0pqu561k2bu1d.js | 1 + .../out/_next/static/chunks/0puul31_.zeq6.js | 10 + .../out/_next/static/chunks/0q250n2j99yss.js | 11 + .../out/_next/static/chunks/0q2o6z5qtf12d.js | 14 + .../out/_next/static/chunks/0q6~n4y84cejn.js | 1 + .../out/_next/static/chunks/0qikgxv.u0j9d.js | 1 + .../out/_next/static/chunks/0qmmlumh.k21x.js | 420 ++++++++++++ .../{e1a670efcb966aaa.js => 0r.-zuh7vk-cs.js} | 2 +- .../out/_next/static/chunks/0s-tn5h6qpp6i.js | 15 + .../out/_next/static/chunks/0sbwfmr31.cvw.js | 8 + .../out/_next/static/chunks/0sleuh3e9q.ww.js | 17 + .../out/_next/static/chunks/0ssorln~eooo0.js | 1 + .../out/_next/static/chunks/0szdm0s3h~vby.js | 1 + .../out/_next/static/chunks/0t0d45r_tvt4i.js | 1 + .../out/_next/static/chunks/0t9.6.et.-spq.js | 1 + .../out/_next/static/chunks/0t_2obde5n17h.js | 7 + .../out/_next/static/chunks/0ta1ffddte5~e.js | 9 + .../{ca5fbafaf3826374.js => 0ttl0__m~5i8a.js} | 0 .../out/_next/static/chunks/0txi1wfn0-01d.js | 1 + .../out/_next/static/chunks/0tz7rml6rolh7.js | 14 + .../{ae420624472238ad.js => 0t~fchw5zb-4r.js} | 4 +- .../out/_next/static/chunks/0ugell4._eyay.js | 13 + .../out/_next/static/chunks/0ugpxsagaloo4.js | 1 + .../out/_next/static/chunks/0uha0pnzl-vec.js | 1 + .../out/_next/static/chunks/0un2--nwsw-uk.js | 1 + .../{70591b116c194481.js => 0upl0pr28-8_j.js} | 0 .../out/_next/static/chunks/0ur~j0twg0t4g.js | 98 +++ .../out/_next/static/chunks/0usxgadggtc52.js | 1 + .../out/_next/static/chunks/0v-.p0q481gjy.js | 1 + .../out/_next/static/chunks/0v.0z34os-hl7.js | 1 + .../out/_next/static/chunks/0v1c3mu~xn105.js | 1 + .../out/_next/static/chunks/0v1rxqc1hqmrl.js | 4 + .../out/_next/static/chunks/0v3d9_8xkvq3w.js | 39 ++ .../out/_next/static/chunks/0vawigy~j_gsx.js | 3 + .../out/_next/static/chunks/0vkkv~m8z3lv~.js | 1 + .../out/_next/static/chunks/0v~f8eqfpch2v.js | 1 + .../{43a9809839de4e6f.js => 0w9a1yg0dlbiw.js} | 0 .../out/_next/static/chunks/0wgk2liq6dqky.js | 1 + .../{0a6c418370a8c183.js => 0whkizop7gd0~.js} | 0 .../out/_next/static/chunks/0w~oa2pli-t56.js | 1 + .../out/_next/static/chunks/0x.73w57rn4ou.js | 1 + .../out/_next/static/chunks/0xqg~rk67rumc.js | 2 + .../out/_next/static/chunks/0x~b7xip-yufi.js | 8 + .../{fcad393dcc862a21.js => 0yblb2-hdk~lt.js} | 6 +- .../out/_next/static/chunks/0ybvtcd~xp-mx.js | 167 +++++ .../out/_next/static/chunks/0yjifm.h74~ec.js | 98 +++ .../{134f728fa7099e3e.js => 0ylz5md8p6x7z.js} | 14 +- .../out/_next/static/chunks/0ys10755n8os_.js | 1 + .../out/_next/static/chunks/0z9bnun-zovqc.js | 1 + .../out/_next/static/chunks/0zmz_tmhm2hsa.js | 7 + .../{5f9c3b92a016f382.js => 0zrbitbm~0koh.js} | 0 .../out/_next/static/chunks/0zxb95ki25y8w.js | 7 + .../{54563d12ee8915f4.js => 0~ozahatcu75y.js} | 0 .../out/_next/static/chunks/100mcnex8yqiz.js | 1 + .../_next/static/chunks/102e659fcec2585e.js | 8 - .../out/_next/static/chunks/102xsbbp.u4ar.js | 8 + .../out/_next/static/chunks/10aj2k~llf~ks.js | 20 + .../_next/static/chunks/10dc4591ef08a91f.js | 598 ------------------ .../out/_next/static/chunks/10n3-~19sc08i.js | 1 + .../out/_next/static/chunks/10q34c2t7--5-.js | 1 + .../out/_next/static/chunks/10v.38o.6qi7-.js | 1 + .../out/_next/static/chunks/10x7z8jgppbtw.js | 8 + .../out/_next/static/chunks/11ibt3khr2hk3.js | 1 + .../_next/static/chunks/120b47ad353e1fc9.js | 98 --- .../{26542a70b9512f71.js => 121g1kmcll0g6.js} | 8 +- .../out/_next/static/chunks/129bujhdmi9ce.js | 4 + .../out/_next/static/chunks/12w.m0_zg8wpq.js | 8 + .../_next/static/chunks/1300460219810c10.js | 4 - .../{446b8595ea98bdef.js => 130gamvns4f_q.js} | 0 .../out/_next/static/chunks/137i07xf5e.xc.js | 1 + .../{3c2d67ecf9619f2b.js => 13br-6l.k_pmg.js} | 0 .../out/_next/static/chunks/13jg16smls48s.js | 7 + .../out/_next/static/chunks/13lfiw5-3ktce.js | 1 + .../out/_next/static/chunks/13ycgm4g26ez_.js | 1 + .../out/_next/static/chunks/13ysooad2u4zz.js | 1 + .../_next/static/chunks/140cf81b356b3239.js | 1 - .../_next/static/chunks/1461020743acb21c.js | 1 - .../_next/static/chunks/14891020b3fb2fc3.js | 8 - .../{878832edb30e99a4.js => 14ut9b-iwzfct.js} | 0 .../out/_next/static/chunks/15.9ylrtxojbj.js | 4 + .../{46d42331373d9805.js => 15b5n8fnfc228.js} | 0 .../out/_next/static/chunks/15fosz6-y91je.js | 1 + .../out/_next/static/chunks/15g0xeupk30ip.js | 8 + .../{54da342a06baf122.js => 15hm8gokjq2uu.js} | 2 +- .../out/_next/static/chunks/15wppjgop06qi.js | 3 + .../out/_next/static/chunks/166fc~7u39du3.js | 1 + .../out/_next/static/chunks/16bbwf4tez3tz.js | 8 + .../out/_next/static/chunks/16hjjjlzvisl9.js | 1 + .../out/_next/static/chunks/17-i5j54jkv5l.js | 1 + .../out/_next/static/chunks/17.q2iay6h4dm.js | 2 + .../_next/static/chunks/175814061abf2c71.js | 1 - .../out/_next/static/chunks/175t1ejd~fi99.js | 40 ++ .../out/_next/static/chunks/181y.ii57q7gs.js | 1 + .../out/_next/static/chunks/186viidwrwv_o.js | 1 + .../_next/static/chunks/18a9536fce05dc33.js | 1 - .../out/_next/static/chunks/18b1-~305a__9.js | 1 + .../_next/static/chunks/1a656c00638be9c7.js | 8 - .../_next/static/chunks/1a9ab640dd574eca.js | 1 - .../_next/static/chunks/1ab44e07f0b1cd5e.js | 1 - .../_next/static/chunks/1abad0fb1abdc83c.js | 2 - .../_next/static/chunks/1bfc3425410625f3.js | 1 - .../_next/static/chunks/1e1da84ff36bc348.js | 1 - .../_next/static/chunks/20acf4fa815c638e.js | 1 - .../_next/static/chunks/222fa988d93d834f.js | 1 - .../_next/static/chunks/23491c78faf959c9.js | 1 - .../_next/static/chunks/23520f5ea04a66c8.js | 420 ------------ .../_next/static/chunks/25d8f4225095b808.js | 1 - .../_next/static/chunks/266fce1df297fb45.js | 98 --- .../_next/static/chunks/26d6c6bf01dbe363.js | 98 --- .../_next/static/chunks/27c7596aa0326b71.js | 4 - .../_next/static/chunks/28e332ef9497a292.js | 1 - .../_next/static/chunks/2971c4658f1bcd7d.js | 1 - .../_next/static/chunks/2a5f4a7388e54210.js | 68 -- .../_next/static/chunks/2b682a7f2932def8.js | 11 - .../_next/static/chunks/2bca6e6a96b0858a.js | 1 - .../_next/static/chunks/325c5effcc6e2384.js | 1 - .../_next/static/chunks/3356ae3643d24081.js | 3 - .../_next/static/chunks/355b9871de1cf382.js | 1 - .../_next/static/chunks/3648e0a5f38c5d36.js | 1 - .../_next/static/chunks/36ccc2b555a26ad4.js | 4 - .../_next/static/chunks/3ba782adb71e77d0.js | 7 - .../_next/static/chunks/3c0e9dc19dbbd4ed.js | 1 - .../_next/static/chunks/42a4beeb4aa01eba.js | 1 - .../_next/static/chunks/43118e9b10d4adb7.js | 1 - .../_next/static/chunks/43f6fc3c2ab9cf23.js | 17 - .../_next/static/chunks/4869cdb44fe43698.js | 1 - .../_next/static/chunks/496b84010c33cf69.js | 1 - .../_next/static/chunks/4a0ccb5ed3d0c33f.js | 72 --- .../_next/static/chunks/4d3aafceafce4648.js | 1 - .../_next/static/chunks/4e06277331e725da.js | 167 ----- .../_next/static/chunks/4e17b625d75327a7.js | 7 - .../_next/static/chunks/4e20891f2fd03463.css | 1 - .../_next/static/chunks/4eab0601ddda6611.js | 3 - .../_next/static/chunks/518eb8c7598afad6.js | 1 - .../_next/static/chunks/5282ed7355826608.js | 1 - .../_next/static/chunks/5387bd8bd4bcf195.js | 14 - .../_next/static/chunks/5489ec6b9761f819.js | 1 - .../_next/static/chunks/5583bc893837fdf8.js | 4 - .../_next/static/chunks/561b33e0e4675dd8.js | 1 - .../_next/static/chunks/570b2e10aa856e54.js | 1 - .../_next/static/chunks/570d770996d98e0f.js | 1 - .../_next/static/chunks/57a2860decebc0b6.js | 1 - .../_next/static/chunks/59e0c0c187697b37.js | 14 - .../_next/static/chunks/5aa498497363ab6c.js | 1 - .../_next/static/chunks/5b2b7fd4dd9a44f3.js | 4 - .../_next/static/chunks/5b9c0b6d6c814e58.js | 1 - .../_next/static/chunks/6188170a32c9a3c3.js | 3 - .../_next/static/chunks/667115385c71d974.js | 1 - .../_next/static/chunks/6764a89c3c614835.js | 4 - .../_next/static/chunks/679dbd657c8b5aef.js | 31 - .../_next/static/chunks/6ac5e2383054326d.js | 10 - .../_next/static/chunks/6c4c97f1ea6e7d77.js | 4 - .../_next/static/chunks/7142b7d05b1b4b2e.js | 1 - .../_next/static/chunks/71dc4f719feed2c0.js | 1 - .../_next/static/chunks/71f6f0fcaef91598.js | 1 - .../_next/static/chunks/726579f2940c2a2f.js | 1 - .../_next/static/chunks/738c339383c3b4b6.js | 1 - .../_next/static/chunks/73b7998f9fa9c4c2.js | 1 - .../_next/static/chunks/7425e467262c0658.js | 14 - .../_next/static/chunks/76d25012c7da52a0.js | 8 - .../_next/static/chunks/7a9066dcd4a390ff.js | 1 - .../_next/static/chunks/7b46d83da0ba9049.js | 1 - .../_next/static/chunks/7c552f88245cdd96.js | 1 - .../_next/static/chunks/7cfedb9cfc78efdb.js | 1 - .../_next/static/chunks/7e417dd24c8becd0.js | 1 - .../_next/static/chunks/7e5fe5584502da06.js | 46 -- .../_next/static/chunks/7f7819822e72bcae.js | 2 - .../_next/static/chunks/80749a6dab9b96b4.js | 14 - .../_next/static/chunks/8489ea6f0be86483.js | 1 - .../_next/static/chunks/84f351822ff5289f.js | 420 ------------ .../_next/static/chunks/8712a14511b63b6c.js | 1 - .../_next/static/chunks/88c74f8b4b20d25a.js | 1 - .../_next/static/chunks/8c4d9ca78c194144.js | 8 - .../_next/static/chunks/908828a91f602d8b.js | 86 --- .../_next/static/chunks/91037395c95e366d.css | 1 - .../_next/static/chunks/928d0c629f28babb.js | 14 - .../_next/static/chunks/92cf5d832080641f.js | 13 - .../_next/static/chunks/939e8a7d52fbe9ce.js | 8 - .../_next/static/chunks/93c3938d8d8704b3.js | 38 -- .../_next/static/chunks/9492aee8924914ae.js | 8 - .../_next/static/chunks/94f7208f5087e27c.js | 1 - .../_next/static/chunks/95b1023fa868f012.js | 14 - .../_next/static/chunks/95bdda1c2974030d.js | 420 ------------ .../_next/static/chunks/975f380f5d2c2b7d.js | 2 - .../_next/static/chunks/98efd843bd5a0758.js | 1 - .../_next/static/chunks/993822065369ee18.js | 14 - .../_next/static/chunks/9e09de50158b3159.js | 1 - .../_next/static/chunks/a06cc76a774dd182.js | 13 - .../_next/static/chunks/a09028cd611c08ef.js | 2 - .../_next/static/chunks/a0ce6f40daef039a.js | 1 - .../_next/static/chunks/a0f302271a793712.js | 4 - .../_next/static/chunks/a2352cfbbb384fe9.js | 1 - .../_next/static/chunks/a3af1b3a5c791b3e.js | 1 - .../static/chunks/a6dad97d9634a72d.js.map | 1 - .../_next/static/chunks/a7919217b70a9a35.js | 17 - .../_next/static/chunks/a81db9a7d7d3325e.js | 420 ------------ .../_next/static/chunks/a8f7c8c5eeb6e042.js | 1 - .../_next/static/chunks/aac7c99aa647e49d.js | 9 - .../_next/static/chunks/aba51a6559eb06c7.js | 14 - .../_next/static/chunks/abf1a802816f8f5a.js | 1 - .../_next/static/chunks/ad02f56c287539eb.js | 1 - .../_next/static/chunks/adbc9cda75866ec1.js | 8 - .../_next/static/chunks/adf8db17652cf9aa.js | 1 - .../_next/static/chunks/adfd07c864335b45.js | 1 - .../_next/static/chunks/b3d198d6c56a21b8.js | 13 - .../_next/static/chunks/b6c1a99750c8786e.js | 1 - .../_next/static/chunks/b9341b4c942e3943.js | 14 - .../_next/static/chunks/baadbd26839e7b66.js | 1 - .../_next/static/chunks/bd02f158353d9cea.js | 98 --- .../_next/static/chunks/bde2340071127430.js | 1 - .../_next/static/chunks/bf30ce92e35d0d54.js | 8 - .../_next/static/chunks/bfbc736ab510b9aa.js | 2 - .../_next/static/chunks/c058ac3e89dc33df.js | 1 - .../_next/static/chunks/c1efd92d6b02ddc9.js | 1 - .../_next/static/chunks/c24ccfc46ac95900.js | 1 - .../_next/static/chunks/c77d417e8a84d57c.js | 17 - .../_next/static/chunks/c93d5122cac84bc6.js | 14 - .../_next/static/chunks/cb8e6ba28461af15.js | 4 - .../_next/static/chunks/cbdff18b8d0102ff.js | 2 - .../_next/static/chunks/ccd21850ee94c92e.js | 1 - .../_next/static/chunks/cfa0acae44b4288b.js | 7 - .../_next/static/chunks/d19edc2f5c8ae8a5.js | 98 --- .../_next/static/chunks/d6ab357d1bbb53f0.js | 1 - .../_next/static/chunks/d7798a4e148be3fe.js | 1 - .../_next/static/chunks/d7aa89e52e3d1758.js | 1 - .../_next/static/chunks/d7bc6bc3b0d44586.js | 1 - .../_next/static/chunks/d84d93ec5e05aece.js | 1 - .../_next/static/chunks/d96012bcfc98706a.js | 1 - .../_next/static/chunks/da1c7742cc6fe8b4.js | 17 - .../_next/static/chunks/da505418e8e8af34.js | 20 - .../_next/static/chunks/dae72c93f180b49f.js | 1 - .../_next/static/chunks/dbca964212122d58.js | 1 - .../_next/static/chunks/dc8c6d1742643c95.js | 1 - .../_next/static/chunks/e00ff4e948e36ad2.js | 1 - .../_next/static/chunks/e03c46f5f6c919c6.js | 1 - .../_next/static/chunks/e099566e8bd4ee4e.js | 1 - .../_next/static/chunks/e1f23fd814ac3500.js | 4 - .../_next/static/chunks/e2e17b99dc4f7bfa.js | 1 - .../_next/static/chunks/e619760a0baf9a7e.js | 1 - .../_next/static/chunks/e7e5bfdf70ba79ab.js | 1 - .../_next/static/chunks/e8044d049f37fcb0.js | 1 - .../_next/static/chunks/e96398764f77c728.js | 2 - .../_next/static/chunks/ead0794ce27b66ce.js | 1 - .../_next/static/chunks/edf02e15c80921ac.js | 1 - .../_next/static/chunks/ee5f9a39a526e423.js | 1 - .../_next/static/chunks/f3fbc1bcf9fcd444.js | 1 - .../_next/static/chunks/f48aa7c7bdc85371.js | 1 - .../_next/static/chunks/f5de144852609bdf.js | 1 - .../_next/static/chunks/f7e1d08418645368.js | 1 - .../_next/static/chunks/fcdf7322b0aa3e2e.js | 1 - .../static/chunks/turbopack-0f1c9lug~n6kv.js | 1 + .../chunks/turbopack-ddedb29a5eb0118f.js | 4 - ...=> 1bffadaabf893a1e-s.16ipb6fqu393i.woff2} | Bin ...=> 2bbe8d2671613f1f-s.067x_6k0k23tk.woff2} | Bin ...=> 2c55a0e60120577a-s.0bjc5tiuqdqro.woff2} | Bin ...=> 5476f68d60460930-s.0wxq9webf.ew4.woff2} | Bin ... 83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2} | Bin ...=> 9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2} | Bin ...=> ad66f9afd8947f86-s.11u06r12fd6v_.woff2} | Bin ...1d32c690.ico => favicon.0~dgapwhi~75y.ico} | Bin .../_buildManifest.js | 0 .../_clientMiddlewareManifest.js | 1 + .../_ssgManifest.js | 0 .../proxy/_experimental/out/_not-found.html | 2 +- .../proxy/_experimental/out/_not-found.txt | 30 +- .../out/_not-found/__next._full.txt | 30 +- .../out/_not-found/__next._head.txt | 8 +- .../out/_not-found/__next._index.txt | 14 +- .../_not-found/__next._not-found.__PAGE__.txt | 4 +- .../out/_not-found/__next._not-found.txt | 7 +- .../out/_not-found/__next._tree.txt | 6 +- .../_experimental/out/api-reference.html | 2 +- .../proxy/_experimental/out/api-reference.txt | 54 +- ...KGRhc2hib2FyZCk.api-reference.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.api-reference.txt | 7 +- .../api-reference/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/api-reference/__next._full.txt | 54 +- .../out/api-reference/__next._head.txt | 8 +- .../out/api-reference/__next._index.txt | 14 +- .../out/api-reference/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/chat.html | 2 +- litellm/proxy/_experimental/out/chat.txt | 37 +- .../_experimental/out/chat/__next._full.txt | 37 +- .../_experimental/out/chat/__next._head.txt | 8 +- .../_experimental/out/chat/__next._index.txt | 14 +- .../_experimental/out/chat/__next._tree.txt | 8 +- .../out/chat/__next.chat.__PAGE__.txt | 8 +- .../_experimental/out/chat/__next.chat.txt | 7 +- .../out/experimental/api-playground.html | 2 +- .../out/experimental/api-playground.txt | 56 +- ...k.experimental.api-playground.__PAGE__.txt | 10 +- ...2hib2FyZCk.experimental.api-playground.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../api-playground/__next._full.txt | 56 +- .../api-playground/__next._head.txt | 8 +- .../api-playground/__next._index.txt | 14 +- .../api-playground/__next._tree.txt | 8 +- .../out/experimental/budgets.html | 2 +- .../out/experimental/budgets.txt | 54 +- ...ib2FyZCk.experimental.budgets.__PAGE__.txt | 10 +- ....!KGRhc2hib2FyZCk.experimental.budgets.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../budgets/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/experimental/budgets/__next._full.txt | 54 +- .../out/experimental/budgets/__next._head.txt | 8 +- .../experimental/budgets/__next._index.txt | 14 +- .../out/experimental/budgets/__next._tree.txt | 8 +- .../out/experimental/caching.html | 2 +- .../out/experimental/caching.txt | 54 +- ...ib2FyZCk.experimental.caching.__PAGE__.txt | 10 +- ....!KGRhc2hib2FyZCk.experimental.caching.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../caching/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/experimental/caching/__next._full.txt | 54 +- .../out/experimental/caching/__next._head.txt | 8 +- .../experimental/caching/__next._index.txt | 14 +- .../out/experimental/caching/__next._tree.txt | 8 +- .../out/experimental/claude-code-plugins.html | 2 +- .../out/experimental/claude-code-plugins.txt | 56 +- ...erimental.claude-code-plugins.__PAGE__.txt | 10 +- ...FyZCk.experimental.claude-code-plugins.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../claude-code-plugins/__next._full.txt | 56 +- .../claude-code-plugins/__next._head.txt | 8 +- .../claude-code-plugins/__next._index.txt | 14 +- .../claude-code-plugins/__next._tree.txt | 8 +- .../out/experimental/old-usage.html | 2 +- .../out/experimental/old-usage.txt | 54 +- ...2FyZCk.experimental.old-usage.__PAGE__.txt | 10 +- ...KGRhc2hib2FyZCk.experimental.old-usage.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../old-usage/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../experimental/old-usage/__next._full.txt | 54 +- .../experimental/old-usage/__next._head.txt | 8 +- .../experimental/old-usage/__next._index.txt | 14 +- .../experimental/old-usage/__next._tree.txt | 8 +- .../out/experimental/prompts.html | 2 +- .../out/experimental/prompts.txt | 54 +- ...ib2FyZCk.experimental.prompts.__PAGE__.txt | 10 +- ....!KGRhc2hib2FyZCk.experimental.prompts.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../prompts/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/experimental/prompts/__next._full.txt | 54 +- .../out/experimental/prompts/__next._head.txt | 8 +- .../experimental/prompts/__next._index.txt | 14 +- .../out/experimental/prompts/__next._tree.txt | 8 +- .../out/experimental/tag-management.html | 2 +- .../out/experimental/tag-management.txt | 56 +- ...k.experimental.tag-management.__PAGE__.txt | 10 +- ...2hib2FyZCk.experimental.tag-management.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.experimental.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../tag-management/__next._full.txt | 56 +- .../tag-management/__next._head.txt | 8 +- .../tag-management/__next._index.txt | 14 +- .../tag-management/__next._tree.txt | 8 +- .../proxy/_experimental/out/guardrails.html | 2 +- .../proxy/_experimental/out/guardrails.txt | 55 +- ...t.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.guardrails.txt | 7 +- .../guardrails/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/guardrails/__next._full.txt | 55 +- .../out/guardrails/__next._head.txt | 8 +- .../out/guardrails/__next._index.txt | 14 +- .../out/guardrails/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/index.html | 2 +- litellm/proxy/_experimental/out/index.txt | 121 ++-- litellm/proxy/_experimental/out/login.html | 2 +- litellm/proxy/_experimental/out/login.txt | 36 +- .../_experimental/out/login/__next._full.txt | 36 +- .../_experimental/out/login/__next._head.txt | 8 +- .../_experimental/out/login/__next._index.txt | 14 +- .../_experimental/out/login/__next._tree.txt | 8 +- .../out/login/__next.login.__PAGE__.txt | 8 +- .../_experimental/out/login/__next.login.txt | 7 +- litellm/proxy/_experimental/out/logs.html | 2 +- litellm/proxy/_experimental/out/logs.txt | 57 +- .../__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt | 12 +- .../out/logs/__next.!KGRhc2hib2FyZCk.logs.txt | 7 +- .../out/logs/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../_experimental/out/logs/__next._full.txt | 57 +- .../_experimental/out/logs/__next._head.txt | 8 +- .../_experimental/out/logs/__next._index.txt | 14 +- .../_experimental/out/logs/__next._tree.txt | 10 +- .../_experimental/out/mcp/oauth/callback.html | 2 +- .../_experimental/out/mcp/oauth/callback.txt | 36 +- .../out/mcp/oauth/callback/__next._full.txt | 36 +- .../out/mcp/oauth/callback/__next._head.txt | 8 +- .../out/mcp/oauth/callback/__next._index.txt | 14 +- .../out/mcp/oauth/callback/__next._tree.txt | 8 +- .../__next.mcp.oauth.callback.__PAGE__.txt | 8 +- .../callback/__next.mcp.oauth.callback.txt | 7 +- .../mcp/oauth/callback/__next.mcp.oauth.txt | 7 +- .../out/mcp/oauth/callback/__next.mcp.txt | 7 +- .../proxy/_experimental/out/model-hub.html | 2 +- litellm/proxy/_experimental/out/model-hub.txt | 55 +- ...xt.!KGRhc2hib2FyZCk.model-hub.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.model-hub.txt | 7 +- .../out/model-hub/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/model-hub/__next._full.txt | 55 +- .../out/model-hub/__next._head.txt | 8 +- .../out/model-hub/__next._index.txt | 14 +- .../out/model-hub/__next._tree.txt | 8 +- .../proxy/_experimental/out/model_hub.html | 2 +- litellm/proxy/_experimental/out/model_hub.txt | 44 +- .../out/model_hub/__next._full.txt | 44 +- .../out/model_hub/__next._head.txt | 8 +- .../out/model_hub/__next._index.txt | 14 +- .../out/model_hub/__next._tree.txt | 8 +- .../model_hub/__next.model_hub.__PAGE__.txt | 8 +- .../out/model_hub/__next.model_hub.txt | 7 +- .../_experimental/out/model_hub_table.html | 2 +- .../_experimental/out/model_hub_table.txt | 53 +- .../out/model_hub_table/__next._full.txt | 53 +- .../out/model_hub_table/__next._head.txt | 8 +- .../out/model_hub_table/__next._index.txt | 14 +- .../out/model_hub_table/__next._tree.txt | 8 +- .../__next.model_hub_table.__PAGE__.txt | 8 +- .../__next.model_hub_table.txt | 7 +- .../out/models-and-endpoints.html | 2 +- .../out/models-and-endpoints.txt | 54 +- ...ib2FyZCk.models-and-endpoints.__PAGE__.txt | 10 +- ....!KGRhc2hib2FyZCk.models-and-endpoints.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/models-and-endpoints/__next._full.txt | 54 +- .../out/models-and-endpoints/__next._head.txt | 8 +- .../models-and-endpoints/__next._index.txt | 14 +- .../out/models-and-endpoints/__next._tree.txt | 8 +- .../proxy/_experimental/out/onboarding.html | 2 +- .../proxy/_experimental/out/onboarding.txt | 36 +- .../out/onboarding/__next._full.txt | 36 +- .../out/onboarding/__next._head.txt | 8 +- .../out/onboarding/__next._index.txt | 14 +- .../out/onboarding/__next._tree.txt | 8 +- .../onboarding/__next.onboarding.__PAGE__.txt | 8 +- .../out/onboarding/__next.onboarding.txt | 7 +- .../_experimental/out/organizations.html | 2 +- .../proxy/_experimental/out/organizations.txt | 54 +- ...KGRhc2hib2FyZCk.organizations.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.organizations.txt | 7 +- .../organizations/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/organizations/__next._full.txt | 54 +- .../out/organizations/__next._head.txt | 8 +- .../out/organizations/__next._index.txt | 14 +- .../out/organizations/__next._tree.txt | 8 +- .../proxy/_experimental/out/playground.html | 2 +- .../proxy/_experimental/out/playground.txt | 55 +- ...t.!KGRhc2hib2FyZCk.playground.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.playground.txt | 7 +- .../playground/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/playground/__next._full.txt | 55 +- .../out/playground/__next._head.txt | 8 +- .../out/playground/__next._index.txt | 14 +- .../out/playground/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/policies.html | 2 +- litellm/proxy/_experimental/out/policies.txt | 55 +- ...ext.!KGRhc2hib2FyZCk.policies.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.policies.txt | 7 +- .../out/policies/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/policies/__next._full.txt | 55 +- .../out/policies/__next._head.txt | 8 +- .../out/policies/__next._index.txt | 14 +- .../out/policies/__next._tree.txt | 8 +- .../out/settings/admin-settings.html | 2 +- .../out/settings/admin-settings.txt | 54 +- ...FyZCk.settings.admin-settings.__PAGE__.txt | 10 +- ...GRhc2hib2FyZCk.settings.admin-settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../settings/admin-settings/__next._full.txt | 54 +- .../settings/admin-settings/__next._head.txt | 8 +- .../settings/admin-settings/__next._index.txt | 14 +- .../settings/admin-settings/__next._tree.txt | 8 +- .../out/settings/logging-and-alerts.html | 2 +- .../out/settings/logging-and-alerts.txt | 56 +- ...k.settings.logging-and-alerts.__PAGE__.txt | 10 +- ...2hib2FyZCk.settings.logging-and-alerts.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../logging-and-alerts/__next._full.txt | 56 +- .../logging-and-alerts/__next._head.txt | 8 +- .../logging-and-alerts/__next._index.txt | 14 +- .../logging-and-alerts/__next._tree.txt | 8 +- .../out/settings/router-settings.html | 2 +- .../out/settings/router-settings.txt | 54 +- ...yZCk.settings.router-settings.__PAGE__.txt | 10 +- ...Rhc2hib2FyZCk.settings.router-settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.txt | 10 +- .../settings/router-settings/__next._full.txt | 54 +- .../settings/router-settings/__next._head.txt | 8 +- .../router-settings/__next._index.txt | 14 +- .../settings/router-settings/__next._tree.txt | 8 +- .../_experimental/out/settings/ui-theme.html | 2 +- .../_experimental/out/settings/ui-theme.txt | 54 +- .../__next.!KGRhc2hib2FyZCk.settings.txt | 7 +- ...c2hib2FyZCk.settings.ui-theme.__PAGE__.txt | 10 +- ...ext.!KGRhc2hib2FyZCk.settings.ui-theme.txt | 7 +- .../ui-theme/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/settings/ui-theme/__next._full.txt | 54 +- .../out/settings/ui-theme/__next._head.txt | 8 +- .../out/settings/ui-theme/__next._index.txt | 14 +- .../out/settings/ui-theme/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/skills.html | 2 +- litellm/proxy/_experimental/out/skills.txt | 55 +- ..._next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt | 10 +- .../skills/__next.!KGRhc2hib2FyZCk.skills.txt | 7 +- .../out/skills/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../_experimental/out/skills/__next._full.txt | 55 +- .../_experimental/out/skills/__next._head.txt | 8 +- .../out/skills/__next._index.txt | 14 +- .../_experimental/out/skills/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/teams.html | 2 +- litellm/proxy/_experimental/out/teams.txt | 55 +- ...__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt | 10 +- .../teams/__next.!KGRhc2hib2FyZCk.teams.txt | 7 +- .../out/teams/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../_experimental/out/teams/__next._full.txt | 55 +- .../_experimental/out/teams/__next._head.txt | 8 +- .../_experimental/out/teams/__next._index.txt | 14 +- .../_experimental/out/teams/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/test-key.html | 2 +- litellm/proxy/_experimental/out/test-key.txt | 55 +- ...ext.!KGRhc2hib2FyZCk.test-key.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.test-key.txt | 7 +- .../out/test-key/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/test-key/__next._full.txt | 55 +- .../out/test-key/__next._head.txt | 8 +- .../out/test-key/__next._index.txt | 14 +- .../out/test-key/__next._tree.txt | 8 +- .../_experimental/out/tools/mcp-servers.html | 2 +- .../_experimental/out/tools/mcp-servers.txt | 54 +- ...c2hib2FyZCk.tools.mcp-servers.__PAGE__.txt | 10 +- ...ext.!KGRhc2hib2FyZCk.tools.mcp-servers.txt | 7 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 7 +- .../mcp-servers/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/tools/mcp-servers/__next._full.txt | 54 +- .../out/tools/mcp-servers/__next._head.txt | 8 +- .../out/tools/mcp-servers/__next._index.txt | 14 +- .../out/tools/mcp-servers/__next._tree.txt | 8 +- .../out/tools/vector-stores.html | 2 +- .../_experimental/out/tools/vector-stores.txt | 54 +- .../__next.!KGRhc2hib2FyZCk.tools.txt | 7 +- ...hib2FyZCk.tools.vector-stores.__PAGE__.txt | 10 +- ...t.!KGRhc2hib2FyZCk.tools.vector-stores.txt | 7 +- .../vector-stores/__next.!KGRhc2hib2FyZCk.txt | 10 +- .../out/tools/vector-stores/__next._full.txt | 54 +- .../out/tools/vector-stores/__next._head.txt | 8 +- .../out/tools/vector-stores/__next._index.txt | 14 +- .../out/tools/vector-stores/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/usage.html | 2 +- litellm/proxy/_experimental/out/usage.txt | 55 +- .../out/usage/__next.!KGRhc2hib2FyZCk.txt | 10 +- ...__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt | 10 +- .../usage/__next.!KGRhc2hib2FyZCk.usage.txt | 7 +- .../_experimental/out/usage/__next._full.txt | 55 +- .../_experimental/out/usage/__next._head.txt | 8 +- .../_experimental/out/usage/__next._index.txt | 14 +- .../_experimental/out/usage/__next._tree.txt | 8 +- litellm/proxy/_experimental/out/users.html | 2 +- litellm/proxy/_experimental/out/users.txt | 55 +- .../out/users/__next.!KGRhc2hib2FyZCk.txt | 10 +- ...__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt | 10 +- .../users/__next.!KGRhc2hib2FyZCk.users.txt | 7 +- .../_experimental/out/users/__next._full.txt | 55 +- .../_experimental/out/users/__next._head.txt | 8 +- .../_experimental/out/users/__next._index.txt | 14 +- .../_experimental/out/users/__next._tree.txt | 8 +- .../proxy/_experimental/out/virtual-keys.html | 2 +- .../proxy/_experimental/out/virtual-keys.txt | 55 +- .../virtual-keys/__next.!KGRhc2hib2FyZCk.txt | 10 +- ...!KGRhc2hib2FyZCk.virtual-keys.__PAGE__.txt | 10 +- .../__next.!KGRhc2hib2FyZCk.virtual-keys.txt | 7 +- .../out/virtual-keys/__next._full.txt | 55 +- .../out/virtual-keys/__next._head.txt | 8 +- .../out/virtual-keys/__next._index.txt | 14 +- .../out/virtual-keys/__next._tree.txt | 8 +- 733 files changed, 7619 insertions(+), 7158 deletions(-) delete mode 100644 litellm/proxy/_experimental/out/_next/static/LpD6ruZoEpvYpT5IvMEoa/_clientMiddlewareManifest.json create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0-2-9tcizw.kv.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0-4-0.z8w6y27.js rename litellm/proxy/_experimental/out/_next/static/chunks/{659ce28f2cb74401.js => 0-dwjzo6mg1t7.js} (75%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0-ne4el5qxs1z.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.6dhordmknmz.js rename litellm/proxy/_experimental/out/_next/static/chunks/{a1ef280b7ad5ae6a.js => 0.75_v4.brf7u.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.d2a_5_6-5pn.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.je~3iy~k4ss.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.kfwj93~uvc5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0.u~fsd.paivu.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/008w4tqm~9~ds.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00bicsqsx~erf.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00dq_sa6qt2eg.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00ff280cdb7d7ee5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00mx~d442jr~o.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00n_262-goqx6.js rename litellm/proxy/_experimental/out/_next/static/chunks/{67570d9401e62846.js => 00p.gft-l.6p..js} (97%) rename litellm/proxy/_experimental/out/_next/static/chunks/{3b30ab8eaa03bc21.js => 00q4mtjboprhm.js} (93%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00rvson..zjub.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00ym60oj49oo5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/015yfy38oh-h8.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01bk9s-ky6_e..js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01eoe.0n-q6.q.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01g5ls2__cy9q.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01n1bg17oxp8l.js rename litellm/proxy/_experimental/out/_next/static/chunks/{754fc49bd90d2980.js => 01ne7gi3z97di.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01pr-g28x~.uu.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01u0i~l49qpdz.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01xm1xt.gmrff.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/01y._o853f7le.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/022.sz94ycw4x.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0229ic_5ff586.js rename litellm/proxy/_experimental/out/_next/static/chunks/{542a1a209eb732c6.js => 02_ols0zt.cn1.js} (94%) rename litellm/proxy/_experimental/out/_next/static/chunks/{7b788dd93ad868b3.js => 02ihc5xweq16v.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{b1c98cc932a0ab19.js => 02v412-qgvyfr.js} (100%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/030fbd1b8bfd0d5f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{99cf9cf99df5ccfc.js => 036wlkuzplhfz.js} (95%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0377ae18aae60c57.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/03kdcij4tsege.js rename litellm/proxy/_experimental/out/_next/static/chunks/{a6dad97d9634a72d.js => 03~yq9q893hmn.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/04.aj3k78v7ut.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/047wghe2gva_o.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0493aafc4891dd29.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/04o4lz~y91s1r.css rename litellm/proxy/_experimental/out/_next/static/chunks/{0c3e8651e0e97232.js => 05b_~th4crri2.js} (100%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05fcbaa2a2d4ce24.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05iha4cgkkxu1.js rename litellm/proxy/_experimental/out/_next/static/chunks/{9cca003867a68aa9.js => 05nip7kd~pjv1.js} (52%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05qmwjqau64bz.css delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0606c92ecd600e0c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06b2ea8c776c2e9b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06es90~yrkd00.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06gao0u0xy9th.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ecbe4d32f0d0ccd3.js => 06kpwf4i0qv9q.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06l162pg8h_k5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06oag4x9~8vif.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06vhmp61k2a89.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06~kt_oo6pz6v.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/07.fwfv-sinb5.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/070q-kt12zun~.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0746reu0n0hsv.js rename litellm/proxy/_experimental/out/_next/static/chunks/{eea976cf4a05fc92.js => 07m0uxheepw8a.js} (91%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/07ok39ppl.vl1.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/08401f_hwndsf.js rename litellm/proxy/_experimental/out/_next/static/chunks/{934dbc43f8c1abde.js => 08cbskerpmujn.js} (99%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09.lm5dax~l7e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/092z01ntb5nu~.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/098j5eweuy__x.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09h04rv0~.g9j.js rename litellm/proxy/_experimental/out/_next/static/chunks/{c847ecdf8c790b0b.js => 09n64dqzn.le~.js} (89%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09o_h3e0fwffd.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09op-t36a-zxm.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/09w3xhc94wa5b.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0_7p_0twqq2dv.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0_ex-stk7ibf_.js rename litellm/proxy/_experimental/out/_next/static/chunks/{adb8beb738574863.js => 0_p625as00xbq.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0_wp7tq3f6six.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0a65da2cd24e2ab6.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ce44d74054c76c03.js => 0aa08wo9_4k-o.js} (55%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0aivi0og~sj6k.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ar6956xz0njn.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ayg3m_5s_z2w.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0b376ph2~1g5l.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0b3d09ff6c6e4335.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0b470ffc60999bf4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0bkk~1l186k4g.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0bzika30gg9sv.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0c.vtc8uofg.h.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0c20.u.cu4ruj.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0c4pfjjue0uc-.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ca7a3fdb635fb7dc.js => 0cbiddnyyt-22.js} (99%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0cv239bgotud_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0da~.l_uihpug.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dit6d5rb4h85.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dmfhvqon~mn~.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dt4fjjwbrov2.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dz69vhu32vzp.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0e6cra27t9c6b.js rename litellm/proxy/_experimental/out/_next/static/chunks/{cbfd53da3104be2a.js => 0e7nuqlfah86n.js} (60%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0eeoyv3fh--5v.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ek7vfd1hrb4_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0em0654rb513m.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0exy~ua1-3m4l.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0eym_z87ts-j8.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0f6t.sli9v9zt.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0fnkbcxr~4hwq.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0fns6vsccj10h.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0gb9pui.r~-sy.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0goq2snzui.n8.js rename litellm/proxy/_experimental/out/_next/static/chunks/{403c4d96324c23a6.js => 0gqqvjn11_pp3.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{1bc2898be56acd1b.js => 0gs8.sc1ds7.w.js} (61%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0gszmhudlm6lw.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0h8dqeg931c1f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{84dd260c7412819c.js => 0hjh1x7qo041f.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{68e50a37159f7d9a.js => 0hmiwn2p8zrxp.js} (75%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0hpcwzoygs-ke.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0i6g.~vhywo3h.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0i7ndeqr5w1sc.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ca22b37c24b4d34a.js => 0igutkl9r09kl.js} (94%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ivj_wax-joap.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0j.~bvp831kae.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0j2g7af6k4x7m.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0je63_yy.8i72.js rename litellm/proxy/_experimental/out/_next/static/chunks/{3f3fa56b5786d58c.css => 0jib1e4hgitwz.css} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0kcdscyjx5upf.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0kf8wlk637e6v.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0kle3tqsakb-1.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ks4zvc_6qump.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0lkwlvo53lk5c.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0lo51j3d423yv.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0lp0qkj93s9n6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0m._ijxus~ryi.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0m6zdocif1gl4.js rename litellm/proxy/_experimental/out/_next/static/chunks/{d3ac82723ec9e30d.js => 0mb3erwqomzal.js} (99%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0mh1wnrvmv_y7.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0mzw3maijoev6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0n279xd8co40q.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0nfpc775w0b8-.js rename litellm/proxy/_experimental/out/_next/static/chunks/{0549bc9afa7d4888.js => 0niabq1py.bpc.js} (100%) rename litellm/proxy/_experimental/out/_next/static/chunks/{4980372eaa37b78b.js => 0nnx~7-7e5t~1.js} (99%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0o4pnwq6k8q4w.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0o7mue3uybfhi.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0oefy62cva53s.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pelwlztq2kwy.js rename litellm/proxy/_experimental/out/_next/static/chunks/{c3c84f2fc1b1e9db.js => 0pfc18cphnnhd.js} (90%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pg.kj49bd73_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pidya1qvuvx8.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0pqu561k2bu1d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0puul31_.zeq6.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0q250n2j99yss.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0q2o6z5qtf12d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0q6~n4y84cejn.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0qikgxv.u0j9d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0qmmlumh.k21x.js rename litellm/proxy/_experimental/out/_next/static/chunks/{e1a670efcb966aaa.js => 0r.-zuh7vk-cs.js} (96%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0s-tn5h6qpp6i.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0sbwfmr31.cvw.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0sleuh3e9q.ww.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ssorln~eooo0.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0szdm0s3h~vby.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0t0d45r_tvt4i.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0t9.6.et.-spq.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0t_2obde5n17h.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ta1ffddte5~e.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ca5fbafaf3826374.js => 0ttl0__m~5i8a.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0txi1wfn0-01d.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0tz7rml6rolh7.js rename litellm/proxy/_experimental/out/_next/static/chunks/{ae420624472238ad.js => 0t~fchw5zb-4r.js} (85%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ugell4._eyay.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ugpxsagaloo4.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0uha0pnzl-vec.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0un2--nwsw-uk.js rename litellm/proxy/_experimental/out/_next/static/chunks/{70591b116c194481.js => 0upl0pr28-8_j.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ur~j0twg0t4g.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0usxgadggtc52.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v-.p0q481gjy.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v.0z34os-hl7.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v1c3mu~xn105.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v1rxqc1hqmrl.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v3d9_8xkvq3w.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0vawigy~j_gsx.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0vkkv~m8z3lv~.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0v~f8eqfpch2v.js rename litellm/proxy/_experimental/out/_next/static/chunks/{43a9809839de4e6f.js => 0w9a1yg0dlbiw.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0wgk2liq6dqky.js rename litellm/proxy/_experimental/out/_next/static/chunks/{0a6c418370a8c183.js => 0whkizop7gd0~.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0w~oa2pli-t56.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0x.73w57rn4ou.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0xqg~rk67rumc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0x~b7xip-yufi.js rename litellm/proxy/_experimental/out/_next/static/chunks/{fcad393dcc862a21.js => 0yblb2-hdk~lt.js} (61%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ybvtcd~xp-mx.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0yjifm.h74~ec.js rename litellm/proxy/_experimental/out/_next/static/chunks/{134f728fa7099e3e.js => 0ylz5md8p6x7z.js} (60%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ys10755n8os_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0z9bnun-zovqc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0zmz_tmhm2hsa.js rename litellm/proxy/_experimental/out/_next/static/chunks/{5f9c3b92a016f382.js => 0zrbitbm~0koh.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0zxb95ki25y8w.js rename litellm/proxy/_experimental/out/_next/static/chunks/{54563d12ee8915f4.js => 0~ozahatcu75y.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/100mcnex8yqiz.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/102e659fcec2585e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/102xsbbp.u4ar.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10aj2k~llf~ks.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10dc4591ef08a91f.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10n3-~19sc08i.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10q34c2t7--5-.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10v.38o.6qi7-.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/10x7z8jgppbtw.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/11ibt3khr2hk3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/120b47ad353e1fc9.js rename litellm/proxy/_experimental/out/_next/static/chunks/{26542a70b9512f71.js => 121g1kmcll0g6.js} (66%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/129bujhdmi9ce.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/12w.m0_zg8wpq.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1300460219810c10.js rename litellm/proxy/_experimental/out/_next/static/chunks/{446b8595ea98bdef.js => 130gamvns4f_q.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/137i07xf5e.xc.js rename litellm/proxy/_experimental/out/_next/static/chunks/{3c2d67ecf9619f2b.js => 13br-6l.k_pmg.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/13jg16smls48s.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/13lfiw5-3ktce.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/13ycgm4g26ez_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/13ysooad2u4zz.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/140cf81b356b3239.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1461020743acb21c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/14891020b3fb2fc3.js rename litellm/proxy/_experimental/out/_next/static/chunks/{878832edb30e99a4.js => 14ut9b-iwzfct.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/15.9ylrtxojbj.js rename litellm/proxy/_experimental/out/_next/static/chunks/{46d42331373d9805.js => 15b5n8fnfc228.js} (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/15fosz6-y91je.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/15g0xeupk30ip.js rename litellm/proxy/_experimental/out/_next/static/chunks/{54da342a06baf122.js => 15hm8gokjq2uu.js} (89%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/15wppjgop06qi.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/166fc~7u39du3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/16bbwf4tez3tz.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/16hjjjlzvisl9.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/17-i5j54jkv5l.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/17.q2iay6h4dm.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/175814061abf2c71.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/175t1ejd~fi99.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/181y.ii57q7gs.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/186viidwrwv_o.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/18a9536fce05dc33.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/18b1-~305a__9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1a656c00638be9c7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1a9ab640dd574eca.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1ab44e07f0b1cd5e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1abad0fb1abdc83c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1bfc3425410625f3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1e1da84ff36bc348.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/20acf4fa815c638e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/222fa988d93d834f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/23491c78faf959c9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/23520f5ea04a66c8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/25d8f4225095b808.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/266fce1df297fb45.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/26d6c6bf01dbe363.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/27c7596aa0326b71.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/28e332ef9497a292.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2971c4658f1bcd7d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2a5f4a7388e54210.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2b682a7f2932def8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2bca6e6a96b0858a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/325c5effcc6e2384.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3356ae3643d24081.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/355b9871de1cf382.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3648e0a5f38c5d36.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/36ccc2b555a26ad4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3ba782adb71e77d0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3c0e9dc19dbbd4ed.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/42a4beeb4aa01eba.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/43118e9b10d4adb7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/43f6fc3c2ab9cf23.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4869cdb44fe43698.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/496b84010c33cf69.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4a0ccb5ed3d0c33f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4d3aafceafce4648.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4e06277331e725da.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4e17b625d75327a7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4e20891f2fd03463.css delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/4eab0601ddda6611.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/518eb8c7598afad6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5282ed7355826608.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5387bd8bd4bcf195.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5489ec6b9761f819.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5583bc893837fdf8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/561b33e0e4675dd8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/570b2e10aa856e54.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/570d770996d98e0f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/57a2860decebc0b6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/59e0c0c187697b37.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5aa498497363ab6c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5b2b7fd4dd9a44f3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/5b9c0b6d6c814e58.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6188170a32c9a3c3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/667115385c71d974.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6764a89c3c614835.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/679dbd657c8b5aef.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6ac5e2383054326d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/6c4c97f1ea6e7d77.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7142b7d05b1b4b2e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/71dc4f719feed2c0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/71f6f0fcaef91598.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/726579f2940c2a2f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/738c339383c3b4b6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/73b7998f9fa9c4c2.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7425e467262c0658.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/76d25012c7da52a0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7a9066dcd4a390ff.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7b46d83da0ba9049.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7c552f88245cdd96.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7cfedb9cfc78efdb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e417dd24c8becd0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7e5fe5584502da06.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/7f7819822e72bcae.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/80749a6dab9b96b4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8489ea6f0be86483.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/84f351822ff5289f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8712a14511b63b6c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/88c74f8b4b20d25a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/8c4d9ca78c194144.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/908828a91f602d8b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/91037395c95e366d.css delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/928d0c629f28babb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/92cf5d832080641f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/939e8a7d52fbe9ce.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/93c3938d8d8704b3.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9492aee8924914ae.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/94f7208f5087e27c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/95b1023fa868f012.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/95bdda1c2974030d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/975f380f5d2c2b7d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/98efd843bd5a0758.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/993822065369ee18.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/9e09de50158b3159.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a06cc76a774dd182.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a09028cd611c08ef.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a0ce6f40daef039a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a0f302271a793712.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a2352cfbbb384fe9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a3af1b3a5c791b3e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a6dad97d9634a72d.js.map delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a7919217b70a9a35.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a81db9a7d7d3325e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/a8f7c8c5eeb6e042.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/aac7c99aa647e49d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/aba51a6559eb06c7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/abf1a802816f8f5a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ad02f56c287539eb.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/adbc9cda75866ec1.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/adf8db17652cf9aa.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/adfd07c864335b45.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b3d198d6c56a21b8.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b6c1a99750c8786e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/b9341b4c942e3943.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/baadbd26839e7b66.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bd02f158353d9cea.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bde2340071127430.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bf30ce92e35d0d54.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/bfbc736ab510b9aa.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c058ac3e89dc33df.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c1efd92d6b02ddc9.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c24ccfc46ac95900.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c77d417e8a84d57c.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/c93d5122cac84bc6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cb8e6ba28461af15.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cbdff18b8d0102ff.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ccd21850ee94c92e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/cfa0acae44b4288b.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d19edc2f5c8ae8a5.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d6ab357d1bbb53f0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d7798a4e148be3fe.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d7aa89e52e3d1758.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d7bc6bc3b0d44586.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d84d93ec5e05aece.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/d96012bcfc98706a.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/da1c7742cc6fe8b4.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/da505418e8e8af34.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/dae72c93f180b49f.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/dbca964212122d58.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/dc8c6d1742643c95.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e00ff4e948e36ad2.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e03c46f5f6c919c6.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e099566e8bd4ee4e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e1f23fd814ac3500.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e2e17b99dc4f7bfa.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e619760a0baf9a7e.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e7e5bfdf70ba79ab.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e8044d049f37fcb0.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/e96398764f77c728.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ead0794ce27b66ce.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/edf02e15c80921ac.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/ee5f9a39a526e423.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f3fbc1bcf9fcd444.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f48aa7c7bdc85371.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f5de144852609bdf.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/f7e1d08418645368.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/fcdf7322b0aa3e2e.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/turbopack-0f1c9lug~n6kv.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/turbopack-ddedb29a5eb0118f.js rename litellm/proxy/_experimental/out/_next/static/media/{1bffadaabf893a1e-s.7cd81963.woff2 => 1bffadaabf893a1e-s.16ipb6fqu393i.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{2bbe8d2671613f1f-s.76dcb0b2.woff2 => 2bbe8d2671613f1f-s.067x_6k0k23tk.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{2c55a0e60120577a-s.2a48534a.woff2 => 2c55a0e60120577a-s.0bjc5tiuqdqro.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{5476f68d60460930-s.c995e352.woff2 => 5476f68d60460930-s.0wxq9webf.ew4.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{83afe278b6a6bb3c-s.p.3a6ba036.woff2 => 83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{9c72aa0f40e4eef8-s.18a48cbc.woff2 => 9c72aa0f40e4eef8-s.0m6w47a4e5dy9.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{ad66f9afd8947f86-s.7a40eb73.woff2 => ad66f9afd8947f86-s.11u06r12fd6v_.woff2} (100%) rename litellm/proxy/_experimental/out/_next/static/media/{favicon.1d32c690.ico => favicon.0~dgapwhi~75y.ico} (100%) rename litellm/proxy/_experimental/out/_next/static/{LpD6ruZoEpvYpT5IvMEoa => nvO4LQEYXI3FX_q_WhKQS}/_buildManifest.js (100%) create mode 100644 litellm/proxy/_experimental/out/_next/static/nvO4LQEYXI3FX_q_WhKQS/_clientMiddlewareManifest.js rename litellm/proxy/_experimental/out/_next/static/{LpD6ruZoEpvYpT5IvMEoa => nvO4LQEYXI3FX_q_WhKQS}/_ssgManifest.js (100%) diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html index 46e13ca9931..b6f2b91544b 100644 --- a/litellm/proxy/_experimental/out/404.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 29fe3567502..0d06f25c62a 100644 --- a/litellm/proxy/_experimental/out/__next.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/__next.__PAGE__.txt @@ -1,30 +1,30 @@ 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/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0493aafc4891dd29.js","/litellm-asset-prefix/_next/static/chunks/f7e1d08418645368.js","/litellm-asset-prefix/_next/static/chunks/b3d198d6c56a21b8.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/0b470ffc60999bf4.js","/litellm-asset-prefix/_next/static/chunks/0b3d09ff6c6e4335.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/b1c98cc932a0ab19.js","/litellm-asset-prefix/_next/static/chunks/4e17b625d75327a7.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a06cc76a774dd182.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/e7e5bfdf70ba79ab.js","/litellm-asset-prefix/_next/static/chunks/10dc4591ef08a91f.js","/litellm-asset-prefix/_next/static/chunks/7a9066dcd4a390ff.js","/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/679dbd657c8b5aef.js","/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/da1c7742cc6fe8b4.js","/litellm-asset-prefix/_next/static/chunks/bd02f158353d9cea.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/ad02f56c287539eb.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a8f7c8c5eeb6e042.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/6188170a32c9a3c3.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/20acf4fa815c638e.js","/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","/litellm-asset-prefix/_next/static/chunks/e1a670efcb966aaa.js","/litellm-asset-prefix/_next/static/chunks/3c0e9dc19dbbd4ed.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/ca7a3fdb635fb7dc.js","/litellm-asset-prefix/_next/static/chunks/659ce28f2cb74401.js","/litellm-asset-prefix/_next/static/chunks/934dbc43f8c1abde.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/4a0ccb5ed3d0c33f.js"],"default"] -1a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] +2:I[347257,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"ClientPageRoot"] +3:I[952683,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js","/litellm-asset-prefix/_next/static/chunks/0niabq1py.bpc.js","/litellm-asset-prefix/_next/static/chunks/0je63_yy.8i72.js","/litellm-asset-prefix/_next/static/chunks/0qikgxv.u0j9d.js","/litellm-asset-prefix/_next/static/chunks/070q-kt12zun~.js","/litellm-asset-prefix/_next/static/chunks/0zmz_tmhm2hsa.js","/litellm-asset-prefix/_next/static/chunks/01n1bg17oxp8l.js","/litellm-asset-prefix/_next/static/chunks/181y.ii57q7gs.js","/litellm-asset-prefix/_next/static/chunks/0gqqvjn11_pp3.js","/litellm-asset-prefix/_next/static/chunks/09n64dqzn.le~.js","/litellm-asset-prefix/_next/static/chunks/01g5ls2__cy9q.js","/litellm-asset-prefix/_next/static/chunks/00dq_sa6qt2eg.js","/litellm-asset-prefix/_next/static/chunks/0_ex-stk7ibf_.js","/litellm-asset-prefix/_next/static/chunks/0_p625as00xbq.js","/litellm-asset-prefix/_next/static/chunks/0tz7rml6rolh7.js","/litellm-asset-prefix/_next/static/chunks/09.lm5dax~l7e.js","/litellm-asset-prefix/_next/static/chunks/0v.0z34os-hl7.js","/litellm-asset-prefix/_next/static/chunks/0szdm0s3h~vby.js","/litellm-asset-prefix/_next/static/chunks/0v1c3mu~xn105.js","/litellm-asset-prefix/_next/static/chunks/08401f_hwndsf.js","/litellm-asset-prefix/_next/static/chunks/0bkk~1l186k4g.js","/litellm-asset-prefix/_next/static/chunks/166fc~7u39du3.js","/litellm-asset-prefix/_next/static/chunks/14ut9b-iwzfct.js","/litellm-asset-prefix/_next/static/chunks/01u0i~l49qpdz.js","/litellm-asset-prefix/_next/static/chunks/02v412-qgvyfr.js","/litellm-asset-prefix/_next/static/chunks/0ssorln~eooo0.js","/litellm-asset-prefix/_next/static/chunks/0sleuh3e9q.ww.js","/litellm-asset-prefix/_next/static/chunks/00q4mtjboprhm.js","/litellm-asset-prefix/_next/static/chunks/0r.-zuh7vk-cs.js","/litellm-asset-prefix/_next/static/chunks/0c4pfjjue0uc-.js","/litellm-asset-prefix/_next/static/chunks/0ys10755n8os_.js","/litellm-asset-prefix/_next/static/chunks/0dt4fjjwbrov2.js","/litellm-asset-prefix/_next/static/chunks/06oag4x9~8vif.js","/litellm-asset-prefix/_next/static/chunks/0-ne4el5qxs1z.js","/litellm-asset-prefix/_next/static/chunks/036wlkuzplhfz.js","/litellm-asset-prefix/_next/static/chunks/01xm1xt.gmrff.js","/litellm-asset-prefix/_next/static/chunks/0cbiddnyyt-22.js","/litellm-asset-prefix/_next/static/chunks/01eoe.0n-q6.q.js","/litellm-asset-prefix/_next/static/chunks/0nnx~7-7e5t~1.js","/litellm-asset-prefix/_next/static/chunks/0mb3erwqomzal.js","/litellm-asset-prefix/_next/static/chunks/00n_262-goqx6.js","/litellm-asset-prefix/_next/static/chunks/0gs8.sc1ds7.w.js","/litellm-asset-prefix/_next/static/chunks/11ibt3khr2hk3.js","/litellm-asset-prefix/_next/static/chunks/0aivi0og~sj6k.js","/litellm-asset-prefix/_next/static/chunks/08cbskerpmujn.js","/litellm-asset-prefix/_next/static/chunks/0ar6956xz0njn.js","/litellm-asset-prefix/_next/static/chunks/022.sz94ycw4x.js","/litellm-asset-prefix/_next/static/chunks/0ylz5md8p6x7z.js","/litellm-asset-prefix/_next/static/chunks/0-dwjzo6mg1t7.js","/litellm-asset-prefix/_next/static/chunks/0ttl0__m~5i8a.js","/litellm-asset-prefix/_next/static/chunks/0fns6vsccj10h.js","/litellm-asset-prefix/_next/static/chunks/015yfy38oh-h8.js","/litellm-asset-prefix/_next/static/chunks/0m6zdocif1gl4.js","/litellm-asset-prefix/_next/static/chunks/0ybvtcd~xp-mx.js","/litellm-asset-prefix/_next/static/chunks/0j2g7af6k4x7m.js"],"default"] +1a:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"OutletBoundary"] 1b:"$Sreact.suspense" -:HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"] -0:{"buildId":"LpD6ruZoEpvYpT5IvMEoa","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/0493aafc4891dd29.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/f7e1d08418645368.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/b3d198d6c56a21b8.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.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/0549bc9afa7d4888.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0b470ffc60999bf4.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0b3d09ff6c6e4335.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b1c98cc932a0ab19.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/4e17b625d75327a7.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a06cc76a774dd182.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/e7e5bfdf70ba79ab.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/10dc4591ef08a91f.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/7a9066dcd4a390ff.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.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/679dbd657c8b5aef.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/da1c7742cc6fe8b4.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/bd02f158353d9cea.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/ad02f56c287539eb.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18"],"$L19"]}],"loading":null,"isPartial":false} +:HL["/litellm-asset-prefix/_next/static/chunks/0jib1e4hgitwz.css","style"] +0:{"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/0jib1e4hgitwz.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0niabq1py.bpc.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0je63_yy.8i72.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0qikgxv.u0j9d.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/070q-kt12zun~.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0zmz_tmhm2hsa.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/01n1bg17oxp8l.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/181y.ii57q7gs.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0gqqvjn11_pp3.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/09n64dqzn.le~.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/01g5ls2__cy9q.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/00dq_sa6qt2eg.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/0_ex-stk7ibf_.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/0_p625as00xbq.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0tz7rml6rolh7.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09.lm5dax~l7e.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0v.0z34os-hl7.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0szdm0s3h~vby.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/0v1c3mu~xn105.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/08401f_hwndsf.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/0bkk~1l186k4g.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/166fc~7u39du3.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/14ut9b-iwzfct.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/01u0i~l49qpdz.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/02v412-qgvyfr.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/0ssorln~eooo0.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/0sleuh3e9q.ww.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/00q4mtjboprhm.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/0r.-zuh7vk-cs.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/0c4pfjjue0uc-.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/0ys10755n8os_.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/0dt4fjjwbrov2.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/06oag4x9~8vif.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/0-ne4el5qxs1z.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/036wlkuzplhfz.js","async":true}],["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/01xm1xt.gmrff.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18"],"$L19"]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"nvO4LQEYXI3FX_q_WhKQS"} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" -6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}] -7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true}] -8:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/a8f7c8c5eeb6e042.js","async":true}] -9:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}] -a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true}] -b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/6188170a32c9a3c3.js","async":true}] -c:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true}] -d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/20acf4fa815c638e.js","async":true}] -e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","async":true}] -f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/e1a670efcb966aaa.js","async":true}] -10:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/3c0e9dc19dbbd4ed.js","async":true}] -11:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true}] -12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}] -13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/ca7a3fdb635fb7dc.js","async":true}] -14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/659ce28f2cb74401.js","async":true}] -15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/934dbc43f8c1abde.js","async":true}] -16:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true}] -17:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}] -18:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/4a0ccb5ed3d0c33f.js","async":true}] +6:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/0cbiddnyyt-22.js","async":true}] +7:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/01eoe.0n-q6.q.js","async":true}] +8:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/0nnx~7-7e5t~1.js","async":true}] +9:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/0mb3erwqomzal.js","async":true}] +a:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/00n_262-goqx6.js","async":true}] +b:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/0gs8.sc1ds7.w.js","async":true}] +c:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/11ibt3khr2hk3.js","async":true}] +d:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/0aivi0og~sj6k.js","async":true}] +e:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/08cbskerpmujn.js","async":true}] +f:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/0ar6956xz0njn.js","async":true}] +10:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/022.sz94ycw4x.js","async":true}] +11:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/0ylz5md8p6x7z.js","async":true}] +12:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/0-dwjzo6mg1t7.js","async":true}] +13:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/0ttl0__m~5i8a.js","async":true}] +14:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/0fns6vsccj10h.js","async":true}] +15:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/015yfy38oh-h8.js","async":true}] +16:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/0m6zdocif1gl4.js","async":true}] +17:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/0ybvtcd~xp-mx.js","async":true}] +18:["$","script","script-53",{"src":"/litellm-asset-prefix/_next/static/chunks/0j2g7af6k4x7m.js","async":true}] 19:["$","$L1a",null,{"children":["$","$1b",null,{"name":"Next.MetadataOutlet","children":"$@1c"}]}] 1c:null diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt index 33e1ef61e1f..772532a4df7 100644 --- a/litellm/proxy/_experimental/out/__next._full.txt +++ b/litellm/proxy/_experimental/out/__next._full.txt @@ -1,62 +1,65 @@ 1:"$Sreact.fragment" -2:I[867271,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js","/litellm-asset-prefix/_next/static/chunks/0493aafc4891dd29.js","/litellm-asset-prefix/_next/static/chunks/f7e1d08418645368.js","/litellm-asset-prefix/_next/static/chunks/b3d198d6c56a21b8.js","/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.js","/litellm-asset-prefix/_next/static/chunks/adb8beb738574863.js","/litellm-asset-prefix/_next/static/chunks/0549bc9afa7d4888.js","/litellm-asset-prefix/_next/static/chunks/0b470ffc60999bf4.js","/litellm-asset-prefix/_next/static/chunks/0b3d09ff6c6e4335.js","/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","/litellm-asset-prefix/_next/static/chunks/b1c98cc932a0ab19.js","/litellm-asset-prefix/_next/static/chunks/4e17b625d75327a7.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/a06cc76a774dd182.js","/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.js","/litellm-asset-prefix/_next/static/chunks/e7e5bfdf70ba79ab.js","/litellm-asset-prefix/_next/static/chunks/10dc4591ef08a91f.js","/litellm-asset-prefix/_next/static/chunks/7a9066dcd4a390ff.js","/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/679dbd657c8b5aef.js","/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","/litellm-asset-prefix/_next/static/chunks/da1c7742cc6fe8b4.js","/litellm-asset-prefix/_next/static/chunks/bd02f158353d9cea.js","/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/ad02f56c287539eb.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","/litellm-asset-prefix/_next/static/chunks/a8f7c8c5eeb6e042.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","/litellm-asset-prefix/_next/static/chunks/6188170a32c9a3c3.js","/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","/litellm-asset-prefix/_next/static/chunks/20acf4fa815c638e.js","/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","/litellm-asset-prefix/_next/static/chunks/e1a670efcb966aaa.js","/litellm-asset-prefix/_next/static/chunks/3c0e9dc19dbbd4ed.js","/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/ca7a3fdb635fb7dc.js","/litellm-asset-prefix/_next/static/chunks/659ce28f2cb74401.js","/litellm-asset-prefix/_next/static/chunks/934dbc43f8c1abde.js","/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/4a0ccb5ed3d0c33f.js"],"default"] -31:I[168027,[],"default"] -:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/91037395c95e366d.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":"LpD6ruZoEpvYpT5IvMEoa","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/91037395c95e366d.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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/0493aafc4891dd29.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/f7e1d08418645368.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/b3d198d6c56a21b8.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/c847ecdf8c790b0b.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/ee5f9a39a526e423.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/0549bc9afa7d4888.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0b470ffc60999bf4.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0b3d09ff6c6e4335.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/e099566e8bd4ee4e.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/403c4d96324c23a6.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/b1c98cc932a0ab19.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/4e17b625d75327a7.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/a06cc76a774dd182.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/ca5fbafaf3826374.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","$L2e"],"$L2f"]}],{},null,false,false]},null,false,false],"$L30",false]],"m":"$undefined","G":["$31",[]],"S":true} -32:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"] -33:"$Sreact.suspense" -35:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -37:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] -a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/e7e5bfdf70ba79ab.js","async":true,"nonce":"$undefined"}] -b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/10dc4591ef08a91f.js","async":true,"nonce":"$undefined"}] -c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/7a9066dcd4a390ff.js","async":true,"nonce":"$undefined"}] -d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/baadbd26839e7b66.js","async":true,"nonce":"$undefined"}] -e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.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/679dbd657c8b5aef.js","async":true,"nonce":"$undefined"}] -11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/94f7208f5087e27c.js","async":true,"nonce":"$undefined"}] -12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/43f6fc3c2ab9cf23.js","async":true,"nonce":"$undefined"}] -13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/4e06277331e725da.js","async":true,"nonce":"$undefined"}] -14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}] -15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/908828a91f602d8b.js","async":true,"nonce":"$undefined"}] -16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/da1c7742cc6fe8b4.js","async":true,"nonce":"$undefined"}] -17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/bd02f158353d9cea.js","async":true,"nonce":"$undefined"}] -18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/a09028cd611c08ef.js","async":true,"nonce":"$undefined"}] -19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}] -1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/ad02f56c287539eb.js","async":true,"nonce":"$undefined"}] -1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}] -1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}] -1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/fcdf7322b0aa3e2e.js","async":true,"nonce":"$undefined"}] -1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/a8f7c8c5eeb6e042.js","async":true,"nonce":"$undefined"}] -1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}] -20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/d3ac82723ec9e30d.js","async":true,"nonce":"$undefined"}] -21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/6188170a32c9a3c3.js","async":true,"nonce":"$undefined"}] -22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/1bc2898be56acd1b.js","async":true,"nonce":"$undefined"}] -23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/20acf4fa815c638e.js","async":true,"nonce":"$undefined"}] -24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/878832edb30e99a4.js","async":true,"nonce":"$undefined"}] -25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/e1a670efcb966aaa.js","async":true,"nonce":"$undefined"}] -26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/3c0e9dc19dbbd4ed.js","async":true,"nonce":"$undefined"}] -27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/e1f23fd814ac3500.js","async":true,"nonce":"$undefined"}] -28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}] -29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/ca7a3fdb635fb7dc.js","async":true,"nonce":"$undefined"}] -2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/659ce28f2cb74401.js","async":true,"nonce":"$undefined"}] -2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/934dbc43f8c1abde.js","async":true,"nonce":"$undefined"}] -2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/d6ab357d1bbb53f0.js","async":true,"nonce":"$undefined"}] -2d:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}] -2e:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/4a0ccb5ed3d0c33f.js","async":true,"nonce":"$undefined"}] -2f:["$","$L32",null,{"children":["$","$33",null,{"name":"Next.MetadataOutlet","children":"$@34"}]}] -30:["$","$1","h",{"children":[null,["$","$L35",null,{"children":"$L36"}],["$","div",null,{"hidden":true,"children":["$","$L37",null,{"children":["$","$33",null,{"name":"Next.Metadata","children":"$L38"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +4:I[339756,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +5:I[837457,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +6:I[347257,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"ClientPageRoot"] +7:I[952683,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js","/litellm-asset-prefix/_next/static/chunks/0niabq1py.bpc.js","/litellm-asset-prefix/_next/static/chunks/0je63_yy.8i72.js","/litellm-asset-prefix/_next/static/chunks/0qikgxv.u0j9d.js","/litellm-asset-prefix/_next/static/chunks/070q-kt12zun~.js","/litellm-asset-prefix/_next/static/chunks/0zmz_tmhm2hsa.js","/litellm-asset-prefix/_next/static/chunks/01n1bg17oxp8l.js","/litellm-asset-prefix/_next/static/chunks/181y.ii57q7gs.js","/litellm-asset-prefix/_next/static/chunks/0gqqvjn11_pp3.js","/litellm-asset-prefix/_next/static/chunks/09n64dqzn.le~.js","/litellm-asset-prefix/_next/static/chunks/01g5ls2__cy9q.js","/litellm-asset-prefix/_next/static/chunks/00dq_sa6qt2eg.js","/litellm-asset-prefix/_next/static/chunks/0_ex-stk7ibf_.js","/litellm-asset-prefix/_next/static/chunks/0_p625as00xbq.js","/litellm-asset-prefix/_next/static/chunks/0tz7rml6rolh7.js","/litellm-asset-prefix/_next/static/chunks/09.lm5dax~l7e.js","/litellm-asset-prefix/_next/static/chunks/0v.0z34os-hl7.js","/litellm-asset-prefix/_next/static/chunks/0szdm0s3h~vby.js","/litellm-asset-prefix/_next/static/chunks/0v1c3mu~xn105.js","/litellm-asset-prefix/_next/static/chunks/08401f_hwndsf.js","/litellm-asset-prefix/_next/static/chunks/0bkk~1l186k4g.js","/litellm-asset-prefix/_next/static/chunks/166fc~7u39du3.js","/litellm-asset-prefix/_next/static/chunks/14ut9b-iwzfct.js","/litellm-asset-prefix/_next/static/chunks/01u0i~l49qpdz.js","/litellm-asset-prefix/_next/static/chunks/02v412-qgvyfr.js","/litellm-asset-prefix/_next/static/chunks/0ssorln~eooo0.js","/litellm-asset-prefix/_next/static/chunks/0sleuh3e9q.ww.js","/litellm-asset-prefix/_next/static/chunks/00q4mtjboprhm.js","/litellm-asset-prefix/_next/static/chunks/0r.-zuh7vk-cs.js","/litellm-asset-prefix/_next/static/chunks/0c4pfjjue0uc-.js","/litellm-asset-prefix/_next/static/chunks/0ys10755n8os_.js","/litellm-asset-prefix/_next/static/chunks/0dt4fjjwbrov2.js","/litellm-asset-prefix/_next/static/chunks/06oag4x9~8vif.js","/litellm-asset-prefix/_next/static/chunks/0-ne4el5qxs1z.js","/litellm-asset-prefix/_next/static/chunks/036wlkuzplhfz.js","/litellm-asset-prefix/_next/static/chunks/01xm1xt.gmrff.js","/litellm-asset-prefix/_next/static/chunks/0cbiddnyyt-22.js","/litellm-asset-prefix/_next/static/chunks/01eoe.0n-q6.q.js","/litellm-asset-prefix/_next/static/chunks/0nnx~7-7e5t~1.js","/litellm-asset-prefix/_next/static/chunks/0mb3erwqomzal.js","/litellm-asset-prefix/_next/static/chunks/00n_262-goqx6.js","/litellm-asset-prefix/_next/static/chunks/0gs8.sc1ds7.w.js","/litellm-asset-prefix/_next/static/chunks/11ibt3khr2hk3.js","/litellm-asset-prefix/_next/static/chunks/0aivi0og~sj6k.js","/litellm-asset-prefix/_next/static/chunks/08cbskerpmujn.js","/litellm-asset-prefix/_next/static/chunks/0ar6956xz0njn.js","/litellm-asset-prefix/_next/static/chunks/022.sz94ycw4x.js","/litellm-asset-prefix/_next/static/chunks/0ylz5md8p6x7z.js","/litellm-asset-prefix/_next/static/chunks/0-dwjzo6mg1t7.js","/litellm-asset-prefix/_next/static/chunks/0ttl0__m~5i8a.js","/litellm-asset-prefix/_next/static/chunks/0fns6vsccj10h.js","/litellm-asset-prefix/_next/static/chunks/015yfy38oh-h8.js","/litellm-asset-prefix/_next/static/chunks/0m6zdocif1gl4.js","/litellm-asset-prefix/_next/static/chunks/0ybvtcd~xp-mx.js","/litellm-asset-prefix/_next/static/chunks/0j2g7af6k4x7m.js"],"default"] +32:I[168027,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default",1] +:HL["/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","style"] +:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +:HL["/litellm-asset-prefix/_next/static/chunks/0jib1e4hgitwz.css","style"] +0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.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/0jib1e4hgitwz.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0niabq1py.bpc.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0je63_yy.8i72.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0qikgxv.u0j9d.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/070q-kt12zun~.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0zmz_tmhm2hsa.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/01n1bg17oxp8l.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/181y.ii57q7gs.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0gqqvjn11_pp3.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/09n64dqzn.le~.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/01g5ls2__cy9q.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/00dq_sa6qt2eg.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/0_ex-stk7ibf_.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/0_p625as00xbq.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0tz7rml6rolh7.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09.lm5dax~l7e.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/0v.0z34os-hl7.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","$L2e","$L2f"],"$L30"]}],{},null,false,null]},null,false,null],"$L31",false]],"m":"$undefined","G":["$32",["$L33","$L34"]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"nvO4LQEYXI3FX_q_WhKQS"} +35:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"OutletBoundary"] +36:"$Sreact.suspense" +38:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"ViewportBoundary"] +3a:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"MetadataBoundary"] +a:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/0szdm0s3h~vby.js","async":true,"nonce":"$undefined"}] +b:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/0v1c3mu~xn105.js","async":true,"nonce":"$undefined"}] +c:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/08401f_hwndsf.js","async":true,"nonce":"$undefined"}] +d:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/0bkk~1l186k4g.js","async":true,"nonce":"$undefined"}] +e:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/166fc~7u39du3.js","async":true,"nonce":"$undefined"}] +f:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/14ut9b-iwzfct.js","async":true,"nonce":"$undefined"}] +10:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/01u0i~l49qpdz.js","async":true,"nonce":"$undefined"}] +11:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/02v412-qgvyfr.js","async":true,"nonce":"$undefined"}] +12:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/0ssorln~eooo0.js","async":true,"nonce":"$undefined"}] +13:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/0sleuh3e9q.ww.js","async":true,"nonce":"$undefined"}] +14:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/00q4mtjboprhm.js","async":true,"nonce":"$undefined"}] +15:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/0r.-zuh7vk-cs.js","async":true,"nonce":"$undefined"}] +16:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/0c4pfjjue0uc-.js","async":true,"nonce":"$undefined"}] +17:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/0ys10755n8os_.js","async":true,"nonce":"$undefined"}] +18:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/0dt4fjjwbrov2.js","async":true,"nonce":"$undefined"}] +19:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/06oag4x9~8vif.js","async":true,"nonce":"$undefined"}] +1a:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/0-ne4el5qxs1z.js","async":true,"nonce":"$undefined"}] +1b:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/036wlkuzplhfz.js","async":true,"nonce":"$undefined"}] +1c:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/01xm1xt.gmrff.js","async":true,"nonce":"$undefined"}] +1d:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/0cbiddnyyt-22.js","async":true,"nonce":"$undefined"}] +1e:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/01eoe.0n-q6.q.js","async":true,"nonce":"$undefined"}] +1f:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/0nnx~7-7e5t~1.js","async":true,"nonce":"$undefined"}] +20:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/0mb3erwqomzal.js","async":true,"nonce":"$undefined"}] +21:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/00n_262-goqx6.js","async":true,"nonce":"$undefined"}] +22:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/0gs8.sc1ds7.w.js","async":true,"nonce":"$undefined"}] +23:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/11ibt3khr2hk3.js","async":true,"nonce":"$undefined"}] +24:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/0aivi0og~sj6k.js","async":true,"nonce":"$undefined"}] +25:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/08cbskerpmujn.js","async":true,"nonce":"$undefined"}] +26:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/0ar6956xz0njn.js","async":true,"nonce":"$undefined"}] +27:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/022.sz94ycw4x.js","async":true,"nonce":"$undefined"}] +28:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/0ylz5md8p6x7z.js","async":true,"nonce":"$undefined"}] +29:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/0-dwjzo6mg1t7.js","async":true,"nonce":"$undefined"}] +2a:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/0ttl0__m~5i8a.js","async":true,"nonce":"$undefined"}] +2b:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/0fns6vsccj10h.js","async":true,"nonce":"$undefined"}] +2c:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/015yfy38oh-h8.js","async":true,"nonce":"$undefined"}] +2d:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/0m6zdocif1gl4.js","async":true,"nonce":"$undefined"}] +2e:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/0ybvtcd~xp-mx.js","async":true,"nonce":"$undefined"}] +2f:["$","script","script-53",{"src":"/litellm-asset-prefix/_next/static/chunks/0j2g7af6k4x7m.js","async":true,"nonce":"$undefined"}] +30:["$","$L35",null,{"children":["$","$36",null,{"name":"Next.MetadataOutlet","children":"$@37"}]}] +31:["$","$1","h",{"children":[null,["$","$L38",null,{"children":"$L39"}],["$","div",null,{"hidden":true,"children":["$","$L3a",null,{"children":["$","$36",null,{"name":"Next.Metadata","children":"$L3b"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] +33:["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}] +34:["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}] 8:{} 9:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" -36:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -39:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"] -34:null -38:[["$","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"}],["$","$L39","4",{}]] +39:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +3c:I[27201,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"IconMark"] +37:null +3b:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0~dgapwhi~75y.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L3c","4",{}]] diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt index 52cb2daa038..909d16bfb5b 100644 --- a/litellm/proxy/_experimental/out/__next._head.txt +++ b/litellm/proxy/_experimental/out/__next._head.txt @@ -1,6 +1,6 @@ 1:"$Sreact.fragment" -2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"] -3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"] +2:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"ViewportBoundary"] +3:I[897367,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.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":"LpD6ruZoEpvYpT5IvMEoa","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} +5:I[27201,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"IconMark"] +0:{"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.0~dgapwhi~75y.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"nvO4LQEYXI3FX_q_WhKQS"} diff --git a/litellm/proxy/_experimental/out/__next._index.txt b/litellm/proxy/_experimental/out/__next._index.txt index 24ed6776f93..51cfce16139 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/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.js"],"default"] -3:I[71195,["/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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/91037395c95e366d.css","style"] -0:{"buildId":"LpD6ruZoEpvYpT5IvMEoa","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/91037395c95e366d.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/9e09de50158b3159.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e5fe5584502da06.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} +2:I[867271,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +3:I[71195,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +4:I[339756,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +5:I[837457,["/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.js"],"default"] +:HL["/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","style"] +0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/06gao0u0xy9th.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/0gszmhudlm6lw.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/0pidya1qvuvx8.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."}]}]]}]}]],[]]}]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"nvO4LQEYXI3FX_q_WhKQS"} diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt index 78aafc1b3f5..9a806f1f9ba 100644 --- a/litellm/proxy/_experimental/out/__next._tree.txt +++ b/litellm/proxy/_experimental/out/__next._tree.txt @@ -1,5 +1,5 @@ -:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/litellm-asset-prefix/_next/static/chunks/91037395c95e366d.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":"LpD6ruZoEpvYpT5IvMEoa","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} +:HL["/litellm-asset-prefix/_next/static/chunks/05qmwjqau64bz.css","style"] +:HL["/litellm-asset-prefix/_next/static/chunks/04o4lz~y91s1r.css","style"] +:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.0q-301v4kxxnr.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +:HL["/litellm-asset-prefix/_next/static/chunks/0jib1e4hgitwz.css","style"] +0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"nvO4LQEYXI3FX_q_WhKQS"} diff --git a/litellm/proxy/_experimental/out/_next/static/LpD6ruZoEpvYpT5IvMEoa/_clientMiddlewareManifest.json b/litellm/proxy/_experimental/out/_next/static/LpD6ruZoEpvYpT5IvMEoa/_clientMiddlewareManifest.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/LpD6ruZoEpvYpT5IvMEoa/_clientMiddlewareManifest.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0-2-9tcizw.kv.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-2-9tcizw.kv.js new file mode 100644 index 00000000000..5e8e78991b9 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-2-9tcizw.kv.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let n=void 0!==r,[a,s]=(0,t.useState)(e);return[n?r:a,e=>{n||s(e)}]}])},757440,e=>{"use strict";var t=e.i(290571),r=e.i(271645);e.s(["default",0,e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}])},446428,854056,e=>{"use strict";let t;var r=e.i(290571),n=e.i(271645);e.s(["default",0,e=>{var t=(0,r.__rest)(e,[]);return n.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),n.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"}))}],446428);var a=e.i(746725),s=e.i(914189),i=e.i(553521),l=e.i(835696),o=e.i(941444),u=e.i(178677),c=e.i(294316),d=e.i(83733),m=e.i(233137),f=e.i(732607),h=e.i(397701),v=e.i(700020);function g(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:j)!==n.Fragment||1===n.default.Children.count(e.children)}let p=(0,n.createContext)(null);p.displayName="TransitionContext";var b=((t=b||{}).Visible="visible",t.Hidden="hidden",t);let x=(0,n.createContext)(null);function y(e){return"children"in e?y(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function w(e,t){let r=(0,o.useLatestValue)(e),l=(0,n.useRef)([]),u=(0,i.useIsMounted)(),c=(0,a.useDisposables)(),d=(0,s.useEvent)((e,t=v.RenderStrategy.Hidden)=>{let n=l.current.findIndex(({el:t})=>t===e);-1!==n&&((0,h.match)(t,{[v.RenderStrategy.Unmount](){l.current.splice(n,1)},[v.RenderStrategy.Hidden](){l.current[n].state="hidden"}}),c.microTask(()=>{var e;!y(l)&&u.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,s.useEvent)(e=>{let t=l.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):l.current.push({el:e,state:"visible"}),()=>d(e,v.RenderStrategy.Unmount)}),f=(0,n.useRef)([]),g=(0,n.useRef)(Promise.resolve()),p=(0,n.useRef)({enter:[],leave:[]}),b=(0,s.useEvent)((e,r,n)=>{f.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=>{f.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(p.current[r].map(([e,t])=>t)).then(()=>e())})]),"enter"===r?g.current=g.current.then(()=>null==t?void 0:t.wait.current).then(()=>n(r)):n(r)}),x=(0,s.useEvent)((e,t,r)=>{Promise.all(p.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=f.current.shift())||e()}).then(()=>r(t))});return(0,n.useMemo)(()=>({children:l,register:m,unregister:d,onStart:b,onStop:x,wait:g,chains:p}),[m,d,l,b,x,p,g])}x.displayName="NestingContext";let j=n.Fragment,M=v.RenderFeatures.RenderStrategy,C=(0,v.forwardRefWithAs)(function(e,t){let{show:r,appear:a=!1,unmount:i=!0,...o}=e,d=(0,n.useRef)(null),f=g(e),h=(0,c.useSyncRefs)(...f?[d,t]:null===t?[]:[t]);(0,u.useServerHandoffComplete)();let b=(0,m.useOpenClosed)();if(void 0===r&&null!==b&&(r=(b&m.State.Open)===m.State.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,C]=(0,n.useState)(r?"visible":"hidden"),T=w(()=>{r||C("hidden")}),[$,k]=(0,n.useState)(!0),N=(0,n.useRef)([r]);(0,l.useIsoMorphicEffect)(()=>{!1!==$&&N.current[N.current.length-1]!==r&&(N.current.push(r),k(!1))},[N,r]);let E=(0,n.useMemo)(()=>({show:r,appear:a,initial:$}),[r,a,$]);(0,l.useIsoMorphicEffect)(()=>{r?C("visible"):y(T)||null===d.current||C("hidden")},[r,T]);let _={unmount:i},D=(0,s.useEvent)(()=>{var t;$&&k(!1),null==(t=e.beforeEnter)||t.call(e)}),O=(0,s.useEvent)(()=>{var t;$&&k(!1),null==(t=e.beforeLeave)||t.call(e)}),L=(0,v.useRender)();return n.default.createElement(x.Provider,{value:T},n.default.createElement(p.Provider,{value:E},L({ourProps:{..._,as:n.Fragment,children:n.default.createElement(S,{ref:h,..._,...o,beforeEnter:D,beforeLeave:O})},theirProps:{},defaultTag:n.Fragment,features:M,visible:"visible"===j,name:"Transition"})))}),S=(0,v.forwardRefWithAs)(function(e,t){var r,a;let{transition:i=!0,beforeEnter:o,afterEnter:b,beforeLeave:C,afterLeave:S,enter:T,enterFrom:$,enterTo:k,entered:N,leave:E,leaveFrom:_,leaveTo:D,...O}=e,[L,R]=(0,n.useState)(null),z=(0,n.useRef)(null),H=g(e),A=(0,c.useSyncRefs)(...H?[z,t,R]:null===t?[]:[t]),V=null==(r=O.unmount)||r?v.RenderStrategy.Unmount:v.RenderStrategy.Hidden,{show:B,appear:F,initial:P}=function(){let e=(0,n.useContext)(p);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[I,W]=(0,n.useState)(B?"visible":"hidden"),Y=function(){let e=(0,n.useContext)(x);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:U,unregister:Z}=Y;(0,l.useIsoMorphicEffect)(()=>U(z),[U,z]),(0,l.useIsoMorphicEffect)(()=>{if(V===v.RenderStrategy.Hidden&&z.current)return B&&"visible"!==I?void W("visible"):(0,h.match)(I,{hidden:()=>Z(z),visible:()=>U(z)})},[I,z,U,Z,B,V]);let q=(0,u.useServerHandoffComplete)();(0,l.useIsoMorphicEffect)(()=>{if(H&&q&&"visible"===I&&null===z.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[z,I,q,H]);let J=P&&!F,K=F&&B&&P,G=(0,n.useRef)(!1),Q=w(()=>{G.current||(W("hidden"),Z(z))},Y),X=(0,s.useEvent)(e=>{G.current=!0,Q.onStart(z,e?"enter":"leave",e=>{"enter"===e?null==o||o():"leave"===e&&(null==C||C())})}),ee=(0,s.useEvent)(e=>{let t=e?"enter":"leave";G.current=!1,Q.onStop(z,t,e=>{"enter"===e?null==b||b():"leave"===e&&(null==S||S())}),"leave"!==t||y(Q)||(W("hidden"),Z(z))});(0,n.useEffect)(()=>{H&&i||(X(B),ee(B))},[B,H,i]);let et=!(!i||!H||!q||J),[,er]=(0,d.useTransition)(et,L,B,{start:X,end:ee}),en=(0,v.compact)({ref:A,className:(null==(a=(0,f.classNames)(O.className,K&&T,K&&$,er.enter&&T,er.enter&&er.closed&&$,er.enter&&!er.closed&&k,er.leave&&E,er.leave&&!er.closed&&_,er.leave&&er.closed&&D,!er.transition&&B&&N))?void 0:a.trim())||void 0,...(0,d.transitionDataAttributes)(er)}),ea=0;"visible"===I&&(ea|=m.State.Open),"hidden"===I&&(ea|=m.State.Closed),er.enter&&(ea|=m.State.Opening),er.leave&&(ea|=m.State.Closing);let es=(0,v.useRender)();return n.default.createElement(x.Provider,{value:Q},n.default.createElement(m.OpenClosedProvider,{value:ea},es({ourProps:en,theirProps:O,defaultTag:j,features:M,visible:"visible"===I,name:"Transition.Child"})))}),T=(0,v.forwardRefWithAs)(function(e,t){let r=null!==(0,n.useContext)(p),a=null!==(0,m.useOpenClosed)();return n.default.createElement(n.default.Fragment,null,!r&&a?n.default.createElement(C,{ref:t,...e}):n.default.createElement(S,{ref:t,...e}))}),$=Object.assign(C,{Child:T,Root:C});e.s(["Transition",0,$],854056)},206929,e=>{"use strict";var t=e.i(290571),r=e.i(757440),n=e.i(271645),a=e.i(446428),s=e.i(444755),i=e.i(673706),l=e.i(103471),o=e.i(495470),u=e.i(854056),c=e.i(888288);let d=(0,i.makeClassName)("Select"),m=n.default.forwardRef((e,i)=>{let{defaultValue:m="",value:f,onValueChange:h,placeholder:v="Select...",disabled:g=!1,icon:p,enableClear:b=!1,required:x,children:y,name:w,error:j=!1,errorMessage:M,className:C,id:S}=e,T=(0,t.__rest)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),$=(0,n.useRef)(null),k=n.Children.toArray(y),[N,E]=(0,c.default)(m,f),_=(0,n.useMemo)(()=>{let e=n.default.Children.toArray(y).filter(n.isValidElement);return(0,l.constructValueToNameMapping)(e)},[y]);return n.default.createElement("div",{className:(0,s.tremorTwMerge)("w-full min-w-[10rem] text-tremor-default",C)},n.default.createElement("div",{className:"relative"},n.default.createElement("select",{title:"select-hidden",required:x,className:(0,s.tremorTwMerge)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:N,onChange:e=>{e.preventDefault()},name:w,disabled:g,id:S,onFocus:()=>{let e=$.current;e&&e.focus()}},n.default.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},v),k.map(e=>{let t=e.props.value,r=e.props.children;return n.default.createElement("option",{className:"hidden",key:t,value:t},r)})),n.default.createElement(o.Listbox,Object.assign({as:"div",ref:i,defaultValue:N,value:N,onChange:e=>{null==h||h(e),E(e)},disabled:g,id:S},T),({value:e})=>{var t;return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.ListboxButton,{ref:$,className:(0,s.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",p?"pl-10":"pl-3",(0,l.getSelectButtonColors)((0,l.hasValue)(e),g,j))},p&&n.default.createElement("span",{className:(0,s.tremorTwMerge)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},n.default.createElement(p,{className:(0,s.tremorTwMerge)(d("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.default.createElement("span",{className:"w-[90%] block truncate"},e&&null!=(t=_.get(e))?t:v),n.default.createElement("span",{className:(0,s.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-3")},n.default.createElement(r.default,{className:(0,s.tremorTwMerge)(d("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),b&&N?n.default.createElement("button",{type:"button",className:(0,s.tremorTwMerge)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E(""),null==h||h("")}},n.default.createElement(a.default,{className:(0,s.tremorTwMerge)(d("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,n.default.createElement(u.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"},n.default.createElement(o.ListboxOptions,{anchor:"bottom start",className:(0,s.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")},y)))})),j&&M?n.default.createElement("p",{className:(0,s.tremorTwMerge)("errorMessage","text-sm text-rose-500 mt-1")},M):null)});m.displayName="Select",e.s(["Select",0,m],206929)},160818,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:"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 a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["GlobalOutlined",0,s],160818)},822315,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",r="minute",n="hour",a="week",s="month",i="quarter",l="year",o="date",u="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},f="en",h={};h[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var v="$isDayjsObject",g=function(e){return e instanceof y||!(!e||!e[v])},p=function e(t,r,n){var a;if(!t)return f;if("string"==typeof t){var s=t.toLowerCase();h[s]&&(a=s),r&&(h[s]=r,a=s);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var l=t.name;h[l]=t,a=l}return!n&&a&&(f=a),a||!n&&f},b=function(e,t){if(g(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new y(r)},x={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+m(Math.floor(r/60),2,"0")+":"+m(r%60,2,"0")},m:function e(t,r){if(t.date(){"use strict";var t=e.i(401361);e.s(["EditOutlined",()=>t.default])},564897,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:"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 a=e.i(9583),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["MinusCircleOutlined",0,s],564897)},987432,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:"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),s=r.forwardRef(function(e,s){return r.createElement(a.default,(0,t.default)({},e,{ref:s,icon:n}))});e.s(["SaveOutlined",0,s],987432)},995926,e=>{"use strict";var t=e.i(841947);e.s(["XIcon",()=>t.default])},584578,e=>{"use strict";var t=e.i(764205);let r=async(e,r,n,a,s)=>{let i;i="Admin"!=n&&"Admin Viewer"!=n?await (0,t.teamListCall)(e,a?.organization_id||null,r):await (0,t.teamListCall)(e,a?.organization_id||null),console.log(`givenTeams: ${i}`),s(i)};e.s(["fetchTeams",0,r])},468133,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(175712),a=e.i(464571),s=e.i(28651),i=e.i(898586),l=e.i(482725),o=e.i(199133),u=e.i(262218),c=e.i(621192),d=e.i(178654),m=e.i(751904),f=e.i(987432),h=e.i(764205),v=e.i(860585),g=e.i(355619),p=e.i(727749),b=e.i(162386);let{Title:x,Text:y}=i.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:r,isEditing:n,viewContent:a,editContent:s})=>(0,t.jsxs)(c.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:r})]}),(0,t.jsx)(d.Col,{span:16,className:"flex items-center",children:(0,t.jsx)("div",{className:"w-full",children:n?s:a})})]}),M=()=>(0,t.jsx)(y,{className:"text-gray-400 italic",children:"Not set"}),C=(e,r)=>e&&0!==e.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map(e=>(0,t.jsx)(u.Tag,{color:"blue",children:r?r(e):e},e))}):(0,t.jsx)(M,{}),S={max_budget:null,budget_duration:null,tpm_limit:null,rpm_limit:null,models:[],team_member_permissions:[]};e.s(["default",0,({accessToken:e})=>{let[i,c]=(0,r.useState)(!0),[d,T]=(0,r.useState)(S),[$,k]=(0,r.useState)(!1),[N,E]=(0,r.useState)(S),[_,D]=(0,r.useState)(!1),[O,L]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(!e)return c(!1);try{let t=await (0,h.getDefaultTeamSettings)(e),r={...S,...t.values||{}};T(r),E(r)}catch(e){console.error("Error fetching team SSO settings:",e),L(!0),p.default.fromBackend("Failed to fetch team settings")}finally{c(!1)}})()},[e]);let R=async()=>{if(e){D(!0);try{let t=await (0,h.updateDefaultTeamSettings)(e,N),r={...S,...t.settings||{}};T(r),E(r),k(!1),p.default.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),p.default.fromBackend("Failed to update team settings")}finally{D(!1)}}},z=(e,t)=>{E(r=>({...r,[e]:t}))};return i?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(l.Spin,{size:"large"})}):O?(0,t.jsx)(n.Card,{children:(0,t.jsx)(y,{children:"No team settings available or you do not have permission to view them."})}):(0,t.jsxs)(n.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)(x,{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:$?(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(a.Button,{onClick:()=>{k(!1),E(d)},disabled:_,children:"Cancel"}),(0,t.jsx)(a.Button,{type:"primary",onClick:R,loading:_,icon:(0,t.jsx)(f.SaveOutlined,{}),children:"Save Changes"})]}):(0,t.jsx)(a.Button,{onClick:()=>k(!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)(j,{label:"Max Budget",description:"Maximum budget (in USD) for new automatically created teams.",isEditing:$,viewContent:null!=d.max_budget?(0,t.jsxs)(y,{children:["$",Number(d.max_budget).toLocaleString()]}):(0,t.jsx)(M,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.max_budget,onChange:e=>z("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:$,viewContent:d.budget_duration?(0,t.jsx)(y,{children:(0,v.getBudgetDurationLabel)(d.budget_duration)}):(0,t.jsx)(M,{}),editContent:(0,t.jsx)(v.default,{value:N.budget_duration||null,onChange:e=>z("budget_duration",e),style:{maxWidth:320}})}),(0,t.jsx)(j,{label:"TPM Limit",description:"Maximum tokens per minute allowed across all models.",isEditing:$,viewContent:null!=d.tpm_limit?(0,t.jsx)(y,{children:d.tpm_limit.toLocaleString()}):(0,t.jsx)(M,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.tpm_limit,onChange:e=>z("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:$,viewContent:null!=d.rpm_limit?(0,t.jsx)(y,{children:d.rpm_limit.toLocaleString()}):(0,t.jsx)(M,{}),editContent:(0,t.jsx)(s.InputNumber,{className:"w-full",style:{maxWidth:320},value:N.rpm_limit,onChange:e=>z("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:$,viewContent:C(d.models,g.getModelDisplayName),editContent:(0,t.jsx)(b.ModelSelect,{value:N.models||[],onChange:e=>z("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:$,viewContent:C(d.team_member_permissions),editContent:(0,t.jsx)(o.Select,{mode:"multiple",style:{width:"100%"},value:N.team_member_permissions||[],onChange:e=>z("team_member_permissions",e),placeholder:"Select permissions",tagRender:({label:e,closable:r,onClose:n})=>(0,t.jsx)(u.Tag,{color:"blue",closable:r,onClose:n,className:"mr-1 mt-1 mb-1",children:e}),children:w.map(e=>(0,t.jsx)(o.Select.Option,{value:e,children:e},e))})})]})]})]})]})}])},747871,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(269200),a=e.i(942232),s=e.i(977572),i=e.i(427612),l=e.i(64848),o=e.i(496020),u=e.i(304967),c=e.i(994388),d=e.i(599724),m=e.i(389083),f=e.i(764205),h=e.i(727749);e.s(["default",0,({accessToken:e,userID:v})=>{let[g,p]=(0,r.useState)([]);(0,r.useEffect)(()=>{(async()=>{if(e&&v)try{let t=await (0,f.availableTeamListCall)(e);p(t)}catch(e){console.error("Error fetching available teams:",e)}})()},[e,v]);let b=async t=>{if(e&&v)try{await (0,f.teamMemberAddCall)(e,t,{user_id:v,role:"user"}),h.default.success("Successfully joined team"),p(e=>e.filter(e=>e.team_id!==t))}catch(e){console.error("Error joining team:",e),h.default.fromBackend("Failed to join team")}};return(0,t.jsx)(u.Card,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,t.jsxs)(n.Table,{children:[(0,t.jsx)(i.TableHead,{children:(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(l.TableHeaderCell,{children:"Team Name"}),(0,t.jsx)(l.TableHeaderCell,{children:"Description"}),(0,t.jsx)(l.TableHeaderCell,{children:"Members"}),(0,t.jsx)(l.TableHeaderCell,{children:"Models"}),(0,t.jsx)(l.TableHeaderCell,{children:"Actions"})]})}),(0,t.jsxs)(a.TableBody,{children:[g.map(e=>(0,t.jsxs)(o.TableRow,{children:[(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.team_alias})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(d.Text,{children:e.description||"No description available"})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsxs)(d.Text,{children:[e.members_with_roles.length," members"]})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,r)=>(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})},r)):(0,t.jsx)(m.Badge,{size:"xs",color:"red",children:(0,t.jsx)(d.Text,{children:"All Proxy Models"})})})}),(0,t.jsx)(s.TableCell,{children:(0,t.jsx)(c.Button,{size:"xs",variant:"secondary",onClick:()=>b(e.team_id),children:"Join Team"})})]},e.team_id)),0===g.length&&(0,t.jsx)(o.TableRow,{children:(0,t.jsx)(s.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/0-4-0.z8w6y27.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-4-0.z8w6y27.js new file mode 100644 index 00000000000..1254d125f9a --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-4-0.z8w6y27.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},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}])},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",0,t])},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",0,t],727612)},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",0,t],823429),e.s(["Edit",0,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"),s=l.default.forwardRef((e,a)=>{let{className:s,children:i}=e,d=(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",s)},d),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")}))});s.displayName="Divider",e.s(["Divider",0,s],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 s=(0,o.makeClassName)("Callout"),i=r.default.forwardRef((e,i)=>{let{title:d,icon:c,color:n,className:u,children:f}=e,m=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:i,className:(0,l.tremorTwMerge)(s("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",n?(0,l.tremorTwMerge)((0,o.getColorClassNames)(n,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(n,a.colorPalette.darkBorder).borderColor,(0,o.getColorClassNames)(n,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"),u)},m),r.default.createElement("div",{className:(0,l.tremorTwMerge)(s("header"),"flex items-start")},c?r.default.createElement(c,{className:(0,l.tremorTwMerge)(s("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,l.tremorTwMerge)(s("title"),"font-semibold")},d)),r.default.createElement("p",{className:(0,l.tremorTwMerge)(s("body"),"overflow-y-auto",f?"mt-2":"")},f))});i.displayName="Callout",e.s(["Callout",0,i],366283)},475647,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)},153472,e=>{"use strict";var t,r,a=e.i(266027),l=e.i(954616),o=e.i(912598),s=e.i(243652),i=e.i(135214),d=e.i(764205),c=((t={}).GENERAL_SETTINGS="general_settings",t),n=((r={}).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period",r);let u=async(e,t)=>{try{let r=d.proxyBaseUrl?`${d.proxyBaseUrl}/config/list?config_type=${t}`:`/config/list?config_type=${t}`,a=await fetch(r,{method:"GET",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=(0,d.deriveErrorMessage)(e);throw(0,d.handleError)(t),Error(t)}return await a.json()}catch(e){throw console.error(`Failed to get proxy config for ${t}:`,e),e}},f=(0,s.createQueryKeys)("proxyConfig"),m=async(e,t)=>{try{let r=d.proxyBaseUrl?`${d.proxyBaseUrl}/config/field/delete`:"/config/field/delete",a=await fetch(r,{method:"POST",headers:{[(0,d.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json(),t=(0,d.deriveErrorMessage)(e);throw(0,d.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",()=>c,"GeneralSettingsFieldName",()=>n,"proxyConfigKeys",0,f,"useDeleteProxyConfigField",0,()=>{let{accessToken:e}=(0,i.default)(),t=(0,o.useQueryClient)();return(0,l.useMutation)({mutationFn:async t=>{if(!e)throw Error("Access token is required");return await m(e,t)},onSuccess:()=>{t.invalidateQueries({queryKey:f.all})}})},"useProxyConfig",0,e=>{let{accessToken:t}=(0,i.default)();return(0,a.useQuery)({queryKey:f.list({filters:{configType:e}}),queryFn:async()=>await u(t,e),enabled:!!t})}])},286536,77705,e=>{"use strict";var t=e.i(475254);let r=(0,t.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",0,r],286536);let a=(0,t.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",0,a],77705)},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/659ce28f2cb74401.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-dwjzo6mg1t7.js similarity index 75% rename from litellm/proxy/_experimental/out/_next/static/chunks/659ce28f2cb74401.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0-dwjzo6mg1t7.js index 0a391e55fc2..cf3ed7a2028 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/659ce28f2cb74401.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-dwjzo6mg1t7.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:T}=n.Select,P=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(T,{value:"BLOCK",children:"Block"}),(0,l.jsx)(T,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,T]=m.default.useState(""),[P,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void T(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}T(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),T("")}).finally(()=>{L(!1)})}else T(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),T(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),P?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:q,Text:H}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(H,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(H,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:T,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,q]=(0,m.useState)(!1),[H,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>q(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(P,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:T,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:H,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!H)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===H);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:H,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),q(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{q(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard",QostodianNexus:"qostodian_nexus"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`,"Qostodian Nexus":`${en}qohash.jpg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}function eu(e){return!0===e?"yes":!1===e?"no":"inherit"}function ep(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",()=>em,"choiceToSkipToolForCreate",()=>ep,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",()=>ec,"skipToolMessageToChoice",()=>eu],180766);var eg=e.i(435451);let{Title:ex}=d.Typography,eh=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eg.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ef=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ex,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eh,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eg.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var ey=e.i(482725),ej=e.i(850627);let e_=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(ey.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ej.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eg.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var eb=e.i(592968),ev=e.i(750113);let ew=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(eb.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(eb.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(eb.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(eb.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(eb.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var eN=e.i(536916),eC=e.i(149192),eS=e.i(741585),eS=eS,ek=e.i(724154);e.i(247167);var eI=e.i(931067);let eA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eO=e.i(9583),eT=m.forwardRef(function(e,t){return m.createElement(eO.default,(0,eI.default)({},e,{ref:t,icon:eA}))});let{Text:eP}=d.Typography,{Option:eL}=n.Select,eB=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eT,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eP,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eL,{value:e.category,children:e.category},e.category))})]}),eF=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eP,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(eb.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(eC.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eS.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(ek.StopOutlined,{}),children:"Select All & Block"})]})]}),e$=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(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)(eP,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eP,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(eN.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eP,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eL,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eS.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(ek.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eE,Text:eM}=d.Typography,eR=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eE,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(eM,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eB,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eF,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(e$,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eG=e.i(304967),ez=e.i(599724),eD=e.i(312361),eK=e.i(21548),eq=e.i(827252);let eH={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eJ=({value:e,onChange:t,disabled:a=!1})=>{let r={...eH,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eG.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(ez.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eD.Divider,{}),0===r.rules.length?(0,l.jsx)(eK.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eG.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(ez.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(ez.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eD.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(ez.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(eb.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eq.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eU,Text:eW,Link:eV}=d.Typography,{Option:eY}=n.Select,eQ={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,T]=(0,m.useState)([]),[P,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[q,H]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,eg]=(0,m.useState)(!1),[ex,eh]=(0,m.useState)([]),[ey,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),eb=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit",skip_tool_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),H(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},eN=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eC=(e,t)=>{C(a=>({...a,[e]:t}))},eS=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},ek=()=>{x.resetFields(),j(null),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),eg(!1),k(0)},eI=()=>{ek(),t()},eA=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i);let s=ep(e.skip_tool_message_choice);if(void 0!==s&&(r.litellm_params.skip_tool_message_in_guardrail=s),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=q&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.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}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),q&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ey.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ey.rules,r.litellm_params.default_action=ey.default_action,r.litellm_params.on_disallowed_action=ey.on_disallowed_action,ey.violation_message_template&&(r.litellm_params.violation_message_template=ey.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),ek(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eO=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:q,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{H(e),U(t)}}):null},eT=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:eI,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:eI,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit",skip_tool_message_choice:"inherit"},children:eT.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eY,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eY,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eY,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.pre_call})]})}),(0,l.jsx)(eY,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.during_call})]})}),(0,l.jsx)(eY,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.post_call})]})}),(0,l.jsx)(eY,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",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"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_tool_message_choice",label:"Skip tool messages in guardrail",tooltip:"Unified guardrails only: omit role: tool from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_tool_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!eb&&!ei(y)&&!es(y)&&(0,l.jsx)(e_,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eR,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:eN,onActionSelect:eC,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eO("categories");if(es(y))return(0,l.jsx)(ew,{availableModels:ex,form:x});if(!y)return null;if(eb)return(0,l.jsx)(eJ,{value:ey,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ef,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eO("patterns");return null;case 3:if(ei(y))return eO("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),eg(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>eg(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:eI,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s=e.skip_tool_message_choice;"yes"===s?r.skip_tool_message_in_guardrail=!0:"no"===s?r.skip_tool_message_in_guardrail=!1:delete r.skip_tool_message_in_guardrail;let n={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):n=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let m={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:n}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(m));let g=`/guardrails/${d}`,h=await fetch(g,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(m)});if(!h.ok){let e=await h.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tl.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(ts,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(ts,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ts,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(ts,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(ts,{value:"inherit",children:"Use global default"}),(0,l.jsx)(ts,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(ts,{value:"no",children:"No — always include in scan"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_tool_message_choice",label:"Skip tool messages in guardrail",tooltip:"Unified guardrails only: whether role: tool content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_tool_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(ts,{value:"inherit",children:"Use global default"}),(0,l.jsx)(ts,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(ts,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eR,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,826910,e=>{"use strict";var t=e.i(201072);e.s(["CheckCircleFilled",()=>t.default])},185357,180766,782719,969641,476993,824296,64352,230312,e=>{"use strict";var t,a,l=e.i(843476),r=e.i(808613),i=e.i(311451),s=e.i(212931),n=e.i(199133),o=e.i(262218),d=e.i(898586),c=e.i(464571),m=e.i(271645),u=e.i(727749),p=e.i(764205),g=e.i(770914),x=e.i(515831),h=e.i(175712),f=e.i(646563),y=e.i(519756);let{Text:j}=d.Typography,{Option:_}=n.Select,b=({visible:e,prebuiltPatterns:t,categories:a,selectedPatternName:r,patternAction:i,onPatternNameChange:o,onActionChange:d,onAdd:m,onCancel:u})=>(0,l.jsxs)(s.Modal,{title:"Add prebuilt pattern",open:e,onCancel:u,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Pattern type"}),(0,l.jsx)(n.Select,{placeholder:"Choose pattern type",value:r,onChange:o,style:{width:"100%",marginTop:8},showSearch:!0,filterOption:(e,a)=>{let l=t.find(e=>e.name===a?.value);return!!l&&(l.display_name.toLowerCase().includes(e.toLowerCase())||l.name.toLowerCase().includes(e.toLowerCase()))},children:a.map(e=>{let a=t.filter(t=>t.category===e);return 0===a.length?null:(0,l.jsx)(n.Select.OptGroup,{label:e,children:a.map(e=>(0,l.jsx)(_,{value:e.name,children:e.display_name},e.name))},e)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(j,{strong:!0,children:"Action"}),(0,l.jsx)(j,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:i,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(_,{value:"BLOCK",children:"Block"}),(0,l.jsx)(_,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:u,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:m,children:"Add"})]})]}),{Text:v}=d.Typography,{Option:w}=n.Select,N=({visible:e,patternName:t,patternRegex:a,patternAction:r,onNameChange:o,onRegexChange:d,onActionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add custom regex pattern",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Pattern name"}),(0,l.jsx)(i.Input,{placeholder:"e.g., internal_id, employee_code",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Regex pattern"}),(0,l.jsx)(i.Input,{placeholder:"e.g., ID-[0-9]{6}",value:a,onChange:e=>d(e.target.value),style:{marginTop:8}}),(0,l.jsx)(v,{type:"secondary",style:{fontSize:12},children:"Enter a valid regular expression to match sensitive data"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(v,{strong:!0,children:"Action"}),(0,l.jsx)(v,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this pattern is detected"}),(0,l.jsxs)(n.Select,{value:r,onChange:m,style:{width:"100%"},children:[(0,l.jsx)(w,{value:"BLOCK",children:"Block"}),(0,l.jsx)(w,{value:"MASK",children:"Mask"})]})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]}),{Text:C}=d.Typography,{Option:S}=n.Select,k=({visible:e,keyword:t,action:a,description:r,onKeywordChange:o,onActionChange:d,onDescriptionChange:m,onAdd:u,onCancel:p})=>(0,l.jsxs)(s.Modal,{title:"Add blocked keyword",open:e,onCancel:p,footer:null,width:800,children:[(0,l.jsxs)(g.Space,{direction:"vertical",style:{width:"100%"},size:"large",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Keyword"}),(0,l.jsx)(i.Input,{placeholder:"Enter sensitive keyword or phrase",value:t,onChange:e=>o(e.target.value),style:{marginTop:8}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Action"}),(0,l.jsx)(C,{type:"secondary",style:{display:"block",marginTop:4,marginBottom:8},children:"Choose what action the guardrail should take when this keyword is detected"}),(0,l.jsxs)(n.Select,{value:a,onChange:d,style:{width:"100%"},children:[(0,l.jsx)(S,{value:"BLOCK",children:"Block"}),(0,l.jsx)(S,{value:"MASK",children:"Mask"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(C,{strong:!0,children:"Description (optional)"}),(0,l.jsx)(i.Input.TextArea,{placeholder:"Explain why this keyword is sensitive",value:r,onChange:e=>m(e.target.value),rows:3,style:{marginTop:8}})]})]}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"8px",marginTop:"24px"},children:[(0,l.jsx)(c.Button,{onClick:p,children:"Cancel"}),(0,l.jsx)(c.Button,{type:"primary",onClick:u,children:"Add"})]})]});var I=e.i(291542),A=e.i(955135);let{Text:O}=d.Typography,{Option:T}=n.Select,P=({patterns:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Type",dataIndex:"type",key:"type",width:100,render:e=>(0,l.jsx)(o.Tag,{color:"prebuilt"===e?"blue":"green",children:"prebuilt"===e?"Prebuilt":"Custom"})},{title:"Pattern name",dataIndex:"name",key:"name",render:(e,t)=>t.display_name||t.name},{title:"Regex pattern",dataIndex:"pattern",key:"pattern",render:e=>e?(0,l.jsxs)(O,{code:!0,style:{fontSize:12},children:[e.substring(0,40),"..."]}):"-"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,e),style:{width:120},size:"small",children:[(0,l.jsx)(T,{value:"BLOCK",children:"Block"}),(0,l.jsx)(T,{value:"MASK",children:"Mask"})]})},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No patterns added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})},{Text:L}=d.Typography,{Option:B}=n.Select,F=({keywords:e,onActionChange:t,onRemove:a})=>{let r=[{title:"Keyword",dataIndex:"keyword",key:"keyword"},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,a)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>t(a.id,"action",e),style:{width:120},size:"small",children:[(0,l.jsx)(B,{value:"BLOCK",children:"Block"}),(0,l.jsx)(B,{value:"MASK",children:"Mask"})]})},{title:"Description",dataIndex:"description",key:"description",render:e=>e||"-"},{title:"",key:"actions",width:100,render:(e,t)=>(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>a(t.id),children:"Delete"})}];return 0===e.length?(0,l.jsx)("div",{style:{textAlign:"center",padding:"40px 0",color:"#999"},children:"No keywords added."}):(0,l.jsx)(I.Table,{dataSource:e,columns:r,rowKey:"id",pagination:!1,size:"small"})};var $=e.i(362024),E=e.i(993914);let{Title:M,Text:R}=d.Typography,{Option:G}=n.Select,z=({availableCategories:e,selectedCategories:t,onCategoryAdd:a,onCategoryRemove:r,onCategoryUpdate:i,accessToken:s,pendingSelection:d,onPendingSelectionChange:u})=>{let[g,x]=m.default.useState(""),y=void 0!==d?d:g,j=u||x,[_,b]=m.default.useState({}),[v,w]=m.default.useState({}),[N,C]=m.default.useState({}),[S,k]=m.default.useState([]),[O,T]=m.default.useState(""),[P,L]=m.default.useState(!1),B=async e=>{if(s&&!_[e]){C(t=>({...t,[e]:!0}));try{let t=await (0,p.getCategoryYaml)(s,e),a=t.yaml_content;if("json"===t.file_type)try{let e=JSON.parse(a);a=JSON.stringify(e,null,2)}catch(t){console.warn(`Failed to format JSON for ${e}:`,t)}b(t=>({...t,[e]:a})),w(a=>({...a,[e]:t.file_type||"yaml"}))}catch(t){console.error(`Failed to fetch content for category ${e}:`,t)}finally{C(t=>({...t,[e]:!1}))}}};m.default.useEffect(()=>{if(y&&s){let e=_[y];if(e)return void T(e);L(!0),console.log(`Fetching content for category: ${y}`,{accessToken:s?"present":"missing"}),(0,p.getCategoryYaml)(s,y).then(e=>{console.log(`Successfully fetched content for ${y}:`,e);let t=e.yaml_content;if("json"===e.file_type)try{let e=JSON.parse(t);t=JSON.stringify(e,null,2)}catch(e){console.warn(`Failed to format JSON for ${y}:`,e)}T(t),b(e=>({...e,[y]:t})),w(t=>({...t,[y]:e.file_type||"yaml"}))}).catch(e=>{console.error(`Failed to fetch preview content for category ${y}:`,e),T("")}).finally(()=>{L(!1)})}else T(""),L(!1)},[y,s]);let F=[{title:"Category",dataIndex:"display_name",key:"display_name",render:(t,a)=>{let r=e.find(e=>e.name===a.category);return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:t}),r?.description&&(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888",marginTop:"4px"},children:r.description})]})}},{title:"Action",dataIndex:"action",key:"action",width:150,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"action",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"BLOCK",children:(0,l.jsx)(o.Tag,{color:"red",children:"BLOCK"})}),(0,l.jsx)(G,{value:"MASK",children:(0,l.jsx)(o.Tag,{color:"orange",children:"MASK"})})]})},{title:"Severity Threshold",dataIndex:"severity_threshold",key:"severity_threshold",width:180,render:(e,t)=>(0,l.jsxs)(n.Select,{value:e,onChange:e=>i(t.id,"severity_threshold",e),style:{width:"100%"},children:[(0,l.jsx)(G,{value:"low",children:"Low"}),(0,l.jsx)(G,{value:"medium",children:"Medium"}),(0,l.jsx)(G,{value:"high",children:"High"})]})},{title:"",key:"actions",width:80,render:(e,t)=>(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),onClick:()=>r(t.id),size:"small",children:"Remove"})}],z=e.filter(e=>!t.some(t=>t.category===e.name));return(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,l.jsx)(M,{level:5,style:{margin:0},children:"Blocked topics"}),(0,l.jsx)(R,{type:"secondary",style:{fontSize:12,fontWeight:400},children:"Select topics to block using keyword and semantic analysis"})]}),size:"small",children:[(0,l.jsxs)("div",{style:{marginBottom:16,display:"flex",gap:8},children:[(0,l.jsx)(n.Select,{placeholder:"Select a content category",value:y||void 0,onChange:j,style:{flex:1},showSearch:!0,optionLabelProp:"label",filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),children:z.map(e=>(0,l.jsx)(G,{value:e.name,label:e.display_name,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{fontWeight:500},children:e.display_name}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:e.description})]})},e.name))}),(0,l.jsx)(c.Button,{type:"primary",onClick:()=>{if(!y)return;let l=e.find(e=>e.name===y);!l||t.some(e=>e.category===y)||(a({id:`category-${Date.now()}`,category:l.name,display_name:l.display_name,action:l.default_action,severity_threshold:"medium"}),j(""),T(""))},disabled:!y,icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add"})]}),y&&(0,l.jsxs)("div",{style:{marginBottom:16,padding:"12px",background:"#f9f9f9",border:"1px solid #e0e0e0",borderRadius:"4px"},children:[(0,l.jsxs)("div",{style:{marginBottom:8,fontWeight:500,fontSize:"14px"},children:["Preview: ",e.find(e=>e.name===y)?.display_name,v[y]&&(0,l.jsxs)("span",{style:{marginLeft:8,fontSize:"12px",color:"#888",fontWeight:400},children:["(",v[y]?.toUpperCase(),")"]})]}),P?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):O?(0,l.jsx)("pre",{style:{background:"#fff",padding:"12px",borderRadius:"4px",overflow:"auto",maxHeight:"300px",maxWidth:"100%",fontSize:"12px",lineHeight:"1.5",margin:0,border:"1px solid #e0e0e0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:(0,l.jsx)("code",{children:O})}):(0,l.jsx)("div",{style:{padding:"8px",textAlign:"center",color:"#888",fontSize:"12px"},children:"Unable to load category content"})]}),t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(I.Table,{dataSource:t,columns:F,pagination:!1,size:"small",rowKey:"id"}),(0,l.jsx)("div",{style:{marginTop:16},children:(0,l.jsx)($.Collapse,{activeKey:S,onChange:e=>{let t=Array.isArray(e)?e:e?[e]:[],a=new Set(S);t.forEach(e=>{a.has(e)||_[e]||B(e)}),k(t)},ghost:!0,items:t.map(e=>{let t=(v[e.category]||"yaml").toUpperCase();return{key:e.category,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)(E.FileTextOutlined,{}),(0,l.jsxs)("span",{children:["View ",t," for ",e.display_name]})]}),children:N[e.category]?(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Loading content..."}):_[e.category]?(0,l.jsx)("pre",{style:{background:"#f5f5f5",padding:"16px",borderRadius:"4px",overflow:"auto",maxHeight:"400px",fontSize:"12px",lineHeight:"1.5",margin:0},children:(0,l.jsx)("code",{children:_[e.category]})}):(0,l.jsx)("div",{style:{padding:"16px",textAlign:"center",color:"#888"},children:"Content will load when expanded"})}})})})]}):(0,l.jsx)("div",{style:{textAlign:"center",padding:"24px",color:"#888",border:"1px dashed #d9d9d9",borderRadius:"4px"},children:"No blocked topics selected. Add topics to detect and block harmful content."})]})};var D=e.i(790848),K=e.i(28651);let{Title:q,Text:H}=d.Typography,{Option:J}=n.Select,U={competitor_intent_type:"airline",brand_self:[],locations:[],policy:{competitor_comparison:"refuse",possible_competitor_comparison:"reframe"},threshold_high:.7,threshold_medium:.45,threshold_low:.3},W=({enabled:e,config:t,onChange:a,accessToken:i})=>{let s=t??U,[o,d]=(0,m.useState)([]),[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"airline"===s.competitor_intent_type&&i&&0===o.length&&(u(!0),(0,p.getMajorAirlines)(i).then(e=>d(e.airlines??[])).catch(()=>d([])).finally(()=>u(!1)))},[s.competitor_intent_type,i,o.length]);let x=e=>{a(e,e?{...U}:null)},f=(t,l)=>{a(e,{...s,[t]:l})},y=(t,l)=>{a(e,{...s,policy:{...s.policy,[t]:l}})},j=(t,l)=>{a(e,{...s,[t]:l.filter(Boolean)})};return e?(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:e,onChange:x})]}),size:"small",children:[(0,l.jsx)(H,{type:"secondary",style:{display:"block",marginBottom:16},children:"Block or reframe competitor comparison questions. Airline type uses major airlines (excluding your brand); generic requires manual competitor list."}),(0,l.jsxs)(r.Form,{layout:"vertical",size:"small",children:[(0,l.jsx)(r.Form.Item,{label:"Type",children:(0,l.jsxs)(n.Select,{value:s.competitor_intent_type,onChange:e=>f("competitor_intent_type",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"airline",children:"Airline (auto-load competitors from IATA)"}),(0,l.jsx)(J,{value:"generic",children:"Generic (specify competitors manually)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Your Brand (brand_self)",required:!0,help:"airline"===s.competitor_intent_type?"Select your airline from the list (excluded from competitors) or type to add a custom term":"Names/codes users use for your brand",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:c?"Loading airlines...":"airline"===s.competitor_intent_type?"Search or select airline, or type to add custom":"Type and press Enter to add",value:s.brand_self,onChange:t=>"airline"===s.competitor_intent_type&&o.length>0?(t=>{let l=t.filter(Boolean),r=[],i=new Set;for(let e of l){let t=o.find(t=>t.match.split("|")[0]?.trim().toLowerCase()===e.toLowerCase());if(t)for(let e of t.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean))i.has(e)||(i.add(e),r.push(e));else i.has(e.toLowerCase())||(i.add(e.toLowerCase()),r.push(e))}a(e,{...s,brand_self:r})})(t??[]):j("brand_self",t??[]),tokenSeparators:[","],loading:c,showSearch:!0,filterOption:(e,t)=>(t?.label?.toString().toLowerCase()??"").includes(e.toLowerCase()),optionFilterProp:"label",options:"airline"===s.competitor_intent_type&&o.length>0?o.map(e=>{let t=e.match.split("|")[0]?.trim()??e.id,a=e.match.split("|").map(e=>e.trim().toLowerCase()).filter(Boolean);return{value:t.toLowerCase(),label:`${t}${a.length>1?` (${a.slice(1).join(", ")})`:""}`}}):void 0})}),"airline"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Locations (optional)",help:"Countries, cities, airports for disambiguation (e.g. qatar, doha)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.locations??[],onChange:e=>j("locations",e??[]),tokenSeparators:[","]})}),"generic"===s.competitor_intent_type&&(0,l.jsx)(r.Form.Item,{label:"Competitors",required:!0,help:"Competitor names to detect (required for generic type)",children:(0,l.jsx)(n.Select,{mode:"tags",style:{width:"100%"},placeholder:"Type and press Enter to add",value:s.competitors??[],onChange:e=>j("competitors",e??[]),tokenSeparators:[","]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.competitor_comparison??"refuse",onChange:e=>y("competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Policy: Possible competitor comparison",children:(0,l.jsxs)(n.Select,{value:s.policy?.possible_competitor_comparison??"reframe",onChange:e=>y("possible_competitor_comparison",e),style:{width:"100%"},children:[(0,l.jsx)(J,{value:"refuse",children:"Refuse (block request)"}),(0,l.jsx)(J,{value:"reframe",children:"Reframe (suggest alternative to backend LLM)"})]})}),(0,l.jsx)(r.Form.Item,{label:"Confidence thresholds",help:(0,l.jsxs)(l.Fragment,{children:["Classify competitor intent by confidence (0–1). Higher confidence → stronger intent.",(0,l.jsxs)("ul",{style:{marginBottom:0,marginTop:4,paddingLeft:20},children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"High (≥)"}),': Treat as full competitor comparison → uses "Competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Medium (≥)"}),': Treat as possible comparison → uses "Possible competitor comparison" policy']}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Low (≥)"}),": Log only; allow request. Below Low → allow with no action"]})]}),"Raise thresholds to be more permissive; lower them to be stricter."]}),children:(0,l.jsxs)(g.Space,{wrap:!0,children:[(0,l.jsx)(r.Form.Item,{label:"High",style:{marginBottom:0},help:"e.g. 0.7",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_high??.7,onChange:e=>f("threshold_high",e??.7),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Medium",style:{marginBottom:0},help:"e.g. 0.45",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_medium??.45,onChange:e=>f("threshold_medium",e??.45),style:{width:80}})}),(0,l.jsx)(r.Form.Item,{label:"Low",style:{marginBottom:0},help:"e.g. 0.3",children:(0,l.jsx)(K.InputNumber,{min:0,max:1,step:.05,value:s.threshold_low??.3,onChange:e=>f("threshold_low",e??.3),style:{width:80}})})]})})]})]}):(0,l.jsx)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(q,{level:5,style:{margin:0},children:"Competitor Intent Filter"}),(0,l.jsx)(D.Switch,{checked:!1,onChange:x})]}),size:"small",children:(0,l.jsx)(H,{type:"secondary",children:"Block or reframe competitor comparison questions. When enabled, airline type auto-loads competitors from IATA; generic type requires manual competitor list."})})},{Title:V,Text:Y}=d.Typography,Q=({prebuiltPatterns:e,categories:t,selectedPatterns:a,blockedWords:r,onPatternAdd:i,onPatternRemove:s,onPatternActionChange:n,onBlockedWordAdd:o,onBlockedWordRemove:d,onBlockedWordUpdate:j,onFileUpload:_,accessToken:v,showStep:w,contentCategories:C=[],selectedContentCategories:S=[],onContentCategoryAdd:I,onContentCategoryRemove:A,onContentCategoryUpdate:O,pendingCategorySelection:T,onPendingCategorySelectionChange:L,competitorIntentEnabled:B=!1,competitorIntentConfig:$=null,onCompetitorIntentChange:E})=>{let[M,R]=(0,m.useState)(!1),[G,D]=(0,m.useState)(!1),[K,q]=(0,m.useState)(!1),[H,J]=(0,m.useState)(""),[U,Q]=(0,m.useState)("BLOCK"),[X,Z]=(0,m.useState)(""),[ee,et]=(0,m.useState)(""),[ea,el]=(0,m.useState)("BLOCK"),[er,ei]=(0,m.useState)(""),[es,en]=(0,m.useState)("BLOCK"),[eo,ed]=(0,m.useState)(""),[ec,em]=(0,m.useState)(!1),eu=async e=>{em(!0);try{let t=await e.text();if(v){let e=await (0,p.validateBlockedWordsFile)(v,t);if(e.valid)_&&_(t),u.default.success(e.message||"File uploaded successfully");else{let t=e.error||e.errors&&e.errors.join(", ")||"Invalid file";u.default.error(`Validation failed: ${t}`)}}}catch(e){u.default.error(`Failed to upload file: ${e}`)}finally{em(!1)}return!1};return(0,l.jsxs)("div",{className:"space-y-6",children:[!w&&(0,l.jsx)("div",{children:(0,l.jsx)(Y,{type:"secondary",children:"Configure patterns, keywords, and content categories to detect and filter sensitive information in requests and responses."})}),(!w||"patterns"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Pattern Detection"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Detect sensitive information using regex patterns (SSN, credit cards, API keys, etc.)"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>R(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add prebuilt pattern"}),(0,l.jsx)(c.Button,{onClick:()=>q(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add custom regex"})]})}),(0,l.jsx)(P,{patterns:a,onActionChange:n,onRemove:s})]}),(!w||"keywords"===w)&&(0,l.jsxs)(h.Card,{title:(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(V,{level:5,style:{margin:0},children:"Blocked Keywords"}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:14,fontWeight:400},children:"Block or mask specific sensitive terms and phrases"})]}),size:"small",children:[(0,l.jsx)("div",{style:{marginBottom:16},children:(0,l.jsxs)(g.Space,{children:[(0,l.jsx)(c.Button,{type:"primary",onClick:()=>D(!0),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add keyword"}),(0,l.jsx)(x.Upload,{beforeUpload:eu,accept:".yaml,.yml",showUploadList:!1,children:(0,l.jsx)(c.Button,{icon:(0,l.jsx)(y.UploadOutlined,{}),loading:ec,children:"Upload YAML file"})})]})}),(0,l.jsx)(F,{keywords:r,onActionChange:j,onRemove:d})]}),(!w||"competitor_intent"===w||"categories"===w)&&E&&(0,l.jsx)(W,{enabled:B,config:$,onChange:E,accessToken:v}),(!w||"categories"===w)&&C.length>0&&I&&A&&O&&(0,l.jsx)(z,{availableCategories:C,selectedCategories:S,onCategoryAdd:I,onCategoryRemove:A,onCategoryUpdate:O,accessToken:v,pendingSelection:T,onPendingSelectionChange:L}),(0,l.jsx)(b,{visible:M,prebuiltPatterns:e,categories:t,selectedPatternName:H,patternAction:U,onPatternNameChange:J,onActionChange:e=>Q(e),onAdd:()=>{if(!H)return void u.default.error("Please select a pattern");let t=e.find(e=>e.name===H);i({id:`pattern-${Date.now()}`,type:"prebuilt",name:H,display_name:t?.display_name,action:U}),R(!1),J(""),Q("BLOCK")},onCancel:()=>{R(!1),J(""),Q("BLOCK")}}),(0,l.jsx)(N,{visible:K,patternName:X,patternRegex:ee,patternAction:ea,onNameChange:Z,onRegexChange:et,onActionChange:e=>el(e),onAdd:()=>{X&&ee?(i({id:`custom-${Date.now()}`,type:"custom",name:X,pattern:ee,action:ea}),q(!1),Z(""),et(""),el("BLOCK")):u.default.error("Please provide pattern name and regex")},onCancel:()=>{q(!1),Z(""),et(""),el("BLOCK")}}),(0,l.jsx)(k,{visible:G,keyword:er,action:es,description:eo,onKeywordChange:ei,onActionChange:e=>en(e),onDescriptionChange:ed,onAdd:()=>{er?(o({id:`word-${Date.now()}`,keyword:er,action:es,description:eo||void 0}),D(!1),ei(""),ed(""),en("BLOCK")):u.default.error("Please enter a keyword")},onCancel:()=>{D(!1),ei(""),ed(""),en("BLOCK")}})]})};var X=((t={}).PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t);let Z={},ee=e=>{let t={};return t.PresidioPII="Presidio PII",t.Bedrock="Bedrock Guardrail",t.Lakera="Lakera",t.LlmAsAJudge="LiteLLM LLM as a Judge",Object.entries(e).forEach(([e,a])=>{a&&"object"==typeof a&&"ui_friendly_name"in a&&(t[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=a.ui_friendly_name)}),Z=t,t},et=()=>Object.keys(Z).length>0?Z:X,ea={PresidioPII:"presidio",Bedrock:"bedrock",Lakera:"lakera_v2",LitellmContentFilter:"litellm_content_filter",ToolPermission:"tool_permission",BlockCodeExecution:"block_code_execution",Promptguard:"promptguard",LlmAsAJudge:"llm_as_a_judge",Xecguard:"xecguard",QostodianNexus:"qostodian_nexus"},el=e=>{Object.entries(e).forEach(([e,t])=>{t&&"object"==typeof t&&"ui_friendly_name"in t&&(ea[e.split("_").map((e,t)=>e.charAt(0).toUpperCase()+e.slice(1)).join("")]=e)})},er=e=>!!e&&"Presidio PII"===et()[e],ei=e=>!!e&&"LiteLLM Content Filter"===et()[e],es=e=>!!e&&"llm_as_a_judge"===ea[e],en="../ui/assets/logos/",eo={"Zscaler AI Guard":`${en}zscaler.svg`,"Presidio PII":`${en}microsoft_azure.svg`,"Bedrock Guardrail":`${en}bedrock.svg`,Lakera:`${en}lakeraai.jpeg`,"Azure Content Safety Prompt Shield":`${en}microsoft_azure.svg`,"Azure Content Safety Text Moderation":`${en}microsoft_azure.svg`,"Aporia AI":`${en}aporia.png`,"PANW Prisma AIRS":`${en}palo_alto_networks.jpeg`,"Noma Security":`${en}noma_security.png`,"Javelin Guardrails":`${en}javelin.png`,"Pillar Guardrail":`${en}pillar.jpeg`,"Google Cloud Model Armor":`${en}google.svg`,"Guardrails AI":`${en}guardrails_ai.jpeg`,"Lasso Guardrail":`${en}lasso.png`,"Pangea Guardrail":`${en}pangea.png`,"AIM Guardrail":`${en}aim_security.jpeg`,"OpenAI Moderation":`${en}openai_small.svg`,EnkryptAI:`${en}enkrypt_ai.avif`,"Prompt Security":`${en}prompt_security.png`,PromptGuard:`${en}promptguard.svg`,XecGuard:`${en}xecguard.svg`,"LiteLLM Content Filter":`${en}litellm_logo.jpg`,"LiteLLM LLM as a Judge":`${en}litellm_logo.jpg`,Akto:`${en}akto.svg`,"Qostodian Nexus":`${en}qohash.jpg`},ed=e=>{if(!e)return{logo:"",displayName:"-"};let t=Object.keys(ea).find(t=>ea[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let a=et()[t];return{logo:eo[a]||"",displayName:a||e}};function ec(e){return!0===e?"yes":!1===e?"no":"inherit"}function em(e){return"yes"===e||"no"!==e&&void 0}function eu(e){return!0===e?"yes":!1===e?"no":"inherit"}function ep(e){return"yes"===e||"no"!==e&&void 0}e.s(["choiceToSkipSystemForCreate",0,em,"choiceToSkipToolForCreate",0,ep,"getGuardrailLogoAndName",0,ed,"getGuardrailProviders",0,et,"guardrailLogoMap",0,eo,"guardrail_provider_map",0,ea,"populateGuardrailProviderMap",0,el,"populateGuardrailProviders",0,ee,"shouldRenderContentFilterConfigSettings",0,ei,"shouldRenderLLMJudgeFields",0,es,"shouldRenderPIIConfigSettings",0,er,"skipSystemMessageToChoice",0,ec,"skipToolMessageToChoice",0,eu],180766);var eg=e.i(435451);let{Title:ex}=d.Typography,eh=({field:e,fieldKey:t,fullFieldKey:a,value:s})=>{let[o,d]=m.default.useState([]),[u,p]=m.default.useState(e.dict_key_options||[]);return m.default.useEffect(()=>{if(s&&"object"==typeof s){let t=Object.keys(s);d(t.map(e=>({key:e,id:`${e}_${Date.now()}_${Math.random()}`}))),p((e.dict_key_options||[]).filter(e=>!t.includes(e)))}},[s,e.dict_key_options]),(0,l.jsxs)("div",{className:"space-y-3",children:[o.map(t=>(0,l.jsxs)("div",{className:"flex items-center space-x-3 p-3 border rounded-lg",children:[(0,l.jsx)("div",{className:"w-24 font-medium text-sm",children:t.key}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.Form.Item,{name:Array.isArray(a)?[...a,t.key]:[a,t.key],style:{marginBottom:0},initialValue:s&&"object"==typeof s?s[t.key]:void 0,normalize:"number"===e.dict_value_type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"number"===e.dict_value_type?(0,l.jsx)(eg.default,{step:1,width:200,placeholder:`Enter ${t.key} value`}):"boolean"===e.dict_value_type?(0,l.jsxs)(n.Select,{placeholder:`Select ${t.key} value`,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):(0,l.jsx)(i.Input,{placeholder:`Enter ${t.key} value`})})}),(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>{var e,a;return e=t.id,a=t.key,void(d(o.filter(t=>t.id!==e)),p([...u,a].sort()))},children:"Remove"})]},t.id)),u.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-3 mt-2",children:[(0,l.jsx)(n.Select,{placeholder:"Select category to configure",style:{width:200},onSelect:e=>e&&void(!e||(d([...o,{key:e,id:`${e}_${Date.now()}`}]),p(u.filter(t=>t!==e)))),value:void 0,children:u.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}),(0,l.jsx)("span",{className:"text-sm text-gray-500",children:"Select a category to add threshold configuration"})]})]})},ef=({optionalParams:e,parentFieldKey:t,values:a})=>e.fields&&0!==Object.keys(e.fields).length?(0,l.jsxs)("div",{className:"guardrail-optional-params",children:[(0,l.jsxs)("div",{className:"mb-8 pb-4 border-b border-gray-100",children:[(0,l.jsx)(ex,{level:3,className:"mb-2 font-semibold text-gray-900",children:"Optional Parameters"}),(0,l.jsx)("p",{className:"text-gray-600 text-sm",children:e.description||"Configure additional settings for this guardrail provider"})]}),(0,l.jsx)("div",{className:"space-y-8",children:Object.entries(e.fields).map(([e,s])=>{let o,d;return o=`${t}.${e}`,(console.log("value",d=a?.[e]),"dict"===s.type&&s.dict_key_options)?(0,l.jsxs)("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,l.jsx)("div",{className:"mb-4 font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s.description}),(0,l.jsx)(eh,{field:s,fieldKey:e,fullFieldKey:[t,e],value:d})]},o):(0,l.jsx)("div",{className:"mb-8 p-6 bg-white rounded-lg border border-gray-200 shadow-sm",children:(0,l.jsx)(r.Form.Item,{name:[t,e],label:(0,l.jsxs)("div",{className:"mb-2",children:[(0,l.jsx)("div",{className:"font-medium text-gray-900 text-base",children:e}),(0,l.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:s.description})]}),rules:s.required?[{required:!0,message:`${e} is required`}]:void 0,className:"mb-0",initialValue:void 0!==d?d:s.default_value,normalize:"number"===s.type?e=>{if(null==e||""===e)return;let t=Number(e);return isNaN(t)?e:t}:void 0,children:"select"===s.type&&s.options?(0,l.jsx)(n.Select,{placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===s.type&&s.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:s.description,children:s.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===s.type||"boolean"===s.type?(0,l.jsxs)(n.Select,{placeholder:s.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"number"===s.type?(0,l.jsx)(eg.default,{step:1,width:400,placeholder:s.description}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:s.description}):(0,l.jsx)(i.Input,{placeholder:s.description})})},o)})})]}):null;var ey=e.i(482725),ej=e.i(850627);let e_=({selectedProvider:e,accessToken:t,providerParams:a=null,value:s=null})=>{let[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(a),[g,x]=(0,m.useState)(null);if((0,m.useEffect)(()=>{if(a)return void u(a);let e=async()=>{if(t){d(!0),x(null);try{let e=await (0,p.getGuardrailProviderSpecificParams)(t);console.log("Provider params API response:",e),u(e),ee(e),el(e)}catch(e){console.error("Error fetching provider params:",e),x("Failed to load provider parameters")}finally{d(!1)}}};a||e()},[t,a]),!e)return null;if(o)return(0,l.jsx)(ey.Spin,{tip:"Loading provider parameters..."});if(g)return(0,l.jsx)("div",{className:"text-red-500",children:g});let h=ea[e]?.toLowerCase(),f=c&&c[h];if(console.log("Provider key:",h),console.log("Provider fields:",f),!f||0===Object.keys(f).length)return(0,l.jsx)("div",{children:"No configuration fields available for this provider."});console.log("Value:",s);let y=new Set(["patterns","blocked_words","blocked_words_file","categories","severity_threshold","pattern_redaction_format","keyword_redaction_tag"]),j=ei(e),_=(e,t="",a)=>Object.entries(e).map(([e,o])=>{let d=t?`${t}.${e}`:e,c=a?a[e]:s?.[e];if(console.log("Field value:",c),"ui_friendly_name"===e||"optional_params"===e&&"nested"===o.type&&o.fields||j&&y.has(e))return null;if("nested"===o.type&&o.fields)return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-2 font-medium",children:e}),(0,l.jsx)("div",{className:"ml-4 border-l-2 border-gray-200 pl-4",children:_(o.fields,d,c)})]},d);let m=void 0!==c?c:o.default_value??("percentage"===o.type?.5:void 0);return(0,l.jsx)(r.Form.Item,{name:d,label:e,tooltip:o.description,rules:o.required?[{required:!0,message:`${e} is required`}]:void 0,initialValue:m,children:"select"===o.type&&o.options?(0,l.jsx)(n.Select,{placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"multiselect"===o.type&&o.options?(0,l.jsx)(n.Select,{mode:"multiple",placeholder:o.description,defaultValue:c||o.default_value,children:o.options.map(e=>(0,l.jsx)(n.Select.Option,{value:e,children:e},e))}):"bool"===o.type||"boolean"===o.type?(0,l.jsxs)(n.Select,{placeholder:o.description,children:[(0,l.jsx)(n.Select.Option,{value:!0,children:"True"}),(0,l.jsx)(n.Select.Option,{value:!1,children:"False"})]}):"percentage"===o.type&&null!=o.min&&null!=o.max?(0,l.jsx)(ej.Slider,{min:o.min,max:o.max,step:o.step??.1,marks:{[o.min]:"0%",[(o.min+o.max)/2]:"50%",[o.max]:"100%"}}):"number"===o.type?(0,l.jsx)(eg.default,{step:1,width:400,placeholder:o.description,defaultValue:void 0!==c?Number(c):void 0}):e.includes("password")||e.includes("secret")||e.includes("key")?(0,l.jsx)(i.Input.Password,{placeholder:o.description,defaultValue:c||""}):(0,l.jsx)(i.Input,{placeholder:o.description,defaultValue:c||""})},d)});return(0,l.jsx)(l.Fragment,{children:_(f)})};var eb=e.i(592968),ev=e.i(750113);let ew=({availableModels:e,form:t})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,padding:"10px 14px",marginBottom:16,fontSize:13,color:"#389e0d"},children:["After each LLM response, the ",(0,l.jsx)("strong",{children:"Judge Model"})," scores it 0–100 against your criteria. If the weighted average falls below the threshold, the response is blocked (or logged)."]}),(0,l.jsx)(r.Form.Item,{name:"judge_model",label:(0,l.jsxs)("span",{children:["Judge Model ",(0,l.jsx)(eb.Tooltip,{title:"The LLM that reads each response and grades it. Pick a capable model — it never sees end-user data beyond what the LLM returned.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),rules:[{required:!0,message:"Select a judge model"}],children:(0,l.jsx)(n.Select,{showSearch:!0,placeholder:"Select a model",options:e.map(e=>({label:e,value:e}))})}),(0,l.jsx)(r.Form.Item,{name:"overall_threshold",label:(0,l.jsxs)("span",{children:["Minimum Score to Pass ",(0,l.jsx)(eb.Tooltip,{title:"0–100. If the weighted average of criterion scores falls below this, the guardrail triggers. 80 is a good default.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:80,children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"/ 100",style:{width:"100%"}})}),(0,l.jsx)(r.Form.Item,{name:"on_failure",label:(0,l.jsxs)("span",{children:["On Failure ",(0,l.jsx)(eb.Tooltip,{title:"Block: return HTTP 422 when the score is too low. Log: record the result but let the response through.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),initialValue:"block",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block (return 422)"}),(0,l.jsx)(n.Select.Option,{value:"log",children:"Log only"})]})}),(0,l.jsx)(r.Form.Item,{label:(0,l.jsxs)("span",{children:["Evaluation Criteria ",(0,l.jsx)(eb.Tooltip,{title:"Each criterion is something the judge checks. Weights must add up to 100%.",children:(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#8c8c8c"}})})]}),children:(0,l.jsx)(r.Form.List,{name:"criteria",initialValue:[{name:"",weight:100,description:""}],children:(e,{add:a,remove:s})=>(0,l.jsxs)(l.Fragment,{children:[e.map(({key:e,name:t,...a})=>(0,l.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,padding:"12px 12px 0",marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,l.jsx)(r.Form.Item,{...a,name:[t,"name"],rules:[{required:!0,message:"Enter criterion name"}],style:{flex:2,marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"Criterion name (e.g. Policy accuracy)"})}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"weight"],label:(0,l.jsx)(eb.Tooltip,{title:"How much this criterion counts toward the final score. All weights must add up to 100%.",children:(0,l.jsxs)("span",{style:{fontSize:12,color:"#595959"},children:["Weight ",(0,l.jsx)(ev.QuestionCircleOutlined,{style:{color:"#bfbfbf"}})]})}),rules:[{required:!0,message:"Enter weight"}],style:{flex:1,marginBottom:8},children:(0,l.jsx)(K.InputNumber,{min:0,max:100,addonAfter:"%",style:{width:"100%"},placeholder:"e.g. 50"})}),(0,l.jsx)("div",{style:{marginBottom:8},children:(0,l.jsx)(c.Button,{type:"text",danger:!0,size:"small",onClick:()=>s(t),children:"×"})})]}),(0,l.jsx)(r.Form.Item,{...a,name:[t,"description"],rules:[{required:!0,message:"Describe what to check"}],style:{marginBottom:8},children:(0,l.jsx)(i.Input,{placeholder:"What should the judge check for this criterion?"})})]},e)),(0,l.jsx)(c.Button,{type:"dashed",block:!0,style:{marginTop:4},onClick:()=>a({name:"",weight:0,description:""}),icon:(0,l.jsx)(f.PlusOutlined,{}),children:"Add Criterion"}),e.length>0&&(0,l.jsx)(r.Form.Item,{shouldUpdate:!0,noStyle:!0,children:()=>{let e=(t.getFieldValue("criteria")||[]).reduce((e,t)=>e+(Number(t?.weight)||0),0),a=100===e;return(0,l.jsxs)("div",{style:{marginTop:6,fontSize:12,color:a?"#52c41a":"#faad14"},children:["Weights total: ",e,"%",a?" ✓":" — must add up to 100%"]})}})]})})})]});var eN=e.i(536916),eC=e.i(149192),eS=e.i(741585),eS=eS,ek=e.i(724154);e.i(247167);var eI=e.i(931067);let eA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"};var eO=e.i(9583),eT=m.forwardRef(function(e,t){return m.createElement(eO.default,(0,eI.default)({},e,{ref:t,icon:eA}))});let{Text:eP}=d.Typography,{Option:eL}=n.Select,eB=({categories:e,selectedCategories:t,onChange:a})=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center mb-2",children:[(0,l.jsx)(eT,{className:"text-gray-500 mr-1"}),(0,l.jsx)(eP,{className:"text-gray-500 font-medium",children:"Filter by category"})]}),(0,l.jsx)(n.Select,{mode:"multiple",placeholder:"Select categories to filter by",style:{width:"100%"},onChange:a,value:t,allowClear:!0,showSearch:!0,optionFilterProp:"children",className:"mb-4",tagRender:e=>(0,l.jsx)(o.Tag,{color:"blue",closable:e.closable,onClose:e.onClose,className:"mr-2 mb-2",children:e.label}),children:e.map(e=>(0,l.jsx)(eL,{value:e.category,children:e.category},e.category))})]}),eF=({onSelectAll:e,onUnselectAll:t,hasSelectedEntities:a})=>(0,l.jsxs)("div",{className:"bg-gray-50 p-5 rounded-lg mb-6 border border-gray-200 shadow-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(eP,{strong:!0,className:"text-gray-700 text-base",children:"Quick Actions"}),(0,l.jsx)(eb.Tooltip,{title:"Apply action to all PII types at once",children:(0,l.jsx)("div",{className:"ml-2 text-gray-400 cursor-help text-xs",children:"ⓘ"})})]}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:t,disabled:!a,icon:(0,l.jsx)(eC.CloseOutlined,{}),children:"Unselect All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,l.jsx)(c.Button,{color:"primary",variant:"outlined",onClick:()=>e("MASK"),className:"h-10",block:!0,icon:(0,l.jsx)(eS.default,{}),children:"Select All & Mask"}),(0,l.jsx)(c.Button,{color:"danger",variant:"outlined",onClick:()=>e("BLOCK"),className:"h-10 hover:bg-red-100",block:!0,icon:(0,l.jsx)(ek.StopOutlined,{}),children:"Select All & Block"})]})]}),e$=({entities:e,selectedEntities:t,selectedActions:a,actions:r,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:d})=>(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)(eP,{strong:!0,className:"flex-1 text-gray-700",children:"PII Type"}),(0,l.jsx)(eP,{strong:!0,className:"w-32 text-right text-gray-700",children:"Action"})]}),(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===e.length?(0,l.jsx)("div",{className:"py-10 text-center text-gray-500",children:"No PII types match your filter criteria"}):e.map(e=>(0,l.jsxs)("div",{className:`px-5 py-3 flex items-center justify-between hover:bg-gray-50 border-b ${t.includes(e)?"bg-blue-50":""}`,children:[(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[(0,l.jsx)(eN.Checkbox,{checked:t.includes(e),onChange:()=>i(e),className:"mr-3"}),(0,l.jsx)(eP,{className:t.includes(e)?"font-medium text-gray-900":"text-gray-700",children:e.replace(/_/g," ")}),d.get(e)&&(0,l.jsx)(o.Tag,{className:"ml-2 text-xs",color:"blue",children:d.get(e)})]}),(0,l.jsx)("div",{className:"w-32",children:(0,l.jsx)(n.Select,{value:t.includes(e)&&a[e]||"MASK",onChange:t=>s(e,t),style:{width:120},disabled:!t.includes(e),className:`${!t.includes(e)?"opacity-50":""}`,dropdownMatchSelectWidth:!1,children:r.map(e=>(0,l.jsx)(eL,{value:e,children:(0,l.jsxs)("div",{className:"flex items-center",children:[(e=>{switch(e){case"MASK":return(0,l.jsx)(eS.default,{style:{marginRight:4}});case"BLOCK":return(0,l.jsx)(ek.StopOutlined,{style:{marginRight:4}});default:return null}})(e),e]})},e))})})]},e))})]}),{Title:eE,Text:eM}=d.Typography,eR=({entities:e,actions:t,selectedEntities:a,selectedActions:r,onEntitySelect:i,onActionSelect:s,entityCategories:n=[]})=>{let[o,d]=(0,m.useState)([]),c=new Map;n.forEach(e=>{e.entities.forEach(t=>{c.set(t,e.category)})});let u=e.filter(e=>0===o.length||o.includes(c.get(e)||""));return(0,l.jsxs)("div",{className:"pii-configuration",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-5",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)(eE,{level:4,className:"!m-0 font-semibold text-gray-800",children:"Configure PII Protection"})}),(0,l.jsxs)(eM,{className:"text-gray-500",children:[a.length," items selected"]})]}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)(eB,{categories:n,selectedCategories:o,onChange:d}),(0,l.jsx)(eF,{onSelectAll:t=>{e.forEach(e=>{a.includes(e)||i(e),s(e,t)})},onUnselectAll:()=>{a.forEach(e=>{i(e)})},hasSelectedEntities:a.length>0})]}),(0,l.jsx)(e$,{entities:u,selectedEntities:a,selectedActions:r,actions:t,onEntitySelect:i,onActionSelect:s,entityToCategoryMap:c})]})};var eG=e.i(304967),ez=e.i(599724),eD=e.i(312361),eK=e.i(21548),eq=e.i(827252);let eH={rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""},eJ=({value:e,onChange:t,disabled:a=!1})=>{let r={...eH,...e||{},rules:e?.rules?[...e.rules]:[]},s=e=>{let a={...r,...e};t?.(a)},o=(e,t)=>{s({rules:r.rules.map((a,l)=>l===e?{...a,...t}:a)})},d=(e,t)=>{let a=r.rules[e];if(!a)return;let l=Object.entries(a.allowed_param_patterns||{});t(l);let i={};l.forEach(([e,t])=>{i[e]=t}),o(e,{allowed_param_patterns:Object.keys(i).length>0?i:void 0})};return(0,l.jsxs)(eG.Card,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-lg font-semibold",children:"LiteLLM Tool Permission Guardrail"}),(0,l.jsx)(ez.Text,{className:"text-sm text-gray-500",children:"Provide regex patterns (e.g., ^mcp__github_.*$) for tool names or types and optionally constrain payload fields."})]}),!a&&(0,l.jsx)(c.Button,{icon:(0,l.jsx)(f.PlusOutlined,{}),type:"primary",onClick:()=>{s({rules:[...r.rules,{id:`rule_${Math.random().toString(36).slice(2,8)}`,decision:"allow",allowed_param_patterns:void 0}]})},className:"!bg-blue-600 !text-white hover:!bg-blue-500",children:"Add Rule"})]}),(0,l.jsx)(eD.Divider,{}),0===r.rules.length?(0,l.jsx)(eK.Empty,{description:"No tool rules added yet"}):(0,l.jsx)("div",{className:"space-y-4",children:r.rules.map((e,t)=>{let m;return(0,l.jsxs)(eG.Card,{className:"bg-gray-50",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)(ez.Text,{className:"font-semibold",children:["Rule ",t+1]}),(0,l.jsx)(c.Button,{icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,type:"text",disabled:a,onClick:()=>{s({rules:r.rules.filter((e,a)=>a!==t)})},children:"Remove"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Rule ID"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"unique_rule_id",value:e.id,onChange:e=>o(t,{id:e.target.value})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Tool Name (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^mcp__github_.*$",value:e.tool_name??"",onChange:e=>o(t,{tool_name:""===e.target.value.trim()?void 0:e.target.value})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 mt-4",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Tool Type (optional)"}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^function$",value:e.tool_type??"",onChange:e=>o(t,{tool_type:""===e.target.value.trim()?void 0:e.target.value})})]})}),(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Decision"}),(0,l.jsxs)(n.Select,{disabled:a,value:e.decision,style:{width:200},onChange:e=>o(t,{decision:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsx)("div",{className:"mt-4",children:0===(m=Object.entries(e.allowed_param_patterns||{})).length?(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{"":""}}),children:"+ Restrict tool arguments (optional)"}):(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)(ez.Text,{className:"text-sm text-gray-600",children:"Argument constraints (dot or array paths)"}),m.map(([r,s],n)=>(0,l.jsxs)(g.Space,{align:"start",children:[(0,l.jsx)(i.Input,{disabled:a,placeholder:"messages[0].content",value:r,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[,t]=e[n];e[n]=[a,t]})}}),(0,l.jsx)(i.Input,{disabled:a,placeholder:"^email@.*$",value:s,onChange:e=>{var a;return a=e.target.value,void d(t,e=>{if(!e[n])return;let[t]=e[n];e[n]=[t,a]})}}),(0,l.jsx)(c.Button,{disabled:a,icon:(0,l.jsx)(A.DeleteOutlined,{}),danger:!0,onClick:()=>d(t,e=>{e.splice(n,1)})})]},`${e.id||t}-${n}`)),(0,l.jsx)(c.Button,{disabled:a,size:"small",onClick:()=>o(t,{allowed_param_patterns:{...e.allowed_param_patterns||{},"":""}}),children:"+ Add another constraint"})]})})]},e.id||t)})}),(0,l.jsx)(eD.Divider,{}),(0,l.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Default action"}),(0,l.jsxs)(n.Select,{disabled:a,value:r.default_action,onChange:e=>s({default_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"allow",children:"Allow"}),(0,l.jsx)(n.Select.Option,{value:"deny",children:"Deny"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(ez.Text,{className:"text-sm font-medium flex items-center gap-1",children:["On disallowed action",(0,l.jsx)(eb.Tooltip,{title:"Block returns an error when a forbidden tool is invoked. Rewrite strips the tool call but lets the rest of the response continue.",children:(0,l.jsx)(eq.InfoCircleOutlined,{})})]}),(0,l.jsxs)(n.Select,{disabled:a,value:r.on_disallowed_action,onChange:e=>s({on_disallowed_action:e}),children:[(0,l.jsx)(n.Select.Option,{value:"block",children:"Block"}),(0,l.jsx)(n.Select.Option,{value:"rewrite",children:"Rewrite"})]})]})]}),(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsx)(ez.Text,{className:"text-sm font-medium",children:"Violation message (optional)"}),(0,l.jsx)(i.Input.TextArea,{disabled:a,rows:3,placeholder:"This violates our org policy...",value:r.violation_message_template,onChange:e=>s({violation_message_template:e.target.value})})]})]})},{Title:eU,Text:eW,Link:eV}=d.Typography,{Option:eY}=n.Select,eQ={pre_call:"Before LLM Call - Runs before the LLM call and checks the input (Recommended)",during_call:"During LLM Call - Runs in parallel with the LLM call, with response held until check completes",post_call:"After LLM Call - Runs after the LLM call and checks only the output",logging_only:"Logging Only - Only runs on logging callbacks without affecting the LLM call",pre_mcp_call:"Before MCP Tool Call - Runs before MCP tool execution and validates tool calls",during_mcp_call:"During MCP Tool Call - Runs in parallel with MCP tool execution for monitoring"};e.s(["default",0,({visible:e,onClose:t,accessToken:a,onSuccess:d,preset:g})=>{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({}),[S,k]=(0,m.useState)(0),[I,A]=(0,m.useState)(null),[O,T]=(0,m.useState)([]),[P,L]=(0,m.useState)(2),[B,F]=(0,m.useState)({}),[$,E]=(0,m.useState)([]),[M,R]=(0,m.useState)([]),[G,z]=(0,m.useState)([]),[D,K]=(0,m.useState)(""),[q,H]=(0,m.useState)(!1),[J,U]=(0,m.useState)(null),[W,V]=(0,m.useState)(""),[Y,X]=(0,m.useState)(void 0),[Z,en]=(0,m.useState)("warn"),[ed,ec]=(0,m.useState)(""),[eu,eg]=(0,m.useState)(!1),[ex,eh]=(0,m.useState)([]),[ey,ej]=(0,m.useState)({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),eb=(0,m.useMemo)(()=>!!y&&"tool_permission"===(ea[y]||"").toLowerCase(),[y]);(0,m.useEffect)(()=>{a&&(async()=>{try{let[e,t,l]=await Promise.all([(0,p.getGuardrailUISettings)(a),(0,p.getGuardrailProviderSpecificParams)(a),(0,p.modelAvailableCall)(a,"","").catch(()=>null)]);b(e),A(t),l?.data&&eh(l.data.map(e=>e.id)),ee(t),el(t)}catch(e){console.error("Error fetching guardrail data:",e),u.default.fromBackend("Failed to load guardrail configuration")}})()},[a]),(0,m.useEffect)(()=>{if(!g||!e||!_)return;j(g.provider);let t={provider:g.provider,guardrail_name:g.guardrailNameSuggestion,mode:g.mode,default_on:g.defaultOn,skip_system_message_choice:"inherit",skip_tool_message_choice:"inherit"};if("BlockCodeExecution"===g.provider&&(t.confidence_threshold=.5),x.setFieldsValue(t),g.categoryName&&_.content_filter_settings?.content_categories){let e=_.content_filter_settings.content_categories.find(e=>e.name===g.categoryName);e&&z([{id:`category-${Date.now()}`,category:e.name,display_name:e.display_name,action:e.default_action,severity_threshold:"medium"}])}},[g,e,_]);let ev=e=>{j(e);let t={config:void 0,presidio_analyzer_api_base:void 0,presidio_anonymizer_api_base:void 0};"BlockCodeExecution"===e&&(t.confidence_threshold=.5),x.setFieldsValue(t),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),H(!1),U(null),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),"LlmAsAJudge"===e&&x.setFieldsValue({mode:"post_call"})},eN=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},eC=(e,t)=>{C(a=>({...a,[e]:t}))},eS=async()=>{try{if(0===S&&(await x.validateFields(["guardrail_name","provider","mode","default_on"]),y)){let e=["guardrail_name","provider","mode","default_on"];"PresidioPII"===y&&e.push("presidio_analyzer_api_base","presidio_anonymizer_api_base"),await x.validateFields(e)}if(1===S&&er(y)&&0===v.length)return void u.default.fromBackend("Please select at least one PII entity to continue");k(S+1)}catch(e){console.error("Form validation failed:",e)}},ek=()=>{x.resetFields(),j(null),w([]),C({}),T([]),L(2),F({}),E([]),R([]),z([]),K(""),ej({rules:[],default_action:"deny",on_disallowed_action:"block",violation_message_template:""}),V(""),X(void 0),en("warn"),ec(""),eg(!1),k(0)},eI=()=>{ek(),t()},eA=async()=>{try{f(!0),await x.validateFields();let e=x.getFieldsValue(!0),l=ea[e.provider],r={guardrail_name:e.guardrail_name,litellm_params:{guardrail:l,mode:e.mode,default_on:e.default_on},guardrail_info:{}},i=em(e.skip_system_message_choice);void 0!==i&&(r.litellm_params.skip_system_message_in_guardrail=i);let s=ep(e.skip_tool_message_choice);if(void 0!==s&&(r.litellm_params.skip_tool_message_in_guardrail=s),"PresidioPII"===e.provider&&v.length>0){let t={};v.forEach(e=>{t[e]=N[e]||"MASK"}),r.litellm_params.pii_entities_config=t,e.presidio_analyzer_api_base&&(r.litellm_params.presidio_analyzer_api_base=e.presidio_analyzer_api_base),e.presidio_anonymizer_api_base&&(r.litellm_params.presidio_anonymizer_api_base=e.presidio_anonymizer_api_base)}if(ei(e.provider)){let e=q&&J?.brand_self?.length>0;if(0===$.length&&0===M.length&&0===G.length&&!e){u.default.fromBackend("Please configure at least one content filter setting (category, pattern, keyword, or competitor intent)"),f(!1);return}$.length>0&&(r.litellm_params.patterns=$.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}))),M.length>0&&(r.litellm_params.blocked_words=M.map(e=>({keyword:e.keyword,action:e.action,description:e.description}))),G.length>0&&(r.litellm_params.categories=G.map(e=>({category:e.category,enabled:!0,action:e.action,severity_threshold:e.severity_threshold||"medium"}))),q&&J?.brand_self?.length>0&&(r.litellm_params.competitor_intent_config={competitor_intent_type:J.competitor_intent_type??"airline",brand_self:J.brand_self,locations:J.locations?.length>0?J.locations:void 0,competitors:"generic"===J.competitor_intent_type&&J.competitors?.length>0?J.competitors:void 0,policy:J.policy,threshold_high:J.threshold_high,threshold_medium:J.threshold_medium,threshold_low:J.threshold_low})}else if(e.config)try{r.guardrail_info=JSON.parse(e.config)}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}if("llm_as_a_judge"===l){let t=e.criteria||[];if(0===t.length){u.default.fromBackend("Add at least one evaluation criterion"),f(!1);return}let a=t.reduce((e,t)=>e+(Number(t?.weight)||0),0);if(100!==a){u.default.fromBackend(`Criterion weights must sum to 100% (currently ${a}%)`),f(!1);return}r.litellm_params.judge_model=e.judge_model,r.litellm_params.overall_threshold=e.overall_threshold??80,r.litellm_params.on_failure=e.on_failure??"block",r.litellm_params.criteria=t.map(e=>({name:e.name,weight:Number(e.weight),description:e.description||""}))}if("tool_permission"===l){if(0===ey.rules.length){u.default.fromBackend("Add at least one tool permission rule"),f(!1);return}r.litellm_params.rules=ey.rules,r.litellm_params.default_action=ey.default_action,r.litellm_params.on_disallowed_action=ey.on_disallowed_action,ey.violation_message_template&&(r.litellm_params.violation_message_template=ey.violation_message_template)}if(ei(e.provider)&&(void 0!==Y&&Y>0&&(r.litellm_params.end_session_after_n_fails=Y),Z&&"realtime"===W&&(r.litellm_params.on_violation=Z),ed.trim()&&(r.litellm_params.realtime_violation_message=ed.trim())),console.log("values: ",JSON.stringify(e)),I&&y&&"llm_as_a_judge"!==l){let t=ea[y]?.toLowerCase();console.log("providerKey: ",t);let a=I[t]||{},l=new Set;console.log("providerSpecificParams: ",JSON.stringify(a)),Object.keys(a).forEach(e=>{"optional_params"!==e&&l.add(e)}),a.optional_params&&a.optional_params.fields&&Object.keys(a.optional_params.fields).forEach(e=>{l.add(e)}),console.log("allowedParams: ",l),l.forEach(t=>{let a=e[t];(null==a||""===a)&&(a=e.optional_params?.[t]),null!=a&&""!==a&&(r.litellm_params[t]=a)})}if(!a)throw Error("No access token available");console.log("Sending guardrail data:",JSON.stringify(r)),await (0,p.createGuardrailCall)(a,r),u.default.success("Guardrail created successfully"),ek(),d(),t()}catch(e){console.error("Failed to create guardrail:",e),u.default.fromBackend("Failed to create guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}},eO=e=>{if(!_||!ei(y))return null;let t=_.content_filter_settings;return t?(0,l.jsx)(Q,{prebuiltPatterns:t.prebuilt_patterns||[],categories:t.pattern_categories||[],selectedPatterns:$,blockedWords:M,onPatternAdd:e=>E([...$,e]),onPatternRemove:e=>E($.filter(t=>t.id!==e)),onPatternActionChange:(e,t)=>{E($.map(a=>a.id===e?{...a,action:t}:a))},onBlockedWordAdd:e=>R([...M,e]),onBlockedWordRemove:e=>R(M.filter(t=>t.id!==e)),onBlockedWordUpdate:(e,t,a)=>{R(M.map(l=>l.id===e?{...l,[t]:a}:l))},contentCategories:t.content_categories||[],selectedContentCategories:G,onContentCategoryAdd:e=>z([...G,e]),onContentCategoryRemove:e=>z(G.filter(t=>t.id!==e)),onContentCategoryUpdate:(e,t,a)=>{z(G.map(l=>l.id===e?{...l,[t]:a}:l))},pendingCategorySelection:D,onPendingCategorySelectionChange:K,accessToken:a,showStep:e,competitorIntentEnabled:q,competitorIntentConfig:J,onCompetitorIntentChange:(e,t)=>{H(e),U(t)}}):null},eT=ei(y)?[{title:"Basic Info",optional:!1},{title:"Topics",optional:!1},{title:"Patterns",optional:!1},{title:"Keywords",optional:!1},{title:"Endpoint Settings (Optional)",optional:!0}]:er(y)?[{title:"Basic Info",optional:!1},{title:"PII Configuration",optional:!1}]:[{title:"Basic Info",optional:!1},{title:"Provider Configuration",optional:!1}];return(0,l.jsx)(s.Modal,{title:null,open:e,onCancel:eI,footer:null,width:1e3,closable:!1,className:"top-8",styles:{body:{padding:0}},children:(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-base font-semibold text-gray-900 m-0",children:"Create guardrail"}),(0,l.jsx)("button",{onClick:eI,className:"text-gray-400 hover:text-gray-600 bg-transparent border-none cursor-pointer text-base leading-none p-1",children:"✕"})]}),(0,l.jsx)("div",{className:"overflow-auto px-6 py-4",style:{maxHeight:"calc(80vh - 120px)"},children:(0,l.jsx)(r.Form,{form:x,layout:"vertical",initialValues:{mode:"pre_call",default_on:!1,skip_system_message_choice:"inherit",skip_tool_message_choice:"inherit"},children:eT.map((e,t)=>{let s=t{s&&k(t)},style:{minHeight:24},children:[(0,l.jsx)("span",{className:"text-sm",style:{fontWeight:d?600:500,color:d?"#1e293b":s?"#4f46e5":"#94a3b8"},children:e.title}),e.optional&&!d&&(0,l.jsx)("span",{className:"text-[11px] text-slate-400",children:"optional"}),s&&(0,l.jsx)("span",{className:"text-[11px] text-indigo-500 hover:underline",children:"Edit"})]}),d&&(0,l.jsx)("div",{className:"mt-3",children:(()=>{switch(S){case 0:return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(i.Input,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:ev,labelInValue:!1,optionLabelProp:"label",dropdownRender:e=>e,showSearch:!0,children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(eY,{value:e,label:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]}),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{optionLabelProp:"label",mode:"multiple",children:_?.supported_modes?.map(e=>(0,l.jsx)(eY,{value:e,label:e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:e}),"pre_call"===e&&(0,l.jsx)(o.Tag,{color:"green",style:{marginLeft:"8px"},children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ[e]})]})},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eY,{value:"pre_call",label:"pre_call",children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("strong",{children:"pre_call"})," ",(0,l.jsx)(o.Tag,{color:"green",children:"Recommended"})]}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.pre_call})]})}),(0,l.jsx)(eY,{value:"during_call",label:"during_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"during_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.during_call})]})}),(0,l.jsx)(eY,{value:"post_call",label:"post_call",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"post_call"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.post_call})]})}),(0,l.jsx)(eY,{value:"logging_only",label:"logging_only",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("strong",{children:"logging_only"})}),(0,l.jsx)("div",{style:{fontSize:"12px",color:"#888"},children:eQ.logging_only})]})})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default.",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"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: omit role: system from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_tool_message_choice",label:"Skip tool messages in guardrail",tooltip:"Unified guardrails only: omit role: tool from guardrail evaluation input (OpenAI chat + Anthropic messages). The model still receives full messages. Use global default follows litellm_settings.skip_tool_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(n.Select.Option,{value:"inherit",children:"Use global default"}),(0,l.jsx)(n.Select.Option,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(n.Select.Option,{value:"no",children:"No — always include in scan"})]})}),!eb&&!ei(y)&&!es(y)&&(0,l.jsx)(e_,{selectedProvider:y,accessToken:a,providerParams:I})]});case 1:if(er(y))return _&&"PresidioPII"===y?(0,l.jsx)(eR,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:eN,onActionSelect:eC,entityCategories:_.pii_entity_categories}):null;if(ei(y))return eO("categories");if(es(y))return(0,l.jsx)(ew,{availableModels:ex,form:x});if(!y)return null;if(eb)return(0,l.jsx)(eJ,{value:ey,onChange:ej});if(!I)return null;console.log("guardrail_provider_map: ",ea),console.log("selectedProvider: ",y);let e=ea[y]?.toLowerCase(),t=I&&I[e];return t&&t.optional_params?(0,l.jsx)(ef,{optionalParams:t.optional_params,parentFieldKey:"optional_params"}):null;case 2:if(ei(y))return eO("patterns");return null;case 3:if(ei(y))return eO("keywords");return null;case 4:return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-sm text-gray-500",children:["Configure settings for a specific call type. Most guardrails don't need this — skip it unless you're using a specific endpoint like ",(0,l.jsx)("code",{children:"/v1/realtime"}),"."]})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call type"}),(0,l.jsx)(n.Select,{placeholder:"Select a call type",value:W||void 0,onChange:e=>{V(e),eg(!1)},style:{width:260},allowClear:!0,options:[{value:"realtime",label:"/v1/realtime"}]}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"More call types coming soon."})]}),"realtime"===W&&(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>eg(e=>!e),className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700",children:[(0,l.jsx)("span",{children:"/v1/realtime settings"}),(0,l.jsx)("svg",{className:`w-4 h-4 text-gray-500 transition-transform ${eu?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),eu&&(0,l.jsxs)("div",{className:"space-y-5 px-4 py-4 border-t border-gray-200",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End session after X violations"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"Automatically close the session after this many guardrail violations. Leave empty to never auto-close."}),(0,l.jsx)("input",{type:"number",min:1,placeholder:"e.g. 3",value:Y??"",onChange:e=>X(e.target.value?parseInt(e.target.value,10):void 0),className:"border border-gray-300 rounded px-3 py-1.5 text-sm w-32"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"On violation"}),(0,l.jsx)("div",{className:"space-y-2",children:["warn","end_session"].map(e=>(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"radio",name:"on_violation",value:e,checked:Z===e,onChange:()=>en(e),className:"mt-0.5"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-sm font-medium text-gray-800",children:"warn"===e?"Warn":"End session"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 m-0",children:"warn"===e?"Bot speaks the message, session continues":"Bot speaks the message, connection closes immediately"})]})]},e))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message the user hears"}),(0,l.jsx)("p",{className:"text-xs text-gray-400 mb-2",children:"What the bot says aloud when this guardrail fires. Falls back to the default violation message if empty."}),(0,l.jsx)("textarea",{rows:3,placeholder:"e.g. I'm not able to continue this conversation. Please contact us at 1-800-774-2678.",value:ed,onChange:e=>ec(e.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm w-full resize-none"})]})]})]})]});default:return null}})()})]})]},t)})})}),(0,l.jsxs)("div",{className:"flex items-center justify-end space-x-3 px-6 py-3 border-t border-gray-200",children:[(0,l.jsx)(c.Button,{onClick:eI,children:"Cancel"}),S>0&&(0,l.jsx)(c.Button,{onClick:()=>{k(S-1)},children:"Previous"}),S{let[x]=r.Form.useForm(),[h,f]=(0,m.useState)(!1),[y,j]=(0,m.useState)(g?.provider||null),[_,b]=(0,m.useState)(null),[v,w]=(0,m.useState)([]),[N,C]=(0,m.useState)({});(0,m.useEffect)(()=>{(async()=>{try{if(!a)return;let e=await (0,p.getGuardrailUISettings)(a);b(e)}catch(e){console.error("Error fetching guardrail settings:",e),u.default.fromBackend("Failed to load guardrail settings")}})()},[a]),(0,m.useEffect)(()=>{g?.pii_entities_config&&Object.keys(g.pii_entities_config).length>0&&(w(Object.keys(g.pii_entities_config)),C(g.pii_entities_config))},[g]);let S=e=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},k=(e,t)=>{C(a=>({...a,[e]:t}))},I=async()=>{try{f(!0);let e=await x.validateFields(),l=ea[e.provider],r=c&&"object"==typeof c?{...c}:{};r.guardrail=l,r.mode=e.mode,r.default_on=e.default_on;let i=e.skip_system_message_choice;"yes"===i?r.skip_system_message_in_guardrail=!0:"no"===i?r.skip_system_message_in_guardrail=!1:delete r.skip_system_message_in_guardrail;let s=e.skip_tool_message_choice;"yes"===s?r.skip_tool_message_in_guardrail=!0:"no"===s?r.skip_tool_message_in_guardrail=!1:delete r.skip_tool_message_in_guardrail;let n={};if("PresidioPII"===e.provider&&v.length>0){let e={};v.forEach(t=>{e[t]=N[t]||"MASK"}),r.pii_entities_config=e}else if(e.config)try{let t=JSON.parse(e.config);"Bedrock"===e.provider&&t?(t.guardrail_id&&(r.guardrailIdentifier=t.guardrail_id),t.guardrail_version&&(r.guardrailVersion=t.guardrail_version)):n=t}catch(e){u.default.fromBackend("Invalid JSON in configuration"),f(!1);return}let m={guardrail_id:d,guardrail:{guardrail_name:e.guardrail_name,litellm_params:r,guardrail_info:n}};if(!a)throw Error("No access token available");console.log("Sending guardrail update data:",JSON.stringify(m));let g=`/guardrails/${d}`,h=await fetch(g,{method:"PUT",headers:{[(0,p.getGlobalLitellmHeaderName)()]:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(m)});if(!h.ok){let e=await h.text();throw Error(e||"Failed to update guardrail")}u.default.success("Guardrail updated successfully"),o(),t()}catch(e){console.error("Failed to update guardrail:",e),u.default.fromBackend("Failed to update guardrail: "+(e instanceof Error?e.message:String(e)))}finally{f(!1)}};return(0,l.jsx)(s.Modal,{title:"Edit Guardrail",open:e,onCancel:t,footer:null,width:700,children:(0,l.jsxs)(r.Form,{form:x,layout:"vertical",initialValues:g,children:[(0,l.jsx)(r.Form.Item,{name:"guardrail_name",label:"Guardrail Name",rules:[{required:!0,message:"Please enter a guardrail name"}],children:(0,l.jsx)(tl.TextInput,{placeholder:"Enter a name for this guardrail"})}),(0,l.jsx)(r.Form.Item,{name:"provider",label:"Guardrail Provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,l.jsx)(n.Select,{placeholder:"Select a guardrail provider",onChange:e=>{j(e),x.setFieldsValue({config:void 0}),w([]),C({})},disabled:!0,optionLabelProp:"label",children:Object.entries(et()).map(([e,t])=>(0,l.jsx)(ts,{value:e,label:t,children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[eo[t]&&(0,l.jsx)("img",{src:eo[t],alt:"",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,l.jsx)("span",{children:t})]})},e))})}),(0,l.jsx)(r.Form.Item,{name:"mode",label:"Mode",tooltip:"How the guardrail should be applied",rules:[{required:!0,message:"Please select a mode"}],children:(0,l.jsx)(n.Select,{children:_?.supported_modes?.map(e=>(0,l.jsx)(ts,{value:e,children:e},e))||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ts,{value:"pre_call",children:"pre_call"}),(0,l.jsx)(ts,{value:"post_call",children:"post_call"})]})})}),(0,l.jsx)(r.Form.Item,{name:"default_on",label:"Always On",tooltip:"If enabled, this guardrail will be applied to all requests by default",valuePropName:"checked",children:(0,l.jsx)(D.Switch,{})}),(0,l.jsx)(r.Form.Item,{name:"skip_system_message_choice",label:"Skip system messages in guardrail",tooltip:"Unified guardrails only: whether role: system content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_system_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(ts,{value:"inherit",children:"Use global default"}),(0,l.jsx)(ts,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(ts,{value:"no",children:"No — always include in scan"})]})}),(0,l.jsx)(r.Form.Item,{name:"skip_tool_message_choice",label:"Skip tool messages in guardrail",tooltip:"Unified guardrails only: whether role: tool content is omitted from guardrail input (LLM still receives full messages). Use global default follows litellm_settings.skip_tool_message_in_guardrail.",children:(0,l.jsxs)(n.Select,{children:[(0,l.jsx)(ts,{value:"inherit",children:"Use global default"}),(0,l.jsx)(ts,{value:"yes",children:"Yes — exclude from guardrail scan"}),(0,l.jsx)(ts,{value:"no",children:"No — always include in scan"})]})}),(()=>{if(!y)return null;if("PresidioPII"===y)return _&&y&&"PresidioPII"===y?(0,l.jsx)(eR,{entities:_.supported_entities,actions:_.supported_actions,selectedEntities:v,selectedActions:N,onEntitySelect:S,onActionSelect:k,entityCategories:_.pii_entity_categories}):null;switch(y){case"Aporia":return(0,l.jsx)(r.Form.Item,{label:"Aporia Configuration",name:"config",tooltip:"JSON configuration for Aporia",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ "api_key": "your_aporia_api_key", "project_name": "your_project_name" }`})});case"AimSecurity":return(0,l.jsx)(r.Form.Item,{label:"Aim Security Configuration",name:"config",tooltip:"JSON configuration for Aim Security",children:(0,l.jsx)(i.Input.TextArea,{rows:4,placeholder:`{ diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0-ne4el5qxs1z.js b/litellm/proxy/_experimental/out/_next/static/chunks/0-ne4el5qxs1z.js new file mode 100644 index 00000000000..a7a6f306c77 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0-ne4el5qxs1z.js @@ -0,0 +1,40 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,921687,e=>{"use strict";var t=e.i(764205);let s=async(e,s)=>{try{let r=s||(0,t.getProxyBaseUrl)(),a=r?`${r}/v1/agents`:"/v1/agents",n=await fetch(a,{method:"GET",headers:{[(0,t.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to fetch agents")}let i=await n.json();return console.log("Fetched agents:",i),i.sort((e,t)=>{let s=e.agent_name||e.agent_id,r=t.agent_name||t.agent_id;return s.localeCompare(r)}),i}catch(e){throw console.error("Error fetching agents:",e),e}},r=async(e,s,r,a)=>{try{let a=await (0,t.modelInfoCall)(e,s,r,1,200),n=a?.data??[],i=(Array.isArray(n)?n:[]).filter(e=>"string"==typeof e?.litellm_params?.model&&e.litellm_params.model.startsWith("litellm_agent/")).map(e=>({model_name:e.model_name??e.model_group??"",litellm_params:{...e.litellm_params,model:e.litellm_params.model,litellm_system_prompt:e.litellm_params?.litellm_system_prompt,tools:Array.isArray(e.litellm_params?.tools)?e.litellm_params.tools:void 0},model_info:e.model_info??null}));return i.sort((e,t)=>e.model_name.localeCompare(t.model_name)),i}catch(e){throw console.error("Error fetching agent models:",e),e}};e.s(["fetchAvailableAgentModels",0,r,"fetchAvailableAgents",0,s])},124608,614677,235267,318059,953860,434788,512882,584976,720762,e=>{"use strict";let t,s,r;e.i(247167);var a,n,i,o,l,c,d,u,h,p,m,g,f,y,x,b,v,w,_,S,j,k,N,E,T,C,A,P,O,I,R,M,$,L,U,D,q,B,W,H,z,F,J,G,V,K,X,Y,Q,Z,ee,et,es,er,ea,en,ei,eo,el,ec,ed,eu,eh,ep,em,eg,ef,ey,ex=e.i(931067),eb=e.i(271645);let ev={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 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"};var ew=e.i(9583),e_=eb.forwardRef(function(e,t){return eb.createElement(ew.default,(0,ex.default)({},e,{ref:t,icon:ev}))});e.s(["PictureOutlined",0,e_],124608);let eS=new Uint8Array(16),ej=[];for(let e=0;e<256;++e)ej.push((e+256).toString(16).slice(1));let ek=function(e,t,s){return t||e||!crypto.randomUUID?function(e,t,s){let r=(e=e||{}).random??e.rng?.()??crypto.getRandomValues(eS);if(r.length<16)throw Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((s=s||0)<0||s+16>t.length)throw RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[s+e]=r[e];return t}return function(e,t=0){return(ej[e[t+0]]+ej[e[t+1]]+ej[e[t+2]]+ej[e[t+3]]+"-"+ej[e[t+4]]+ej[e[t+5]]+"-"+ej[e[t+6]]+ej[e[t+7]]+"-"+ej[e[t+8]]+ej[e[t+9]]+"-"+ej[e[t+10]]+ej[e[t+11]]+ej[e[t+12]]+ej[e[t+13]]+ej[e[t+14]]+ej[e[t+15]]).toLowerCase()}(r)}(e,t,s):crypto.randomUUID()};e.s(["v4",0,ek],614677);var eN=e.i(843476),eE=e.i(808613),eT=e.i(311451),eC=e.i(28651),eA=e.i(199133),eP=e.i(592968),eO=e.i(827252);function eI(e){if(!e)return[];if(Array.isArray(e))return e.map(e=>eR(e)).filter(e=>void 0!==e);let t=eR(e);return void 0!==t?[t]:[]}function eR(e,t){if(!e)return;let s=void 0!==t?t:e.default;if("object"===e.type){let t="object"!=typeof s||null===s||Array.isArray(s)?{}:{...s};return e.properties&&Object.entries(e.properties).forEach(([e,s])=>{t[e]=eR(s,t[e])}),t}if("array"===e.type){if(Array.isArray(s)){let t=e.items;if(!t)return s;if(0===s.length){let e=eI(t);return e.length?e:s}return Array.isArray(t)?s.map((e,s)=>eR(t[s]??t[t.length-1],e)):s.map(e=>eR(t,e))}return void 0!==s?s:eI(e.items)}if(void 0!==s)return s;switch(e.type){case"integer":case"number":return 0;case"boolean":return!1;default:return""}}let eM=e=>{let t=eR(e);if("object"===e.type||"array"===e.type){let s="array"===e.type?[]:{};return JSON.stringify(t??s,null,2)}return t},e$=(0,eb.forwardRef)(({tool:e,className:t},s)=>{let[r]=eE.Form.useForm(),a=(0,eb.useMemo)(()=>"string"==typeof e.inputSchema?{type:"object",properties:{input:{type:"string",description:"Input for this tool"}},required:["input"]}:e.inputSchema,[e.inputSchema]),n=(0,eb.useMemo)(()=>a.properties?.params?.type==="object"&&a.properties.params.properties?{type:"object",properties:a.properties.params.properties,required:a.properties.params.required||[]}:a,[a]);return((0,eb.useImperativeHandle)(s,()=>({getSubmitValues:async()=>{var e;let t;return e=await r.validateFields(),t={},Object.entries(e).forEach(([e,s])=>{let r=n.properties?.[e];if(r&&null!=s&&""!==s)switch(r.type){case"boolean":t[e]="true"===s||!0===s;break;case"number":case"integer":{let a=Number(s);t[e]=Number.isNaN(a)?s:"integer"===r.type?Math.trunc(a):a;break}case"object":case"array":try{let a="string"==typeof s?JSON.parse(s):s,n="object"===r.type&&null!==a&&"object"==typeof a&&!Array.isArray(a),i="array"===r.type&&Array.isArray(a);"object"===r.type&&n||"array"===r.type&&i?t[e]=a:t[e]=s}catch{t[e]=s}break;case"string":t[e]=String(s);break;default:t[e]=s}else null!=s&&""!==s&&(t[e]=s)}),a.properties?.params?.type==="object"&&a.properties.params.properties?{params:t}:t}})),eb.default.useEffect(()=>{if(r.resetFields(),!n.properties)return;let e={};Object.entries(n.properties).forEach(([t,s])=>{e[t]=eM(s)}),r.setFieldsValue(e)},[r,n,e]),"string"==typeof e.inputSchema)?(0,eN.jsx)(eE.Form,{form:r,layout:"vertical",className:t,children:(0,eN.jsx)(eE.Form.Item,{label:(0,eN.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Input ",(0,eN.jsx)("span",{className:"text-red-500",children:"*"})]}),name:"input",rules:[{required:!0,message:"Please enter input for this tool"}],children:(0,eN.jsx)(eT.Input,{placeholder:"Enter input for this tool"})})}):n.properties?(0,eN.jsx)(eE.Form,{form:r,layout:"vertical",className:t,children:Object.entries(n.properties).map(([t,s])=>{let r=eM(s),a=`${e.name}-${t}`;return(0,eN.jsx)(eE.Form.Item,{label:(0,eN.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[t," ",n.required?.includes(t)&&(0,eN.jsx)("span",{className:"text-red-500",children:"*"}),s.description&&(0,eN.jsx)(eP.Tooltip,{title:s.description,children:(0,eN.jsx)(eO.InfoCircleOutlined,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:t,initialValue:r,rules:[{required:n.required?.includes(t),message:`Please enter ${t}`},..."object"===s.type||"array"===s.type?[{validator:(e,r)=>{if((null==r||""===r)&&!n.required?.includes(t))return Promise.resolve();try{let e="string"==typeof r?JSON.parse(r):r,t="object"===s.type&&null!==e&&"object"==typeof e&&!Array.isArray(e),a="array"===s.type&&Array.isArray(e);if("object"===s.type&&t||"array"===s.type&&a)return Promise.resolve();return Promise.reject(Error("object"===s.type?"Please enter a JSON object":"Please enter a JSON array"))}catch{return Promise.reject(Error("Invalid JSON"))}}}]:[]],children:"string"===s.type&&s.enum?(0,eN.jsx)(eA.Select,{placeholder:`Select ${t}`,allowClear:!n.required?.includes(t),options:s.enum.map(e=>({value:e,label:e}))}):"string"!==s.type||s.enum?"number"===s.type||"integer"===s.type?(0,eN.jsx)(eC.InputNumber,{step:"integer"===s.type?1:void 0,placeholder:s.description||`Enter ${t}`,className:"w-full",style:{width:"100%"}}):"boolean"===s.type?(0,eN.jsx)(eA.Select,{placeholder:`Select ${t}`,allowClear:!n.required?.includes(t),options:[{value:!0,label:"True"},{value:!1,label:"False"}]}):"object"===s.type||"array"===s.type?(0,eN.jsx)(eT.Input.TextArea,{rows:"object"===s.type?4:3,placeholder:s.description||("object"===s.type?`Enter JSON object for ${t}`:`Enter JSON array for ${t}`),spellCheck:!1,className:"font-mono"}):(0,eN.jsx)(eT.Input,{placeholder:s.description||`Enter ${t}`,allowClear:!0}):(0,eN.jsx)(eT.Input,{placeholder:s.description||`Enter ${t}`,allowClear:!0})},a)})}):(0,eN.jsx)(eE.Form,{form:r,layout:"vertical",className:t,children:(0,eN.jsx)("div",{className:"py-4 text-center text-sm text-gray-500",children:"No parameters required for this tool."})})});e$.displayName="MCPToolArgumentsForm",e.s(["default",0,e$],235267);var eL=e.i(764205);e.s(["default",0,({onChange:e,value:t,className:s,accessToken:r})=>{let[a,n]=(0,eb.useState)([]),[i,o]=(0,eb.useState)(!1);return(0,eb.useEffect)(()=>{(async()=>{if(r)try{let e=await (0,eL.tagListCall)(r);console.log("List tags response:",e),n(Object.values(e))}catch(e){console.error("Error fetching tags:",e)}finally{o(!1)}})()},[r]),(0,eN.jsx)(eA.Select,{mode:"tags",showSearch:!0,placeholder:"Select or create tags",onChange:e,value:t,loading:i,className:s,options:a.map(e=>({label:e.name,value:e.name,title:e.description||e.name})),optionFilterProp:"label",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"}})}],318059);let eU=e=>{if(!e)return;let t={};if(e.id&&(t.taskId=e.id),e.contextId&&(t.contextId=e.contextId),e.status&&(t.status={state:e.status.state,timestamp:e.status.timestamp},e.status.message?.parts)){let s=e.status.message.parts.filter(e=>"text"===e.kind&&e.text).map(e=>e.text).join(" ");s&&(t.status.message=s)}return e.metadata&&"object"==typeof e.metadata&&(t.metadata=e.metadata),Object.keys(t).length>0?t:void 0},eD=async(e,t,s,r,a,n,i,o,l,c)=>{let d=l||(0,eL.getProxyBaseUrl)(),u=d?`${d}/a2a/${e}/message/send`:`/a2a/${e}/message/send`,h={jsonrpc:"2.0",id:ek(),method:"message/send",params:{message:{kind:"message",messageId:ek().replace(/-/g,""),role:"user",parts:[{kind:"text",text:t}]}}};c&&c.length>0&&(h.params.metadata={guardrails:c});let p=performance.now();try{let t=await fetch(u,{method:"POST",headers:{[(0,eL.getGlobalLitellmHeaderName)()]:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify(h),signal:a}),l=performance.now()-p;if(n&&n(l),!t.ok){let e=await t.json();throw Error(e.error?.message||e.detail||`HTTP ${t.status}`)}let c=await t.json(),d=performance.now()-p;if(i&&i(d),c.error)throw Error(c.error.message);let m=c.result;if(m){let t="",r=eU(m);if(r&&o&&o(r),m.artifacts&&Array.isArray(m.artifacts)){for(let e of m.artifacts)if(e.parts&&Array.isArray(e.parts))for(let s of e.parts)"text"===s.kind&&s.text&&(t+=s.text)}else if(m.parts&&Array.isArray(m.parts))for(let e of m.parts)"text"===e.kind&&e.text&&(t+=e.text);else if(m.status?.message?.parts)for(let e of m.status.message.parts)"text"===e.kind&&e.text&&(t+=e.text);t?s(t,`a2a_agent/${e}`):(console.warn("Could not extract text from A2A response, showing raw JSON:",m),s(JSON.stringify(m,null,2),`a2a_agent/${e}`))}}catch(e){if(a?.aborted)return void console.log("A2A request was cancelled");throw console.error("A2A send message error:",e),e}},eq=async(e,t,s,r,a,n,i,o,l)=>{let c,d=l||(0,eL.getProxyBaseUrl)(),u=d?`${d}/a2a/${e}`:`/a2a/${e}`,h=ek(),p=ek().replace(/-/g,""),m=performance.now(),g=!1,f="";try{let l=await fetch(u,{method:"POST",headers:{[(0,eL.getGlobalLitellmHeaderName)()]:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:h,method:"message/stream",params:{message:{kind:"message",messageId:p,role:"user",parts:[{kind:"text",text:t}]}}}),signal:a});if(!l.ok){let e=await l.json();throw Error(e.error?.message||e.detail||`HTTP ${l.status}`)}let d=l.body?.getReader();if(!d)throw Error("No response body");let y=new TextDecoder,x="",b=!1;for(;!b;){let t=await d.read();b=t.done;let r=t.value;if(b)break;let a=(x+=y.decode(r,{stream:!0})).split("\n");for(let t of(x=a.pop()||"",a))if(t.trim())try{let r=JSON.parse(t);if(!g){g=!0;let e=performance.now()-m;n&&n(e)}let a=r.result;if(a){let t=eU(a);t&&(c={...c,...t});let r=a.kind;if("artifact-update"===r&&a.artifact){let t=a.artifact;if(t.parts&&Array.isArray(t.parts))for(let r of t.parts)"text"===r.kind&&r.text&&(f+=r.text,s(f,`a2a_agent/${e}`))}else if(a.artifacts&&Array.isArray(a.artifacts)){for(let t of a.artifacts)if(t.parts&&Array.isArray(t.parts))for(let r of t.parts)"text"===r.kind&&r.text&&(f+=r.text,s(f,`a2a_agent/${e}`))}else if("status-update"===r);else if(a.parts&&Array.isArray(a.parts))for(let t of a.parts)"text"===t.kind&&t.text&&(f+=t.text,s(f,`a2a_agent/${e}`))}if(r.error){let e=r.error.message||"Unknown A2A error";throw Error(e)}}catch(e){if(e instanceof Error&&e.message&&!e.message.includes("JSON"))throw e;t.trim().length>0&&console.warn("Failed to parse A2A streaming chunk:",t,e)}}let v=performance.now()-m;i&&i(v),c&&o&&o(c)}catch(e){if(a?.aborted)return void console.log("A2A streaming request was cancelled");throw console.error("A2A stream message error:",e),e}};function eB(e,t,s,r,a){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,s):a?a.value=s:t.set(e,s),s}function eW(e,t,s,r){if("a"===s&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)}e.s(["makeA2ASendMessageRequest",0,eD,"makeA2AStreamMessageRequest",0,eq],953860);let eH=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return eH=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),s=e?()=>e.getRandomValues(t)[0]:()=>255*Math.random()&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^s()&15>>e/4).toString(16))};function ez(e){return"object"==typeof e&&null!==e&&("name"in e&&"AbortError"===e.name||"message"in e&&String(e.message).includes("FetchRequestCanceledException"))}let eF=e=>{if(e instanceof Error)return e;if("object"==typeof e&&null!==e){try{if("[object Error]"===Object.prototype.toString.call(e)){let t=Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return Error(JSON.stringify(e))}catch{}}return Error(e)};class eJ extends Error{}class eG extends eJ{constructor(e,t,s,r,a){super(`${eG.makeMessage(e,t,s)}`),this.status=e,this.headers=r,this.requestID=r?.get("request-id"),this.error=t,this.type=a??null}static makeMessage(e,t,s){let r=t?.message?"string"==typeof t.message?t.message:JSON.stringify(t.message):t?JSON.stringify(t):s;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||"(no status code or body)"}static generate(e,t,s,r){if(!e||!r)return new eK({message:s,cause:eF(t)});let a=t?.error?.type;return 400===e?new eY(e,t,s,r,a):401===e?new eQ(e,t,s,r,a):403===e?new eZ(e,t,s,r,a):404===e?new e0(e,t,s,r,a):409===e?new e1(e,t,s,r,a):422===e?new e2(e,t,s,r,a):429===e?new e4(e,t,s,r,a):e>=500?new e6(e,t,s,r,a):new eG(e,t,s,r,a)}}class eV extends eG{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}}class eK extends eG{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}}class eX extends eK{constructor({message:e}={}){super({message:e??"Request timed out."})}}class eY extends eG{}class eQ extends eG{}class eZ extends eG{}class e0 extends eG{}class e1 extends eG{}class e2 extends eG{}class e4 extends eG{}class e6 extends eG{}let e3=/^[a-z][a-z0-9+.-]*:/i,e5=e=>(e5=Array.isArray)(e),e8=e5;function e7(e){return"object"!=typeof e?{}:e??{}}function e9(e){if(!e)return!0;for(let t in e)return!1;return!0}let te=e=>{try{return JSON.parse(e)}catch(e){return}},tt="0.92.0",ts=e=>"x32"===e?"x32":"x86_64"===e||"x64"===e?"x64":"arm"===e?"arm":"aarch64"===e||"arm64"===e?"arm64":e?`other:${e}`:"unknown",tr=e=>(e=e.toLowerCase()).includes("ios")?"iOS":"android"===e?"Android":"darwin"===e?"MacOS":"win32"===e?"Windows":"freebsd"===e?"FreeBSD":"openbsd"===e?"OpenBSD":"linux"===e?"Linux":e?`Other:${e}`:"Unknown";function ta(...e){let t=globalThis.ReadableStream;if(void 0===t)throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function tn(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return ta({start(){},async pull(e){let{done:s,value:r}=await t.next();s?e.close():e.enqueue(r)},async cancel(){await t.return?.()}})}function ti(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){let e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function to(e){if(null===e||"object"!=typeof e)return;if(e[Symbol.asyncIterator])return void await e[Symbol.asyncIterator]().return?.();let t=e.getReader(),s=t.cancel();t.releaseLock(),await s}let tl=({headers:e,body:t})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(t)});function tc(e){let t;return(s??(s=(t=new globalThis.TextEncoder).encode.bind(t)))(e)}function td(e){let t;return(r??(r=(t=new globalThis.TextDecoder).decode.bind(t)))(e)}class tu{constructor(){a.set(this,void 0),n.set(this,void 0),eB(this,a,new Uint8Array,"f"),eB(this,n,null,"f")}decode(e){let t;if(null==e)return[];let s=e instanceof ArrayBuffer?new Uint8Array(e):"string"==typeof e?tc(e):e;eB(this,a,function(e){let t=0;for(let s of e)t+=s.length;let s=new Uint8Array(t),r=0;for(let t of e)s.set(t,r),r+=t.length;return s}([eW(this,a,"f"),s]),"f");let r=[];for(;null!=(t=function(e,t){for(let s=t??0;s{if(e){if(Object.prototype.hasOwnProperty.call(th,e))return e;tx(s).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(th))}`)}};function tm(){}function tg(e,t,s){return!t||th[e]>th[s]?tm:t[e].bind(t)}let tf={error:tm,warn:tm,info:tm,debug:tm},ty=new WeakMap;function tx(e){let t=e.logger,s=e.logLevel??"off";if(!t)return tf;let r=ty.get(t);if(r&&r[0]===s)return r[1];let a={error:tg("error",t,s),warn:tg("warn",t,s),info:tg("info",t,s),debug:tg("debug",t,s)};return ty.set(t,[s,a]),a}let tb=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&(e.headers=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([e,t])=>[e,"x-api-key"===e.toLowerCase()||"authorization"===e.toLowerCase()||"cookie"===e.toLowerCase()||"set-cookie"===e.toLowerCase()?"***":t]))),"retryOfRequestLogID"in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e);class tv{constructor(e,t,s){this.iterator=e,i.set(this,void 0),this.controller=t,eB(this,i,s,"f")}static fromSSEResponse(e,t,s){let r=!1,a=s?tx(s):console;async function*n(){if(r)throw new eJ("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let s=!1;try{for await(let s of tw(e,t)){if("completion"===s.event)try{yield JSON.parse(s.data)}catch(e){throw a.error("Could not parse message into JSON:",s.data),a.error("From chunk:",s.raw),e}if("message_start"===s.event||"message_delta"===s.event||"message_stop"===s.event||"content_block_start"===s.event||"content_block_delta"===s.event||"content_block_stop"===s.event||"message"===s.event||"user.message"===s.event||"user.interrupt"===s.event||"user.tool_confirmation"===s.event||"user.custom_tool_result"===s.event||"agent.message"===s.event||"agent.thinking"===s.event||"agent.tool_use"===s.event||"agent.tool_result"===s.event||"agent.mcp_tool_use"===s.event||"agent.mcp_tool_result"===s.event||"agent.custom_tool_use"===s.event||"agent.thread_context_compacted"===s.event||"session.status_running"===s.event||"session.status_idle"===s.event||"session.status_rescheduled"===s.event||"session.status_terminated"===s.event||"session.error"===s.event||"session.deleted"===s.event||"span.model_request_start"===s.event||"span.model_request_end"===s.event)try{yield JSON.parse(s.data)}catch(e){throw a.error("Could not parse message into JSON:",s.data),a.error("From chunk:",s.raw),e}if("ping"!==s.event&&"error"===s.event){let t=te(s.data)??s.data,r=t?.error?.type;throw new eG(void 0,t,void 0,e.headers,r)}}s=!0}catch(e){if(ez(e))return;throw e}finally{s||t.abort()}}return new tv(n,t,s)}static fromReadableStream(e,t,s){let r=!1;async function*a(){let t=new tu;for await(let s of ti(e))for(let e of t.decode(s))yield e;for(let e of t.flush())yield e}return new tv(async function*(){if(r)throw new eJ("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let e=!1;try{for await(let t of a())!e&&t&&(yield JSON.parse(t));e=!0}catch(e){if(ez(e))return;throw e}finally{e||t.abort()}},t,s)}[(i=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],t=[],s=this.iterator(),r=r=>({next:()=>{if(0===r.length){let r=s.next();e.push(r),t.push(r)}return r.shift()}});return[new tv(()=>r(e),this.controller,eW(this,i,"f")),new tv(()=>r(t),this.controller,eW(this,i,"f"))]}toReadableStream(){let e,t=this;return ta({async start(){e=t[Symbol.asyncIterator]()},async pull(t){try{let{value:s,done:r}=await e.next();if(r)return t.close();let a=tc(JSON.stringify(s)+"\n");t.enqueue(a)}catch(e){t.error(e)}},async cancel(){await e.return?.()}})}}async function*tw(e,t){if(!e.body){if(t.abort(),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product)throw new eJ("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new eJ("Attempted to iterate over a response with no body")}let s=new tS,r=new tu;for await(let t of t_(ti(e.body)))for(let e of r.decode(t)){let t=s.decode(e);t&&(yield t)}for(let e of r.flush()){let t=s.decode(e);t&&(yield t)}}async function*t_(e){let t=new Uint8Array;for await(let s of e){let e;if(null==s)continue;let r=s instanceof ArrayBuffer?new Uint8Array(s):"string"==typeof s?tc(s):s,a=new Uint8Array(t.length+r.length);for(a.set(t),a.set(r,t.length),t=a;-1!==(e=function(e){for(let t=0;t0&&(yield t)}class tS{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){var t;let s;if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let e={event:this.event,data:this.data.join("\n"),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],e}if(this.chunks.push(e),e.startsWith(":"))return null;let[r,a,n]=-1!==(s=(t=e).indexOf(":"))?[t.substring(0,s),":",t.substring(s+1)]:[t,"",""];return n.startsWith(" ")&&(n=n.substring(1)),"event"===r?this.event=n:"data"===r&&this.data.push(n),null}}async function tj(e,t){let{response:s,requestLogID:r,retryOfRequestLogID:a,startTime:n}=t,i=await (async()=>{if(t.options.stream)return(tx(e).debug("response",s.status,s.url,s.headers,s.body),t.options.__streamClass)?t.options.__streamClass.fromSSEResponse(s,t.controller):tv.fromSSEResponse(s,t.controller);if(204===s.status)return null;if(t.options.__binaryResponse)return s;let r=s.headers.get("content-type"),a=r?.split(";")[0]?.trim();if(a?.includes("application/json")||a?.endsWith("+json")){if("0"===s.headers.get("content-length"))return;return tk(await s.json(),s)}return await s.text()})();return tx(e).debug(`[${r}] response parsed`,tb({retryOfRequestLogID:a,url:s.url,status:s.status,body:i,durationMs:Date.now()-n})),i}function tk(e,t){return!e||"object"!=typeof e||Array.isArray(e)?e:Object.defineProperty(e,"_request_id",{value:t.headers.get("request-id"),enumerable:!1})}class tN extends Promise{constructor(e,t,s=tj){super(e=>{e(null)}),this.responsePromise=t,this.parseResponse=s,o.set(this,void 0),eB(this,o,e,"f")}_thenUnwrap(e){return new tN(eW(this,o,"f"),this.responsePromise,async(t,s)=>tk(e(await this.parseResponse(t,s),s),s.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,t]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:t,request_id:t.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(eW(this,o,"f"),e))),this.parsedPromise}then(e,t){return this.parse().then(e,t)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}}o=new WeakMap;class tE{constructor(e,t,s,r){l.set(this,void 0),eB(this,l,e,"f"),this.options=r,this.response=t,this.body=s}hasNextPage(){return!!this.getPaginatedItems().length&&null!=this.nextPageRequestOptions()}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new eJ("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await eW(this,l,"f").requestAPIList(this.constructor,e)}async *iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async *[(l=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let t of e.getPaginatedItems())yield t}}class tT extends tN{constructor(e,t,s){super(e,t,async(e,t)=>new s(e,t.response,await tj(e,t),t.options))}async *[Symbol.asyncIterator](){for await(let e of(await this))yield e}}class tC extends tE{constructor(e,t,s,r){super(e,t,s,r),this.data=s.data||[],this.has_more=s.has_more||!1,this.first_id=s.first_id||null,this.last_id=s.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return!1!==this.has_more&&super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let e=this.first_id;return e?{...this.options,query:{...e7(this.options.query),before_id:e}}:null}let e=this.last_id;return e?{...this.options,query:{...e7(this.options.query),after_id:e}}:null}}class tA extends tE{constructor(e,t,s,r){super(e,t,s,r),this.data=s.data||[],this.next_page=s.next_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let e=this.next_page;return e?{...this.options,query:{...e7(this.options.query),page:e}}:null}}let tP=()=>{if("u"parseInt(e.versions.node.split("."))?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};function tO(e,t,s){return tP(),new File(e,t??"unknown_file",s)}function tI(e,t){let s="object"==typeof e&&null!==e&&("name"in e&&e.name&&String(e.name)||"url"in e&&e.url&&String(e.url)||"filename"in e&&e.filename&&String(e.filename)||"path"in e&&e.path&&String(e.path))||"";return t?s.split(/[\\/]/).pop()||void 0:s}let tR=e=>null!=e&&"object"==typeof e&&"function"==typeof e[Symbol.asyncIterator],tM=async(e,t,s=!0)=>({...e,body:await tL(e.body,t,s)}),t$=new WeakMap,tL=async(e,t,s=!0)=>{if(!await function(e){let t="function"==typeof e?e:e.fetch,s=t$.get(t);if(s)return s;let r=(async()=>{try{let e="Response"in t?t.Response:(await t("data:,")).constructor,s=new FormData;if(s.toString()===await new e(s).text())return!1;return!0}catch{return!0}})();return t$.set(t,r),r}(t))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let r=new FormData;return await Promise.all(Object.entries(e||{}).map(([e,t])=>tU(r,e,t,s))),r},tU=async(e,t,s,r)=>{if(void 0!==s){if(null==s)throw TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if("string"==typeof s||"number"==typeof s||"boolean"==typeof s)e.append(t,String(s));else if(s instanceof Response){let a={},n=s.headers.get("Content-Type");n&&(a={type:n}),e.append(t,tO([await s.blob()],tI(s,r),a))}else if(tR(s))e.append(t,tO([await new Response(tn(s)).blob()],tI(s,r)));else{let a;if((a=s)instanceof Blob&&"name"in a)e.append(t,tO([s],tI(s,r),{type:s.type}));else if(Array.isArray(s))await Promise.all(s.map(s=>tU(e,t+"[]",s,r)));else if("object"==typeof s)await Promise.all(Object.entries(s).map(([s,a])=>tU(e,`${t}[${s}]`,a,r)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${s} instead`)}}},tD=e=>null!=e&&"object"==typeof e&&"number"==typeof e.size&&"string"==typeof e.type&&"function"==typeof e.text&&"function"==typeof e.slice&&"function"==typeof e.arrayBuffer;async function tq(e,t,s){let r,a;if(tP(),e=await e,t||(t=tI(e,!0)),null!=(r=e)&&"object"==typeof r&&"string"==typeof r.name&&"number"==typeof r.lastModified&&tD(r))return e instanceof File&&null==t&&null==s?e:tO([await e.arrayBuffer()],t??e.name,{type:e.type,lastModified:e.lastModified,...s});if(null!=(a=e)&&"object"==typeof a&&"string"==typeof a.url&&"function"==typeof a.blob){let r=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()),tO(await tB(r),t,s)}let n=await tB(e);if(!s?.type){let e=n.find(e=>"object"==typeof e&&"type"in e&&e.type);"string"==typeof e&&(s={...s,type:e})}return tO(n,t,s)}async function tB(e){let t=[];if("string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(tD(e))t.push(e instanceof Blob?e:await e.arrayBuffer());else if(tR(e))for await(let s of e)t.push(...await tB(s));else{let t=e?.constructor?.name;throw Error(`Unexpected data type: ${typeof e}${t?`; constructor: ${t}`:""}${function(e){if("object"!=typeof e||null===e)return"";let t=Object.getOwnPropertyNames(e);return`; props: [${t.map(e=>`"${e}"`).join(", ")}]`}(e)}`)}return t}class tW{constructor(e){this._client=e}}let tH=Symbol.for("brand.privateNullableHeaders"),tz=e=>{let t=new Headers,s=new Set;for(let r of e){let e=new Set;for(let[a,n]of function*(e){let t;if(!e)return;if(tH in e){let{values:t,nulls:s}=e;for(let e of(yield*t.entries(),s))yield[e,null];return}let s=!1;for(let r of(e instanceof Headers?t=e.entries():e8(e)?t=e:(s=!0,t=Object.entries(e??{})),t)){let e=r[0];if("string"!=typeof e)throw TypeError("expected header name to be a string");let t=e8(r[1])?r[1]:[r[1]],a=!1;for(let r of t)void 0!==r&&(s&&!a&&(a=!0,yield[e,null]),yield[e,r])}}(r)){let r=a.toLowerCase();e.has(r)||(t.delete(a),e.add(r)),null===n?(t.delete(a),s.add(r)):(t.append(a,n),s.delete(r))}}return{[tH]:!0,values:t,nulls:s}};function tF(e){return e.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}let tJ=Object.freeze(Object.create(null)),tG=((e=tF)=>function(t,...s){let r;if(1===t.length)return t[0];let a=!1,n=[],i=t.reduce((t,r,i)=>{/[?#]/.test(r)&&(a=!0);let o=s[i],l=(a?encodeURIComponent:e)(""+o);return i!==s.length&&(null==o||"object"==typeof o&&o.toString===Object.getPrototypeOf(Object.getPrototypeOf(o.hasOwnProperty??tJ)??tJ)?.toString)&&(l=o+"",n.push({start:t.length+r.length,length:l.length,error:`Value of type ${Object.prototype.toString.call(o).slice(8,-1)} is not a valid path parameter`})),t+r+(i===s.length?"":l)},""),o=i.split(/[?#]/,1)[0],l=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;for(;null!==(r=l.exec(o));)n.push({start:r.index,length:r[0].length,error:`Value "${r[0]}" can't be safely passed as a path parameter`});if(n.sort((e,t)=>e.start-t.start),n.length>0){let e=0,t=n.reduce((t,s)=>{let r=" ".repeat(s.start-e),a="^".repeat(s.length);return e=s.start+s.length,t+r+a},"");throw new eJ(`Path parameters result in path with invalid segments: +${n.map(e=>e.error).join("\n")} +${i} +${t}`)}return i})(tF);class tV extends tW{create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/environments?beta=true",{body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/environments/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}update(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/environments/${e}?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/environments?beta=true",tA,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}delete(e,t={},s){let{betas:r}=t??{};return this._client.delete(tG`/v1/environments/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}archive(e,t={},s){let{betas:r}=t??{};return this._client.post(tG`/v1/environments/${e}/archive?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}let tK=Symbol("anthropic.sdk.stainlessHelper");function tX(e){return"object"==typeof e&&null!==e&&tK in e}function tY(e,t){let s=new Set;if(e)for(let t of e)tX(t)&&s.add(t[tK]);if(t){for(let e of t)if(tX(e)&&s.add(e[tK]),Array.isArray(e.content))for(let t of e.content)tX(t)&&s.add(t[tK])}return Array.from(s)}function tQ(e,t){let s=tY(e,t);return 0===s.length?{}:{"x-stainless-helper":s.join(", ")}}class tZ extends tW{list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/files?beta=true",tC,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"files-api-2025-04-14"].toString()},t?.headers])})}delete(e,t={},s){let{betas:r}=t??{};return this._client.delete(tG`/v1/files/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"files-api-2025-04-14"].toString()},s?.headers])})}download(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/files/${e}/content?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},s?.headers]),__binaryResponse:!0})}retrieveMetadata(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/files/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"files-api-2025-04-14"].toString()},s?.headers])})}upload(e,t){var s;let{betas:r,...a}=e;return this._client.post("/v1/files?beta=true",tM({body:a,...t,headers:tz([{"anthropic-beta":[...r??[],"files-api-2025-04-14"].toString()},tX(s=a.file)?{"x-stainless-helper":s[tK]}:{},t?.headers])},this._client))}}class t0 extends tW{retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/models/${e}?beta=true`,{...s,headers:tz([{...r?.toString()!=null?{"anthropic-beta":r?.toString()}:void 0},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/models?beta=true",tC,{query:r,...t,headers:tz([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers])})}}class t1 extends tW{create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/user_profiles?beta=true",{body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"user-profiles-2026-03-24"].toString()},t?.headers])})}retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/user_profiles/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"user-profiles-2026-03-24"].toString()},s?.headers])})}update(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/user_profiles/${e}?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"user-profiles-2026-03-24"].toString()},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/user_profiles?beta=true",tA,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"user-profiles-2026-03-24"].toString()},t?.headers])})}createEnrollmentURL(e,t={},s){let{betas:r}=t??{};return this._client.post(tG`/v1/user_profiles/${e}/enrollment_url?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"user-profiles-2026-03-24"].toString()},s?.headers])})}}class t2 extends tW{list(e,t={},s){let{betas:r,...a}=t??{};return this._client.getAPIList(tG`/v1/agents/${e}/versions?beta=true`,tA,{query:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}class t4 extends tW{constructor(){super(...arguments),this.versions=new t2(this._client)}create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/agents?beta=true",{body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}retrieve(e,t={},s){let{betas:r,...a}=t??{};return this._client.get(tG`/v1/agents/${e}?beta=true`,{query:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}update(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/agents/${e}?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/agents?beta=true",tA,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}archive(e,t={},s){let{betas:r}=t??{};return this._client.post(tG`/v1/agents/${e}/archive?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}t4.Versions=t2;class t6 extends tW{create(e,t,s){let{view:r,betas:a,...n}=t;return this._client.post(tG`/v1/memory_stores/${e}/memories?beta=true`,{query:{view:r},body:n,...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}retrieve(e,t,s){let{memory_store_id:r,betas:a,...n}=t;return this._client.get(tG`/v1/memory_stores/${r}/memories/${e}?beta=true`,{query:n,...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}update(e,t,s){let{memory_store_id:r,view:a,betas:n,...i}=t;return this._client.post(tG`/v1/memory_stores/${r}/memories/${e}?beta=true`,{query:{view:a},body:i,...s,headers:tz([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e,t={},s){let{betas:r,...a}=t??{};return this._client.getAPIList(tG`/v1/memory_stores/${e}/memories?beta=true`,tA,{query:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}delete(e,t,s){let{memory_store_id:r,expected_content_sha256:a,betas:n}=t;return this._client.delete(tG`/v1/memory_stores/${r}/memories/${e}?beta=true`,{query:{expected_content_sha256:a},...s,headers:tz([{"anthropic-beta":[...n??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}class t3 extends tW{retrieve(e,t,s){let{memory_store_id:r,betas:a,...n}=t;return this._client.get(tG`/v1/memory_stores/${r}/memory_versions/${e}?beta=true`,{query:n,...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e,t={},s){let{betas:r,...a}=t??{};return this._client.getAPIList(tG`/v1/memory_stores/${e}/memory_versions?beta=true`,tA,{query:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}redact(e,t,s){let{memory_store_id:r,betas:a}=t;return this._client.post(tG`/v1/memory_stores/${r}/memory_versions/${e}/redact?beta=true`,{...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}class t5 extends tW{constructor(){super(...arguments),this.memories=new t6(this._client),this.memoryVersions=new t3(this._client)}create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/memory_stores?beta=true",{body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/memory_stores/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}update(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/memory_stores/${e}?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/memory_stores?beta=true",tA,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}delete(e,t={},s){let{betas:r}=t??{};return this._client.delete(tG`/v1/memory_stores/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}archive(e,t={},s){let{betas:r}=t??{};return this._client.post(tG`/v1/memory_stores/${e}/archive?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}t5.Memories=t6,t5.MemoryVersions=t3;class t8{constructor(e,t){this.iterator=e,this.controller=t}async *decoder(){let e=new tu;for await(let t of this.iterator)for(let s of e.decode(t))yield JSON.parse(s);for(let t of e.flush())yield JSON.parse(t)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,t){if(!e.body){if(t.abort(),void 0!==globalThis.navigator&&"ReactNative"===globalThis.navigator.product)throw new eJ("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new eJ("Attempted to iterate over a response with no body")}return new t8(ti(e.body),t)}}class t7 extends tW{create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/messages/batches?beta=true",{body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"message-batches-2024-09-24"].toString()},t?.headers])})}retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/messages/batches/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"message-batches-2024-09-24"].toString()},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/messages/batches?beta=true",tC,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"message-batches-2024-09-24"].toString()},t?.headers])})}delete(e,t={},s){let{betas:r}=t??{};return this._client.delete(tG`/v1/messages/batches/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"message-batches-2024-09-24"].toString()},s?.headers])})}cancel(e,t={},s){let{betas:r}=t??{};return this._client.post(tG`/v1/messages/batches/${e}/cancel?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"message-batches-2024-09-24"].toString()},s?.headers])})}async results(e,t={},s){let r=await this.retrieve(e);if(!r.results_url)throw new eJ(`No batch \`results_url\`; Has it finished processing? ${r.processing_status} - ${r.id}`);let{betas:a}=t??{};return this._client.get(r.results_url,{...s,headers:tz([{"anthropic-beta":[...a??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},s?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((e,t)=>t8.fromResponse(t.response,t.controller))}}let t9={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192};function se(e){return e?.output_format??e?.output_config?.format}function st(e,t,s){let r=se(t);return t&&"parse"in(r??{})?ss(e,t,s):{...e,content:e.content.map(e=>"text"===e.type?Object.defineProperty(Object.defineProperty({...e},"parsed_output",{value:null,enumerable:!1}),"parsed",{get:()=>(s.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null),enumerable:!1}):e),parsed_output:null}}function ss(e,t,s){let r=null,a=e.content.map(e=>{if("text"===e.type){let a=function(e,t){let s=se(e);if(s?.type!=="json_schema")return null;try{if("parse"in s)return s.parse(t);return JSON.parse(t)}catch(e){throw new eJ(`Failed to parse structured output: ${e}`)}}(t,e.text);return null===r&&(r=a),Object.defineProperty(Object.defineProperty({...e},"parsed_output",{value:a,enumerable:!1}),"parsed",{get:()=>(s.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),a),enumerable:!1})}return e});return{...e,content:a,parsed_output:r}}let sr=e=>{if(0===e.length)return e;let t=e[e.length-1];switch(t.type){case"separator":return sr(e=e.slice(0,e.length-1));case"number":let s=t.value[t.value.length-1];if("."===s||"-"===s)return sr(e=e.slice(0,e.length-1));case"string":let r=e[e.length-2];if(r?.type==="delimiter"||r?.type==="brace"&&"{"===r.value)return sr(e=e.slice(0,e.length-1));break;case"delimiter":return sr(e=e.slice(0,e.length-1))}return e},sa=e=>{var t;let s,r;return JSON.parse((t=sr((e=>{let t=0,s=[];for(;t{"brace"===e.type&&("{"===e.value?s.push("}"):s.splice(s.lastIndexOf("}"),1)),"paren"===e.type&&("["===e.value?s.push("]"):s.splice(s.lastIndexOf("]"),1))}),s.length>0&&s.reverse().map(e=>{"}"===e?t.push({type:"brace",value:"}"}):"]"===e&&t.push({type:"paren",value:"]"})}),r="",t.map(e=>{"string"===e.type?r+='"'+e.value+'"':r+=e.value}),r))},sn="__json_buf";function si(e){return"tool_use"===e.type||"server_tool_use"===e.type||"mcp_tool_use"===e.type}class so{constructor(e,t){c.add(this),this.messages=[],this.receivedMessages=[],d.set(this,void 0),u.set(this,null),this.controller=new AbortController,h.set(this,void 0),p.set(this,()=>{}),m.set(this,()=>{}),g.set(this,void 0),f.set(this,()=>{}),y.set(this,()=>{}),x.set(this,{}),b.set(this,!1),v.set(this,!1),w.set(this,!1),_.set(this,!1),S.set(this,void 0),j.set(this,void 0),k.set(this,void 0),T.set(this,e=>{if(eB(this,v,!0,"f"),ez(e)&&(e=new eV),e instanceof eV)return eB(this,w,!0,"f"),this._emit("abort",e);if(e instanceof eJ)return this._emit("error",e);if(e instanceof Error){let t=new eJ(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new eJ(String(e)))}),eB(this,h,new Promise((e,t)=>{eB(this,p,e,"f"),eB(this,m,t,"f")}),"f"),eB(this,g,new Promise((e,t)=>{eB(this,f,e,"f"),eB(this,y,t,"f")}),"f"),eW(this,h,"f").catch(()=>{}),eW(this,g,"f").catch(()=>{}),eB(this,u,e,"f"),eB(this,k,t?.logger??console,"f")}get response(){return eW(this,S,"f")}get request_id(){return eW(this,j,"f")}async withResponse(){eB(this,_,!0,"f");let e=await eW(this,h,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let t=new so(null);return t._run(()=>t._fromReadableStream(e)),t}static createMessage(e,t,s,{logger:r}={}){let a=new so(t,{logger:r});for(let e of t.messages)a._addMessageParam(e);return eB(a,u,{...t,stream:!0},"f"),a._run(()=>a._createMessage(e,{...t,stream:!0},{...s,headers:{...s?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},eW(this,T,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit("message",e)}async _createMessage(e,t,s){let r,a=s?.signal;a&&(a.aborted&&this.controller.abort(),r=this.controller.abort.bind(this.controller),a.addEventListener("abort",r));try{eW(this,c,"m",C).call(this);let{response:r,data:a}=await e.create({...t,stream:!0},{...s,signal:this.controller.signal}).withResponse();for await(let e of(this._connected(r),a))eW(this,c,"m",A).call(this,e);if(a.controller.signal?.aborted)throw new eV;eW(this,c,"m",P).call(this)}finally{a&&r&&a.removeEventListener("abort",r)}}_connected(e){this.ended||(eB(this,S,e,"f"),eB(this,j,e?.headers.get("request-id"),"f"),eW(this,p,"f").call(this,e),this._emit("connect"))}get ended(){return eW(this,b,"f")}get errored(){return eW(this,v,"f")}get aborted(){return eW(this,w,"f")}abort(){this.controller.abort()}on(e,t){return(eW(this,x,"f")[e]||(eW(this,x,"f")[e]=[])).push({listener:t}),this}off(e,t){let s=eW(this,x,"f")[e];if(!s)return this;let r=s.findIndex(e=>e.listener===t);return r>=0&&s.splice(r,1),this}once(e,t){return(eW(this,x,"f")[e]||(eW(this,x,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,s)=>{eB(this,_,!0,"f"),"error"!==e&&this.once("error",s),this.once(e,t)})}async done(){eB(this,_,!0,"f"),await eW(this,g,"f")}get currentMessage(){return eW(this,d,"f")}async finalMessage(){return await this.done(),eW(this,c,"m",N).call(this)}async finalText(){return await this.done(),eW(this,c,"m",E).call(this)}_emit(e,...t){if(eW(this,b,"f"))return;"end"===e&&(eB(this,b,!0,"f"),eW(this,f,"f").call(this));let s=eW(this,x,"f")[e];if(s&&(eW(this,x,"f")[e]=s.filter(e=>!e.once),s.forEach(({listener:e})=>e(...t))),"abort"===e){let e=t[0];eW(this,_,"f")||s?.length||Promise.reject(e),eW(this,m,"f").call(this,e),eW(this,y,"f").call(this,e),this._emit("end");return}if("error"===e){let e=t[0];eW(this,_,"f")||s?.length||Promise.reject(e),eW(this,m,"f").call(this,e),eW(this,y,"f").call(this,e),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",eW(this,c,"m",N).call(this))}async _fromReadableStream(e,t){let s,r=t?.signal;r&&(r.aborted&&this.controller.abort(),s=this.controller.abort.bind(this.controller),r.addEventListener("abort",s));try{eW(this,c,"m",C).call(this),this._connected(null);let t=tv.fromReadableStream(e,this.controller);for await(let e of t)eW(this,c,"m",A).call(this,e);if(t.controller.signal?.aborted)throw new eV;eW(this,c,"m",P).call(this)}finally{r&&s&&r.removeEventListener("abort",s)}}[(d=new WeakMap,u=new WeakMap,h=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,f=new WeakMap,y=new WeakMap,x=new WeakMap,b=new WeakMap,v=new WeakMap,w=new WeakMap,_=new WeakMap,S=new WeakMap,j=new WeakMap,k=new WeakMap,T=new WeakMap,c=new WeakSet,N=function(){if(0===this.receivedMessages.length)throw new eJ("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},E=function(){if(0===this.receivedMessages.length)throw new eJ("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(e=>"text"===e.type).map(e=>e.text);if(0===e.length)throw new eJ("stream ended without producing a content block with type=text");return e.join(" ")},C=function(){this.ended||eB(this,d,void 0,"f")},A=function(e){if(this.ended)return;let t=eW(this,c,"m",O).call(this,e);switch(this._emit("streamEvent",e,t),e.type){case"content_block_delta":{let s=t.content.at(-1);switch(e.delta.type){case"text_delta":"text"===s.type&&this._emit("text",e.delta.text,s.text||"");break;case"citations_delta":"text"===s.type&&this._emit("citation",e.delta.citation,s.citations??[]);break;case"input_json_delta":si(s)&&s.input&&this._emit("inputJson",e.delta.partial_json,s.input);break;case"thinking_delta":"thinking"===s.type&&this._emit("thinking",e.delta.thinking,s.thinking);break;case"signature_delta":"thinking"===s.type&&this._emit("signature",s.signature);break;case"compaction_delta":"compaction"===s.type&&s.content&&this._emit("compaction",s.content);break;default:sl(e.delta)}break}case"message_stop":this._addMessageParam(t),this._addMessage(st(t,eW(this,u,"f"),{logger:eW(this,k,"f")}),!0);break;case"content_block_stop":this._emit("contentBlock",t.content.at(-1));break;case"message_start":eB(this,d,t,"f")}},P=function(){if(this.ended)throw new eJ("stream has ended, this shouldn't happen");let e=eW(this,d,"f");if(!e)throw new eJ("request ended without sending any chunks");return eB(this,d,void 0,"f"),st(e,eW(this,u,"f"),{logger:eW(this,k,"f")})},O=function(e){let t=eW(this,d,"f");if("message_start"===e.type){if(t)throw new eJ(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!t)throw new eJ(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":case"content_block_stop":return t;case"message_delta":return t.container=e.delta.container,t.stop_reason=e.delta.stop_reason,t.stop_sequence=e.delta.stop_sequence,t.usage.output_tokens=e.usage.output_tokens,t.context_management=e.context_management,null!=e.usage.input_tokens&&(t.usage.input_tokens=e.usage.input_tokens),null!=e.usage.cache_creation_input_tokens&&(t.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),null!=e.usage.cache_read_input_tokens&&(t.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),null!=e.usage.server_tool_use&&(t.usage.server_tool_use=e.usage.server_tool_use),null!=e.usage.iterations&&(t.usage.iterations=e.usage.iterations),t;case"content_block_start":return t.content.push(e.content_block),t;case"content_block_delta":{let s=t.content.at(e.index);switch(e.delta.type){case"text_delta":s?.type==="text"&&(t.content[e.index]={...s,text:(s.text||"")+e.delta.text});break;case"citations_delta":s?.type==="text"&&(t.content[e.index]={...s,citations:[...s.citations??[],e.delta.citation]});break;case"input_json_delta":if(s&&si(s)){let r=s[sn]||"";r+=e.delta.partial_json;let a={...s};if(Object.defineProperty(a,sn,{value:r,enumerable:!1,writable:!0}),r)try{a.input=sa(r)}catch(t){let e=new eJ(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${t}. JSON: ${r}`);eW(this,T,"f").call(this,e)}t.content[e.index]=a}break;case"thinking_delta":s?.type==="thinking"&&(t.content[e.index]={...s,thinking:s.thinking+e.delta.thinking});break;case"signature_delta":s?.type==="thinking"&&(t.content[e.index]={...s,signature:e.delta.signature});break;case"compaction_delta":s?.type==="compaction"&&(t.content[e.index]={...s,content:(s.content||"")+e.delta.content});break;default:sl(e.delta)}return t}}},Symbol.asyncIterator)](){let e=[],t=[],s=!1;return this.on("streamEvent",s=>{let r=t.shift();r?r.resolve(s):e.push(s)}),this.on("end",()=>{for(let e of(s=!0,t))e.resolve(void 0);t.length=0}),this.on("abort",e=>{for(let r of(s=!0,t))r.reject(e);t.length=0}),this.on("error",e=>{for(let r of(s=!0,t))r.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:s?{value:void 0,done:!0}:new Promise((e,s)=>t.push({resolve:e,reject:s})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new tv(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}function sl(e){}class sc extends Error{constructor(e){super("string"==typeof e?e:e.map(e=>"text"===e.type?e.text:`[${e.type}]`).join(" ")),this.name="ToolError",this.content=e}}let sd=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include: +1. Task Overview +The user's core request and success criteria +Any clarifications or constraints they specified +2. Current State +What has been completed so far +Files created, modified, or analyzed (with paths if relevant) +Key outputs or artifacts produced +3. Important Discoveries +Technical constraints or requirements uncovered +Decisions made and their rationale +Errors encountered and how they were resolved +What approaches were tried that didn't work (and why) +4. Next Steps +Specific actions needed to complete the task +Any blockers or open questions to resolve +Priority order if multiple steps remain +5. Context to Preserve +User preferences or style requirements +Domain-specific details that aren't obvious +Any promises made to the user +Be concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task. +Wrap your summary in tags.`;function su(){let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}}class sh{constructor(e,t,s){I.add(this),this.client=e,R.set(this,!1),M.set(this,!1),$.set(this,void 0),L.set(this,void 0),U.set(this,void 0),D.set(this,void 0),q.set(this,void 0),B.set(this,0),eB(this,$,{params:{...t,messages:structuredClone(t.messages)}},"f");const r=["BetaToolRunner",...tY(t.tools,t.messages)].join(", ");eB(this,L,{...s,headers:tz([{"x-stainless-helper":r},s?.headers])},"f"),eB(this,q,su(),"f"),t.compactionControl?.enabled&&console.warn('Anthropic: The `compactionControl` parameter is deprecated and will be removed in a future version. Use server-side compaction instead by passing `edits: [{ type: "compact_20260112" }]` in the params passed to `toolRunner()`. See https://platform.claude.com/docs/en/build-with-claude/compaction')}async *[(R=new WeakMap,M=new WeakMap,$=new WeakMap,L=new WeakMap,U=new WeakMap,D=new WeakMap,q=new WeakMap,B=new WeakMap,I=new WeakSet,W=async function(){let e=eW(this,$,"f").params.compactionControl;if(!e||!e.enabled)return!1;let t=0;if(void 0!==eW(this,U,"f"))try{let e=await eW(this,U,"f");t=e.usage.input_tokens+(e.usage.cache_creation_input_tokens??0)+(e.usage.cache_read_input_tokens??0)+e.usage.output_tokens}catch{return!1}if(t<(e.contextTokenThreshold??1e5))return!1;let s=e.model??eW(this,$,"f").params.model,r=e.summaryPrompt??sd,a=eW(this,$,"f").params.messages;if("assistant"===a[a.length-1].role){let e=a[a.length-1];if(Array.isArray(e.content)){let t=e.content.filter(e=>"tool_use"!==e.type);0===t.length?a.pop():e.content=t}}let n=await this.client.beta.messages.create({model:s,messages:[...a,{role:"user",content:[{type:"text",text:r}]}],max_tokens:eW(this,$,"f").params.max_tokens},{signal:eW(this,L,"f").signal,headers:tz([eW(this,L,"f").headers,{"x-stainless-helper":"compaction"}])});if(n.content[0]?.type!=="text")throw new eJ("Expected text response for compaction");return eW(this,$,"f").params.messages=[{role:"user",content:n.content}],!0},Symbol.asyncIterator)](){var e;if(eW(this,R,"f"))throw new eJ("Cannot iterate over a consumed stream");eB(this,R,!0,"f"),eB(this,M,!0,"f"),eB(this,D,void 0,"f");try{for(;;){let t;try{if(eW(this,$,"f").params.max_iterations&&eW(this,B,"f")>=eW(this,$,"f").params.max_iterations)break;eB(this,M,!1,"f"),eB(this,D,void 0,"f"),eB(this,B,(e=eW(this,B,"f"),++e),"f"),eB(this,U,void 0,"f");let{max_iterations:s,compactionControl:r,...a}=eW(this,$,"f").params;if(a.stream?(t=this.client.beta.messages.stream({...a},eW(this,L,"f")),eB(this,U,t.finalMessage(),"f"),eW(this,U,"f").catch(()=>{}),yield t):(eB(this,U,this.client.beta.messages.create({...a,stream:!1},eW(this,L,"f")),"f"),yield eW(this,U,"f")),!await eW(this,I,"m",W).call(this)){if(!eW(this,M,"f")){let{role:e,content:t}=await eW(this,U,"f");eW(this,$,"f").params.messages.push({role:e,content:t})}let e=await eW(this,I,"m",H).call(this,eW(this,$,"f").params.messages.at(-1));if(e)eW(this,$,"f").params.messages.push(e);else if(!eW(this,M,"f"))break}}finally{t&&t.abort()}}if(!eW(this,U,"f"))throw new eJ("ToolRunner concluded without a message from the server");eW(this,q,"f").resolve(await eW(this,U,"f"))}catch(e){throw eB(this,R,!1,"f"),eW(this,q,"f").promise.catch(()=>{}),eW(this,q,"f").reject(e),eB(this,q,su(),"f"),e}}setMessagesParams(e){"function"==typeof e?eW(this,$,"f").params=e(eW(this,$,"f").params):eW(this,$,"f").params=e,eB(this,M,!0,"f"),eB(this,D,void 0,"f")}setRequestOptions(e){"function"==typeof e?eB(this,L,e(eW(this,L,"f")),"f"):eB(this,L,{...eW(this,L,"f"),...e},"f")}async generateToolResponse(e=eW(this,L,"f").signal){let t=await eW(this,U,"f")??this.params.messages.at(-1);return t?eW(this,I,"m",H).call(this,t,e):null}done(){return eW(this,q,"f").promise}async runUntilDone(){if(!eW(this,R,"f"))for await(let e of this);return this.done()}get params(){return eW(this,$,"f").params}pushMessages(...e){this.setMessagesParams(t=>({...t,messages:[...t.messages,...e]}))}then(e,t){return this.runUntilDone().then(e,t)}}async function sp(e,t=e.messages.at(-1),s){if(!t||"assistant"!==t.role||!t.content||"string"==typeof t.content)return null;let r=t.content.filter(e=>"tool_use"===e.type);return 0===r.length?null:{role:"user",content:await Promise.all(r.map(async t=>{let r=e.tools.find(e=>("name"in e?e.name:e.mcp_server_name)===t.name);if(!r||!("run"in r))return{type:"tool_result",tool_use_id:t.id,content:`Error: Tool '${t.name}' not found`,is_error:!0};try{let e=t.input;"parse"in r&&r.parse&&(e=r.parse(e));let a=await r.run(e,{toolUseBlock:t,signal:s?.signal});return{type:"tool_result",tool_use_id:t.id,content:a}}catch(e){return{type:"tool_result",tool_use_id:t.id,content:e instanceof sc?e.content:`Error: ${e instanceof Error?e.message:String(e)}`,is_error:!0}}}))}}H=async function(e,t=eW(this,L,"f").signal){return void 0!==eW(this,D,"f")||eB(this,D,sp(eW(this,$,"f").params,e,{...eW(this,L,"f"),signal:t}),"f"),eW(this,D,"f")};let sm={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"},sg=["claude-mythos-preview","claude-opus-4-6"];class sf extends tW{constructor(){super(...arguments),this.batches=new t7(this._client)}create(e,t){let s=sy(e),{betas:r,...a}=s;a.model in sm&&console.warn(`The model '${a.model}' is deprecated and will reach end-of-life on ${sm[a.model]} +Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),sg.includes(a.model)&&a.thinking&&"enabled"===a.thinking.type&&console.warn(`Using Claude with ${a.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let n=this._client._options.timeout;if(!a.stream&&null==n){let e=t9[a.model]??void 0;n=this._client.calculateNonstreamingTimeout(a.max_tokens,e)}let i=tQ(a.tools,a.messages);return this._client.post("/v1/messages?beta=true",{body:a,timeout:n??6e5,...t,headers:tz([{...r?.toString()!=null?{"anthropic-beta":r?.toString()}:void 0},i,t?.headers]),stream:s.stream??!1})}parse(e,t){return t={...t,headers:tz([{"anthropic-beta":[...e.betas??[],"structured-outputs-2025-12-15"].toString()},t?.headers])},this.create(e,t).then(t=>ss(t,e,{logger:this._client.logger??console}))}stream(e,t){return so.createMessage(this,e,t)}countTokens(e,t){let{betas:s,...r}=sy(e);return this._client.post("/v1/messages/count_tokens?beta=true",{body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"token-counting-2024-11-01"].toString()},t?.headers])})}toolRunner(e,t){return new sh(this._client,e,t)}}function sy(e){if(!e.output_format)return e;if(e.output_config?.format)throw new eJ("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:t,...s}=e;return{...s,output_config:{...e.output_config,format:t}}}sf.Batches=t7,sf.BetaToolRunner=sh,sf.ToolError=sc;class sx extends tW{list(e,t={},s){let{betas:r,...a}=t??{};return this._client.getAPIList(tG`/v1/sessions/${e}/events?beta=true`,tA,{query:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}send(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/sessions/${e}/events?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}stream(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/sessions/${e}/events/stream?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers]),stream:!0})}}class sb extends tW{retrieve(e,t,s){let{session_id:r,betas:a}=t;return this._client.get(tG`/v1/sessions/${r}/resources/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}update(e,t,s){let{session_id:r,betas:a,...n}=t;return this._client.post(tG`/v1/sessions/${r}/resources/${e}?beta=true`,{body:n,...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e,t={},s){let{betas:r,...a}=t??{};return this._client.getAPIList(tG`/v1/sessions/${e}/resources?beta=true`,tA,{query:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}delete(e,t,s){let{session_id:r,betas:a}=t;return this._client.delete(tG`/v1/sessions/${r}/resources/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}add(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/sessions/${e}/resources?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}class sv extends tW{constructor(){super(...arguments),this.events=new sx(this._client),this.resources=new sb(this._client)}create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/sessions?beta=true",{body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/sessions/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}update(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/sessions/${e}?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/sessions?beta=true",tA,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}delete(e,t={},s){let{betas:r}=t??{};return this._client.delete(tG`/v1/sessions/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}archive(e,t={},s){let{betas:r}=t??{};return this._client.post(tG`/v1/sessions/${e}/archive?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}sv.Events=sx,sv.Resources=sb;class sw extends tW{create(e,t={},s){let{betas:r,...a}=t??{};return this._client.post(tG`/v1/skills/${e}/versions?beta=true`,tM({body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"skills-2025-10-02"].toString()},s?.headers])},this._client))}retrieve(e,t,s){let{skill_id:r,betas:a}=t;return this._client.get(tG`/v1/skills/${r}/versions/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},s?.headers])})}list(e,t={},s){let{betas:r,...a}=t??{};return this._client.getAPIList(tG`/v1/skills/${e}/versions?beta=true`,tA,{query:a,...s,headers:tz([{"anthropic-beta":[...r??[],"skills-2025-10-02"].toString()},s?.headers])})}delete(e,t,s){let{skill_id:r,betas:a}=t;return this._client.delete(tG`/v1/skills/${r}/versions/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},s?.headers])})}}class s_ extends tW{constructor(){super(...arguments),this.versions=new sw(this._client)}create(e={},t){let{betas:s,...r}=e??{};return this._client.post("/v1/skills?beta=true",tM({body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"skills-2025-10-02"].toString()},t?.headers])},this._client,!1))}retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/skills/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"skills-2025-10-02"].toString()},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/skills?beta=true",tA,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"skills-2025-10-02"].toString()},t?.headers])})}delete(e,t={},s){let{betas:r}=t??{};return this._client.delete(tG`/v1/skills/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"skills-2025-10-02"].toString()},s?.headers])})}}s_.Versions=sw;class sS extends tW{create(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/vaults/${e}/credentials?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}retrieve(e,t,s){let{vault_id:r,betas:a}=t;return this._client.get(tG`/v1/vaults/${r}/credentials/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}update(e,t,s){let{vault_id:r,betas:a,...n}=t;return this._client.post(tG`/v1/vaults/${r}/credentials/${e}?beta=true`,{body:n,...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e,t={},s){let{betas:r,...a}=t??{};return this._client.getAPIList(tG`/v1/vaults/${e}/credentials?beta=true`,tA,{query:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}delete(e,t,s){let{vault_id:r,betas:a}=t;return this._client.delete(tG`/v1/vaults/${r}/credentials/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}archive(e,t,s){let{vault_id:r,betas:a}=t;return this._client.post(tG`/v1/vaults/${r}/credentials/${e}/archive?beta=true`,{...s,headers:tz([{"anthropic-beta":[...a??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}class sj extends tW{constructor(){super(...arguments),this.credentials=new sS(this._client)}create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/vaults?beta=true",{body:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/vaults/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}update(e,t,s){let{betas:r,...a}=t;return this._client.post(tG`/v1/vaults/${e}?beta=true`,{body:a,...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/vaults?beta=true",tA,{query:r,...t,headers:tz([{"anthropic-beta":[...s??[],"managed-agents-2026-04-01"].toString()},t?.headers])})}delete(e,t={},s){let{betas:r}=t??{};return this._client.delete(tG`/v1/vaults/${e}?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}archive(e,t={},s){let{betas:r}=t??{};return this._client.post(tG`/v1/vaults/${e}/archive?beta=true`,{...s,headers:tz([{"anthropic-beta":[...r??[],"managed-agents-2026-04-01"].toString()},s?.headers])})}}sj.Credentials=sS;class sk extends tW{constructor(){super(...arguments),this.models=new t0(this._client),this.messages=new sf(this._client),this.agents=new t4(this._client),this.environments=new tV(this._client),this.sessions=new sv(this._client),this.vaults=new sj(this._client),this.memoryStores=new t5(this._client),this.files=new tZ(this._client),this.skills=new s_(this._client),this.userProfiles=new t1(this._client)}}function sN(e){return e?.output_config?.format}function sE(e,t,s){let r=sN(t);return t&&"parse"in(r??{})?sT(e,t,s):{...e,content:e.content.map(e=>"text"===e.type?Object.defineProperty({...e},"parsed_output",{value:null,enumerable:!1}):e),parsed_output:null}}function sT(e,t,s){let r=null,a=e.content.map(e=>{if("text"===e.type){let s=function(e,t){let s=sN(e);if(s?.type!=="json_schema")return null;try{if("parse"in s)return s.parse(t);return JSON.parse(t)}catch(e){throw new eJ(`Failed to parse structured output: ${e}`)}}(t,e.text);return null===r&&(r=s),Object.defineProperty({...e},"parsed_output",{value:s,enumerable:!1})}return e});return{...e,content:a,parsed_output:r}}sk.Models=t0,sk.Messages=sf,sk.Agents=t4,sk.Environments=tV,sk.Sessions=sv,sk.Vaults=sj,sk.MemoryStores=t5,sk.Files=tZ,sk.Skills=s_,sk.UserProfiles=t1;let sC="__json_buf";function sA(e){return"tool_use"===e.type||"server_tool_use"===e.type}class sP{constructor(e,t){z.add(this),this.messages=[],this.receivedMessages=[],F.set(this,void 0),J.set(this,null),this.controller=new AbortController,G.set(this,void 0),V.set(this,()=>{}),K.set(this,()=>{}),X.set(this,void 0),Y.set(this,()=>{}),Q.set(this,()=>{}),Z.set(this,{}),ee.set(this,!1),et.set(this,!1),es.set(this,!1),er.set(this,!1),ea.set(this,void 0),en.set(this,void 0),ei.set(this,void 0),ec.set(this,e=>{if(eB(this,et,!0,"f"),ez(e)&&(e=new eV),e instanceof eV)return eB(this,es,!0,"f"),this._emit("abort",e);if(e instanceof eJ)return this._emit("error",e);if(e instanceof Error){let t=new eJ(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new eJ(String(e)))}),eB(this,G,new Promise((e,t)=>{eB(this,V,e,"f"),eB(this,K,t,"f")}),"f"),eB(this,X,new Promise((e,t)=>{eB(this,Y,e,"f"),eB(this,Q,t,"f")}),"f"),eW(this,G,"f").catch(()=>{}),eW(this,X,"f").catch(()=>{}),eB(this,J,e,"f"),eB(this,ei,t?.logger??console,"f")}get response(){return eW(this,ea,"f")}get request_id(){return eW(this,en,"f")}async withResponse(){eB(this,er,!0,"f");let e=await eW(this,G,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let t=new sP(null);return t._run(()=>t._fromReadableStream(e)),t}static createMessage(e,t,s,{logger:r}={}){let a=new sP(t,{logger:r});for(let e of t.messages)a._addMessageParam(e);return eB(a,J,{...t,stream:!0},"f"),a._run(()=>a._createMessage(e,{...t,stream:!0},{...s,headers:{...s?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},eW(this,ec,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit("message",e)}async _createMessage(e,t,s){let r,a=s?.signal;a&&(a.aborted&&this.controller.abort(),r=this.controller.abort.bind(this.controller),a.addEventListener("abort",r));try{eW(this,z,"m",ed).call(this);let{response:r,data:a}=await e.create({...t,stream:!0},{...s,signal:this.controller.signal}).withResponse();for await(let e of(this._connected(r),a))eW(this,z,"m",eu).call(this,e);if(a.controller.signal?.aborted)throw new eV;eW(this,z,"m",eh).call(this)}finally{a&&r&&a.removeEventListener("abort",r)}}_connected(e){this.ended||(eB(this,ea,e,"f"),eB(this,en,e?.headers.get("request-id"),"f"),eW(this,V,"f").call(this,e),this._emit("connect"))}get ended(){return eW(this,ee,"f")}get errored(){return eW(this,et,"f")}get aborted(){return eW(this,es,"f")}abort(){this.controller.abort()}on(e,t){return(eW(this,Z,"f")[e]||(eW(this,Z,"f")[e]=[])).push({listener:t}),this}off(e,t){let s=eW(this,Z,"f")[e];if(!s)return this;let r=s.findIndex(e=>e.listener===t);return r>=0&&s.splice(r,1),this}once(e,t){return(eW(this,Z,"f")[e]||(eW(this,Z,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,s)=>{eB(this,er,!0,"f"),"error"!==e&&this.once("error",s),this.once(e,t)})}async done(){eB(this,er,!0,"f"),await eW(this,X,"f")}get currentMessage(){return eW(this,F,"f")}async finalMessage(){return await this.done(),eW(this,z,"m",eo).call(this)}async finalText(){return await this.done(),eW(this,z,"m",el).call(this)}_emit(e,...t){if(eW(this,ee,"f"))return;"end"===e&&(eB(this,ee,!0,"f"),eW(this,Y,"f").call(this));let s=eW(this,Z,"f")[e];if(s&&(eW(this,Z,"f")[e]=s.filter(e=>!e.once),s.forEach(({listener:e})=>e(...t))),"abort"===e){let e=t[0];eW(this,er,"f")||s?.length||Promise.reject(e),eW(this,K,"f").call(this,e),eW(this,Q,"f").call(this,e),this._emit("end");return}if("error"===e){let e=t[0];eW(this,er,"f")||s?.length||Promise.reject(e),eW(this,K,"f").call(this,e),eW(this,Q,"f").call(this,e),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",eW(this,z,"m",eo).call(this))}async _fromReadableStream(e,t){let s,r=t?.signal;r&&(r.aborted&&this.controller.abort(),s=this.controller.abort.bind(this.controller),r.addEventListener("abort",s));try{eW(this,z,"m",ed).call(this),this._connected(null);let t=tv.fromReadableStream(e,this.controller);for await(let e of t)eW(this,z,"m",eu).call(this,e);if(t.controller.signal?.aborted)throw new eV;eW(this,z,"m",eh).call(this)}finally{r&&s&&r.removeEventListener("abort",s)}}[(F=new WeakMap,J=new WeakMap,G=new WeakMap,V=new WeakMap,K=new WeakMap,X=new WeakMap,Y=new WeakMap,Q=new WeakMap,Z=new WeakMap,ee=new WeakMap,et=new WeakMap,es=new WeakMap,er=new WeakMap,ea=new WeakMap,en=new WeakMap,ei=new WeakMap,ec=new WeakMap,z=new WeakSet,eo=function(){if(0===this.receivedMessages.length)throw new eJ("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},el=function(){if(0===this.receivedMessages.length)throw new eJ("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(e=>"text"===e.type).map(e=>e.text);if(0===e.length)throw new eJ("stream ended without producing a content block with type=text");return e.join(" ")},ed=function(){this.ended||eB(this,F,void 0,"f")},eu=function(e){if(this.ended)return;let t=eW(this,z,"m",ep).call(this,e);switch(this._emit("streamEvent",e,t),e.type){case"content_block_delta":{let s=t.content.at(-1);switch(e.delta.type){case"text_delta":"text"===s.type&&this._emit("text",e.delta.text,s.text||"");break;case"citations_delta":"text"===s.type&&this._emit("citation",e.delta.citation,s.citations??[]);break;case"input_json_delta":sA(s)&&s.input&&this._emit("inputJson",e.delta.partial_json,s.input);break;case"thinking_delta":"thinking"===s.type&&this._emit("thinking",e.delta.thinking,s.thinking);break;case"signature_delta":"thinking"===s.type&&this._emit("signature",s.signature);break;default:sO(e.delta)}break}case"message_stop":this._addMessageParam(t),this._addMessage(sE(t,eW(this,J,"f"),{logger:eW(this,ei,"f")}),!0);break;case"content_block_stop":this._emit("contentBlock",t.content.at(-1));break;case"message_start":eB(this,F,t,"f")}},eh=function(){if(this.ended)throw new eJ("stream has ended, this shouldn't happen");let e=eW(this,F,"f");if(!e)throw new eJ("request ended without sending any chunks");return eB(this,F,void 0,"f"),sE(e,eW(this,J,"f"),{logger:eW(this,ei,"f")})},ep=function(e){let t=eW(this,F,"f");if("message_start"===e.type){if(t)throw new eJ(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!t)throw new eJ(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":case"content_block_stop":return t;case"message_delta":return t.stop_reason=e.delta.stop_reason,t.stop_sequence=e.delta.stop_sequence,t.usage.output_tokens=e.usage.output_tokens,null!=e.usage.input_tokens&&(t.usage.input_tokens=e.usage.input_tokens),null!=e.usage.cache_creation_input_tokens&&(t.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),null!=e.usage.cache_read_input_tokens&&(t.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),null!=e.usage.server_tool_use&&(t.usage.server_tool_use=e.usage.server_tool_use),t;case"content_block_start":return t.content.push({...e.content_block}),t;case"content_block_delta":{let s=t.content.at(e.index);switch(e.delta.type){case"text_delta":s?.type==="text"&&(t.content[e.index]={...s,text:(s.text||"")+e.delta.text});break;case"citations_delta":s?.type==="text"&&(t.content[e.index]={...s,citations:[...s.citations??[],e.delta.citation]});break;case"input_json_delta":if(s&&sA(s)){let r=s[sC]||"";r+=e.delta.partial_json;let a={...s};Object.defineProperty(a,sC,{value:r,enumerable:!1,writable:!0}),r&&(a.input=sa(r)),t.content[e.index]=a}break;case"thinking_delta":s?.type==="thinking"&&(t.content[e.index]={...s,thinking:s.thinking+e.delta.thinking});break;case"signature_delta":s?.type==="thinking"&&(t.content[e.index]={...s,signature:e.delta.signature});break;default:sO(e.delta)}return t}}},Symbol.asyncIterator)](){let e=[],t=[],s=!1;return this.on("streamEvent",s=>{let r=t.shift();r?r.resolve(s):e.push(s)}),this.on("end",()=>{for(let e of(s=!0,t))e.resolve(void 0);t.length=0}),this.on("abort",e=>{for(let r of(s=!0,t))r.reject(e);t.length=0}),this.on("error",e=>{for(let r of(s=!0,t))r.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:s?{value:void 0,done:!0}:new Promise((e,s)=>t.push({resolve:e,reject:s})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new tv(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}function sO(e){}class sI extends tW{create(e,t){return this._client.post("/v1/messages/batches",{body:e,...t})}retrieve(e,t){return this._client.get(tG`/v1/messages/batches/${e}`,t)}list(e={},t){return this._client.getAPIList("/v1/messages/batches",tC,{query:e,...t})}delete(e,t){return this._client.delete(tG`/v1/messages/batches/${e}`,t)}cancel(e,t){return this._client.post(tG`/v1/messages/batches/${e}/cancel`,t)}async results(e,t){let s=await this.retrieve(e);if(!s.results_url)throw new eJ(`No batch \`results_url\`; Has it finished processing? ${s.processing_status} - ${s.id}`);return this._client.get(s.results_url,{...t,headers:tz([{Accept:"application/binary"},t?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((e,t)=>t8.fromResponse(t.response,t.controller))}}class sR extends tW{constructor(){super(...arguments),this.batches=new sI(this._client)}create(e,t){e.model in sM&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${sM[e.model]} +Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),s$.includes(e.model)&&e.thinking&&"enabled"===e.thinking.type&&console.warn(`Using Claude with ${e.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let s=this._client._options.timeout;if(!e.stream&&null==s){let t=t9[e.model]??void 0;s=this._client.calculateNonstreamingTimeout(e.max_tokens,t)}let r=tQ(e.tools,e.messages);return this._client.post("/v1/messages",{body:e,timeout:s??6e5,...t,headers:tz([r,t?.headers]),stream:e.stream??!1})}parse(e,t){return this.create(e,t).then(t=>sT(t,e,{logger:this._client.logger??console}))}stream(e,t){return sP.createMessage(this,e,t,{logger:this._client.logger??console})}countTokens(e,t){return this._client.post("/v1/messages/count_tokens",{body:e,...t})}}let sM={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026","claude-opus-4-0":"June 15th, 2026","claude-opus-4-20250514":"June 15th, 2026","claude-sonnet-4-0":"June 15th, 2026","claude-sonnet-4-20250514":"June 15th, 2026"},s$=["claude-mythos-preview","claude-opus-4-6"];sR.Batches=sI;class sL extends tW{retrieve(e,t={},s){let{betas:r}=t??{};return this._client.get(tG`/v1/models/${e}`,{...s,headers:tz([{...r?.toString()!=null?{"anthropic-beta":r?.toString()}:void 0},s?.headers])})}list(e={},t){let{betas:s,...r}=e??{};return this._client.getAPIList("/v1/models",tC,{query:r,...t,headers:tz([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers])})}}class sU extends tW{create(e,t){let{betas:s,...r}=e;return this._client.post("/v1/complete",{body:r,timeout:this._client._options.timeout??6e5,...t,headers:tz([{...s?.toString()!=null?{"anthropic-beta":s?.toString()}:void 0},t?.headers]),stream:e.stream??!1})}}let sD=e=>void 0!==globalThis.process?globalThis.process.env?.[e]?.trim()||void 0:void 0!==globalThis.Deno&&globalThis.Deno.env?.get?.(e)?.trim()||void 0;class sq{constructor({baseURL:e=sD("ANTHROPIC_BASE_URL"),apiKey:t=sD("ANTHROPIC_API_KEY")??null,authToken:s=sD("ANTHROPIC_AUTH_TOKEN")??null,...r}={}){em.add(this),ef.set(this,void 0);const a={apiKey:t,authToken:s,...r,baseURL:e||"https://api.anthropic.com"};if(!a.dangerouslyAllowBrowser&&"u">typeof window&&void 0!==window.document&&"u">typeof navigator)throw new eJ("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew Anthropic({ apiKey, dangerouslyAllowBrowser: true });\n");this.baseURL=a.baseURL,this.timeout=a.timeout??eg.DEFAULT_TIMEOUT,this.logger=a.logger??console;const n="warn";this.logLevel=n,this.logLevel=tp(a.logLevel,"ClientOptions.logLevel",this)??tp(sD("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??n,this.fetchOptions=a.fetchOptions,this.maxRetries=a.maxRetries??2,this.fetch=a.fetch??function(){if("u">typeof fetch)return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}(),eB(this,ef,tl,"f");const i=sD("ANTHROPIC_CUSTOM_HEADERS");if(i){const e={};for(const t of i.split("\n")){const s=t.indexOf(":");s>=0&&(e[t.substring(0,s).trim()]=t.substring(s+1).trim())}a.defaultHeaders={...e,...a.defaultHeaders}}this._options=a,this.apiKey="string"==typeof t?t:null,this.authToken=s}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:t}){if(!(e.get("x-api-key")||e.get("authorization")||this.apiKey&&e.get("x-api-key")||t.has("x-api-key")||this.authToken&&e.get("authorization"))&&!t.has("authorization"))throw Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}async authHeaders(e){return tz([await this.apiKeyAuth(e),await this.bearerAuth(e)])}async apiKeyAuth(e){if(null!=this.apiKey)return tz([{"X-Api-Key":this.apiKey}])}async bearerAuth(e){if(null!=this.authToken)return tz([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return Object.entries(e).filter(([e,t])=>void 0!==t).map(([e,t])=>{if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(null===t)return`${encodeURIComponent(e)}=`;throw new eJ(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}getUserAgent(){return`${this.constructor.name}/JS ${tt}`}defaultIdempotencyKey(){return`stainless-node-retry-${eH()}`}makeStatusError(e,t,s,r){return eG.generate(e,t,s,r)}buildURL(e,t,s){let r=!eW(this,em,"m",ey).call(this)&&s||this.baseURL,a=new URL(e3.test(e)?e:r+(r.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),n=this.defaultQuery(),i=Object.fromEntries(a.searchParams);return e9(n)&&e9(i)||(t={...i,...n,...t}),"object"==typeof t&&t&&!Array.isArray(t)&&(a.search=this.stringifyQuery(t)),a.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new eJ("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 6e5}async prepareOptions(e){}async prepareRequest(e,{url:t,options:s}){}get(e,t){return this.methodRequest("get",e,t)}post(e,t){return this.methodRequest("post",e,t)}patch(e,t){return this.methodRequest("patch",e,t)}put(e,t){return this.methodRequest("put",e,t)}delete(e,t){return this.methodRequest("delete",e,t)}methodRequest(e,t,s){return this.request(Promise.resolve(s).then(s=>({method:e,path:t,...s})))}request(e,t=null){return new tN(this,this.makeRequest(e,t,void 0))}async makeRequest(e,t,s){let r=await e,a=r.maxRetries??this.maxRetries;null==t&&(t=a),await this.prepareOptions(r);let{req:n,url:i,timeout:o}=await this.buildRequest(r,{retryCount:a-t});await this.prepareRequest(n,{url:i,options:r});let l="log_"+(0x1000000*Math.random()|0).toString(16).padStart(6,"0"),c=void 0===s?"":`, retryOf: ${s}`,d=Date.now();if(tx(this).debug(`[${l}] sending request`,tb({retryOfRequestLogID:s,method:r.method,url:i,options:r,headers:n.headers})),r.signal?.aborted)throw new eV;let u=new AbortController,h=await this.fetchWithTimeout(i,n,o,u).catch(eF),p=Date.now();if(h instanceof globalThis.Error){let e=`retrying, ${t} attempts remaining`;if(r.signal?.aborted)throw new eV;let a=ez(h)||/timed? ?out/i.test(String(h)+("cause"in h?String(h.cause):""));if(t)return tx(this).info(`[${l}] connection ${a?"timed out":"failed"} - ${e}`),tx(this).debug(`[${l}] connection ${a?"timed out":"failed"} (${e})`,tb({retryOfRequestLogID:s,url:i,durationMs:p-d,message:h.message})),this.retryRequest(r,t,s??l);if(tx(this).info(`[${l}] connection ${a?"timed out":"failed"} - error; no more retries left`),tx(this).debug(`[${l}] connection ${a?"timed out":"failed"} (error; no more retries left)`,tb({retryOfRequestLogID:s,url:i,durationMs:p-d,message:h.message})),a)throw new eX;throw new eK({cause:h})}let m=[...h.headers.entries()].filter(([e])=>"request-id"===e).map(([e,t])=>", "+e+": "+JSON.stringify(t)).join(""),g=`[${l}${c}${m}] ${n.method} ${i} ${h.ok?"succeeded":"failed"} with status ${h.status} in ${p-d}ms`;if(!h.ok){let e=await this.shouldRetry(h);if(t&&e){let e=`retrying, ${t} attempts remaining`;return await to(h.body),tx(this).info(`${g} - ${e}`),tx(this).debug(`[${l}] response error (${e})`,tb({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,durationMs:p-d})),this.retryRequest(r,t,s??l,h.headers)}let a=e?"error; no more retries left":"error; not retryable";tx(this).info(`${g} - ${a}`);let n=await h.text().catch(e=>eF(e).message),i=te(n),o=i?void 0:n;throw tx(this).debug(`[${l}] response error (${a})`,tb({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,message:o,durationMs:Date.now()-d})),this.makeStatusError(h.status,i,o,h.headers)}return tx(this).info(g),tx(this).debug(`[${l}] response start`,tb({retryOfRequestLogID:s,url:h.url,status:h.status,headers:h.headers,durationMs:p-d})),{response:h,options:r,controller:u,requestLogID:l,retryOfRequestLogID:s,startTime:d}}getAPIList(e,t,s){return this.requestAPIList(t,s&&"then"in s?s.then(t=>({method:"get",path:e,...t})):{method:"get",path:e,...s})}requestAPIList(e,t){return new tT(this,this.makeRequest(t,null,void 0),e)}async fetchWithTimeout(e,t,s,r){let{signal:a,method:n,...i}=t||{},o=this._makeAbort(r);a&&a.addEventListener("abort",o,{once:!0});let l=setTimeout(o,s),c=globalThis.ReadableStream&&i.body instanceof globalThis.ReadableStream||"object"==typeof i.body&&null!==i.body&&Symbol.asyncIterator in i.body,d={signal:r.signal,...c?{duplex:"half"}:{},method:"GET",...i};n&&(d.method=n.toUpperCase());try{return await this.fetch.call(void 0,e,d)}finally{clearTimeout(l)}}async shouldRetry(e){let t=e.headers.get("x-should-retry");return"true"===t||"false"!==t&&(408===e.status||409===e.status||429===e.status||!!(e.status>=500))}async retryRequest(e,t,s,r){let a,n,i=r?.get("retry-after-ms");if(i){let e=parseFloat(i);Number.isNaN(e)||(a=e)}let o=r?.get("retry-after");if(o&&!a){let e=parseFloat(o);a=Number.isNaN(e)?Date.parse(o)-Date.now():1e3*e}if(void 0===a){let s=e.maxRetries??this.maxRetries;a=this.calculateDefaultRetryTimeoutMillis(t,s)}return await (n=a,new Promise(e=>setTimeout(e,n))),this.makeRequest(e,t-1,s)}calculateDefaultRetryTimeoutMillis(e,t){return Math.min(.5*Math.pow(2,t-e),8)*(1-.25*Math.random())*1e3}calculateNonstreamingTimeout(e,t){if(36e5*e/128e3>6e5||null!=t&&e>t)throw new eJ("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}async buildRequest(e,{retryCount:t=0}={}){let s={...e},{method:r,path:a,query:n,defaultBaseURL:i}=s,o=this.buildURL(a,n,i);"timeout"in s&&((e,t)=>{if("number"!=typeof t||!Number.isInteger(t))throw new eJ(`${e} must be an integer`);if(t<0)throw new eJ(`${e} must be a positive integer`)})("timeout",s.timeout),s.timeout=s.timeout??this.timeout;let{bodyHeaders:l,body:c}=this.buildBody({options:s}),d=await this.buildHeaders({options:e,method:r,bodyHeaders:l,retryCount:t});return{req:{method:r,headers:d,...s.signal&&{signal:s.signal},...globalThis.ReadableStream&&c instanceof globalThis.ReadableStream&&{duplex:"half"},...c&&{body:c},...this.fetchOptions??{},...s.fetchOptions??{}},url:o,timeout:s.timeout}}async buildHeaders({options:e,method:s,bodyHeaders:r,retryCount:a}){let n={};this.idempotencyHeader&&"get"!==s&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),n[this.idempotencyHeader]=e.idempotencyKey);let i=tz([n,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(a),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...t??(t=(()=>{let e="u">typeof Deno&&null!=Deno.build?"deno":"u">typeof EdgeRuntime?"edge":"[object process]"===Object.prototype.toString.call(void 0!==globalThis.process?globalThis.process:0)?"node":"unknown";if("deno"===e)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":tt,"X-Stainless-OS":tr(Deno.build.os),"X-Stainless-Arch":ts(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":"string"==typeof Deno.version?Deno.version:Deno.version?.deno??"unknown"};if("u">typeof EdgeRuntime)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":tt,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if("node"===e)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":tt,"X-Stainless-OS":tr(globalThis.process.platform??"unknown"),"X-Stainless-Arch":ts(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let t=function(){if("u"e.abort()}buildBody({options:{body:e,headers:t}}){if(!e)return{bodyHeaders:void 0,body:void 0};let s=tz([t]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||"string"==typeof e&&s.values.has("content-type")||globalThis.Blob&&e instanceof globalThis.Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:"object"==typeof e&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&"function"==typeof e.next)?{bodyHeaders:void 0,body:tn(e)}:"object"==typeof e&&"application/x-www-form-urlencoded"===s.values.get("content-type")?{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(e)}:eW(this,ef,"f").call(this,{body:e,headers:s})}}eg=sq,ef=new WeakMap,em=new WeakSet,ey=function(){return"https://api.anthropic.com"!==this.baseURL},sq.Anthropic=eg,sq.HUMAN_PROMPT="\\n\\nHuman:",sq.AI_PROMPT="\\n\\nAssistant:",sq.DEFAULT_TIMEOUT=6e5,sq.AnthropicError=eJ,sq.APIError=eG,sq.APIConnectionError=eK,sq.APIConnectionTimeoutError=eX,sq.APIUserAbortError=eV,sq.NotFoundError=e0,sq.ConflictError=e1,sq.RateLimitError=e4,sq.BadRequestError=eY,sq.AuthenticationError=eQ,sq.InternalServerError=e6,sq.PermissionDeniedError=eZ,sq.UnprocessableEntityError=e2,sq.toFile=tq;class sB extends sq{constructor(){super(...arguments),this.completions=new sU(this),this.messages=new sR(this),this.models=new sL(this),this.beta=new sk(this)}}sB.Completions=sU,sB.Messages=sR,sB.Models=sL,sB.Beta=sk;var sW=e.i(727749);async function sH(e,t,s,r,a=[],n,i,o,l,c,d,u,h,p,m){if(!r)throw Error("Virtual Key is required");console.log=function(){};let g=m||(0,eL.getProxyBaseUrl)(),f={};a&&a.length>0&&(f["x-litellm-tags"]=a.join(","));let y=new sB({apiKey:r,baseURL:g,dangerouslyAllowBrowser:!0,defaultHeaders:f});try{let r=Date.now(),a=!1,p={model:s,messages:e.map(e=>({role:e.role,content:e.content})),stream:!0,max_tokens:1024,litellm_trace_id:c};for await(let e of(d&&(p.vector_store_ids=d),u&&(p.guardrails=u),h&&(p.policies=h),y.messages.stream(p,{signal:n}))){if(console.log("Stream event:",e),"content_block_delta"===e.type){let n=e.delta;if(!a){a=!0;let e=Date.now()-r;console.log("First token received! Time:",e,"ms"),o&&o(e)}"text_delta"===n.type?t("assistant",n.text,s):"reasoning_delta"===n.type&&i&&i(n.text)}if("message_delta"===e.type&&e.usage&&l){let t=e.usage;console.log("Usage data found:",t);let s={completionTokens:t.output_tokens,promptTokens:t.input_tokens,totalTokens:t.input_tokens+t.output_tokens};l(s)}}}catch(e){throw n?.aborted?console.log("Anthropic messages request was cancelled"):sW.default.fromBackend(`Error occurred while generating model response. Please try again. Error: ${e}`),e}}e.s(["makeAnthropicMessagesRequest",0,sH],434788);var sz=e.i(356449);async function sF(e,t,s,r,a,n,i,o,l,c){console.log=function(){},console.log("isLocal:",!1);let d=c||(0,eL.getProxyBaseUrl)(),u=new sz.default.OpenAI({apiKey:a,baseURL:d,dangerouslyAllowBrowser:!0,defaultHeaders:n&&n.length>0?{"x-litellm-tags":n.join(",")}:void 0});try{let a=await u.audio.speech.create({model:r,input:e,voice:t,...o?{response_format:o}:{},...l?{speed:l}:{}},{signal:i}),n=await a.blob(),c=URL.createObjectURL(n);s(c,r)}catch(e){throw i?.aborted?console.log("Audio speech request was cancelled"):sW.default.fromBackend(`Error occurred while generating speech. Please try again. Error: ${e}`),e}}async function sJ(e,t,s,r,a,n,i,o,l,c,d){console.log=function(){},console.log("isLocal:",!1);let u=d||(0,eL.getProxyBaseUrl)(),h=new sz.default.OpenAI({apiKey:r,baseURL:u,dangerouslyAllowBrowser:!0,defaultHeaders:a&&a.length>0?{"x-litellm-tags":a.join(",")}:void 0});try{console.log("Processing audio file for transcription:",e.name);let r=await h.audio.transcriptions.create({model:s,file:e,...i?{language:i}:{},...o?{prompt:o}:{},...l?{response_format:l}:{},...void 0!==c?{temperature:c}:{}},{signal:n});if(console.log("Transcription response:",r),r&&r.text)t(r.text,s),sW.default.success("Audio transcribed successfully");else throw Error("No transcription text in response")}catch(e){if(console.error("Error making audio transcription request:",e),n?.aborted)console.log("Audio transcription request was cancelled");else{let t="Failed to transcribe audio";e?.error?.message?t=e.error.message:e?.message&&(t=e.message),sW.default.fromBackend(`Audio transcription failed: ${t}`)}throw e}}async function sG(e,t,s,r,a,n){if(!r)throw Error("Virtual Key is required");console.log=function(){};let i=n||(0,eL.getProxyBaseUrl)(),o={};a&&a.length>0&&(o["x-litellm-tags"]=a.join(","));try{let a=i.endsWith("/")?i.slice(0,-1):i,n=`${a}/embeddings`,l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[(0,eL.getGlobalLitellmHeaderName)()]:`Bearer ${r}`,...o},body:JSON.stringify({model:s,input:e})});if(!l.ok){let e=await l.text();throw Error(e||`Request failed with status ${l.status}`)}let c=await l.json(),d=c?.data?.[0]?.embedding;if(!d)throw Error("No embedding returned from server");t(JSON.stringify(d),c?.model??s)}catch(e){throw sW.default.fromBackend(`Error occurred while making embeddings request. Please try again. Error: ${e}`),e}}e.s(["makeOpenAIAudioSpeechRequest",0,sF],512882),e.s(["makeOpenAIAudioTranscriptionRequest",0,sJ],584976),e.s(["makeOpenAIEmbeddingsRequest",0,sG],720762)},488143,(e,t,s)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:s,blurHeight:a,blurDataURL:n,objectFit:i}){let o=s?40*s:e,l=a?40*a:t,c=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${n}'/%3E%3C/svg%3E`}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},987690,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return n},imageConfigDefault:function(){return i}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=["default","imgix","cloudinary","akamai","custom"],i={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},908927,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"getImgProps",{enumerable:!0,get:function(){return c}}),e.r(233525);let r=e.r(543369),a=e.r(488143),n=e.r(987690),i=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:s=!1,priority:d=!1,preload:u=!1,loading:h,className:p,quality:m,width:g,height:f,fill:y=!1,style:x,overrideSrc:b,onLoad:v,onLoadingComplete:w,placeholder:_="empty",blurDataURL:S,fetchPriority:j,decoding:k="async",layout:N,objectFit:E,objectPosition:T,lazyBoundary:C,lazyRoot:A,...P},O){var I;let R,M,$,{imgConf:L,showAltText:U,blurComplete:D,defaultLoader:q}=O,B=L||n.imageConfigDefault;if("allSizes"in B)R=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),s=B.qualities?.sort((e,t)=>e-t);R={...B,allSizes:e,deviceSizes:t,qualities:s}}if(void 0===q)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let W=P.loader||q;delete P.loader,delete P.srcSet;let H="__next_img_default"in W;if(H){if("custom"===R.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop. +Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=W;W=t=>{let{config:s,...r}=t;return e(r)}}if(N){"fill"===N&&(y=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[N];e&&(x={...x,...e});let s={responsive:"100vw",fill:"100vw"}[N];s&&!t&&(t=s)}let z="",F=l(g),J=l(f);if((I=e)&&"object"==typeof I&&(o(I)||void 0!==I.src)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(M=t.blurWidth,$=t.blurHeight,S=S||t.blurDataURL,z=t.src,!y)if(F||J){if(F&&!J){let e=F/t.width;J=Math.round(t.height*e)}else if(!F&&J){let e=J/t.height;F=Math.round(t.width*e)}}else F=t.width,J=t.height}let G=!d&&!u&&("lazy"===h||void 0===h);(!(e="string"==typeof e?e:z)||e.startsWith("data:")||e.startsWith("blob:"))&&(s=!0,G=!1),R.unoptimized&&(s=!0),H&&!R.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(s=!0);let V=l(m),K=Object.assign(y?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:E,objectPosition:T}:{},U?{}:{color:"transparent"},x),X=D||"empty"===_?null:"blur"===_?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:F,heightInt:J,blurWidth:M,blurHeight:$,blurDataURL:S||"",objectFit:K.objectFit})}")`:`url("${_}")`,Y=i.includes(K.objectFit)?"fill"===K.objectFit?"100% 100%":"cover":K.objectFit,Q=X?{backgroundSize:Y,backgroundPosition:K.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:X}:{},Z=function({config:e,src:t,unoptimized:s,width:a,quality:n,sizes:i,loader:o}){if(s){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,r.getDeploymentId)();if(e){let s=t.indexOf("?");if(-1!==s){let r=new URLSearchParams(t.slice(s+1));r.get("dpl")||(r.append("dpl",e),t=t.slice(0,s)+"?"+r.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:c}=function({deviceSizes:e,allSizes:t},s,r){if(r){let s=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=s.exec(r);)a.push(parseInt(e[2]));if(a.length){let s=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*s),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof s?{widths:e,kind:"w"}:{widths:[...new Set([s,2*s].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,a,i),d=l.length-1;return{sizes:i||"w"!==c?i:"100vw",srcSet:l.map((s,r)=>`${o({config:e,src:t,quality:n,width:s})} ${"w"===c?s:r+1}${c}`).join(", "),src:o({config:e,src:t,quality:n,width:l[d]})}}({config:R,src:e,unoptimized:s,width:F,quality:V,sizes:t,loader:W}),ee=G?"lazy":h;return{props:{...P,loading:ee,fetchPriority:j,width:F,height:J,decoding:k,className:p,style:{...K,...Q},sizes:Z.sizes,srcSet:Z.srcSet,src:b||Z.src},meta:{unoptimized:s,preload:u||d,placeholder:_,fill:y}}}},898879,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return o}});let r=e.r(271645),a="u"{}:r.useLayoutEffect,i=a?()=>{}:r.useEffect;function o(e){let{headManager:t,reduceComponentsToState:s}=e;function o(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(s(e))}}return a&&(t?.mountedInstances?.add(e.children),o()),n(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),n(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),i(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},325633,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return g},defaultHead:function(){return u}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=e.r(563141),i=e.r(151836),o=e.r(843476),l=i._(e.r(271645)),c=n._(e.r(898879)),d=e.r(742732);function u(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function h(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(233525);let p=["name","httpEquiv","charSet","itemProp"];function m(e){let t,s,r,a;return e.reduce(h,[]).reverse().concat(u().reverse()).filter((t=new Set,s=new Set,r=new Set,a={},e=>{let n=!0,i=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){i=!0;let s=e.key.slice(e.key.indexOf("$")+1);t.has(s)?n=!1:t.add(s)}switch(e.type){case"title":case"base":s.has(e.type)?n=!1:s.add(e.type);break;case"meta":for(let t=0,s=p.length;t{let s=e.key||t;return l.default.cloneElement(e,{key:s})})}let g=function({children:e}){let t=(0,l.useContext)(d.HeadManagerContext);return(0,o.jsx)(c.default,{reduceComponentsToState:m,headManager:t,children:e})};("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},918556,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"ImageConfigContext",{enumerable:!0,get:function(){return n}});let r=e.r(563141)._(e.r(271645)),a=e.r(987690),n=r.default.createContext(a.imageConfigDefault)},65856,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(563141)._(e.r(271645)).default.createContext(null)},670965,(e,t,s)=>{"use strict";function r(e,t){let s=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return i}});let r=e.r(670965),a=e.r(543369);function n({config:e,src:t,width:s,quality:i}){let o=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let s=new URLSearchParams(t.slice(e+1)),r=s.get("dpl");if(r){o=r,s.delete("dpl");let a=s.toString();t=t.slice(0,e)+(a?"?"+a:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns. +Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,r.findClosestQuality)(i,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${s}&q=${l}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}n.__next_img_default=!0;let i=n},605500,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"Image",{enumerable:!0,get:function(){return v}});let r=e.r(563141),a=e.r(151836),n=e.r(843476),i=a._(e.r(271645)),o=r._(e.r(174080)),l=r._(e.r(325633)),c=e.r(908927),d=e.r(987690),u=e.r(918556);e.r(233525);let h=e.r(65856),p=r._(e.r(1948)),m=e.r(818581),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function f(e,t,s,r,a,n,i){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),s?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;s.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function y(e){return i.use?{fetchPriority:e}:{fetchpriority:e}}"u"{let E=(0,i.useCallback)(e=>{e&&(j&&(e.src=e.src),e.complete&&f(e,u,x,b,v,p,_))},[e,u,x,b,v,j,p,_]),T=(0,m.useMergedRef)(N,E);return(0,n.jsx)("img",{...k,...y(d),loading:h,width:a,height:r,decoding:o,"data-nimg":g?"fill":"1",className:l,style:c,sizes:s,srcSet:t,src:e,ref:T,onLoad:e=>{f(e.currentTarget,u,x,b,v,p,_)},onError:e=>{w(!0),"empty"!==u&&v(!0),j&&j(e)}})});function b({isAppRouter:e,imgAttributes:t}){let s={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,s),null):(0,n.jsx)(l.default,{children:(0,n.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...s},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,i.forwardRef)((e,t)=>{let s=(0,i.useContext)(h.RouterContext),r=(0,i.useContext)(u.ImageConfigContext),a=(0,i.useMemo)(()=>{let e=g||r||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),s=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:s,qualities:a,localPatterns:"u"{m.current=o},[o]);let f=(0,i.useRef)(l);(0,i.useEffect)(()=>{f.current=l},[l]);let[y,v]=(0,i.useState)(!1),[w,_]=(0,i.useState)(!1),{props:S,meta:j}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:a,blurComplete:y,showAltText:w});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x,{...S,unoptimized:j.unoptimized,placeholder:j.placeholder,fill:j.fill,onLoadRef:m,onLoadingCompleteRef:f,setBlurComplete:v,setShowAltText:_,sizesInput:e.sizes,ref:t}),j.preload?(0,n.jsx)(b,{isAppRouter:!s,imgAttributes:S}):null]})});("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},794909,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return c}};for(var a in r)Object.defineProperty(s,a,{enumerable:!0,get:r[a]});let n=e.r(563141),i=e.r(908927),o=e.r(605500),l=n._(e.r(1948));function c(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let d=o.Image},657688,(e,t,s)=>{t.exports=e.r(794909)},220486,761793,964421,91500,843153,152401,e=>{"use strict";var t=e.i(843476),s=e.i(218129),r=e.i(132104),a=e.i(447593),n=e.i(245094),i=e.i(210612),o=e.i(955135),l=e.i(827252),c=e.i(438957),d=e.i(596239),u=e.i(56456),h=e.i(124608),p=e.i(983561),m=e.i(602073),g=e.i(313603),f=e.i(782273),y=e.i(232164),x=e.i(366308),b=e.i(304967),v=e.i(599724),w=e.i(779241),_=e.i(629569),S=e.i(994388),j=e.i(464571),k=e.i(311451),N=e.i(212931),E=e.i(282786),T=e.i(199133),C=e.i(482725),A=e.i(592968),P=e.i(898586),O=e.i(515831),I=e.i(271645),R=e.i(650056),M=e.i(219470),$=e.i(614677),L=e.i(891547),U=e.i(921511),D=e.i(235267),q=e.i(611052),B=e.i(727749),W=e.i(764205),H=e.i(318059),z=e.i(916940),F=e.i(953860),J=e.i(434788),G=e.i(512882),V=e.i(584976),K=e.i(254530),X=e.i(720762),Y=e.i(921687),Q=e.i(689020);e.i(247167);var Z=e.i(356449);async function ee(e,t,s,r,a,n,i,o){console.log=function(){},console.log("isLocal:",!1);let l=o||(0,W.getProxyBaseUrl)(),c=new Z.default.OpenAI({apiKey:a,baseURL:l,dangerouslyAllowBrowser:!0,defaultHeaders:n&&n.length>0?{"x-litellm-tags":n.join(",")}:void 0});try{let a=Array.isArray(e)?e:[e],n=[];for(let e=0;e1&&B.default.success(`Successfully processed ${n.length} images`)}catch(e){if(console.error("Error making image edit request:",e),i?.aborted)console.log("Image edits request was cancelled");else{let t="Failed to edit image(s)";e?.error?.message?t=e.error.message:e?.message&&(t=e.message),B.default.fromBackend(`Image edit failed: ${t}`)}throw e}}async function et(e,t,s,r,a,n,i){console.log=function(){},console.log("isLocal:",!1);let o=i||(0,W.getProxyBaseUrl)(),l=new Z.default.OpenAI({apiKey:r,baseURL:o,dangerouslyAllowBrowser:!0,defaultHeaders:a&&a.length>0?{"x-litellm-tags":a.join(",")}:void 0});try{let r=await l.images.generate({model:s,prompt:e},{signal:n});if(console.log(r.data),r.data&&r.data[0])if(r.data[0].url)t(r.data[0].url,s);else if(r.data[0].b64_json){let e=r.data[0].b64_json;t(`data:image/png;base64,${e}`,s)}else throw Error("No image data found in response");else throw Error("Invalid response format")}catch(e){throw n?.aborted?console.log("Image generation request was cancelled"):B.default.fromBackend(`Error occurred while generating image. Please try again. Error: ${e}`),e}}var es=e.i(452598),er=e.i(536916),ea=e.i(28651),en=e.i(850627);let ei=({temperature:e=1,maxTokens:s=2048,useAdvancedParams:r,onTemperatureChange:a,onMaxTokensChange:n,onUseAdvancedParamsChange:i,mockTestFallbacks:o,onMockTestFallbacksChange:c})=>{let[d,u]=(0,I.useState)(!1),h=void 0!==r?r:d,[p,m]=(0,I.useState)(e),[g,f]=(0,I.useState)(s);(0,I.useEffect)(()=>{m(e)},[e]),(0,I.useEffect)(()=>{f(s)},[s]);let y=e=>{let t=e??1;m(t),a?.(t)},x=e=>{let t=e??1e3;f(t),n?.(t)},b=h?"text-gray-700":"text-gray-400";return(0,t.jsxs)("div",{className:"space-y-4 p-4 w-80",children:[(0,t.jsx)(er.Checkbox,{checked:h,onChange:e=>{var t;return t=e.target.checked,void(i?i(t):u(t))},children:(0,t.jsx)("span",{className:"font-medium",children:"Use Advanced Parameters"})}),c&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(er.Checkbox,{checked:o??!1,onChange:e=>c(e.target.checked),children:(0,t.jsx)("span",{className:"font-medium",children:"Simulate failure to test fallbacks"})}),(0,t.jsx)(E.Popover,{trigger:"hover",placement:"right",content:(0,t.jsxs)("div",{style:{maxWidth:340},children:[(0,t.jsx)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:8},children:"Causes the first request to fail so the router tries fallbacks (if configured). Use this to verify your fallback setup."}),(0,t.jsxs)(P.Typography.Paragraph,{className:"text-sm",style:{marginBottom:0},children:["Behavior can differ when keys, teams, or router settings are configured."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/keys_teams_router_settings",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800",children:"Learn more"})]})]}),children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-xs text-gray-400 cursor-pointer shrink-0 hover:text-gray-600","aria-label":"Help: Simulate failure to test fallbacks"})})]}),(0,t.jsxs)("div",{className:"space-y-4 transition-opacity duration-200",style:{opacity:h?1:.4},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Temperature"}),(0,t.jsx)(A.Tooltip,{title:"Controls randomness. Lower values make output more deterministic, higher values more creative.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:0,max:2,step:.1,value:p,onChange:y,disabled:!h,precision:1,className:"w-20"})]}),(0,t.jsx)(en.Slider,{min:0,max:2,step:.1,value:p,onChange:y,disabled:!h,marks:{0:"0",1:"1.0",2:"2.0"}})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(v.Text,{className:`text-sm ${b}`,children:"Max Tokens"}),(0,t.jsx)(A.Tooltip,{title:"Maximum number of tokens to generate in the response.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:`text-xs ${b} cursor-help`})})]}),(0,t.jsx)(ea.InputNumber,{min:1,max:32768,step:1,value:g,onChange:x,disabled:!h})]}),(0,t.jsx)(en.Slider,{min:1,max:32768,step:1,value:g,onChange:x,disabled:!h,marks:{1:"1",32768:"32768"}})]})]})]})};var eo=e.i(785913);let el={ALLOY:"Alloy - Professional and confident",ASH:"Ash - Casual and relaxed",BALAD:"Ballad - Smooth and melodic",CORAL:"Coral - Warm and engaging",ECHO:"Echo - Friendly and conversational",FABLE:"Fable - Wise and measured",NOVA:"Nova - Friendly and conversational",ONYX:"Onyx - Deep and authoritative",SAGE:"Sage - Wise and measured",SHIMMER:"Shimmer - Bright and cheerful"},ec=Object.entries({ALLOY:"alloy",ASH:"ash",BALAD:"ballad",CORAL:"coral",ECHO:"echo",FABLE:"fable",NOVA:"nova",ONYX:"onyx",SAGE:"sage",SHIMMER:"shimmer"}).map(([e,t])=>({value:t,label:el[e]})),ed=[{value:eo.EndpointType.CHAT,label:"/v1/chat/completions"},{value:eo.EndpointType.RESPONSES,label:"/v1/responses"},{value:eo.EndpointType.ANTHROPIC_MESSAGES,label:"/v1/messages"},{value:eo.EndpointType.IMAGE,label:"/v1/images/generations"},{value:eo.EndpointType.IMAGE_EDITS,label:"/v1/images/edits"},{value:eo.EndpointType.EMBEDDINGS,label:"/v1/embeddings"},{value:eo.EndpointType.SPEECH,label:"/v1/audio/speech"},{value:eo.EndpointType.TRANSCRIPTION,label:"/v1/audio/transcriptions"},{value:eo.EndpointType.A2A_AGENTS,label:"/v1/a2a/message/send"},{value:eo.EndpointType.MCP,label:"/mcp-rest/tools/call"},{value:eo.EndpointType.REALTIME,label:"/v1/realtime"}];var eu=e.i(955719),eu=eu;let{Dragger:eh}=O.Upload,ep=({chatUploadedImage:e,chatImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(eh,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})});e.s(["default",0,ep],761793);let em=async(e,t)=>({role:"user",content:[{type:"text",text:e},{type:"image_url",image_url:{url:await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=s,r.readAsDataURL(t)})}}]}),eg=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},ef=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl;e.s(["createChatDisplayMessage",0,eg,"createChatMultimodalMessage",0,em,"shouldShowChatAttachedImage",0,ef],964421);var ey=e.i(790848),ex=e.i(888259),eb=e.i(270377);let ev=({enabled:e,onEnabledChange:s,selectedModel:r,disabled:a=!1})=>{let i=(e=>{if(!e)return!1;let t=e.toLowerCase();return t.startsWith("openai/")||t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.includes("openai")})(r);return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg p-3 bg-gradient-to-r from-blue-50 to-purple-50",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)(n.CodeOutlined,{className:"text-blue-500"}),(0,t.jsx)(v.Text,{className:"font-medium text-gray-700",children:"Code Interpreter"}),(0,t.jsx)(A.Tooltip,{title:"Run Python code to generate files, charts, and analyze data. Container is created automatically.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400 text-xs"})})]}),(0,t.jsx)(ey.Switch,{checked:e&&i,onChange:e=>{e&&!i?ex.default.warning("Code Interpreter is only available for OpenAI models"):s(e)},disabled:a||!i,size:"small",className:e&&i?"bg-blue-500":""})]}),!i&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-amber-500 mt-0.5"}),(0,t.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,t.jsx)("span",{children:"Code Interpreter is currently only supported for OpenAI models. "}),(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new?template=feature_request.yml",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Request support for other providers"})]})]})})]})};var ew=e.i(190272);let e_=({endpointType:e,onEndpointChange:s,className:r})=>(0,t.jsx)("div",{className:r,children:(0,t.jsx)(T.Select,{showSearch:!0,value:e,style:{width:"100%"},onChange:s,options:ed,className:"rounded-md",filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase())||(t?.value??"").toLowerCase().includes(e.toLowerCase())})});var eS=e.i(931067);let ej={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.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 42h216v494z"}}]},name:"file-pdf",theme:"outlined"};var ek=e.i(9583),eN=I.forwardRef(function(e,t){return I.createElement(ek.default,(0,eS.default)({},e,{ref:t,icon:ej}))});e.s(["FilePdfOutlined",0,eN],91500);let eE=function({file:e,previewUrl:s,onRemove:r}){let a=e.name.toLowerCase().endsWith(".pdf");return(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsx)("div",{className:"relative inline-block",children:a?(0,t.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,t.jsx)(eN,{style:{fontSize:"16px",color:"white"}})}):(0,t.jsx)("img",{src:s||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:a?"PDF":"Image"})]}),(0,t.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:r,children:(0,t.jsx)(o.DeleteOutlined,{style:{fontSize:"12px"}})})]})})};var eT=e.i(771674),eC=e.i(918789),eA=e.i(245704),eP=e.i(637235),eO=e.i(166406),eI=e.i(755151),eR=e.i(240647),eM=e.i(993914);let e$=(e,t=8)=>e?e.length>t?`${e.substring(0,t)}…`:e:null,eL=e=>{navigator.clipboard.writeText(e)},eU=({a2aMetadata:e,timeToFirstToken:s,totalLatency:r})=>{let[a,n]=(0,I.useState)(!1);if(!e&&!s&&!r)return null;let{taskId:i,contextId:o,status:l,metadata:c}=e||{},h=(e=>{if(!e)return null;try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return e}})(l?.timestamp);return(0,t.jsxs)("div",{className:"a2a-metrics mt-3 pt-2 border-t border-gray-200 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-gray-600",children:[(0,t.jsx)(p.RobotOutlined,{className:"mr-1.5 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"A2A Metadata"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-gray-500 ml-4",children:[l?.state&&(0,t.jsxs)("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${(e=>{switch(e){case"completed":return"bg-green-100 text-green-700";case"working":case"submitted":return"bg-blue-100 text-blue-700";case"failed":case"canceled":return"bg-red-100 text-red-700";default:return"bg-gray-100 text-gray-700"}})(l.state)}`,children:[(e=>{switch(e){case"completed":return(0,t.jsx)(eA.CheckCircleOutlined,{className:"text-green-500"});case"working":case"submitted":return(0,t.jsx)(u.LoadingOutlined,{className:"text-blue-500"});case"failed":case"canceled":return(0,t.jsx)(eb.ExclamationCircleOutlined,{className:"text-red-500"});default:return(0,t.jsx)(eP.ClockCircleOutlined,{className:"text-gray-500"})}})(l.state),(0,t.jsx)("span",{className:"ml-1 capitalize",children:l.state})]}),h&&(0,t.jsx)(A.Tooltip,{title:l?.timestamp,children:(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),h]})}),void 0!==r&&(0,t.jsx)(A.Tooltip,{title:"Total latency",children:(0,t.jsxs)("span",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(eP.ClockCircleOutlined,{className:"mr-1"}),(r/1e3).toFixed(2),"s"]})}),void 0!==s&&(0,t.jsx)(A.Tooltip,{title:"Time to first token",children:(0,t.jsxs)("span",{className:"flex items-center text-green-600",children:["TTFT: ",(s/1e3).toFixed(2),"s"]})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-gray-500 ml-4 mt-1.5",children:[i&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${i}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>eL(i),children:[(0,t.jsx)(eM.FileTextOutlined,{className:"mr-1"}),"Task: ",e$(i),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),o&&(0,t.jsx)(A.Tooltip,{title:`Click to copy: ${o}`,children:(0,t.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>eL(o),children:[(0,t.jsx)(d.LinkOutlined,{className:"mr-1"}),"Session: ",e$(o),(0,t.jsx)(eO.CopyOutlined,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),(c||l?.message)&&(0,t.jsxs)(j.Button,{type:"text",size:"small",className:"text-xs text-blue-500 hover:text-blue-700 p-0 h-auto",onClick:()=>n(!a),children:[a?(0,t.jsx)(eI.DownOutlined,{}):(0,t.jsx)(eR.RightOutlined,{}),(0,t.jsx)("span",{className:"ml-1",children:"Details"})]})]}),a&&(0,t.jsxs)("div",{className:"mt-2 ml-4 p-3 bg-gray-50 rounded-md text-gray-600 border border-gray-200",children:[l?.message&&(0,t.jsxs)("div",{className:"mb-2",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Status Message:"}),(0,t.jsx)("span",{className:"ml-2",children:l.message})]}),i&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Task ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:i}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>eL(i)})]}),o&&(0,t.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Session ID:"}),(0,t.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:o}),(0,t.jsx)(eO.CopyOutlined,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>eL(o)})]}),c&&Object.keys(c).length>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("span",{className:"font-medium text-gray-700",children:"Custom Metadata:"}),(0,t.jsx)("pre",{className:"mt-1.5 p-2 bg-white border border-gray-200 rounded text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:JSON.stringify(c,null,2)})]})]})]})},eD=({message:e})=>e.isAudio&&"string"==typeof e.content?(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsx)("audio",{controls:!0,src:e.content,className:"max-w-full",style:{maxWidth:"500px"},children:"Your browser does not support the audio element."})}):null;var eq=e.i(657688);let eB=({message:e})=>{if(!ef(e))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(eN,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)(eq.default,{src:e.imagePreviewUrl||"",alt:"User uploaded image",width:256,height:200,className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px",width:"auto",height:"auto"}})})};e.s(["default",0,eB],843153);var eW=e.i(362024),eH=e.i(737434);let ez={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.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 42h216v494z"}}]},name:"file-image",theme:"outlined"};var eF=I.forwardRef(function(e,t){return I.createElement(ek.default,(0,eS.default)({},e,{ref:t,icon:ez}))});let eJ=({code:e,containerId:s,annotations:r=[],accessToken:a})=>{let[i,o]=(0,I.useState)({}),[l,c]=(0,I.useState)({}),d=(0,W.getProxyBaseUrl)();(0,I.useEffect)(()=>{let e=async()=>{for(let e of r)if((e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif"))&&e.container_id&&e.file_id){c(t=>({...t,[e.file_id]:!0}));try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s);o(t=>({...t,[e.file_id]:r}))}}catch(e){console.error("Error fetching image:",e)}finally{c(t=>({...t,[e.file_id]:!1}))}}};return r.length>0&&a&&e(),()=>{Object.values(i).forEach(e=>URL.revokeObjectURL(e))}},[r,a,d]);let h=async e=>{try{let t=await fetch(`${d}/v1/containers/${e.container_id}/files/${e.file_id}/content`,{headers:{[(0,W.getGlobalLitellmHeaderName)()]:`Bearer ${a}`}});if(t.ok){let s=await t.blob(),r=URL.createObjectURL(s),a=document.createElement("a");a.href=r,a.download=e.filename||`file_${e.file_id}`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}}catch(e){console.error("Error downloading file:",e)}},p=r.filter(e=>e.filename?.toLowerCase().endsWith(".png")||e.filename?.toLowerCase().endsWith(".jpg")||e.filename?.toLowerCase().endsWith(".jpeg")||e.filename?.toLowerCase().endsWith(".gif")),m=r.filter(e=>!e.filename?.toLowerCase().endsWith(".png")&&!e.filename?.toLowerCase().endsWith(".jpg")&&!e.filename?.toLowerCase().endsWith(".jpeg")&&!e.filename?.toLowerCase().endsWith(".gif"));return e||0!==r.length?(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[e&&(0,t.jsx)(eW.Collapse,{size:"small",items:[{key:"code",label:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-sm text-gray-600",children:[(0,t.jsx)(n.CodeOutlined,{})," Python Code Executed"]}),children:(0,t.jsx)(R.Prism,{language:"python",style:M.coy,customStyle:{margin:0,borderRadius:"6px",fontSize:"12px",maxHeight:"300px",overflow:"auto"},children:e})}]}),p.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-gray-200 overflow-hidden",children:l[e.file_id]?(0,t.jsxs)("div",{className:"flex items-center justify-center p-8 bg-gray-50",children:[(0,t.jsx)(C.Spin,{indicator:(0,t.jsx)(u.LoadingOutlined,{spin:!0})}),(0,t.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:"Loading image..."})]}):i[e.file_id]?(0,t.jsxs)("div",{children:[(0,t.jsx)("img",{src:i[e.file_id],alt:e.filename||"Generated chart",className:"max-w-full",style:{maxHeight:"400px"}}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-50 border-t border-gray-200",children:[(0,t.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,t.jsx)(eF,{})," ",e.filename]}),(0,t.jsxs)("button",{onClick:()=>h(e),className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1",children:[(0,t.jsx)(eH.DownloadOutlined,{})," Download"]})]})]}):(0,t.jsx)("div",{className:"flex items-center justify-center p-4 bg-gray-50",children:(0,t.jsx)("span",{className:"text-sm text-gray-400",children:"Image not available"})})},e.file_id)),m.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:m.map(e=>(0,t.jsxs)("button",{onClick:()=>h(e),className:"flex items-center gap-2 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,t.jsx)(eM.FileTextOutlined,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"text-sm",children:e.filename}),(0,t.jsx)(eH.DownloadOutlined,{className:"text-gray-400"})]},e.file_id))})]}):null};var eG=e.i(355343),eV=e.i(966988),eK=e.i(989022);let eX=async(e,t)=>{let s=await new Promise((e,s)=>{let r=new FileReader;r.onload=()=>{e(r.result.split(",")[1])},r.onerror=s,r.readAsDataURL(t)}),r=t.type||(t.name.toLowerCase().endsWith(".pdf")?"application/pdf":"image/jpeg");return{role:"user",content:[{type:"input_text",text:e},{type:"input_image",image_url:`data:${r};base64,${s}`}]}},eY=(e,t,s,r)=>{let a="";t&&r&&(a=r.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let n={role:"user",content:t?`${e} ${a}`:e};return t&&s&&(n.imagePreviewUrl=s),n},eQ=({message:e})=>{if(!("user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&e.imagePreviewUrl))return null;let s="string"==typeof e.content&&e.content.includes("[PDF attached]");return(0,t.jsx)("div",{className:"mb-2",children:s?(0,t.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,t.jsx)(eN,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,t.jsx)("img",{src:e.imagePreviewUrl,alt:"User uploaded image",className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px"}})})};function eZ({searchResults:e}){let[s,r]=(0,I.useState)(!0),[a,n]=(0,I.useState)({});if(!e||0===e.length)return null;let o=e.reduce((e,t)=>e+t.data.length,0);return(0,t.jsxs)("div",{className:"search-results-content mt-1 mb-2",children:[(0,t.jsxs)(j.Button,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>r(!s),icon:(0,t.jsx)(i.DatabaseOutlined,{}),children:[s?"Hide sources":`Show sources (${o})`,s?(0,t.jsx)(eI.DownOutlined,{className:"ml-1"}):(0,t.jsx)(eR.RightOutlined,{className:"ml-1"})]}),s&&(0,t.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm",children:(0,t.jsx)("div",{className:"space-y-3",children:e.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs text-gray-600 mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:"Query:"}),(0,t.jsxs)("span",{className:"italic",children:['"',e.search_query,'"']}),(0,t.jsx)("span",{className:"text-gray-400",children:"•"}),(0,t.jsxs)("span",{className:"text-gray-500",children:[e.data.length," result",1!==e.data.length?"s":""]})]}),(0,t.jsx)("div",{className:"space-y-2",children:e.data.map((e,r)=>{let i=a[`${s}-${r}`]||!1;return(0,t.jsxs)("div",{className:"border border-gray-200 rounded-md overflow-hidden bg-white",children:[(0,t.jsx)("div",{className:"flex items-center justify-between p-2 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>{let e;return e=`${s}-${r}`,void n(t=>({...t,[e]:!t[e]}))},children:(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform flex-shrink-0 ${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.jsx)(eM.FileTextOutlined,{className:"text-gray-400 flex-shrink-0",style:{fontSize:"12px"}}),(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 truncate",children:e.filename||e.file_id||`Result ${r+1}`}),(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-blue-100 text-blue-700 font-mono flex-shrink-0",children:e.score.toFixed(3)})]})}),i&&(0,t.jsx)("div",{className:"border-t border-gray-200 bg-white",children:(0,t.jsxs)("div",{className:"p-3 space-y-2",children:[e.content.map((e,s)=>(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"text-xs font-mono bg-gray-50 p-2 rounded text-gray-800 whitespace-pre-wrap break-words",children:e.text})},s)),e.attributes&&Object.keys(e.attributes).length>0&&(0,t.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-100",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Metadata:"}),(0,t.jsx)("div",{className:"space-y-1",children:Object.entries(e.attributes).map(([e,s])=>(0,t.jsxs)("div",{className:"text-xs flex gap-2",children:[(0,t.jsxs)("span",{className:"text-gray-500 font-medium",children:[e,":"]}),(0,t.jsx)("span",{className:"text-gray-700 font-mono break-all",children:String(s)})]},e))})]})]})})]},r)})})]},s))})})]})}e.s(["SearchResultsDisplay",0,eZ],152401);let e0=function({message:e,isLastMessage:s,endpointType:r,mcpEvents:a,codeInterpreterResult:n,accessToken:i}){let o="user"===e.role;return(0,t.jsx)("div",{className:`mb-4 ${o?"text-right":"text-left"}`,children:(0,t.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:o?"#f0f8ff":"#ffffff",border:o?"1px solid #e6f0fa":"1px solid #f0f0f0",textAlign:"left"},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:o?"#e6f0fa":"#f5f5f5"},children:o?(0,t.jsx)(eT.UserOutlined,{style:{fontSize:"12px",color:"#2563eb"}}):(0,t.jsx)(p.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})]}),e.reasoningContent&&(0,t.jsx)(eV.default,{reasoningContent:e.reasoningContent}),"assistant"===e.role&&s&&a.length>0&&(r===eo.EndpointType.RESPONSES||r===eo.EndpointType.CHAT)&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(eG.default,{events:a})}),"assistant"===e.role&&e.searchResults&&(0,t.jsx)(eZ,{searchResults:e.searchResults}),"assistant"===e.role&&s&&n&&r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eJ,{code:n.code,containerId:n.containerId,annotations:n.annotations,accessToken:i}),(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:[e.isImage?(0,t.jsx)("img",{src:"string"==typeof e.content?e.content:"",alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}}):e.isAudio?(0,t.jsx)(eD,{message:e}):(0,t.jsxs)(t.Fragment,{children:[r===eo.EndpointType.RESPONSES&&(0,t.jsx)(eQ,{message:e}),r===eo.EndpointType.CHAT&&(0,t.jsx)(eB,{message:e}),(0,t.jsx)(eC.default,{components:{code({node:e,inline:s,className:r,children:a,...n}){let i=/language-(\w+)/.exec(r||"");return!s&&i?(0,t.jsx)(R.Prism,{style:M.coy,language:i[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...n,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"},...n,children:a})},pre:({node:e,...s})=>(0,t.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})},children:"string"==typeof e.content?e.content:""}),e.image&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("img",{src:e.image.url,alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}})})]}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&!e.a2aMetadata&&(0,t.jsx)(eK.default,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage,toolName:e.toolName}),"assistant"===e.role&&e.a2aMetadata&&(0,t.jsx)(eU,{a2aMetadata:e.a2aMetadata,timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency})]})]})})};var eu=eu;let{Dragger:e1}=O.Upload,e2=({responsesUploadedImage:e,responsesImagePreviewUrl:s,onImageUpload:r,onRemoveImage:a})=>(0,t.jsx)(t.Fragment,{children:!e&&(0,t.jsx)(e1,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,t.jsx)(A.Tooltip,{title:"Attach image or PDF",children:(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,t.jsx)(eu.default,{style:{fontSize:"16px"}})})})})}),e4=({endpointType:e,responsesSessionId:s,useApiSessionManagement:r,onToggleSessionManagement:a})=>e!==eo.EndpointType.RESPONSES?null:(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Session Management"}),(0,t.jsx)(A.Tooltip,{title:"Choose between LiteLLM API session management (using previous_response_id) or UI-based session management (using chat history)",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"text-gray-400",style:{fontSize:"12px"}})})]}),(0,t.jsx)(ey.Switch,{checked:r,onChange:a,checkedChildren:"API",unCheckedChildren:"UI",size:"small"})]}),(0,t.jsxs)("div",{className:`text-xs p-2 rounded-md ${s?"bg-green-50 text-green-700 border border-green-200":"bg-blue-50 text-blue-700 border border-blue-200"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(l.InfoCircleOutlined,{style:{fontSize:"12px"}}),(()=>{if(!s)return r?"API Session: Ready":"UI Session: Ready";let e=r?"Response ID":"UI Session",t=s.slice(0,10);return`${e}: ${t}...`})()]}),s&&(0,t.jsx)(A.Tooltip,{title:(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"mb-1",children:"Copy response ID to continue session:"}),(0,t.jsx)("div",{className:"bg-gray-800 text-gray-100 p-2 rounded font-mono text-xs whitespace-pre-wrap",children:`curl -X POST "your-proxy-url/v1/responses" \\ + -H "Authorization: Bearer your-api-key" \\ + -H "Content-Type: application/json" \\ + -d '{ + "model": "your-model", + "input": [{"role": "user", "content": "your message", "type": "message"}], + "previous_response_id": "${s}", + "stream": true + }'`})]}),overlayStyle:{maxWidth:"500px"},children:(0,t.jsx)("button",{onClick:()=>{s&&(navigator.clipboard.writeText(s),B.default.success("Response ID copied to clipboard!"))},className:"ml-2 p-1 hover:bg-green-100 rounded transition-colors",children:(0,t.jsx)(eO.CopyOutlined,{style:{fontSize:"12px"}})})})]}),(0,t.jsx)("div",{className:"text-xs opacity-75 mt-1",children:s?r?"LiteLLM API session active - context maintained server-side":"UI session active - context maintained client-side":r?"LiteLLM will manage session using previous_response_id":"UI will manage session using chat history"})]})]});var e6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z"}},{tag:"path",attrs:{d:"M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z"}}]},name:"audio-muted",theme:"outlined"},e3=I.forwardRef(function(e,t){return I.createElement(ek.default,(0,eS.default)({},e,{ref:t,icon:e6}))}),e5=e.i(793916),e8=e.i(518617),e7=e.i(84899);let{Text:e9}=P.Typography,te=({accessToken:e,selectedModel:s,customProxyBaseUrl:r,selectedGuardrails:a})=>{let[n,i]=(0,I.useState)([]),[o,l]=(0,I.useState)(""),[c,d]=(0,I.useState)(!1),[u,h]=(0,I.useState)(!1),[p,m]=(0,I.useState)(!1),[g,y]=(0,I.useState)("alloy"),x=(0,I.useRef)(null),b=(0,I.useRef)(null),v=(0,I.useRef)(null),w=(0,I.useRef)(null);(0,I.useRef)([]),(0,I.useRef)(!1);let _=(0,I.useRef)(null),S=(0,I.useRef)(0),N=(0,I.useCallback)(()=>{_.current?.scrollIntoView({behavior:"smooth"})},[]);(0,I.useEffect)(()=>{N()},[n,N]);let E=(0,I.useCallback)((e,t)=>{i(s=>[...s,{role:e,content:t,timestamp:new Date}])},[]),C=(0,I.useCallback)(e=>{i(t=>{let s=t[t.length-1];return s&&"assistant"===s.role?[...t.slice(0,-1),{...s,content:s.content+e}]:[...t,{role:"assistant",content:e,timestamp:new Date}]})},[]),A=(0,I.useCallback)(e=>{let t=atob(e),s=new Uint8Array(t.length);for(let e=0;e{if(!x.current){if(!s)return void E("status","Please select a model first");h(!0);try{b.current=new AudioContext({sampleRate:24e3});let t=(r||(0,W.getProxyBaseUrl)()).replace(/^http/,"ws"),n=`${t}/v1/realtime?model=${encodeURIComponent(s)}`;a&&a.length>0&&(n+=`&guardrails=${encodeURIComponent(a.join(","))}`);let o=new WebSocket(n,["realtime",`openai-insecure-api-key.${e}`]);o.onopen=()=>{d(!0),h(!1),E("status","Connected to realtime API")},o.onmessage=async e=>{try{let t=e.data;t instanceof Blob?t=await t.text():t instanceof ArrayBuffer&&(t=new TextDecoder().decode(t));let s=JSON.parse(t),r=s.type;"session.created"===r?o.send(JSON.stringify({type:"session.update",session:{type:"realtime",modalities:["text","audio"],voice:g,input_audio_format:"pcm16",output_audio_format:"pcm16",input_audio_transcription:{model:"gpt-4o-mini-transcribe"},turn_detection:null}})):"session.updated"===r||("response.output_audio.delta"===r||"response.audio.delta"===r?s.delta&&A(s.delta):"response.output_text.delta"===r||"response.output_audio_transcript.delta"===r||"response.audio_transcript.delta"===r||"response.text.delta"===r?s.delta&&C(s.delta):"conversation.item.input_audio_transcription.completed"===r?s.transcript&&E("user",s.transcript):"response.done"===r?i(e=>{let t=e[e.length-1];if(t&&"assistant"===t.role&&t.content)return e;let r=s.response?.output||[],a=[];for(let e of r)for(let t of e.content||[]){let e=t.text||t.transcript;e&&a.push(e)}return a.length>0?[...e,{role:"assistant",content:a.join(""),timestamp:new Date}]:e}):"error"===r&&E("status",`Error: ${s.error?.message||JSON.stringify(s.error)}`))}catch{}},o.onerror=()=>{E("status","WebSocket error"),d(!1),h(!1)},o.onclose=()=>{E("status","Disconnected"),d(!1),h(!1),x.current=null},x.current=o}catch(e){E("status",`Connection failed: ${e.message}`),h(!1)}}},[e,s,g,r,a,E,C,A]),O=(0,I.useCallback)(()=>{M(),x.current?.close(),x.current=null,b.current?.close(),b.current=null,S.current=0,$.current=!1,d(!1)},[]),R=(0,I.useCallback)(async()=>{if(x.current&&x.current.readyState===WebSocket.OPEN){x.current.send(JSON.stringify({type:"session.update",session:{type:"realtime",modalities:["text","audio"],voice:g,input_audio_format:"pcm16",output_audio_format:"pcm16",input_audio_transcription:{model:"gpt-4o-mini-transcribe"},turn_detection:{type:"server_vad"}}}));try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});v.current=e;let t=b.current||new AudioContext({sampleRate:24e3});b.current=t;let s=t.createMediaStreamSource(e),r=t.createScriptProcessor(4096,1,1);w.current=r,r.onaudioprocess=e=>{let s;if(!x.current||x.current.readyState!==WebSocket.OPEN)return;let r=e.inputBuffer.getChannelData(0),a=t.sampleRate;if(24e3!==a){let e=a/24e3,t=Math.round(r.length/e);s=new Float32Array(t);for(let a=0;a{w.current?.disconnect(),w.current=null,v.current?.getTracks().forEach(e=>e.stop()),v.current=null,m(!1)},[]),$=(0,I.useRef)(!1),L=(0,I.useCallback)(()=>{!x.current||x.current.readyState!==WebSocket.OPEN||$.current||($.current=!0,x.current.send(JSON.stringify({type:"session.update",session:{type:"realtime",modalities:["text","audio"],voice:g,input_audio_format:"pcm16",output_audio_format:"pcm16",input_audio_transcription:{model:"gpt-4o-mini-transcribe"},turn_detection:null}})))},[g]),U=(0,I.useCallback)(()=>{if(!o.trim()||!x.current||x.current.readyState!==WebSocket.OPEN)return;let e=o.trim();E("user",e),l(""),x.current.send(JSON.stringify({type:"conversation.item.create",item:{type:"message",role:"user",content:[{type:"input_text",text:e}]}})),x.current.send(JSON.stringify({type:"response.create"}))},[o,E,L]);return(0,I.useEffect)(()=>()=>{x.current?.close(),b.current?.close(),v.current?.getTracks().forEach(e=>e.stop())},[]),(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(f.SoundOutlined,{className:"text-lg text-blue-500"}),(0,t.jsx)(e9,{className:"font-semibold text-gray-800",children:"Realtime Voice Chat"}),(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full ${c?"bg-green-500":"bg-gray-300"}`}),(0,t.jsx)(e9,{className:"text-xs text-gray-500",children:c?"Connected":u?"Connecting...":"Disconnected"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.Select,{size:"small",value:g,onChange:y,options:ec,style:{width:220},disabled:c}),c?(0,t.jsx)(j.Button,{danger:!0,onClick:O,size:"small",icon:(0,t.jsx)(e8.CloseCircleOutlined,{}),children:"Disconnect"}):(0,t.jsx)(j.Button,{type:"primary",onClick:P,loading:u,size:"small",children:"Connect"})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[0===n.length&&!c&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-400 gap-3",children:[(0,t.jsx)(f.SoundOutlined,{style:{fontSize:48}}),(0,t.jsx)(e9,{className:"text-lg text-gray-500",children:"Realtime Voice Playground"}),(0,t.jsxs)(e9,{className:"text-sm text-gray-400 text-center max-w-md",children:["Click ",(0,t.jsx)("b",{children:"Connect"})," to start a realtime session. You can speak using your microphone or type messages. The AI will respond with voice and text."]})]}),n.map((e,s)=>(0,t.jsx)("div",{className:`flex ${"user"===e.role?"justify-end":"status"===e.role?"justify-center":"justify-start"}`,children:"status"===e.role?(0,t.jsx)("div",{className:"text-xs text-gray-400 italic px-3 py-1",children:e.content}):(0,t.jsxs)("div",{className:`max-w-[75%] rounded-2xl px-4 py-2.5 ${"user"===e.role?"bg-blue-500 text-white rounded-br-md":"bg-gray-100 text-gray-800 rounded-bl-md"}`,children:[(0,t.jsx)("div",{className:"text-xs font-medium mb-0.5 opacity-70",children:"user"===e.role?"You":"AI"}),(0,t.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:e.content})]})},s)),(0,t.jsx)("div",{ref:_})]}),c&&(0,t.jsxs)("div",{className:"border-t border-gray-200 p-3 bg-white",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.Button,{shape:"circle",size:"large",type:p?"primary":"default",danger:p,icon:p?(0,t.jsx)(e3,{}):(0,t.jsx)(e5.AudioOutlined,{}),onClick:p?M:R,title:p?"Stop recording":"Start recording",className:p?"animate-pulse":""}),(0,t.jsx)(k.Input,{placeholder:"Type a message or use the mic...",value:o,onChange:e=>l(e.target.value),onPressEnter:U,className:"flex-1",size:"large"}),(0,t.jsx)(j.Button,{type:"primary",icon:(0,t.jsx)(e7.SendOutlined,{}),onClick:U,disabled:!o.trim(),size:"large"})]}),p&&(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 text-red-500 text-xs",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-red-500 animate-pulse"}),"Listening — speak into your microphone. Server VAD will detect when you stop."]})]})]})};var tt=e.i(122550),ts=e.i(434166);let{TextArea:tr}=k.Input,{Dragger:ta}=O.Upload,tn=new Set([eo.EndpointType.CHAT,eo.EndpointType.RESPONSES,eo.EndpointType.MCP]);e.s(["default",0,({accessToken:e,token:k,userRole:O,userID:Z,disabledPersonalKeyCreation:er,proxySettings:ea,simplified:en=!1,fixedModel:el})=>{let[ed,eu]=(0,I.useState)([]),[eh,ef]=(0,I.useState)([]),[ey,ex]=(0,I.useState)(!1),[eb,eS]=(0,I.useState)(null),[ej,ek]=(0,I.useState)(()=>{let e=sessionStorage.getItem("selectedMCPServers");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedMCPServers from sessionStorage",e),[]}}),[eN,eT]=(0,I.useState)(!1),[eC,eA]=(0,I.useState)({}),[eP,eO]=(0,I.useState)(void 0),eI=(0,I.useRef)(null),[eR,eM]=(0,I.useState)(()=>{let e=sessionStorage.getItem("mcpServerToolRestrictions");try{return e?JSON.parse(e):{}}catch(e){return console.error("Error parsing mcpServerToolRestrictions from sessionStorage",e),{}}}),{chatHistory:e$,setChatHistory:eL,mcpEvents:eU,setMCPEvents:eD,messageTraceId:eq,setMessageTraceId:eB,responsesSessionId:eW,setResponsesSessionId:eH,useApiSessionManagement:ez,setUseApiSessionManagement:eF,updateTextUI:eJ,updateReasoningContent:eV,updateTimingData:eK,updateUsageData:eQ,updateA2AMetadata:eZ,updateTotalLatency:e1,updateSearchResults:e6,handleResponseId:e3,handleToggleSessionManagement:e5,handleMCPEvent:e8,updateImageUI:e7,updateEmbeddingsUI:e9,updateAudioUI:ti,updateChatImageUI:to,clearChatHistory:tl,clearMCPEvents:tc}=function({simplified:e}){let[t,s]=(0,I.useState)(()=>{if(e)return[];try{let e=sessionStorage.getItem("chatHistory");return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing chatHistory from sessionStorage",e),[]}}),[r,a]=(0,I.useState)([]),[n,i]=(0,I.useState)(()=>e?null:sessionStorage.getItem("messageTraceId")||null),[o,l]=(0,I.useState)(()=>e?null:sessionStorage.getItem("responsesSessionId")||null),[c,d]=(0,I.useState)(()=>{if(e)return!0;let t=sessionStorage.getItem("useApiSessionManagement");return!t||JSON.parse(t)});return(0,I.useEffect)(()=>{if(e||0===t.length)return;let s=setTimeout(()=>{sessionStorage.setItem("chatHistory",JSON.stringify(t))},500);return()=>{clearTimeout(s)}},[t,e]),(0,I.useEffect)(()=>{e||(n?sessionStorage.setItem("messageTraceId",n):sessionStorage.removeItem("messageTraceId"),o?sessionStorage.setItem("responsesSessionId",o):sessionStorage.removeItem("responsesSessionId"),sessionStorage.setItem("useApiSessionManagement",JSON.stringify(c)))},[n,o,c,e]),{chatHistory:t,setChatHistory:s,mcpEvents:r,setMCPEvents:a,messageTraceId:n,setMessageTraceId:i,responsesSessionId:o,setResponsesSessionId:l,useApiSessionManagement:c,setUseApiSessionManagement:d,updateTextUI:(e,t,r)=>{s(s=>{let a=s[s.length-1];if(!a||a.role!==e||a.isImage||a.isAudio)return[...s,{role:e,content:t,model:r}];{let e={...a,content:a.content+t,model:a.model??r};return[...s.slice(0,-1),e]}})},updateReasoningContent:e=>{s(t=>{let s=t[t.length-1];return!s||"assistant"!==s.role||s.isImage||s.isAudio?t.length>0&&"user"===t[t.length-1].role?[...t,{role:"assistant",content:"",reasoningContent:e}]:t:[...t.slice(0,t.length-1),{...s,reasoningContent:(s.reasoningContent||"")+e}]})},updateTimingData:e=>{s(t=>{let s=t[t.length-1];return s&&"assistant"===s.role?[...t.slice(0,t.length-1),{...s,timeToFirstToken:e}]:s&&"user"===s.role?[...t,{role:"assistant",content:"",timeToFirstToken:e}]:t})},updateUsageData:(e,t)=>{s(s=>{let r=s[s.length-1];if(r&&"assistant"===r.role){let a={...r,usage:e,toolName:t};return[...s.slice(0,s.length-1),a]}return s})},updateA2AMetadata:e=>{s(t=>{let s=t[t.length-1];if(s&&"assistant"===s.role){let r={...s,a2aMetadata:e};return[...t.slice(0,t.length-1),r]}return t})},updateTotalLatency:e=>{s(t=>{let s=t[t.length-1];return s&&"assistant"===s.role?[...t.slice(0,t.length-1),{...s,totalLatency:e}]:t})},updateSearchResults:e=>{s(t=>{let s=t[t.length-1];if(s&&"assistant"===s.role){let r={...s,searchResults:e};return[...t.slice(0,t.length-1),r]}return t})},handleResponseId:e=>{c&&l(e)},handleToggleSessionManagement:e=>{d(e),e||l(null)},handleMCPEvent:e=>{a(t=>e.item_id&&t.some(t=>t.item_id===e.item_id&&t.type===e.type&&(t.sequence_number===e.sequence_number||void 0===t.sequence_number&&void 0===e.sequence_number))?t:[...t,e])},updateImageUI:(e,t)=>{s(s=>[...s,{role:"assistant",content:e,model:t,isImage:!0}])},updateEmbeddingsUI:(e,t)=>{s(s=>[...s,{role:"assistant",content:(0,tt.truncateString)(e,100),model:t,isEmbeddings:!0}])},updateAudioUI:(e,t)=>{s(s=>[...s,{role:"assistant",content:e,model:t,isAudio:!0}])},updateChatImageUI:(e,t)=>{s(s=>{let r=s[s.length-1];if(!r||"assistant"!==r.role||r.isImage||r.isAudio)return[...s,{role:"assistant",content:"",model:t,image:{url:e,detail:"auto"}}];{let a={...r,image:{url:e,detail:"auto"},model:r.model??t};return[...s.slice(0,-1),a]}})},clearChatHistory:()=>{s(e=>(e.forEach(e=>{e.isAudio&&"string"==typeof e.content&&URL.revokeObjectURL(e.content)}),[])),i(null),l(null),a([]),e||(sessionStorage.removeItem("chatHistory"),sessionStorage.removeItem("messageTraceId"),sessionStorage.removeItem("responsesSessionId"))},clearMCPEvents:()=>{a([])}}}({simplified:en}),[td,tu]=(0,I.useState)(()=>{let e=(0,ts.getSecureItem)("apiKeySource");if(e)try{return JSON.parse(e)}catch(e){console.error("Error parsing apiKeySource from sessionStorage",e)}return er?"custom":"session"}),[th,tp]=(0,I.useState)(()=>(0,ts.getSecureItem)("apiKey")||""),[tm,tg]=(0,I.useState)(()=>sessionStorage.getItem("customProxyBaseUrl")||""),[tf,ty]=(0,I.useState)(""),[tx,tb]=(0,I.useState)(en?el:void 0),[tv,tw]=(0,I.useState)(!1),[t_,tS]=(0,I.useState)([]),[tj,tk]=(0,I.useState)([]),[tN,tE]=(0,I.useState)(void 0),tT=(0,I.useRef)(null),[tC,tA]=(0,I.useState)(()=>sessionStorage.getItem("endpointType")||eo.EndpointType.CHAT),[tP,tO]=(0,I.useState)(!1),tI=(0,I.useRef)(null),[tR,tM]=(0,I.useState)(()=>{let e=sessionStorage.getItem("selectedTags");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedTags from sessionStorage",e),[]}}),[t$,tL]=(0,I.useState)(()=>{let e=sessionStorage.getItem("selectedVoice");if(!e)return"alloy";try{return JSON.parse(e)}catch{return e}}),[tU,tD]=(0,I.useState)(()=>{let e=sessionStorage.getItem("selectedVectorStores");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedVectorStores from sessionStorage",e),[]}}),[tq,tB]=(0,I.useState)(()=>{let e=sessionStorage.getItem("selectedGuardrails");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedGuardrails from sessionStorage",e),[]}}),[tW,tH]=(0,I.useState)(()=>{let e=sessionStorage.getItem("selectedPolicies");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedPolicies from sessionStorage",e),[]}}),[tz,tF]=(0,I.useState)([]),[tJ,tG]=(0,I.useState)([]),[tV,tK]=(0,I.useState)(null),[tX,tY]=(0,I.useState)(null),[tQ,tZ]=(0,I.useState)(null),[t0,t1]=(0,I.useState)(null),[t2,t4]=(0,I.useState)(null),[t6,t3]=(0,I.useState)(!1),[t5,t8]=(0,I.useState)(""),[t7,t9]=(0,I.useState)("openai"),[se,st]=(0,I.useState)(1),[ss,sr]=(0,I.useState)(2048),[sa,sn]=(0,I.useState)(!1),[si,so]=(0,I.useState)(!1),sl=function(){let[e,t]=(0,I.useState)(()=>{let e=sessionStorage.getItem("codeInterpreterEnabled");return!!e&&JSON.parse(e)}),[s,r]=(0,I.useState)(null),a=(0,I.useCallback)(e=>{t(e),sessionStorage.setItem("codeInterpreterEnabled",JSON.stringify(e))},[]),n=(0,I.useCallback)(()=>{r(null)},[]),i=(0,I.useCallback)(()=>{a(!e)},[e,a]);return{enabled:e,result:s,setEnabled:a,setResult:r,clearResult:n,toggle:i}}(),sc=(0,I.useRef)(null),sd=async()=>{let t="session"===td?e:th;if(t){eT(!0);try{let[e,s]=await Promise.all([(0,W.fetchMCPServers)(t),(0,W.fetchMCPToolsets)(t).catch(()=>[])]);eu(Array.isArray(e)?e:e.data||[]),ef(Array.isArray(s)?s:[])}catch(e){console.error("Error fetching MCP servers:",e)}finally{eT(!1)}}};(0,I.useEffect)(()=>{en&&el&&(tb(el),tA(eo.EndpointType.CHAT))},[en,el]);let su=async t=>{let s="session"===td?e:th;if(s&&!eC[t])try{let e=await (0,W.listMCPTools)(s,t);eA(s=>({...s,[t]:e.tools||[]}))}catch(e){console.error(`Error fetching tools for server ${t}:`,e)}};(0,I.useEffect)(()=>{if(t6){let t=(0,ew.generateCodeSnippet)({apiKeySource:td,accessToken:e,apiKey:th,inputMessage:tf,chatHistory:e$,selectedTags:tR,selectedVectorStores:tU,selectedGuardrails:tq,selectedPolicies:tW,selectedMCPServers:ej,mcpServers:ed,mcpServerToolRestrictions:eR,endpointType:tC,selectedModel:tx,selectedSdk:t7,selectedVoice:t$,proxySettings:ea});t8(t)}},[t6,t7,td,e,th,tf,e$,tR,tU,tq,tW,ej,ed,eR,tC,tx,ea]),(0,I.useEffect)(()=>{try{(0,ts.setSecureItem)("apiKeySource",JSON.stringify(td)),(0,ts.setSecureItem)("apiKey",th)}catch{}sessionStorage.setItem("endpointType",tC),sessionStorage.setItem("selectedTags",JSON.stringify(tR)),sessionStorage.setItem("selectedVectorStores",JSON.stringify(tU)),sessionStorage.setItem("selectedGuardrails",JSON.stringify(tq)),sessionStorage.setItem("selectedPolicies",JSON.stringify(tW)),sessionStorage.setItem("selectedMCPServers",JSON.stringify(ej)),sessionStorage.setItem("mcpServerToolRestrictions",JSON.stringify(eR)),sessionStorage.setItem("selectedVoice",t$),sessionStorage.removeItem("selectedMCPTools"),en||(tx?sessionStorage.setItem("selectedModel",tx):sessionStorage.removeItem("selectedModel"))},[en,td,th,tx,tC,tR,tU,tq,tW,ej,eR,t$]),(0,I.useEffect)(()=>{let t="session"===td?e:th;if(!t||!k||!O||!Z)return void console.log("userApiKey or token or userRole or userID is missing = ",t,k,O,Z);let s=async()=>{try{if(!t)return void console.log("userApiKey is missing");let e=await (0,Q.fetchAvailableModels)(t);console.log("Fetched models:",e),tS(e);let s=e.some(e=>e.model_group===tx);e.length&&s||tb(void 0)}catch(e){console.error("Error fetching model info:",e)}};en||s(),sd()},[e,Z,O,td,th,k,en]),(0,I.useEffect)(()=>{if(tC===eo.EndpointType.MCP&&1===ej.length&&"__all__"!==ej[0]){let e=ej[0];if(e.startsWith("toolset:")){let t=e.slice(8),s=eh.find(e=>e.toolset_id===t);s&&[...new Set(s.tools.map(e=>e.server_id))].forEach(e=>{eC[e]||su(e)})}else eC[e]||su(e)}},[tC,ej,eC,eh]),(0,I.useEffect)(()=>{let t="session"===td?e:th;t&&tC===eo.EndpointType.A2A_AGENTS&&(async()=>{try{let e=await (0,Y.fetchAvailableAgents)(t,tm||void 0);tk(e),tN&&!e.some(e=>e.agent_name===tN)&&tE(void 0)}catch(e){console.error("Error fetching agents:",e)}})()},[e,td,th,tC,tm,tN]),(0,I.useEffect)(()=>{sc.current&&setTimeout(()=>{sc.current?.scrollIntoView({behavior:"smooth",block:"end"})},100)},[e$]);let sh=e=>{tF(t=>[...t,e]);let t=URL.createObjectURL(e),s=t.startsWith("blob:")?t:"";return tG(e=>[...e,s]),!1},sp=()=>{tJ.forEach(e=>{URL.revokeObjectURL(e)}),tF([]),tG([])},sm=()=>{tX&&URL.revokeObjectURL(tX),tK(null),tY(null)},sg=()=>{t0&&URL.revokeObjectURL(t0),tZ(null),t1(null)},sf=()=>{t4(null)},sy=async()=>{let t;if(""===tf.trim()&&tC!==eo.EndpointType.TRANSCRIPTION&&tC!==eo.EndpointType.MCP)return;if(tC===eo.EndpointType.IMAGE_EDITS&&0===tz.length)return void B.default.fromBackend("Please upload at least one image for editing");if(tC===eo.EndpointType.TRANSCRIPTION&&!t2)return void B.default.fromBackend("Please upload an audio file for transcription");if(tC===eo.EndpointType.A2A_AGENTS&&!tN)return void B.default.fromBackend("Please select an agent to send a message");let s={};if(tC===eo.EndpointType.MCP){let e=1===ej.length&&"__all__"!==ej[0]?ej[0]:null;if(!e)return void B.default.fromBackend("Please select an MCP server to test");if(e.startsWith("toolset:"),!eP)return void B.default.fromBackend("Please select an MCP tool to call");let t=e.startsWith("toolset:")?eh.find(t=>t.toolset_id===e.slice(8)):null,r=[];if(t?[...new Set(t.tools.map(e=>e.server_id))].forEach(e=>{r=r.concat(eC[e]||[])}):r=eC[e]||[],!r.find(e=>e.name===eP))return void B.default.fromBackend("Please wait for tool schema to load");try{s=await eI.current?.getSubmitValues()??{}}catch(e){B.default.fromBackend(e instanceof Error?e.message:"Please fill in all required parameters");return}}if([eo.EndpointType.CHAT,eo.EndpointType.IMAGE,eo.EndpointType.SPEECH,eo.EndpointType.IMAGE_EDITS,eo.EndpointType.RESPONSES,eo.EndpointType.ANTHROPIC_MESSAGES,eo.EndpointType.EMBEDDINGS,eo.EndpointType.TRANSCRIPTION].includes(tC)&&!tx)return void B.default.fromBackend("Please select a model before sending a request");if(!k||!O||!Z)return;let r=en||"session"===td?e:th;if(!r)return void B.default.fromBackend("Please provide a Virtual Key or select Current UI Session");tI.current=new AbortController;let a=tI.current.signal;if(tC===eo.EndpointType.RESPONSES&&tV)try{t=await eX(tf,tV)}catch(e){B.default.fromBackend("Failed to process image. Please try again.");return}else if(tC===eo.EndpointType.CHAT&&tQ)try{t=await em(tf,tQ)}catch(e){B.default.fromBackend("Failed to process image. Please try again.");return}else t={role:"user",content:tf};let n=eq||(0,$.v4)();eq||eB(n),eL([...e$,tC===eo.EndpointType.RESPONSES&&tV?eY(tf,!0,tX||void 0,tV.name):tC===eo.EndpointType.CHAT&&tQ?eg(tf,!0,t0||void 0,tQ.name):tC===eo.EndpointType.TRANSCRIPTION&&t2?eY(tf?`🎵 Audio file: ${t2.name} +Prompt: ${tf}`:`🎵 Audio file: ${t2.name}`,!1):tC===eo.EndpointType.MCP&&eP?eY(`🔧 MCP Tool: ${eP} +Arguments: ${JSON.stringify(s,null,2)}`,!1):eY(tf,!1)]),tc(),sl.clearResult(),tO(!0);try{if(tx)if(tC===eo.EndpointType.CHAT){let e=[...e$.filter(e=>!e.isImage&&!e.isAudio).map(({role:e,content:t})=>({role:e,content:"string"==typeof t?t:""})),t],s=en&&ea?ea.LITELLM_UI_API_DOC_BASE_URL??ea.PROXY_BASE_URL??void 0:tm||void 0;await (0,K.makeOpenAIChatCompletionRequest)(e,(e,t)=>eJ("assistant",e,t),tx,r,tR,a,eV,eK,eQ,n,tU.length>0?tU:void 0,tq.length>0?tq:void 0,tW.length>0?tW:void 0,ej,to,e6,sa?se:void 0,sa?ss:void 0,e1,s,ed,eR,e8,si,eh)}else if(tC===eo.EndpointType.IMAGE)await et(tf,(e,t)=>e7(e,t),tx,r,tR,a,tm||void 0);else if(tC===eo.EndpointType.SPEECH)await (0,G.makeOpenAIAudioSpeechRequest)(tf,t$,(e,t)=>ti(e,t),tx||"",r,tR,a,void 0,void 0,tm||void 0);else if(tC===eo.EndpointType.IMAGE_EDITS)tz.length>0&&await ee(1===tz.length?tz[0]:tz,tf,(e,t)=>e7(e,t),tx,r,tR,a,tm||void 0);else if(tC===eo.EndpointType.RESPONSES){let e;e=ez&&eW?[t]:[...e$.filter(e=>!e.isImage&&!e.isAudio).map(({role:e,content:t})=>({role:e,content:t})),t],await (0,es.makeOpenAIResponsesRequest)(e,(e,t,s)=>eJ(e,t,s),tx,r,tR,a,eV,eK,eQ,n,tU.length>0?tU:void 0,tq.length>0?tq:void 0,tW.length>0?tW:void 0,ej,ez?eW:null,e3,e8,sl.enabled,sl.setResult,tm||void 0,ed,eR,eh)}else if(tC===eo.EndpointType.ANTHROPIC_MESSAGES){let e=[...e$.filter(e=>!e.isImage&&!e.isAudio).map(({role:e,content:t})=>({role:e,content:t})),t];await (0,J.makeAnthropicMessagesRequest)(e,(e,t,s)=>eJ(e,t,s),tx,r,tR,a,eV,eK,eQ,n,tU.length>0?tU:void 0,tq.length>0?tq:void 0,tW.length>0?tW:void 0,ej,tm||void 0)}else tC===eo.EndpointType.EMBEDDINGS?await (0,X.makeOpenAIEmbeddingsRequest)(tf,(e,t)=>e9(e,t),tx,r,tR,tm||void 0):tC===eo.EndpointType.TRANSCRIPTION&&t2&&await (0,V.makeOpenAIAudioTranscriptionRequest)(t2,(e,t)=>eJ("assistant",e,t),tx,r,tR,a,void 0,void 0,void 0,void 0,tm||void 0);if(tC===eo.EndpointType.MCP){let e=1===ej.length&&"__all__"!==ej[0]?ej[0]:null,t=e;if(e?.startsWith("toolset:")){let s=e.slice(8),r=eh.find(e=>e.toolset_id===s),a=r?.tools.find(e=>e.tool_name===eP);t=a?.server_id??e}if(t&&!t.startsWith("toolset:")&&eP){let e=await (0,W.callMCPTool)(r,t,eP,s,tq.length>0?{guardrails:tq}:void 0),a=e?.content?.length>0?JSON.stringify(e.content.map(e=>"text"===e.type?e.text:e).filter(Boolean),null,2):JSON.stringify(e,null,2);eJ("assistant",a||"Tool executed successfully.")}}tC===eo.EndpointType.A2A_AGENTS&&tN&&await (0,F.makeA2ASendMessageRequest)(tN,tf,(e,t)=>eJ("assistant",e,t),r,a,eK,e1,eZ,tm||void 0,tq.length>0?tq:void 0)}catch(e){a.aborted?console.log("Request was cancelled"):(console.error("Error fetching response",e),eJ("assistant","Error fetching response:"+e))}finally{tO(!1),tI.current=null,tC===eo.EndpointType.IMAGE_EDITS&&sp(),tC===eo.EndpointType.RESPONSES&&tV&&sm(),tC===eo.EndpointType.CHAT&&tQ&&sg(),tC===eo.EndpointType.TRANSCRIPTION&&t2&&sf()}ty("")};if(O&&"Admin Viewer"===O){let{Title:e,Paragraph:s}=P.Typography;return(0,t.jsxs)("div",{children:[(0,t.jsx)(e,{level:1,children:"Access Denied"}),(0,t.jsx)(s,{children:"Ask your proxy admin for access to test models"})]})}let sx=(0,t.jsx)(u.LoadingOutlined,{style:{fontSize:24},spin:!0});return(0,t.jsxs)("div",{className:`w-full bg-white ${en?"h-full flex flex-col":"p-4 pb-0"}`,children:[(0,t.jsx)(b.Card,{className:`w-full rounded-xl shadow-md overflow-hidden ${en?"h-full flex flex-col":""}`,children:(0,t.jsxs)("div",{className:`flex w-full gap-4 ${en?"h-full":"h-[80vh]"}`,children:[!en&&(0,t.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 overflow-y-auto",children:[(0,t.jsx)(_.Title,{className:"text-xl font-semibold mb-6 mt-2",children:"Configurations"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(c.KeyOutlined,{className:"mr-2"})," Virtual Key Source"]}),(0,t.jsx)(T.Select,{disabled:er,value:td,style:{width:"100%"},onChange:e=>{tu(e)},options:[{value:"session",label:"Current UI Session"},{value:"custom",label:"Virtual Key"}],className:"rounded-md"}),"custom"===td&&(0,t.jsx)(w.TextInput,{className:"mt-2",placeholder:"Enter custom Virtual Key",type:"password",onValueChange:tp,value:th,icon:c.KeyOutlined})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)(v.Text,{className:"font-medium block text-gray-700 flex items-center",children:[(0,t.jsx)(g.SettingOutlined,{className:"mr-2"})," Custom Proxy Base URL"]}),ea?.LITELLM_UI_API_DOC_BASE_URL&&!tm&&(0,t.jsx)(j.Button,{type:"link",size:"small",icon:(0,t.jsx)(d.LinkOutlined,{}),onClick:()=>{tg(ea.LITELLM_UI_API_DOC_BASE_URL||""),sessionStorage.setItem("customProxyBaseUrl",ea.LITELLM_UI_API_DOC_BASE_URL||"")},className:"text-gray-500 hover:text-gray-700",children:"Fill"}),tm&&(0,t.jsx)(j.Button,{type:"link",size:"small",icon:(0,t.jsx)(a.ClearOutlined,{}),onClick:()=>{tg(""),sessionStorage.removeItem("customProxyBaseUrl")},className:"text-gray-500 hover:text-gray-700",children:"Clear"})]}),(0,t.jsx)(w.TextInput,{placeholder:"Optional: Enter custom proxy URL (e.g., http://localhost:5000)",onValueChange:e=>{tg(e),sessionStorage.setItem("customProxyBaseUrl",e)},value:tm,icon:s.ApiOutlined}),tm&&(0,t.jsxs)(v.Text,{className:"text-xs text-gray-500 mt-1",children:["API calls will be sent to: ",tm]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(s.ApiOutlined,{className:"mr-2"})," Endpoint Type"]}),(0,t.jsx)(e_,{endpointType:tC,onEndpointChange:e=>{tA(e),tb(void 0),tE(void 0),tw(!1),eO(void 0),e===eo.EndpointType.MCP&&ek(e=>1===e.length&&"__all__"!==e[0]?e:[]);try{sessionStorage.removeItem("selectedModel"),sessionStorage.removeItem("selectedAgent")}catch{}},className:"mb-4"}),tC===eo.EndpointType.SPEECH&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(f.SoundOutlined,{className:"mr-2"}),"Voice"]}),(0,t.jsx)(T.Select,{value:t$,onChange:e=>{tL(e),sessionStorage.setItem("selectedVoice",e)},style:{width:"100%"},className:"rounded-md",options:ec})]}),(0,t.jsx)(e4,{endpointType:tC,responsesSessionId:eW,useApiSessionManagement:ez,onToggleSessionManagement:e5})]}),tC!==eo.EndpointType.A2A_AGENTS&&tC!==eo.EndpointType.MCP&&(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"flex items-center",children:[(0,t.jsx)(p.RobotOutlined,{className:"mr-2"})," Select Model"]}),(()=>{if(!tx||"custom"===tx)return!1;let e=t_.find(e=>e.model_group===tx);return!!e&&(!e.mode||"chat"===e.mode)})()?(0,t.jsx)(E.Popover,{content:(0,t.jsx)(ei,{temperature:se,maxTokens:ss,useAdvancedParams:sa,onTemperatureChange:st,onMaxTokensChange:sr,onUseAdvancedParamsChange:sn,mockTestFallbacks:si,onMockTestFallbacksChange:so}),title:"Model Settings",trigger:"click",placement:"right",children:(0,t.jsx)(j.Button,{type:"text",size:"small",icon:(0,t.jsx)(g.SettingOutlined,{}),className:"text-gray-500 hover:text-gray-700","aria-label":"Model Settings","data-testid":"model-settings-button"})}):(0,t.jsx)(A.Tooltip,{title:"Advanced parameters are only supported for chat models currently",children:(0,t.jsx)(j.Button,{type:"text",size:"small",icon:(0,t.jsx)(g.SettingOutlined,{}),className:"text-gray-300 cursor-not-allowed",disabled:!0})})]}),(0,t.jsx)(T.Select,{value:tx,placeholder:"Select a Model",onChange:e=>{console.log(`selected ${e}`),tb(e),tw("custom"===e)},options:[{value:"custom",label:"Enter custom model",key:"custom"},...Array.from(new Set(t_.filter(e=>{if(!e.mode)return!0;let t=(0,eo.getEndpointType)(e.mode);return tC===eo.EndpointType.RESPONSES||tC===eo.EndpointType.ANTHROPIC_MESSAGES?t===tC||t===eo.EndpointType.CHAT:tC===eo.EndpointType.IMAGE_EDITS?t===tC||t===eo.EndpointType.IMAGE:t===tC}).map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t}))],style:{width:"100%"},showSearch:!0,className:"rounded-md"}),tv&&(0,t.jsx)(w.TextInput,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{tT.current&&clearTimeout(tT.current),tT.current=setTimeout(()=>{tb(e)},500)}})]}),tC===eo.EndpointType.A2A_AGENTS&&(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(p.RobotOutlined,{className:"mr-2"})," Select Agent"]}),(0,t.jsx)(T.Select,{value:tN,placeholder:"Select an Agent",onChange:e=>tE(e),options:tj.map(e=>({value:e.agent_name,label:e.agent_name||e.agent_id,key:e.agent_id})),style:{width:"100%"},showSearch:!0,className:"rounded-md",optionLabelProp:"label",children:tj.map(e=>(0,t.jsx)(T.Select.Option,{value:e.agent_name,label:e.agent_name||e.agent_id,children:(0,t.jsxs)("div",{className:"flex flex-col py-1",children:[(0,t.jsx)("span",{className:"font-medium",children:e.agent_name||e.agent_id}),e.agent_card_params?.description&&(0,t.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:e.agent_card_params.description})]})},e.agent_id))}),0===tj.length&&(0,t.jsx)(v.Text,{className:"text-xs text-gray-500 mt-2 block",children:"No agents found. Create agents via /v1/agents endpoint."})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(y.TagsOutlined,{className:"mr-2"})," Tags"]}),(0,t.jsx)(H.default,{value:tR,onChange:tM,className:"mb-4",accessToken:e||""})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(x.ToolOutlined,{className:"mr-2"}),tC===eo.EndpointType.MCP?"MCP Server":"MCP Servers",(0,t.jsx)(A.Tooltip,{className:"ml-1",title:tC===eo.EndpointType.MCP?"Select an MCP server or toolset to test tools directly.":"Select MCP servers or toolsets to use in your conversation.",children:(0,t.jsx)(l.InfoCircleOutlined,{className:"cursor-pointer",onClick:()=>ex(!0)})})]}),(0,t.jsxs)(T.Select,{mode:tC===eo.EndpointType.MCP?void 0:"multiple",style:{width:"100%"},placeholder:tC===eo.EndpointType.MCP?"Select MCP server":"Select MCP servers",value:tC===eo.EndpointType.MCP?"__all__"!==ej[0]&&1===ej.length?ej[0]:void 0:ej,onChange:e=>{tC===eo.EndpointType.MCP?(ek(e?[e]:[]),eO(void 0),e&&!eC[e]&&su(e)):e.includes("__all__")?(ek(["__all__"]),eM({})):(ek(e),eM(t=>{let s={...t};return Object.keys(s).forEach(t=>{e.includes(t)||delete s[t]}),s}),e.forEach(e=>{eC[e]||su(e)}))},loading:eN,className:"mb-2",allowClear:!0,showSearch:!0,optionLabelProp:"label",disabled:!tn.has(tC),maxTagCount:tC===eo.EndpointType.MCP?1:"responsive",filterOption:(e,t)=>{if(t?.value==="__all__")return"all mcp servers".includes(e.toLowerCase());let s=t?.value;if(s?.startsWith("toolset:")){let t=s.slice(8),r=eh.find(e=>e.toolset_id===t);return!!r&&[r.toolset_name,r.description].filter(Boolean).join(" ").toLowerCase().includes(e.toLowerCase())}let r=ed.find(e=>e.server_id===s);return!!r&&[r.server_name,r.alias,r.server_id,r.description].filter(Boolean).join(" ").toLowerCase().includes(e.toLowerCase())},children:[tC!==eo.EndpointType.MCP&&(0,t.jsx)(T.Select.Option,{value:"__all__",label:"All MCP Servers",children:(0,t.jsxs)("div",{className:"flex flex-col py-1",children:[(0,t.jsx)("span",{className:"font-medium",children:"All MCP Servers"}),(0,t.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:"Use all available MCP servers"})]})},"__all__"),eh.length>0&&(0,t.jsx)(T.Select.OptGroup,{label:"Toolsets",children:eh.map(e=>(0,t.jsx)(T.Select.Option,{value:`toolset:${e.toolset_id}`,label:e.toolset_name,disabled:tC!==eo.EndpointType.MCP&&ej.includes("__all__"),children:(0,t.jsxs)("div",{className:"flex flex-col py-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"font-medium",children:e.toolset_name}),(0,t.jsx)("span",{className:"text-xs px-1 rounded",style:{background:"#ede9fe",color:"#7c3aed"},children:"Toolset"}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["(",e.tools.length," tools)"]})]}),e.description&&(0,t.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},`toolset:${e.toolset_id}`))}),ed.length>0&&(0,t.jsx)(T.Select.OptGroup,{label:"Servers",children:ed.map(e=>(0,t.jsx)(T.Select.Option,{value:e.server_id,label:e.alias||e.server_name||e.server_id,disabled:tC!==eo.EndpointType.MCP&&ej.includes("__all__"),children:(0,t.jsxs)("div",{className:"flex flex-col py-1",children:[(0,t.jsx)("span",{className:"font-medium",children:e.alias||e.server_name||e.server_id}),e.description&&(0,t.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},e.server_id))})]}),tC===eo.EndpointType.MCP&&1===ej.length&&"__all__"!==ej[0]&&(()=>{let e=ej[0],s=e.startsWith("toolset:"),r=[];if(s){let t=e.slice(8),s=eh.find(e=>e.toolset_id===t);s&&(r=s.tools.map(e=>({value:e.tool_name,label:e.tool_name})))}else r=(eC[e]||[]).map(e=>({value:e.name,label:e.name}));return(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)(v.Text,{className:"text-xs text-gray-600 mb-1 block",children:"Select Tool"}),(0,t.jsx)(T.Select,{style:{width:"100%"},placeholder:"Select a tool to call",value:eP,onChange:e=>eO(e),options:r,allowClear:!0,className:"rounded-md"})]})})(),ej.length>0&&!ej.includes("__all__")&&tC!==eo.EndpointType.MCP&&tn.has(tC)&&(0,t.jsx)("div",{className:"mt-3 space-y-2",children:ej.map(e=>{let s=ed.find(t=>t.server_id===e),r=eC[e]||[];return 0===r.length?null:(0,t.jsxs)("div",{className:"border rounded p-2",children:[(0,t.jsxs)(v.Text,{className:"text-xs text-gray-600 mb-1",children:["Limit tools for ",s?.alias||s?.server_name||e,":"]}),(0,t.jsx)(T.Select,{mode:"multiple",size:"small",style:{width:"100%"},placeholder:"All tools (default)",value:eR[e]||[],onChange:t=>{eM(s=>({...s,[e]:t}))},options:r.map(e=>({value:e.name,label:e.name})),maxTagCount:2})]},e)})}),ej.length>0&&!ej.includes("__all__")&&ej.some(e=>{let t=ed.find(t=>t.server_id===e);return t?.is_byok})&&(0,t.jsx)("div",{className:"mt-3 space-y-2",children:ej.map(e=>{let s=ed.find(t=>t.server_id===e);if(!s?.is_byok)return null;let r=s.alias||s.server_name||e;return(0,t.jsxs)("div",{className:"border border-blue-100 rounded p-2 bg-blue-50 flex items-center justify-between",children:[(0,t.jsxs)(v.Text,{className:"text-xs text-blue-700",children:[r," requires your API key"]}),s.has_user_credential?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"text-green-600 text-xs font-medium flex items-center gap-1",children:[(0,t.jsx)(c.KeyOutlined,{})," Connected"]}),(0,t.jsx)("button",{className:"text-xs text-gray-400 hover:text-blue-500 underline",onClick:()=>eS(s),children:"Reconnect"})]}):(0,t.jsx)("button",{className:"text-xs bg-blue-500 hover:bg-blue-600 text-white px-3 py-1 rounded-lg font-medium",onClick:()=>eS(s),children:"Connect"})]},e)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(i.DatabaseOutlined,{className:"mr-2"})," Vector Store",(0,t.jsx)(A.Tooltip,{className:"ml-1",title:(0,t.jsxs)("span",{children:["Select vector store(s) to use for this LLM API call. You can set up your vector store"," ",(0,t.jsx)("a",{href:"?page=vector-stores",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,t.jsx)(l.InfoCircleOutlined,{})})]}),(0,t.jsx)(z.default,{value:tU,onChange:tD,className:"mb-4",accessToken:e||""})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(m.SafetyOutlined,{className:"mr-2"})," Guardrails",(0,t.jsx)(A.Tooltip,{className:"ml-1",title:(0,t.jsxs)("span",{children:["Select guardrail(s) to use for this LLM API call. You can set up your guardrails"," ",(0,t.jsx)("a",{href:"?page=guardrails",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,t.jsx)(l.InfoCircleOutlined,{})})]}),(0,t.jsx)(L.default,{value:tq,onChange:tB,className:"mb-4",accessToken:e||""})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(m.SafetyOutlined,{className:"mr-2"})," Policies",(0,t.jsx)(A.Tooltip,{className:"ml-1",title:(0,t.jsxs)("span",{children:["Select policy/policies to apply to this LLM API call. Policies define which guardrails are applied based on conditions. You can set up your policies"," ",(0,t.jsx)("a",{href:"?page=policies",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,t.jsx)(l.InfoCircleOutlined,{})})]}),(0,t.jsx)(U.default,{value:tW,onChange:tH,className:"mb-4",accessToken:e||""})]}),tC===eo.EndpointType.RESPONSES&&(0,t.jsx)("div",{children:(0,t.jsx)(ev,{accessToken:"session"===td?e||"":th,enabled:sl.enabled,onEnabledChange:sl.setEnabled,selectedContainerId:null,onContainerChange:()=>{},selectedModel:tx||""})})]})]}),(0,t.jsx)("div",{className:`flex flex-col bg-white ${en?"flex-1 w-full":"w-3/4"}`,children:tC===eo.EndpointType.REALTIME?(0,t.jsx)(te,{accessToken:"session"===td?e||"":th,selectedModel:tx||"",customProxyBaseUrl:tm||void 0,selectedGuardrails:tq.length>0?tq:void 0}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:[(0,t.jsx)(_.Title,{className:"text-xl font-semibold mb-0",children:en?"Chat":"Test Key"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(S.Button,{onClick:()=>{tl(),sp(),sm(),sg(),sf(),B.default.success("Chat history cleared.")},className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:a.ClearOutlined,children:"Clear Chat"}),!en&&(0,t.jsx)(S.Button,{onClick:()=>t3(!0),className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:n.CodeOutlined,children:"Get Code"})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-auto p-4 pb-0",children:[0===e$.length&&(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(p.RobotOutlined,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)(v.Text,{children:"Start a conversation, generate an image, or handle audio"})]}),e$.map((s,r)=>(0,t.jsx)("div",{children:(0,t.jsx)(e0,{message:s,isLastMessage:r===e$.length-1,endpointType:tC,mcpEvents:eU,codeInterpreterResult:sl.result,accessToken:"session"===td?e||"":th})},r)),tP&&eU.length>0&&(tC===eo.EndpointType.RESPONSES||tC===eo.EndpointType.CHAT)&&e$.length>0&&"user"===e$[e$.length-1].role&&(0,t.jsx)("div",{className:"text-left mb-4",children:(0,t.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"#ffffff",border:"1px solid #f0f0f0",textAlign:"left"},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:"#f5f5f5"},children:(0,t.jsx)(p.RobotOutlined,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,t.jsx)("strong",{className:"text-sm capitalize",children:"Assistant"})]}),(0,t.jsx)(eG.default,{events:eU})]})}),tP&&(0,t.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,t.jsx)(C.Spin,{indicator:sx})}),(0,t.jsx)("div",{ref:sc,style:{height:"1px"}})]}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[tC===eo.EndpointType.IMAGE_EDITS&&(0,t.jsx)("div",{className:"mb-4",children:0===tz.length?(0,t.jsxs)(ta,{beforeUpload:sh,accept:"image/*",showUploadList:!1,children:[(0,t.jsx)("p",{className:"ant-upload-drag-icon",children:(0,t.jsx)(h.PictureOutlined,{style:{fontSize:"24px",color:"#666"}})}),(0,t.jsx)("p",{className:"ant-upload-text text-sm",children:"Click or drag images to upload"}),(0,t.jsx)("p",{className:"ant-upload-hint text-xs text-gray-500",children:"Support for PNG, JPG, JPEG formats. Multiple images supported."})]}):(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[tz.map((e,s)=>(0,t.jsxs)("div",{className:"relative inline-block",children:[(0,t.jsx)("img",{src:(()=>{let e=tJ[s];if(!e)return"";try{let t=new URL(e);return"blob:"===t.protocol?t.href:""}catch{return""}})(),alt:`Upload preview ${s+1}`,className:"max-w-32 max-h-32 rounded-md border border-gray-200 object-cover"}),(0,t.jsx)("button",{className:"absolute top-1 right-1 bg-white shadow-sm border border-gray-200 rounded px-1 py-1 text-red-500 hover:bg-red-50 text-xs",onClick:()=>{tJ[s]&&URL.revokeObjectURL(tJ[s]),tF(e=>e.filter((e,t)=>t!==s)),tG(e=>e.filter((e,t)=>t!==s))},children:(0,t.jsx)(o.DeleteOutlined,{})})]},s)),(0,t.jsxs)("div",{className:"flex items-center justify-center w-32 h-32 border-2 border-dashed border-gray-300 rounded-md hover:border-gray-400 cursor-pointer",onClick:()=>document.getElementById("additional-image-upload")?.click(),children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(h.PictureOutlined,{style:{fontSize:"24px",color:"#666"}}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Add more"})]}),(0,t.jsx)("input",{id:"additional-image-upload",type:"file",accept:"image/*",multiple:!0,style:{display:"none"},onChange:e=>{Array.from(e.target.files||[]).forEach(e=>sh(e))}})]})]})}),tC===eo.EndpointType.TRANSCRIPTION&&(0,t.jsx)("div",{className:"mb-4",children:t2?(0,t.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1",children:[(0,t.jsx)(f.SoundOutlined,{style:{fontSize:"20px",color:"#666"}}),(0,t.jsx)("span",{className:"text-sm font-medium",children:t2.name}),(0,t.jsxs)("span",{className:"text-xs text-gray-500",children:["(",(t2.size/1024/1024).toFixed(2)," MB)"]})]}),(0,t.jsxs)("button",{className:"bg-white shadow-sm border border-gray-200 rounded px-2 py-1 text-red-500 hover:bg-red-50 text-xs",onClick:sf,children:[(0,t.jsx)(o.DeleteOutlined,{})," Remove"]})]}):(0,t.jsxs)(ta,{beforeUpload:e=>(t4(e),!1),accept:"audio/*,.mp3,.mp4,.mpeg,.mpga,.m4a,.wav,.webm",showUploadList:!1,children:[(0,t.jsx)("p",{className:"ant-upload-drag-icon",children:(0,t.jsx)(f.SoundOutlined,{style:{fontSize:"24px",color:"#666"}})}),(0,t.jsx)("p",{className:"ant-upload-text text-sm",children:"Click or drag audio file to upload"}),(0,t.jsx)("p",{className:"ant-upload-hint text-xs text-gray-500",children:"Support for MP3, MP4, MPEG, MPGA, M4A, WAV, WEBM formats. Max file size: 25 MB."})]})}),tC===eo.EndpointType.RESPONSES&&tV&&(0,t.jsx)(eE,{file:tV,previewUrl:tX,onRemove:sm}),tC===eo.EndpointType.CHAT&&tQ&&(0,t.jsx)(eE,{file:tQ,previewUrl:t0,onRemove:sg}),tC===eo.EndpointType.RESPONSES&&sl.enabled&&(0,t.jsxs)("div",{className:"mb-2 space-y-2",children:[(0,t.jsxs)("div",{className:"px-3 py-2 bg-gradient-to-r from-blue-50 to-purple-50 rounded-lg border border-blue-200 flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:tP?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.LoadingOutlined,{className:"text-blue-500",spin:!0}),(0,t.jsx)("span",{className:"text-sm text-blue-700 font-medium",children:"Running Python code..."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.CodeOutlined,{className:"text-blue-500"}),(0,t.jsx)("span",{className:"text-sm text-blue-700 font-medium",children:"Code Interpreter Active"})]})}),(0,t.jsx)("button",{className:"text-xs text-blue-500 hover:text-blue-700",onClick:()=>sl.setEnabled(!1),children:"Disable"})]}),!tP&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:["Generate sample sales data CSV and create a chart","Create a PNG bar chart comparing AI gateway providers including LiteLLM","Generate a CSV of LLM pricing data and visualize it as a line chart"].map((e,s)=>(0,t.jsx)("button",{className:"text-xs px-3 py-1.5 bg-white border border-gray-200 rounded-full hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600 transition-colors",onClick:()=>ty(e),children:e},s))})]}),0===e$.length&&!tP&&tC!==eo.EndpointType.MCP&&(0,t.jsx)("div",{className:"flex items-center gap-2 mb-3 overflow-x-auto",children:(tC===eo.EndpointType.A2A_AGENTS?["What can you help me with?","Tell me about yourself","What tasks can you perform?"]:["Write me a poem","Explain quantum computing","Draft a polite email requesting a meeting"]).map(e=>(0,t.jsx)("button",{type:"button",className:"shrink-0 rounded-full border border-gray-200 px-3 py-1 text-xs font-medium text-gray-600 transition-colors hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600 cursor-pointer",onClick:()=>ty(e),children:e},e))}),(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.jsxs)("div",{className:"flex-shrink-0 mr-2 flex items-center gap-1",children:[tC===eo.EndpointType.RESPONSES&&!tV&&(0,t.jsx)(e2,{responsesUploadedImage:tV,responsesImagePreviewUrl:tX,onImageUpload:e=>(tK(e),tY(URL.createObjectURL(e)),!1),onRemoveImage:sm}),tC===eo.EndpointType.CHAT&&!tQ&&(0,t.jsx)(ep,{chatUploadedImage:tQ,chatImagePreviewUrl:t0,onImageUpload:e=>(tZ(e),t1(URL.createObjectURL(e)),!1),onRemoveImage:sg}),tC===eo.EndpointType.RESPONSES&&(0,t.jsx)(A.Tooltip,{title:sl.enabled?"Code Interpreter enabled (click to disable)":"Enable Code Interpreter",children:(0,t.jsx)("button",{className:`p-1.5 rounded-md transition-colors ${sl.enabled?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"}`,onClick:()=>{sl.toggle(),sl.enabled||B.default.success("Code Interpreter enabled!")},children:(0,t.jsx)(n.CodeOutlined,{style:{fontSize:"16px"}})})})]}),tC===eo.EndpointType.MCP&&1===ej.length&&"__all__"!==ej[0]&&eP?(0,t.jsx)("div",{className:"flex-1 overflow-y-auto max-h-48 min-h-[44px] p-2 border border-gray-200 rounded-lg bg-gray-50/50",children:(()=>{let e=ej[0],s=[];if(e.startsWith("toolset:")){let t=e.slice(8),r=eh.find(e=>e.toolset_id===t);r&&[...new Set(r.tools.map(e=>e.server_id))].forEach(e=>{s=s.concat(eC[e]||[])})}else s=eC[e]||[];let r=s.find(e=>e.name===eP);return r?(0,t.jsx)(D.default,{ref:eI,tool:r,className:"space-y-2"}):(0,t.jsx)("div",{className:"flex items-center justify-center h-10 text-sm text-gray-500",children:"Loading tool schema..."})})()}):(0,t.jsx)(tr,{value:tf,onChange:e=>ty(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),sy())},placeholder:tC===eo.EndpointType.CHAT||tC===eo.EndpointType.EMBEDDINGS||tC===eo.EndpointType.RESPONSES||tC===eo.EndpointType.ANTHROPIC_MESSAGES?"Type your message... (Shift+Enter for new line)":tC===eo.EndpointType.A2A_AGENTS?"Send a message to the A2A agent...":tC===eo.EndpointType.IMAGE_EDITS?"Describe how you want to edit the image...":tC===eo.EndpointType.SPEECH?"Enter text to convert to speech...":tC===eo.EndpointType.TRANSCRIPTION?"Optional: Add context or prompt for transcription...":"Describe the image you want to generate...",disabled:tP,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)(S.Button,{onClick:sy,disabled:tP||(tC===eo.EndpointType.MCP?!(1===ej.length&&"__all__"!==ej[0]&&eP):tC===eo.EndpointType.TRANSCRIPTION?!t2:!tf.trim()),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)(r.ArrowUpOutlined,{style:{fontSize:"14px"}})})]}),tP&&(0,t.jsx)(S.Button,{onClick:()=>{tI.current&&(tI.current.abort(),tI.current=null,tO(!1),B.default.info("Request cancelled"))},className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",icon:o.DeleteOutlined,children:"Cancel"})]})]})]})})]})}),(0,t.jsxs)(N.Modal,{title:"Generated Code",open:t6,onCancel:()=>t3(!1),footer:null,width:800,children:[(0,t.jsxs)("div",{className:"flex justify-between items-end my-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(v.Text,{className:"font-medium block mb-1 text-gray-700",children:"SDK Type"}),(0,t.jsx)(T.Select,{value:t7,onChange:e=>t9(e),style:{width:150},options:[{value:"openai",label:"OpenAI SDK"},{value:"azure",label:"Azure SDK"}]})]}),(0,t.jsx)(j.Button,{onClick:()=>{navigator.clipboard.writeText(t5),B.default.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,t.jsx)(R.Prism,{language:"python",style:M.coy,wrapLines:!0,wrapLongLines:!0,className:"rounded-md",customStyle:{maxHeight:"60vh",overflowY:"auto"},children:t5})]}),eb&&(0,t.jsx)(q.ByokCredentialModal,{server:eb,open:!!eb,onClose:()=>eS(null),onSuccess:e=>{sd(),eS(null)},accessToken:e||""}),(0,t.jsx)(N.Modal,{title:"How Toolsets Work",open:ey,onCancel:()=>ex(!1),footer:[(0,t.jsx)(j.Button,{onClick:()=>ex(!1),children:"Close"},"close")],width:600,children:(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("p",{className:"text-gray-700",children:[(0,t.jsx)("strong",{children:"Toolsets"})," are named collections of specific tools from one or more MCP servers. Instead of exposing all tools from a server, a toolset gives an agent exactly the tools it needs."]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"font-semibold text-gray-800 mb-2",children:"How to use a toolset:"}),(0,t.jsxs)("ol",{className:"list-decimal list-inside space-y-2 text-gray-700",children:[(0,t.jsxs)("li",{children:["Select a ",(0,t.jsx)("span",{style:{color:"#7c3aed",fontWeight:600},children:"Toolset"})," (purple badge) from the MCP Servers dropdown."]}),(0,t.jsx)("li",{children:"The tool picker will show only the tools included in that toolset."}),(0,t.jsx)("li",{children:"Select a tool and fill in its parameters, then send."}),(0,t.jsx)("li",{children:"The tool call is routed to the correct underlying MCP server automatically."})]})]}),(0,t.jsx)("div",{className:"bg-purple-50 border border-purple-200 rounded p-3",children:(0,t.jsxs)("p",{className:"text-sm text-purple-800",children:[(0,t.jsx)("strong",{children:"Example:"}),' A "GitHub Read-only" toolset might include only ',(0,t.jsx)("code",{children:"list_repos"})," and ",(0,t.jsx)("code",{children:"get_file"})," from a GitHub MCP server — preventing agents from making writes."]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"font-semibold text-gray-800 mb-1",children:"Creating toolsets:"}),(0,t.jsxs)("p",{className:"text-sm text-gray-600",children:["Admins can create and manage toolsets from the ",(0,t.jsx)("strong",{children:"MCP"})," page → ",(0,t.jsx)("strong",{children:"Toolsets"})," tab. Toolsets can then be assigned to keys and teams to scope their tool access."]})]})]})})]})}],220486)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0.6dhordmknmz.js b/litellm/proxy/_experimental/out/_next/static/chunks/0.6dhordmknmz.js new file mode 100644 index 00000000000..8c670536145 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0.6dhordmknmz.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510674,e=>{"use strict";var t=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214),r=e.i(708347);let i=(0,s.createQueryKeys)("projects"),n=async e=>{let t=(0,a.getProxyBaseUrl)(),s=`${t}/project/list`,l=await fetch(s,{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:s}=(0,l.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>n(e),enabled:!!e&&r.all_admin_roles.includes(s)})}])},557662,e=>{"use strict";let t="../ui/assets/logos/",s=[{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=s.reduce((e,t)=>(e[t.displayName]=t,e),{}),l=s.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),r=s.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=>r[e]||e),"reverse_callback_map",0,r])},810757,477386,e=>{"use strict";var t=e.i(271645);let s=t.forwardRef(function(e,s){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:s},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,s],810757);let a=t.forwardRef(function(e,s){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:s},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)},207082,e=>{"use strict";var t=e.i(619273),s=e.i(266027),a=e.i(243652),l=e.i(764205),r=e.i(135214);let i=(0,a.createQueryKeys)("keys"),n=async(e,t,s,a={})=>{try{let r=(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:s,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=`${r?`${r}/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,r.default)();return(0,s.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,r.default)();return(0,s.useQuery)({queryKey:i.list({page:e,limit:a,...l}),queryFn:async()=>await n(o,e,a,l),enabled:!!o,staleTime:3e4,placeholderData:t.keepPreviousData})}])},234713,e=>{"use strict";e.s(["NO_MCP_SERVERS_SENTINEL",0,"no-mcp-servers"])},552130,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select agents",disabled:c=!1})=>{let[d,u]=(0,s.useState)([]),[m,p]=(0,s.useState)([]),[g,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,l.getAgentsList)(n),t=e?.agents||[];u(t);let s=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>s.add(e))}),p(Array.from(s))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...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`}))],y=[...r?.agents||[],...(r?.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:y,loading:g,className:i,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:c,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.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))})})}])},9314,263147,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(981339),l=e.i(645526),r=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)(),s=`${t}/v1/access_group`,a=await fetch(s,{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:x,isError:y}=p();if(x)return(0,t.jsxs)("div",{children:[u&&(0,t.jsxs)(r.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 f=(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)(r.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)(s.Select,{mode:"multiple",value:e,placeholder:n,onChange:i,disabled:o,allowClear:g,showSearch:!0,style:{width:"100%",...c},className:`rounded-md ${d??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(592968),r=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:x=!1,onNeverExpireChange:y})=>{let f=p&&!["7d","30d","90d","180d","365d"].includes(p),[_,j]=(0,s.useState)(f),[b,v]=(0,s.useState)(f?p:""),[N,w]=(0,s.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&&y&&(0,t.jsx)(n.Checkbox,{checked:x,onChange:t=>{let s=t.target.checked;y(s),s&&(w(""),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:N,onValueChange:t=>{w(t),e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",t):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:t})},disabled:!h&&x})]})]}),(0,t.jsx)(r.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:_?"custom":p,onChange:e=>{"custom"===e?j(!0):(j(!1),v(""),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"})]}),_&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:b,onChange:e=>{let t=e.target.value;v(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."})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(199133),l=e.i(764205);e.s(["default",0,({onChange:e,value:r,className:i,accessToken:n,placeholder:o="Select pass through routes",disabled:c=!1,teamId:d})=>{let[u,m]=(0,s.useState)([]),[p,g]=(0,s.useState)(!1);return(0,s.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,s=e.methods;return s&&s.length>0?s.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:r,loading:p,className:i,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})}])},939510,e=>{"use strict";var t=e.i(843476),s=e.i(808613),a=e.i(199133),l=e.i(592968),r=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)(s.Form.Item,{label:(0,t.jsxs)("span",{children:[p," Rate Limit Type"," ",(0,t.jsx)(l.Tooltip,{title:h,children:(0,t.jsx)(r.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),s=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:l,onChange:r,disabled:i,loading:n,style:o})=>(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"All Organizations",value:l,onChange:r,disabled:i,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,s)=>{if(!s)return!1;let a=e?.find(e=>e.organization_id===s.key);if(!a)return!1;let l=t.toLowerCase().trim(),r=(a.organization_alias||"").toLowerCase(),i=(a.organization_id||"").toLowerCase();return r.includes(l)||i.includes(l)},children:e?.map(e=>(0,t.jsxs)(s.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))})])},319312,e=>{"use strict";var t=e.i(843476),s=e.i(464571),a=e.i(28651),l=e.i(199133);let r=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:i}){let n=(t,s,a)=>{i(e.map((e,l)=>l===t?{...e,[s]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((o,c)=>{let d=r.find(e=>e.value===o.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(l.Select,{value:o.budget_duration,onChange:e=>n(c,"budget_duration",e),style:{width:130},options:r.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(a.InputNumber,{step:.01,min:0,precision:2,value:o.max_budget??void 0,onChange:e=>n(c,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(s.Button,{type:"text",danger:!0,size:"small",onClick:()=>{i(e.filter((e,t)=>t!==c))},style:{padding:"0 4px"},children:"✕"})]}),d&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",d]})]},c)}),(0,t.jsx)(s.Button,{size:"small",onClick:t=>{t.preventDefault(),i([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}])},101837,e=>{"use strict";var t=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214);let r=(0,s.createQueryKeys)("mcpAccessGroups");e.s(["useMCPAccessGroups",0,()=>{let{accessToken:e}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.fetchMCPAccessGroups)(e),enabled:!!e})}])},75921,e=>{"use strict";var t=e.i(843476),s=e.i(101837),a=e.i(500727),l=e.i(699857),r=e.i(199133),i=e.i(234713);let n="toolset:";e.s(["default",0,({onChange:e,value:o,className:c,accessToken:d,placeholder:u="Select MCP servers",disabled:m=!1,teamId:p,allowNoMcpServers:g=!1})=>{let{data:h=[],isLoading:x}=(0,a.useMCPServers)(p),{data:y=[],isLoading:f}=(0,s.useMCPAccessGroups)(),{data:_=[],isLoading:j}=(0,l.useMCPToolsets)(),b=new Set(y),v=[...y.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...h.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),..._.map(e=>({label:e.toolset_name,value:`${n}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],N={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},w={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},k=[...o?.servers||[],...o?.accessGroups||[],...(o?.toolsets||[]).map(e=>`${n}${e}`)],S=g&&k.includes(i.NO_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(r.Select,{mode:"multiple",placeholder:u,onChange:t=>{if(g&&t.includes(i.NO_MCP_SERVERS_SENTINEL))return void e({servers:[i.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let s=t.filter(e=>e.startsWith(n)).map(e=>e.slice(n.length)),a=t.filter(e=>!e.startsWith(n));e({servers:a.filter(e=>!b.has(e)),accessGroups:a.filter(e=>b.has(e)),toolsets:s})},value:k,loading:x||f||j,className:c,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:m,filterOption:(e,t)=>t?.value===i.NO_MCP_SERVERS_SENTINEL||(v.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[g&&(0,t.jsx)(r.Select.Option,{value:i.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},i.NO_MCP_SERVERS_SENTINEL),v.map(e=>(0,t.jsx)(r.Select.Option,{value:e.value,label:e.label,disabled:S,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:N[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:N[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:w[e.type]})]})},e.value))]})})}])},390605,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(764205),l=e.i(599724),r=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,x]=(0,s.useState)({}),[y,f]=(0,s.useState)({}),[_,j]=(0,s.useState)({}),[b,v]=(0,s.useState)({}),N=(0,s.useRef)(u);(0,s.useEffect)(()=>{N.current=u},[u]);let w=(0,s.useMemo)(()=>0===d.length?[]:g.filter(e=>d.includes(e.server_id)),[g,d]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let s=await (0,a.listMCPTools)(t,e);if(s.error)j(t=>({...t,[e]:s.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=s.tools||[];x(s=>({...s,[e]:t}));let a=N.current;if(!a[e]&&t.length>0){let s=t.filter(e=>"delete"!==(0,c.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:s})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,s.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let S=(e,t)=>{m({...u,[e]:t})};return 0===d.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let s=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],c=y[e.server_id],d=_[e.server_id],g=b[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:s}),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=>v(s=>({...s,[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 s;return s=h[t=e.server_id]||[],void m({...u,[t]:s.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)(r.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=>S(e.server_id,t),readOnly:p}),!c&&!d&&a.length>0&&"flat"===g&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(s=>{let a=n.includes(s.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!==s.name):[...n,s.name];S(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:s.name}),(0,t.jsxs)(l.Text,{className:"text-sm text-gray-500",children:["- ",s.description||"No description"]})]})})]},s.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)})})}])},109034,e=>{"use strict";var t=e.i(266027),s=e.i(243652),a=e.i(764205),l=e.i(135214);let r=(0,s.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:s,userRole:i}=(0,l.default)();return(0,t.useQuery)({queryKey:r.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&s&&i)})}])},533882,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(250980),l=e.i(797672),r=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),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:_=!0})=>{let[j,b]=(0,s.useState)([]),[v,N]=(0,s.useState)({aliasName:"",targetModel:""}),[w,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{b(Object.entries(y).map(([e,t],s)=>({id:`${s}-${e}`,aliasName:e,targetModel:t})))},[y]);let S=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);b(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},C=()=>{k(null)},T=j.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:v.aliasName,onChange:e=>N({...v,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:v.targetModel,placeholder:"Select target model",onChange:e=>N({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];b(e),N({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.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:[j.map(s=>(0,t.jsx)(p.TableRow,{className:"h-8",children:w&&w.id===s.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,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:w.targetModel,onChange:e=>k({...w,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:S,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:C,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:s.aliasName}),(0,t.jsx)(g.TableCell,{className:"py-0.5 text-sm text-gray-500",children:s.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:()=>{k({...s})},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=s.id,b(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.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)(r.TrashIcon,{className:"w-3 h-3"})})]})})]})},s.id)),0===j.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."})})]})]})})}),_&&(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(T).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(T).map(([e,s])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',s,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(592968),l=e.i(312361),r=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}=s.Select;e.s(["default",0,({value:e=[],onChange:x,disabledCallbacks:y=[],onDisabledCallbacksChange:f})=>{let _=Object.entries(p.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),j=Object.keys(p.callbackInfo),b=e=>{x?.(e)},v=(t,s,a)=>{let l=[...e];if("callback_name"===s){let e=p.callback_map[a]||a;l[t]={...l[t],[s]:e,callback_vars:{}}}else l[t]={...l[t],[s]:a};b(l)},N=(t,s,a)=>{let l=[...e];l[t]={...l[t],callback_vars:{...l[t].callback_vars,[s]:a}},b(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)(r.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)(s.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:y,onChange:e=>{let t=(0,p.mapDisplayToInternalNames)(e);f?.(t)},style:{width:"100%"},optionLabelProp:"label",children:j.map(e=>{let s=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:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",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.charAt(0),a.replaceChild(t,s)}}}),(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)(r.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:()=>{b([...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:()=>{b(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)(s.Select,{value:u,placeholder:"Select integration",onChange:e=>v(c,"callback_name",e),className:"w-full",optionLabelProp:"label",children:_.map(e=>{let s=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:[s&&(0,t.jsx)("img",{src:s,alt:e,className:"w-4 h-4 object-contain",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.charAt(0),a.replaceChild(t,s)}}}),(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)(s.Select,{value:l.callback_type,onChange:e=>v(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,s)=>{if(!e.callback_name)return null;let l=Object.entries(p.callback_map).find(([t,s])=>s===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)(r.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=>N(s,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=>N(s,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'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),s=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:l,premiumUser:r=!1,disabledCallbacks:i=[],onDisabledCallbacksChange:n}){return r?(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)(s.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),s=e.i(271645),a=e.i(404206),l=e.i(723731),r=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,s.forwardRef)(({accessToken:e,value:m,onChange:p,modelData:g},h)=>{let[x,y]=(0,s.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[f,_]=(0,s.useState)([]),[j,b]=(0,s.useState)([]),[v,N]=(0,s.useState)([]),[w,k]=(0,s.useState)([]),[S,C]=(0,s.useState)({}),[T,I]=(0,s.useState)({}),A=(0,s.useRef)(!1),L=(0,s.useRef)(null);(0,s.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(A.current&&e===L.current){A.current=!1;return}if(A.current&&e!==L.current&&(A.current=!1),e!==L.current)if(L.current=e,m?.router_settings){let e=m.router_settings,{fallbacks:t,...s}=e;y({routerSettings:s,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];_(a),b(a&&0!==a.length?a.map((e,t)=>{let[s,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:s||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else y({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),_([]),b([{id:"1",primaryModel:null,fallbackModels:[]}])},[m]),(0,s.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}}),C(t);let s=e.fields.find(e=>"routing_strategy"===e.field_name);s?.options&&k(s.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,s.useEffect)(()=>{e&&(async()=>{try{let t=await (0,u.fetchAvailableModels)(e);N(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let E=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),s=Object.fromEntries(Object.entries({...x.routerSettings,enable_tag_filtering:x.enableTagFiltering,routing_strategy:x.selectedStrategy,fallbacks:f.length>0?f:null}).map(([s,a])=>{if("routing_strategy_args"!==s&&"routing_strategy"!==s&&"enable_tag_filtering"!==s&&"fallbacks"!==s){let l=document.querySelector(`input[name="${s}"]`);if(l){if(void 0!==l.value&&""!==l.value){let r=((s,a,l)=>{if(null==a)return l;let r=String(a).trim();if(""===r||"null"===r.toLowerCase())return null;if(e.has(s)){let e=Number(r);return Number.isNaN(e)?l:e}if(t.has(s)){if(""===r)return null;try{return JSON.parse(r)}catch{return l}}return"true"===r.toLowerCase()||"false"!==r.toLowerCase()&&r})(s,l.value,a);return[s,r]}return[s,null]}}else if("routing_strategy"===s)return[s,x.selectedStrategy];else if("enable_tag_filtering"===s)return[s,x.enableTagFiltering];else if("fallbacks"===s)return[s,f.length>0?f:null];else if("routing_strategy_args"===s&&"latency-based-routing"===x.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),s={};return e?.value&&(s.lowest_latency_buffer=Number(e.value)),t?.value&&(s.ttl=Number(t.value)),["routing_strategy_args",Object.keys(s).length>0?s:null]}return[s,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(s.routing_strategy),allowed_fails:a(s.allowed_fails,!0),cooldown_time:a(s.cooldown_time,!0),num_retries:a(s.num_retries,!0),timeout:a(s.timeout,!0),retry_after:a(s.retry_after,!0),fallbacks:f.length>0?f:null,context_window_fallbacks:a(s.context_window_fallbacks),retry_policy:a(s.retry_policy),model_group_alias:a(s.model_group_alias),enable_tag_filtering:x.enableTagFiltering,routing_strategy_args:a(s.routing_strategy_args)}};(0,s.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>{A.current=!0,p({router_settings:E()})},100);return()=>clearTimeout(e)},[x,f]);let F=Array.from(new Set(v.map(e=>e.model_group))).sort();return((0,s.useImperativeHandle)(h,()=>({getValue:()=>({router_settings:E()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(r.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:x,onChange:y,routerFieldsMetadata:S,availableRoutingStrategies:w,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(d.FallbackSelectionForm,{groups:j,onGroupsChange:e=>{b(e),_(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:F,maxGroups:5})})]})]})}):null});m.displayName="RouterSettingsAccordion",e.s(["default",0,m])},575260,e=>{"use strict";var t=e.i(843476),s=e.i(199133),a=e.i(482725),l=e.i(56456);e.s(["default",0,({projects:e,value:r,onChange:i,disabled:n,loading:o,teamId:c})=>{let d=c?e?.filter(e=>e.team_id===c):e;return(0,t.jsx)(s.Select,{showSearch:!0,placeholder:"Search or select a project",value:r,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 s=d?.find(e=>e.project_id===t.key);if(!s)return!1;let a=e.toLowerCase().trim(),l=(s.project_alias||"").toLowerCase(),r=(s.project_id||"").toLowerCase();return l.includes(a)||r.includes(a)},optionFilterProp:"children",children:!o&&d?.map(e=>(0,t.jsxs)(s.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),s=e.i(207082),a=e.i(109799),l=e.i(510674),r=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),x=e.i(350967),y=e.i(599724),f=e.i(779241),_=e.i(629569),j=e.i(464571),b=e.i(808613),v=e.i(311451),N=e.i(212931),w=e.i(91739),k=e.i(199133),S=e.i(790848),C=e.i(262218),T=e.i(592968),I=e.i(898586),A=e.i(374009),L=e.i(271645),E=e.i(708347),F=e.i(552130),M=e.i(557662),O=e.i(9314),P=e.i(860585),$=e.i(82946),R=e.i(392110),V=e.i(533882),B=e.i(844565),G=e.i(651904),z=e.i(939510),D=e.i(460285),K=e.i(663435),U=e.i(363256),q=e.i(575260),W=e.i(371455),H=e.i(319312),Q=e.i(355619),J=e.i(75921),Y=e.i(234713),X=e.i(390605),Z=e.i(727749),ee=e.i(764205),et=e.i(237016),es=e.i(888259);let ea=({apiKey:e})=>{let[s,a]=(0,L.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)(et.CopyToClipboard,{text:e,onCopy:()=>{a(!0),es.default.success("Key copied to clipboard"),setTimeout(()=>a(!1),2e3)},children:(0,t.jsx)(j.Button,{type:"primary",style:{marginTop:12},children:s?"Copied!":"Copy Virtual Key"})})]})};e.s(["default",0,ea],364769);var el=e.i(435451),er=e.i(916940);let{Option:ei}=k.Select,en=async(e,t,s,a)=>{try{if(null===e||null===t)return[];if(null!==s){let l=(await (0,ee.modelAvailableCall)(s,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),[]}},eo=async(e,t,s,a)=>{try{if(null===e||null===t)return;if(null!==s){let l=(await (0,ee.modelAvailableCall)(s,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:et,data:es,addKey:ec,autoOpenCreate:ed,prefillData:eu})=>{let{accessToken:em,userId:ep,userRole:eg,premiumUser:eh}=(0,n.default)(),ex=eh||null!=eg&&E.rolesWithWriteAccess.includes(eg),{data:ey,isLoading:ef}=(0,a.useOrganizations)(),{data:e_,isLoading:ej}=(0,l.useProjects)(),{data:eb}=(0,i.useUISettings)(),{data:ev}=(0,r.useTags)(),eN=!!eb?.values?.enable_projects_ui,ew=!!eb?.values?.disable_custom_api_keys,ek=ev?Object.values(ev).map(e=>({value:e.name,label:e.name})):[],eS=(0,d.useQueryClient)(),[eC]=b.Form.useForm(),[eT,eI]=(0,L.useState)(!1),[eA,eL]=(0,L.useState)(null),[eE,eF]=(0,L.useState)(null),[eM,eO]=(0,L.useState)([]),[eP,e$]=(0,L.useState)([]),[eR,eV]=(0,L.useState)("you"),[eB,eG]=(0,L.useState)(!1),[ez,eD]=(0,L.useState)(null),[eK,eU]=(0,L.useState)([]),[eq,eW]=(0,L.useState)([]),[eH,eQ]=(0,L.useState)([]),[eJ,eY]=(0,L.useState)([]),[eX,eZ]=(0,L.useState)(e),[e0,e1]=(0,L.useState)(null),[e2,e4]=(0,L.useState)(null),[e5,e3]=(0,L.useState)(!1),[e6,e7]=(0,L.useState)(null),[e8,e9]=(0,L.useState)({}),[te,tt]=(0,L.useState)([]),[ts,ta]=(0,L.useState)(!1),[tl,tr]=(0,L.useState)([]),[ti,tn]=(0,L.useState)([]),[to,tc]=(0,L.useState)("llm_api"),[td,tu]=(0,L.useState)({}),[tm,tp]=(0,L.useState)(!1),[tg,th]=(0,L.useState)("30d"),[tx,ty]=(0,L.useState)(null),[tf,t_]=(0,L.useState)([]),[tj,tb]=(0,L.useState)(0),[tv,tN]=(0,L.useState)([]),[tw,tk]=(0,L.useState)(null),tS=()=>{eI(!1),eC.resetFields(),eY([]),tn([]),tc("llm_api"),tu({}),tp(!1),th("30d"),ty(null),tb(e=>e+1),tk(null),e1(null),e4(null),t_([])},tC=()=>{eI(!1),eL(null),eZ(null),eC.resetFields(),eY([]),tn([]),tc("llm_api"),tu({}),tp(!1),th("30d"),ty(null),tb(e=>e+1),tk(null),e1(null),e4(null),t_([])};(0,L.useEffect)(()=>{ep&&eg&&em&&eo(ep,eg,em,eO)},[em,ep,eg]),(0,L.useEffect)(()=>{em&&(0,ee.getAgentsList)(em).then(e=>tN(e?.agents||[])).catch(()=>tN([]))},[em]),(0,L.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ee.getPoliciesList)(em)).policies.map(e=>e.policy_name);eW(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ee.getPromptsList)(em);eQ(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ee.getGuardrailsList)(em)).guardrails.map(e=>e.guardrail_name);eU(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[em]),(0,L.useEffect)(()=>{(async()=>{try{if(em){let e=sessionStorage.getItem("possibleUserRoles");if(e)e9(JSON.parse(e));else{let e=await (0,ee.getPossibleUserRoles)(em);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),e9(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[em]),(0,L.useEffect)(()=>{if(ed&&!eB&&et&&eg&&E.rolesWithWriteAccess.includes(eg)&&(eI(!0),eG(!0),eu)){if(eu.owned_by&&("another_user"===eu.owned_by&&"Admin"!==eg?eV("you"):eV(eu.owned_by)),eu.team_id){let e=et?.find(e=>e.team_id===eu.team_id)||null;e&&(eZ(e),eC.setFieldsValue({team_id:eu.team_id}))}eu.key_alias&&eC.setFieldsValue({key_alias:eu.key_alias}),eu.models&&eu.models.length>0&&eD(eu.models),eu.key_type&&(tc(eu.key_type),eC.setFieldsValue({key_type:eu.key_type}))}},[ed,eu,et,eB,eC,eg]);let tT=eP.includes("no-default-models")&&!eX,tI=async e=>{try{let t,a=e?.key_alias??"",l=e?.team_id??null;if((es?.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(Z.default.info("Making API Call"),eI(!0),"you"===eR)e.user_id=ep;else if("agent"===eR){if(!tw)return void Z.default.fromBackend("Please select an agent");e.agent_id=tw}let r={};try{r=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===eR&&(r.service_account_id=e.key_alias),eJ.length>0&&(r={...r,logging:eJ.filter(e=>e.callback_name)}),ti.length>0){let e=(0,M.mapDisplayToInternalNames)(ti);r={...r,litellm_disabled_callbacks:e}}if(tm&&(e.auto_rotate=!0,e.rotation_interval=tg),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(r),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:s}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),s&&s.length>0&&(e.object_permission.mcp_access_groups=s),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:s}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),s&&s.length>0&&(e.object_permission.agent_access_groups=s),delete e.allowed_agents_and_groups}Object.keys(td).length>0&&(e.aliases=JSON.stringify(td)),tx?.router_settings&&Object.values(tx.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tx.router_settings);let n=tf.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n),t="service_account"===eR?await (0,ee.keyCreateServiceAccountCall)(em,e):await (0,ee.keyCreateCall)(em,ep,e),console.log("key create Response:",t),ec(t),eS.invalidateQueries({queryKey:s.keyKeys.lists()}),eL(t.key),eF(t.soft_budget),Z.default.success("Virtual Key Created"),eC.resetFields(),t_([]),localStorage.removeItem("userData"+ep)}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 s=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&&(s=a.message)}}else{let t=e?.error||e;t?.message&&(s=t.message)}}catch(e){}return t.includes("team_member_permission_error")||s.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);Z.default.fromBackend(e)}};(0,L.useEffect)(()=>{if(e2){let e=e_?.find(e=>e.project_id===e2);e$(e?.models??[]),eC.setFieldValue("models",[]);return}ep&&eg&&em&&en(ep,eg,em,eX?.team_id??null).then(e=>{e$(Array.from(new Set([...eX?.models??[],...e])))}),ez||eC.setFieldValue("models",[]),eC.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[eX,e2,em,ep,eg,eC]),(0,L.useEffect)(()=>{if(!ez||0===ez.length||!eP||0===eP.length)return;let e=ez.filter(e=>eP.includes(e));e.length>0&&eC.setFieldsValue({models:e}),eD(null)},[ez,eP,eC]),(0,L.useEffect)(()=>{if(!e2||!et)return;let e=e_?.find(e=>e.project_id===e2);if(!e?.team_id||eX?.team_id===e.team_id)return;let t=et.find(t=>t.team_id===e.team_id)||null;t&&(eZ(t),eC.setFieldValue("team_id",t.team_id))},[et,e2,e_]);let tA=async e=>{if(!e)return void tt([]);ta(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==em)return;let s=(await (0,ee.userFilterUICall)(em,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));tt(s)}catch(e){console.error("Error fetching users:",e),Z.default.fromBackend("Failed to search for users")}finally{ta(!1)}},tL=(0,L.useCallback)((0,A.default)(e=>tA(e),300),[em]);return(0,t.jsxs)("div",{children:[eg&&E.rolesWithWriteAccess.includes(eg)&&(0,t.jsx)(g.Button,{className:"mx-auto",onClick:()=>eI(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(N.Modal,{open:eT,width:1e3,footer:null,onOk:tS,onCancel:tC,children:(0,t.jsxs)(b.Form,{form:eC,onFinish:tI,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(T.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)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:eR,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===eg&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(C.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===eR&&(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(T.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"===eR,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)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:e=>{tL(e)},onSelect:(e,t)=>{let s;return s=t.user,void eC.setFieldsValue({user_id:s.user_id})},options:te,loading:ts,allowClear:!0,style:{width:"100%"},notFoundContent:ts?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e3(!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"===eR&&(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)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tw,onChange:e=>tk(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tv.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)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(T.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)(U.default,{organizations:ey,loading:ef,disabled:"Admin"!==eg,onChange:e=>{e1(e||null),eZ(null),e4(null),eC.setFieldValue("team_id",void 0),eC.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(T.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"===eR,message:"Please select a team for the service account"}],help:"service_account"===eR?"required":"",children:(0,t.jsx)(K.default,{disabled:null!==e2,organizationId:e0,onTeamSelect:e=>{eZ(e),e4(null),eC.setFieldValue("project_id",void 0),e?.organization_id?(e1(e.organization_id),eC.setFieldValue("organization_id",e.organization_id)):e||(e1(null),eC.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(T.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)(q.default,{projects:e_,teamId:eX?.team_id,loading:ej||!et,onChange:e=>{if(!e){e4(null),eZ(null),eC.setFieldValue("team_id",void 0);return}e4(e)}})})]}),tT&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.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."})}),!tT&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(_.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===eR||"another_user"===eR?"Key Name":"Service Account ID"," ",(0,t.jsx)(T.Tooltip,{title:"you"===eR||"another_user"===eR?"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"===eR?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(T.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"===to||"read_only"===to?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===to||"read_only"===to,onChange:e=>{e.includes("all-team-models")&&eC.setFieldsValue({models:["all-team-models"]})},children:[!e2&&(0,t.jsx)(ei,{value:"all-team-models",children:"All Team Models"},"all-team-models"),eP.map(e=>(0,t.jsx)(ei,{value:e,children:(0,Q.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(T.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)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tc(e),("management"===e||"read_only"===e)&&eC.setFieldsValue({models:[]})},children:[(0,t.jsx)(ei,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(ei,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(ei,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(I.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(I.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tT&&(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)(_.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.max_budget&&s>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(el.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(T.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)(P.default,{onChange:e=>eC.setFieldValue("budget_duration",e)})}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(T.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(c.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(H.BudgetWindowsEditor,{value:tf,onChange:t_})}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.tpm_limit&&s>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(el.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eC,showDetailedDescriptions:!0}),(0,t.jsx)(b.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(T.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,s)=>{if(s&&e&&null!==e.rpm_limit&&s>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(el.default,{step:1,width:400})}),(0,t.jsx)(z.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eC,showDetailedDescriptions:!0}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(T.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:ex?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ex,placeholder:ex?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eK.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(T.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:ex?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(S.Switch,{disabled:!ex,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(T.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:eh?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eh,placeholder:eh?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eq.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(T.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:eh?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eh,placeholder:eh?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(T.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)(O.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(T.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:eh?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(B.default,{onChange:e=>eC.setFieldValue("allowed_passthrough_routes",e),value:eC.getFieldValue("allowed_passthrough_routes"),accessToken:em,placeholder:eh?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!eh,teamId:eX?eX.team_id:null})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(T.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=>eC.setFieldValue("allowed_vector_store_ids",e),value:eC.getFieldValue("allowed_vector_store_ids"),accessToken:em,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(T.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)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(T.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)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:ek})}),(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)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(T.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)(J.default,{onChange:e=>eC.setFieldValue("allowed_mcp_servers_and_groups",e),value:eC.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:em,teamId:eX?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(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.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)(X.default,{accessToken:em,selectedServers:(eC.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==Y.NO_MCP_SERVERS_SENTINEL),toolPermissions:eC.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eC.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)(b.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(T.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)(F.default,{onChange:e=>eC.setFieldValue("allowed_agents_and_groups",e),value:eC.getFieldValue("allowed_agents_and_groups"),accessToken:em,placeholder:"Select agents or access groups (optional)"})})})]}),eh?(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)(G.default,{value:eJ,onChange:eY,premiumUser:!0,disabledCallbacks:ti,onDisabledCallbacksChange:tn})})})]}):(0,t.jsx)(T.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)(G.default,{value:eJ,onChange:eY,premiumUser:!1,disabledCallbacks:ti,onDisabledCallbacksChange:tn})})})]})}),(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)(D.default,{accessToken:em||"",value:tx||void 0,onChange:ty,modelData:eM.length>0?{data:eM.map(e=>({model_name:e}))}:void 0},tj)})})]},`router-settings-accordion-${tj}`),(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)(y.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)(V.default,{accessToken:em,initialModelAliases:td,onAliasUpdate:tu,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)(R.default,{form:eC,autoRotationEnabled:tm,onAutoRotationChange:tp,rotationInterval:tg,onRotationIntervalChange:th,isCreateMode:!0})})}),(0,t.jsx)(b.Form.Item,{name:"duration",hidden:!0,initialValue:null,children:(0,t.jsx)(v.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)(T.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ee.proxyBaseUrl?`${ee.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)($.default,{schemaComponent:"GenerateKeyRequest",form:eC,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...ew?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tT,style:{opacity:tT?.5:1},children:"Create Key"})})]})}),e5&&(0,t.jsx)(N.Modal,{title:"Create New User",open:e5,onCancel:()=>e3(!1),footer:null,width:800,children:(0,t.jsx)(W.CreateUserButton,{userID:ep,accessToken:em,teams:et,possibleUIRoles:e8,onUserCreated:e=>{e7(e),eC.setFieldsValue({user_id:e}),e3(!1)},isEmbedded:!0})}),eA&&(0,t.jsx)(N.Modal,{open:eT,onOk:tS,onCancel:tC,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(_.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eA?(0,t.jsx)(ea,{apiKey:eA}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,en,"fetchUserModels",0,eo],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/a1ef280b7ad5ae6a.js b/litellm/proxy/_experimental/out/_next/static/chunks/0.75_v4.brf7u.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/chunks/a1ef280b7ad5ae6a.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0.75_v4.brf7u.js diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0.d2a_5_6-5pn.js b/litellm/proxy/_experimental/out/_next/static/chunks/0.d2a_5_6-5pn.js new file mode 100644 index 00000000000..9086fa0c010 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0.d2a_5_6-5pn.js @@ -0,0 +1,2 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,220508,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:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["CheckCircleIcon",0,r],220508)},503269,214520,601893,694421,140721,942803,35889,722678,e=>{"use strict";var t=e.i(271645),r=e.i(914189);e.s(["useControllable",0,function(e,n,i){let[o,s]=(0,t.useState)(i),a=void 0!==e,l=(0,t.useRef)(a),u=(0,t.useRef)(!1),c=(0,t.useRef)(!1);return!a||l.current||u.current?a||!l.current||c.current||(c.current=!0,l.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(u.current=!0,l.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?e:o,(0,r.useEvent)(e=>(a||s(e),null==n?void 0:n(e)))]}],503269),e.s(["useDefaultValue",0,function(e){let[r]=(0,t.useState)(e);return r}],214520);let n=(0,t.createContext)(void 0);function i(){return(0,t.useContext)(n)}e.s(["useDisabled",0,i],601893);var o=e.i(174080),s=e.i(746725);function a(e={},t=null,r=[]){for(let[n,i]of Object.entries(e))!function e(t,r,n){if(Array.isArray(n))for(let[i,o]of n.entries())e(t,l(r,i.toString()),o);else n instanceof Date?t.push([r,n.toISOString()]):"boolean"==typeof n?t.push([r,n?"1":"0"]):"string"==typeof n?t.push([r,n]):"number"==typeof n?t.push([r,`${n}`]):null==n?t.push([r,""]):a(n,r,t)}(r,l(t,n),i);return r}function l(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,r;let n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n){for(let t of n.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(r=n.requestSubmit)||r.call(n)}},"objectToFormEntries",0,a],694421);var u=e.i(700020),c=e.i(2788);let d=(0,t.createContext)(null);function f({children:e}){let r=(0,t.useContext)(d);if(!r)return t.default.createElement(t.default.Fragment,null,e);let{target:n}=r;return n?(0,o.createPortal)(t.default.createElement(t.default.Fragment,null,e),n):null}function p({setForm:e,formId:r}){return(0,t.useEffect)(()=>{if(r){let t=document.getElementById(r);t&&e(t)}},[e,r]),r?null:t.default.createElement(c.Hidden,{features:c.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let r=t.closest("form");r&&e(r)}})}e.s(["FormFields",0,function({data:e,form:r,disabled:n,onReset:i,overrides:o}){let[l,d]=(0,t.useState)(null),h=(0,s.useDisposables)();return(0,t.useEffect)(()=>{if(i&&l)return h.addEventListener(l,"reset",i)},[l,r,i]),t.default.createElement(f,null,t.default.createElement(p,{setForm:d,formId:r}),a(e).map(([e,i])=>t.default.createElement(c.Hidden,{features:c.HiddenFeatures.Hidden,...(0,u.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:n,name:e,value:i,...o})})))}],140721);let h=(0,t.createContext)(void 0);function m(){return(0,t.useContext)(h)}e.s(["useProvidedId",0,m],942803);var g=e.i(835696),v=e.i(294316);let b=(0,t.createContext)(null);b.displayName="DescriptionContext";let y=Object.assign((0,u.forwardRefWithAs)(function(e,r){let n=(0,t.useId)(),o=i(),{id:s=`headlessui-description-${n}`,...a}=e,l=function e(){let r=(0,t.useContext)(b);if(null===r){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return r}(),c=(0,v.useSyncRefs)(r);(0,g.useIsoMorphicEffect)(()=>l.register(s),[s,l.register]);let d=o||!1,f=(0,t.useMemo)(()=>({...l.slot,disabled:d}),[l.slot,d]),p={ref:c,...l.props,id:s};return(0,u.useRender)()({ourProps:p,theirProps:a,slot:f,defaultTag:"p",name:l.name||"Description"})}),{});e.s(["Description",0,y,"useDescribedBy",0,function(){var e,r;return null!=(r=null==(e=(0,t.useContext)(b))?void 0:e.value)?r:void 0},"useDescriptions",0,function(){let[e,n]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let i=(0,r.useEvent)(e=>(n(t=>[...t,e]),()=>n(t=>{let r=t.slice(),n=r.indexOf(e);return -1!==n&&r.splice(n,1),r}))),o=(0,t.useMemo)(()=>({register:i,slot:e.slot,name:e.name,props:e.props,value:e.value}),[i,e.slot,e.name,e.props,e.value]);return t.default.createElement(b.Provider,{value:o},e.children)},[n])]}],35889);let _=(0,t.createContext)(null);function E(e){var r,n,i;let o=null!=(n=null==(r=(0,t.useContext)(_))?void 0:r.value)?n:void 0;return(null!=(i=null==e?void 0:e.length)?i:0)>0?[o,...e].filter(Boolean).join(" "):o}_.displayName="LabelContext";let C=Object.assign((0,u.forwardRefWithAs)(function(e,n){var o;let s=(0,t.useId)(),a=function e(){let r=(0,t.useContext)(_);if(null===r){let t=Error("You used a