UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

45 lines (44 loc) • 1.06 kB
//#region src/commands/doctor-hooks-model.ts async function collectHooksModelIssues(e) { const t = e.hooks?.gmail?.model; if (!t?.trim()) return []; const { DEFAULT_MODEL: n, DEFAULT_PROVIDER: r } = await import("./defaults-DRPry3dD.mjs"); const { readPreparedModelCatalog: i } = await import("./prepared-model-catalog-guV7T9CV.mjs"); const { getModelRefStatus: a, resolveConfiguredModelRef: o, resolveHooksGmailModel: s } = await import("./model-selection-MVvzg347.mjs"); const c = s({ cfg: e, defaultProvider: r }); if (!c) return [{ kind: "unresolved", model: t }]; const l = o({ cfg: e, defaultProvider: r, defaultModel: n }); const u = a({ cfg: e, catalog: await i({ config: e, readOnly: true, providerDiscoveryProviderIds: [] }), ref: c, defaultProvider: l.provider, defaultModel: l }); const d = []; if (!u.allowed) d.push({ kind: "not-allowed", model: u.key }); if (!u.inCatalog) d.push({ kind: "not-in-catalog", model: u.key }); return d; } //#endregion export { collectHooksModelIssues };