Skip to content

Refactor OpenRouter model config and add chunk-aware save with AI advisor enhancements #86exnxbwb#37

Merged
navidshad merged 3 commits into
devfrom
CU-86exnxbwb_Step-6-Build-PRFAQ-001-Phase-1-Productive-Retrieval-Smart-Review_Navid-Shad
May 21, 2026
Merged

Refactor OpenRouter model config and add chunk-aware save with AI advisor enhancements #86exnxbwb#37
navidshad merged 3 commits into
devfrom
CU-86exnxbwb_Step-6-Build-PRFAQ-001-Phase-1-Productive-Retrieval-Smart-Review_Navid-Shad

Conversation

@navidshad
Copy link
Copy Markdown
Contributor

@navidshad navidshad commented May 21, 2026

🏷️ 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

  • Centralizing model and pricing data simplifies maintenance and updates.
  • Chunk-aware save improves data handling efficiency by processing data in defined chunks.
  • AI advisor and bundle suggestion features provide smarter, context-aware recommendations during save operations.

📜 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

navidshad and others added 2 commits May 21, 2026 12:37
… 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>
@navidshad
Copy link
Copy Markdown
Contributor Author

Comment thread server/src/modules/translation/service.ts Outdated
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>
@navidshad navidshad changed the title Cu 86exnxbwb step 6 build prfaq 001 phase 1 productive retrieval smart review navid shad Refactor OpenRouter model config and add chunk-aware save with AI advisor enhancements #86exnxbwb May 21, 2026
@navidshad navidshad merged commit 65efa33 into dev May 21, 2026
6 checks passed
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