doxa-maps-cdn/server/utils
corsacca 7dfad0ee07 replace deepl with llm translation via openrouter
- translateText/translateTexts call OpenRouter chat-completions; glossary
  terms are prompt-injected from config/glossaries.ts, generated from the
  translation repo's TSVs by scripts/build-glossaries.ts
- model resolution: per-language override in config/languages.ts →
  translation.model site setting (new admin field) → TRANSLATION_MODEL env
  → anthropic/claude-opus-5, at low reasoning effort
- blank fragments are held back from the model, which drops them and breaks
  the one-translation-per-fragment count the caller maps results back on
- OpenRouter failures map to a typed error with a human-readable message;
  an unrecoverable one (no credits, bad key, rejected model) stops the run
  instead of repeating the same call for every remaining locale
- machine translations record source 'auto-translate'; 'deepl' stays
  readable for snapshots written before the switch
2026-09-07 16:30:48 +01:00
..
activity-logger.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00
auth.ts init 2026-04-21 12:12:54 +01:00
cmsCache.ts Let categories have child categories for nested pages. (#6) 2026-05-21 06:00:54 -05:00
countries.ts Replace country pages with region dashboards (#23) 2026-09-07 11:49:24 +01:00
database.ts build tweaks. 2026-05-20 13:06:54 +01:00
email-templates.ts User invitation (#3) 2026-04-28 06:26:59 -05:00
email.ts init 2026-04-21 12:12:54 +01:00
openrouter.ts replace deepl with llm translation via openrouter 2026-09-07 16:30:48 +01:00
rate-limit.ts init 2026-04-21 12:12:54 +01:00
rbac.ts init 2026-04-21 12:12:54 +01:00
renderTiptap.ts Central tiptap block definitions 2026-04-23 11:05:05 +01:00
site-settings.ts replace deepl with llm translation via openrouter 2026-09-07 16:30:48 +01:00
storage.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00
tiptapFromMarkdown.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00
tiptapLossyDetector.ts support vimeo video embeds alongside youtube in cms editor 2026-05-21 14:31:27 +01:00
tiptapToMarkdown.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00
tiptapValidate.ts support unlisted vimeo and fix video display. 2026-05-22 10:15:30 +01:00
translate.ts replace deepl with llm translation via openrouter 2026-09-07 16:30:48 +01:00
urlValidation.ts Implement CMS MCP 2026-04-29 13:06:54 +01:00