function e(e){let t=[],n=new Map;return e.forEach(e=>{!e.models||e.models.length===0||e.models.forEach(r=>{if(!r.isActive)return;let i=r.model||r.id;if(n.has(i)){let t=n.get(i);t.providers.includes(e.provider)||t.providers.push(e.provider)}else{let a={id:r.id,name:r.name,chef:e.name,chefSlug:e.provider,providers:[e.provider],providerSortOrder:e.sortOrder,providerCreatedAt:e.createdAt,features:r.features,thinking:r.thinking,enableThinkingParam:r.enableThinkingParam,billingRule:r.billingRule,iconUrl:e.iconUrl,membershipLevel:r.membershipLevel};n.set(i,a),t.push(a)}})}),t}export{e as t};