manifest
Version:
Self-hosted Manifest LLM router with embedded server, SQLite database, and dashboard
2 lines (1 loc) • 2.7 kB
JavaScript
import{e as i,q as t,B as n}from"./index-C4Qw7vZo.js";function u(e){return i(`/routing/${encodeURIComponent(e)}/status`)}function a(e){return i(`/routing/${encodeURIComponent(e)}/providers`)}function p(e,o){return t(`${n}/routing/${encodeURIComponent(e)}/providers`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})}function m(e){return t(`${n}/routing/${encodeURIComponent(e)}/providers/deactivate-all`,{method:"POST"})}function l(e,o,r){const s=`${n}/routing/${encodeURIComponent(e)}/providers/${encodeURIComponent(o)}`,d=r?`${s}?authType=${r}`:s;return t(d,{method:"DELETE"})}function $(e){return t(`${n}/routing/${encodeURIComponent(e)}/copilot/device-code`,{method:"POST"})}async function C(e,o){const r=await fetch(`${n}/routing/${encodeURIComponent(e)}/copilot/poll-token`,{credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:o})});if(!r.ok)throw new Error(`Poll failed: ${r.status}`);return r.json()}function f(e){return i(`/routing/${encodeURIComponent(e)}/tiers`)}function g(e,o,r,s,d){return t(`${n}/routing/${encodeURIComponent(e)}/tiers/${encodeURIComponent(o)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:r,provider:s,...d&&{authType:d}})})}function U(e,o){return t(`${n}/routing/${encodeURIComponent(e)}/tiers/${encodeURIComponent(o)}`,{method:"DELETE"})}function R(e){return t(`${n}/routing/${encodeURIComponent(e)}/tiers/reset-all`,{method:"POST"})}function h(e,o,r){return t(`${n}/routing/${encodeURIComponent(e)}/tiers/${encodeURIComponent(o)}/fallbacks`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({models:r})})}function I(e,o){return t(`${n}/routing/${encodeURIComponent(e)}/tiers/${encodeURIComponent(o)}/fallbacks`,{method:"DELETE"})}function T(e){return i(`/routing/${encodeURIComponent(e)}/available-models`)}function v(e){return t(`${n}/routing/${encodeURIComponent(e)}/refresh-models`,{method:"POST"})}function P(e){return i(`/routing/${encodeURIComponent(e)}/custom-providers`)}function y(e,o){return t(`${n}/routing/${encodeURIComponent(e)}/custom-providers`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})}function S(e,o,r){return t(`${n}/routing/${encodeURIComponent(e)}/custom-providers/${encodeURIComponent(o)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}function b(e,o){return t(`${n}/routing/${encodeURIComponent(e)}/custom-providers/${encodeURIComponent(o)}`,{method:"DELETE"})}export{u as a,l as b,y as c,b as d,$ as e,C as f,P as g,p as h,I as i,m as j,R as k,f as l,T as m,a as n,g as o,v as p,U as r,h as s,S as u};