import { NextResponse } from 'next/server' import { getSystemConfig } from '@/lib/config' import { auth } from '@/auth' export async function GET() { const session = await auth() if (!session?.user?.id) { return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } try { const config = await getSystemConfig() const available = !!( config.WEB_SEARCH_PROVIDER || config.BRAVE_SEARCH_API_KEY || config.SEARXNG_URL || config.JINA_API_KEY ) return NextResponse.json({ available }) } catch { return NextResponse.json({ available: false }) } }