const r=[{cors:"proxy",envKeys:["GOOGLE_AI_API_KEY"],id:"google-ai",label:"Google AI",model:"gemini-3.1-flash-lite-preview"},{cors:"proxy",envKeys:["ANTHROPIC_API_KEY"],id:"anthropic",label:"Anthropic",model:"claude-haiku-4-5-20251001"},{cors:"proxy",envKeys:["OPENAI_API_KEY"],id:"openai",label:"OpenAI",model:"gpt-4o-mini"},{cors:"proxy",envKeys:["MISTRAL_API_KEY"],id:"mistral",label:"Mistral",model:"mistral-small-2506"},{cors:"direct",envKeys:["LITELLM_API_KEY","LITELLM_BASE_URL"],extraEnvKeys:["LITELLM_MODEL"],id:"litellm",label:"LiteLLM",model:"open-large"}];function s(n,d){if(d){const e=r.find(o=>o.id===d);if(e){if(e.cors==="direct"){const o=typeof window<"u"?window.process?.env??{}:{};if(e.envKeys.every(i=>!!o[i]))return{model:e.model,provider:e.id}}else if(n?.[e.id])return{model:e.model,provider:e.id}}}const l=typeof window<"u"?window.process?.env??{}:{};for(const e of r)if(e.cors==="direct"){if(e.envKeys.every(i=>!!l[i]))return{model:e.model,provider:e.id}}else if(n?.[e.id])return{model:e.model,provider:e.id};return null}export{r as P,s as d};
