pediatric-ai-scribe-v3/src/routes
Daniel e5f7167b8d fix: auth/API logging to Loki, TTS voice auto-detection, STT ElevenLabs support
- Add logger.audit/access calls to auth route (login, login_failed,
  login_blocked, register, password_changed, 2fa_backup_code_used,
  2fa_backup_codes_regenerated) — these previously only wrote to DB
  via raw SQL, bypassing Loki shipper
- Replace logger.info with logger.apiCall in callAI() so every AI call
  ships to Loki with model, tokens, cost, duration
- Add device identifier (parsed user agent) to audit and access logs
- Fix TTS voice/model provider mismatch: auto-detect Vertex voices
  (Puck, Charon, Kore, etc.) and ElevenLabs voice IDs, override model
  to match provider regardless of what model was previously set
- Fix TTS discovery: model IDs saved to tts.voice are detected and
  redirected to tts.model (regex for openai-tts, elevenlabs, vertex-tts)
- Fix STT transcription route: add scribe/elevenlabs/transcri to the
  isTranscriptionModel regex so ElevenLabs Scribe uses /audio/transcriptions
  endpoint instead of chat completions
- Remove OpenObserve/SigNoz code from logger (reverted to Loki-only)
2026-04-19 21:26:49 +02:00
..
admin.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
adminConfig.js fix: auth/API logging to Loki, TTS voice auto-detection, STT ElevenLabs support 2026-04-19 21:26:49 +02:00
adminMilestones.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
audioBackups.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
auth.js fix: auth/API logging to Loki, TTS voice auto-detection, STT ElevenLabs support 2026-04-19 21:26:49 +02:00
billing.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
chartReview.js Prompt-injection wrap: remaining AI routes 2026-04-14 05:31:54 +02:00
documents.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
encounters.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
hospitalCourse.js Prompt-injection wrap: remaining AI routes 2026-04-14 05:31:54 +02:00
hpi.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
learningAdmin.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
learningAI.js feat: neonatal calculator, DOCX/PPTX/ODT/EPUB support, gateway-agnostic URL helper, TTS/STT fixes 2026-04-19 02:17:06 +02:00
learningHub.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
logs.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
memories.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
milestones.js Prompt-injection wrap: remaining AI routes 2026-04-14 05:31:54 +02:00
nextcloud.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
oidc.js Fix local-auth sections not showing for normal users + backup-code modal signature 2026-04-14 04:43:07 +02:00
refine.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
sessions.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
sickVisit.js Prompt-injection wrap: remaining AI routes 2026-04-14 05:31:54 +02:00
soap.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
transcribe.js fix: auth/API logging to Loki, TTS voice auto-detection, STT ElevenLabs support 2026-04-19 21:26:49 +02:00
tts.js fix: auth/API logging to Loki, TTS voice auto-detection, STT ElevenLabs support 2026-04-19 21:26:49 +02:00
userPreferences.js Stop leaking e.message to clients across all routes 2026-04-14 03:04:24 +02:00
wellVisit.js Prompt-injection wrap: remaining AI routes 2026-04-14 05:31:54 +02:00