UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.15 kB
import{l as normalizeOptionalString}from"./string-coerce-CpTFcSwY.mjs";import{p as sanitizeConfiguredModelProviderRequest}from"./provider-request-config-BQ-HhEKu.mjs";import"./string-coerce-runtime-BYDH9Quw.mjs";import{h as resolveProviderHttpRequestConfig}from"./shared-BGvdIfYO.mjs";import{a as resolveApiKeyForProvider}from"./provider-auth-runtime-NQRl8Lp4.mjs";import"./provider-http-D0sVd8r_.mjs"; //!extensions/fal/http-config.ts const DEFAULT_FAL_BASE_URL=`https://fal.run`;async function resolveFalHttpRequestConfig(e){const t=await resolveApiKeyForProvider({provider:`fal`,cfg:e.req.cfg,agentDir:e.req.agentDir,store:e.req.authStore});if(!t.apiKey)throw new Error(`fal API key missing`);return resolveProviderHttpRequestConfig({baseUrl:normalizeOptionalString(e.req.cfg?.models?.providers?.fal?.baseUrl),defaultBaseUrl:DEFAULT_FAL_BASE_URL,request:sanitizeConfiguredModelProviderRequest(e.req.cfg?.models?.providers?.fal?.request),allowPrivateNetwork:false,defaultHeaders:{Authorization:`Key ${t.apiKey}`,"Content-Type":`application/json`},provider:`fal`,capability:e.capability,transport:`http`})}export{resolveFalHttpRequestConfig as t};