Refactor OpenRouter model config and add chunk-aware save with AI advisor enhancements #86exnxbwb#37
Merged
navidshad merged 3 commits intoMay 21, 2026
Conversation
… suggestion
PRFAQ-001 Phase 1 (server, CU-86exnxn8c):
- Replace actual_phrase with chunks[{text,type,transliteration,confidence}];
drop linguistic_data.examples[], phonetic.ipa, and RelatedExpressionSchema.
- getDetailedTranslation gains pageTitle/pageUrl inputs + suggested_bundle_name
output; per-chunk + source-phrase transliteration in the target alphabet.
- New translationAdvice RPC: Q&A tutor (reply) with optional chunk edits and
conversation history.
- normaliseSourceUrl util; persist chunks + normalised sourceUrl on phrase docs.
- Tests for url-normalise and createPhrase persistence.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each chunk now carries its own short definition (alongside its transliteration), so multi-chunk phrases get one explanation per pattern instead of a single combined paragraph. Persisted on the phrase document. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
navidshad
commented
May 21, 2026
Addresses PR review: define allowed models and their pricing in utils/openrouter-models.ts (TRANSLATION_MODELS) instead of duplicating the hardcoded ids/pricing comments across the translation service. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🏷️ PR Title: Refactor OpenRouter model config and add chunk-aware save with AI advisor enhancements
📋 Summary
This PR refactors the OpenRouter model list and pricing by moving them into a centralized configuration. It introduces per-chunk definitions for chunk-aware save functionality and enhances the translation and phrase modules with a chunk-aware save schema, an AI advisor, and bundle suggestions.
🔗 Related Tasks
#f6e9fc5 - Refactor OpenRouter model list and pricing to config
#363fe39 - Add per-chunk definition for chunk-aware save
#82abb5e - Implement chunk-aware save schema, AI advisor, and bundle suggestion
📝 Additional Details
📜 Commit List
f6e9fc5 Refactor(translation): move OpenRouter model list + pricing to a config
363fe39 feat(translation): per-chunk definition for chunk-aware save
82abb5e feat(translation,phrase): chunk-aware save schema, AI advisor, bundle suggestion