import { NextResponse } from "next/server"; import { getProviderInfoList, getOllamaModels } from "@/lib/analysis/providers/registry"; /** * GET /api/analyze/providers * * Returns all providers (available and unavailable) and the list of * locally available Ollama models (empty array if Ollama is unreachable). */ export async function GET() { const [providers, ollamaModels] = await Promise.all([ getProviderInfoList(), getOllamaModels(), ]); return NextResponse.json( { providers, ollamaModels }, { headers: { "Cache-Control": "no-store" } } ); }