UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

16 lines (15 loc) • 742 B
import { l as normalizeOptionalString } from "./string-coerce-CCIiB4H7.mjs"; import { t as areRuntimeModelRefsEquivalent } from "./model-runtime-aliases-DZy9Ea2c.mjs"; //#region src/status/fallback-notice-state.ts function resolveActiveFallbackState(e) { const t = normalizeOptionalString(e.state?.fallbackNotice?.selectedModel); const n = normalizeOptionalString(e.state?.fallbackNotice?.activeModel); const r = normalizeOptionalString(e.state?.fallbackNotice?.reason); const i = t === e.selectedModelRef && n === e.activeModelRef && !areRuntimeModelRefsEquivalent(e.selectedModelRef, e.activeModelRef, { config: e.config }); return { active: i, reason: i ? r : void 0 }; } //#endregion export { resolveActiveFallbackState as t };