UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 771 B
//!src/agents/image-compression-policy.ts async function resolveImageCompressionModelPolicy(e){async function resolvePolicyWithHooks(t){try{const{resolveModelAsync:n}=await import(`./model-X2vbd4LA.mjs`);return(await n(e.provider,e.model,e.agentDir,e.cfg,{abortSignal:e.abortSignal,allowBundledStaticCatalogFallback:true,skipProviderRuntimeHooks:t,skipAgentDiscovery:true,workspaceDir:e.workspaceDir,...e.preparedModelRuntime?{preparedModelRuntime:e.preparedModelRuntime}:{}})).model?.mediaInput?.image??{}}catch{e.abortSignal?.throwIfAborted();return{}}}const t=await resolvePolicyWithHooks(true);if(typeof t.maxSidePx===`number`||typeof t.maxPixels===`number`)return t;return{...await resolvePolicyWithHooks(false),...t}}export{resolveImageCompressionModelPolicy as t};