MediBot / app /api /models /route.ts
github-actions[bot]
Deploy MedOS Global from 0b9218f6
102e23b
raw
history blame contribute delete
437 Bytes
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
);
}
}