Tüm AI çağrıları artık ortak lib/aiClient.ts üzerinden gidiyor:
- /v1/chat/completions yerine native /api/chat (think:false burada
güvenilir çalışıyor)
- keep_alive:30m ile model her istekte bellekten atılıp soğuk
başlamıyor
- num_predict ile öngörülemez uzunlukta üretime üst sınır
- İnteraktif sohbet uç noktaları (chatMessage, sendThreadMessage)
artık SSE ile token token akıtıyor
- Dosya sohbetinde varsayılan olarak belgenin tam metni değil analiz
özeti gönderiliyor; tam metin sadece kullanıcı açıkça isterse
eklenir
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- summarizeCase: if an iddianame is among the case's documents, run a
narrow first-pass analysis on it alone (isnatEdilenSuc, iddiaOzeti,
onemliTarihler), then feed that as context into the general
case-wide evaluation instead of treating every document equally.
- ANALYSIS_SYSTEM_PROMPT no longer asks the AI to guess "taraflar" -
that now comes from real UYAP data (cases.parties) instead.
- Removed the hardcoded RunPod proxy URL fallback from every call
site (document/chat/precedent controllers + lib/openai.ts) - it was
a real infra endpoint checked into source. New lib/aiConfig.ts
throws if RUNPOD_API_BASE_URL isn't set rather than silently
falling back to it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Takes the user's described situation plus the top search results and
asks the AI model for a short legal assessment. Auth-protected since
it's a paid AI call.