Skip to content

Feat: Translation - #9

Open
huanga wants to merge 3 commits into
dmilin1:mainfrom
huanga:main
Open

Feat: Translation#9
huanga wants to merge 3 commits into
dmilin1:mainfrom
huanga:main

Conversation

@huanga

@huanga huanga commented Feb 21, 2026

Copy link
Copy Markdown

Just a quick hack to kick it over the LLM for translation. Uses the same AI token accounting functionality from other LLM features, so it shouldn't impact operational cost. Supported languages based on popular languages as suggested by Perplexity search. I've tested several of the languages and the translations seem correct when routed through groq provider. I do not have OpenAI key to test with OpenAI models, but I'd imagine they'd function as intended as well.

…le translate endpoint

DRY: merge two nearly-identical route handlers (shared system prompt,
language-name mapping, model selection, subscription/spend checks) into
one /api/ai/translate route accepting type: "post" | "comment".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant