import { NextResponse } from 'next/server';
import { withErrorHandler } from '@server/middleware/withErrorHandler';
import { withAuth } from '@server/middleware/withAuth';
import { getProvidersForUI } from '@server/services/ai-providers.service';

export const GET = withErrorHandler(
  withAuth(async () => {
    const providers = await getProvidersForUI();
    return NextResponse.json({ providers });
  })
);
