UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 820 B
import{o as normalizeLowercaseStringOrEmpty}from"./string-coerce-CpTFcSwY.mjs";import{o as normalizeModelRef}from"./model-ref-shared-T-aCqInj.mjs";import{n as findNormalizedProviderValue$1}from"./provider-id-A-8WTtLA.mjs"; //!src/agents/model-selection-normalize.ts const OPENROUTER_AUTO_COMPAT_ALIAS=`openrouter:auto`;function findNormalizedProviderValue(e,t){return findNormalizedProviderValue$1(e,t)}function parseModelRef(e,t,n){const r=e.trim();if(!r)return null;if(normalizeLowercaseStringOrEmpty(r)===OPENROUTER_AUTO_COMPAT_ALIAS)return normalizeModelRef(`openrouter`,`auto`,n);const i=r.indexOf(`/`);if(i===-1)return normalizeModelRef(t,r,n);const a=r.slice(0,i).trim();const o=r.slice(i+1).trim();if(!a||!o)return null;return normalizeModelRef(a,o,n)}export{parseModelRef as n,findNormalizedProviderValue as t};