feat: GPT-4.1 optimierte Ergänzungssuche bei Maps-Lücke

Wenn Google Maps weniger Leads findet als angefragt, wird automatisch
eine optimierte Suchanfrage via GPT-4.1 generiert und als SERP-Job
gestartet, um die Lücke zu füllen. Die KI-Query wird im LoadingCard
angezeigt. Fallback auf Original-Query wenn kein OpenAI-Key konfiguriert.

- lib/services/openai.ts: GPT-4.1 Query-Generator
- app/api/search/supplement: neuer Endpoint (GPT + SERP-Job)
- LoadingCard: ruft /api/search/supplement statt direkt SERP
- apiKey.ts + .env.local.example: openai Key-Support

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
TimoUttenweiler
2026-04-01 10:43:33 +02:00
parent aa6707b8bc
commit 89a176700d
7 changed files with 156 additions and 20 deletions

View File

@@ -27,6 +27,7 @@
"lucide-react": "^0.577.0",
"next": "16.1.7",
"next-themes": "^0.4.6",
"openai": "^6.33.0",
"papaparse": "^5.5.3",
"prisma": "^7.5.0",
"react": "19.2.3",