UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

35 lines (34 loc) • 1.13 kB
import { resolveMergedModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared"; //#region extensions/bifrost/provider-catalog.ts var provider_catalog_default = { id: "bifrost", label: "Bifrost", docsPath: "/providers/bifrost", envVars: ["BIFROST_VIRTUAL_KEY"], auth: [], catalog: { order: "simple", run: async (e) => { if (e.providerIds && !e.providerIds.includes("bifrost")) return null; const t = resolveMergedModelProviderConfig(e.config, "bifrost"); if (!t) return null; const n = e.resolveProviderApiKey("bifrost"); const [{ listBifrostModels: r }, { runLiveProviderCatalog: i }] = await Promise.all([import("./.setup/models-BXvd3nls.mjs"), import("openclaw/plugin-sdk/provider-catalog-live-runtime")]); const a = await i({ providerId: "bifrost", profileId: n.profileId, run: async () => ({ provider: { ...await r({ ...e, apiKey: n.discoveryApiKey }), apiKey: t.auth === "none" ? void 0 : t.apiKey ?? n.apiKey } }) }); e.signal?.throwIfAborted(); return a; } } }; //#endregion export { provider_catalog_default as default };