import { getBackendBaseURL } from "../config"; import type { ModelsResponse } from "./types"; export async function loadModels(): Promise { const res = await fetch(`${getBackendBaseURL()}/api/models`); const data = (await res.json()) as Partial; return { models: data.models ?? [], token_usage: data.token_usage ?? { enabled: false }, }; }