"use strict";(()=>{var e={};e.id=7830,e.ids=[7830],e.modules={20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},12104:(e,t,a)=>{a.r(t),a.d(t,{originalPathname:()=>c,patchFetch:()=>g,requestAsyncStorage:()=>p,routeModule:()=>m,serverHooks:()=>d,staticGenerationAsyncStorage:()=>u});var r={};a.r(r),a.d(r,{GET:()=>l});var o=a(49303),s=a(88716),n=a(60670),i=a(87070);async function l(){let e;try{let t=new AbortController;e=setTimeout(()=>t.abort(),3e3);let a=await fetch("http://localhost:11434/api/tags",{signal:t.signal,cache:"no-store"});if(!a.ok)return i.NextResponse.json({models:[],error:`Ollama returned status ${a.status}`},{status:200});let r=((await a.json()).models??[]).map(e=>({name:"string"==typeof e.name?e.name:"",size:"number"==typeof e.size?e.size:0,parameterSize:"string"==typeof e.details?.parameter_size?e.details.parameter_size:""})).filter(e=>e.name.length>0);return i.NextResponse.json({models:r},{status:200})}catch(t){let e=t instanceof Error?t.message:String(t);return i.NextResponse.json({models:[],error:`Ollama is not available: ${e}`},{status:200})}finally{e&&clearTimeout(e)}}let m=new o.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/ollama/models/route",pathname:"/api/ollama/models",filename:"route",bundlePath:"app/api/ollama/models/route"},resolvedPagePath:"/home/runner/work/CommandMate/CommandMate/src/app/api/ollama/models/route.ts",nextConfigOutput:"",userland:r}),{requestAsyncStorage:p,staticGenerationAsyncStorage:u,serverHooks:d}=m,c="/api/ollama/models/route";function g(){return(0,n.patchFetch)({serverHooks:d,staticGenerationAsyncStorage:u})}}};var t=require("../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[8948,5972],()=>a(12104));module.exports=r})();