File size: 437 Bytes
cb6a2d8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import { NextResponse } from 'next/server';
import { fetchAvailableModels } from '@/lib/providers/ollabridge-models';
export async function GET() {
try {
const models = await fetchAvailableModels();
return NextResponse.json({ models });
} catch {
return NextResponse.json(
{ models: [], error: 'Failed to fetch models' },
{ status: 200 } // Return 200 with empty array — non-critical endpoint
);
}
}
|