Repository navigation
feat(i18n): add internationalization support for combo features and dashboard components #1318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
diegosouzapw
merged 4 commits into
cheaper-inference:release/v3.6.7
from
clousky2020:feat/i18n-clean
Apr 16, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1992516
🌐 i18n(combos): add internationalization support for agent features s…
clousky2020 cba6524
feat(combos): add new routing strategies and i18n support
clousky2020 f07c7ae
fix(i18n): add Chinese i18n support to remaining dashboard components
clousky2020 9a54e09
fix(i18n): add Chinese i18n support to Loading.tsx
clousky2020 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,6 +120,21 @@ const STRATEGY_GUIDANCE_FALLBACK = { | |
| avoid: "Avoid when models have different quality or latency and order matters.", | ||
| example: "Example: Multiple accounts of the same model to distribute usage evenly.", | ||
| }, | ||
| auto: { | ||
| when: "Use when you have one preferred model and only want fallback on failure.", | ||
| avoid: "Avoid when you need balanced load between models.", | ||
| example: "Example: Primary coding model with cheaper backup for outages.", | ||
| }, | ||
| lkgp: { | ||
| when: "Use when you have one preferred model and only want fallback on failure.", | ||
| avoid: "Avoid when you need balanced load between models.", | ||
| example: "Example: Primary coding model with cheaper backup for outages.", | ||
| }, | ||
| "context-optimized": { | ||
| when: "Use when you have one preferred model and only want fallback on failure.", | ||
| avoid: "Avoid when you need balanced load between models.", | ||
| example: "Example: Primary coding model with cheaper backup for outages.", | ||
| }, | ||
| }; | ||
|
|
||
| const ADVANCED_FIELD_HELP_FALLBACK = { | ||
|
|
@@ -224,6 +239,33 @@ const STRATEGY_RECOMMENDATIONS_FALLBACK = { | |
| "Guarantees no model is skipped or repeated within a cycle.", | ||
| ], | ||
| }, | ||
| auto: { | ||
| title: "Fail-safe baseline", | ||
| description: "Use one primary model and keep fallback chain short and reliable.", | ||
| tips: [ | ||
| "Put your most reliable model first.", | ||
| "Keep 1-2 backup models with similar quality.", | ||
| "Use safe retries to absorb transient provider failures.", | ||
| ], | ||
| }, | ||
| lkgp: { | ||
| title: "Fail-safe baseline", | ||
| description: "Use one primary model and keep fallback chain short and reliable.", | ||
| tips: [ | ||
| "Put your most reliable model first.", | ||
| "Keep 1-2 backup models with similar quality.", | ||
| "Use safe retries to absorb transient provider failures.", | ||
| ], | ||
| }, | ||
| "context-optimized": { | ||
| title: "Fail-safe baseline", | ||
| description: "Use one primary model and keep fallback chain short and reliable.", | ||
| tips: [ | ||
| "Put your most reliable model first.", | ||
| "Keep 1-2 backup models with similar quality.", | ||
| "Use safe retries to absorb transient provider failures.", | ||
| ], | ||
| }, | ||
|
Comment on lines
+242
to
+268
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }; | ||
|
|
||
| const COMBO_USAGE_GUIDE_STORAGE_KEY = "omniroute:combos:hide-usage-guide"; | ||
|
|
@@ -2467,7 +2509,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| <p className="text-[10px] text-text-muted mt-0.5"> | ||
| {getI18nOrFallback( | ||
| t, | ||
| "builderFlowDescription", | ||
| "builderStagesDescription", | ||
| "Move through the stages in order to define the combo, build the steps, choose the routing strategy and review the result." | ||
| )} | ||
| </p> | ||
|
|
@@ -2719,7 +2761,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| <p className="text-[10px] text-text-muted mt-0.5"> | ||
| {getI18nOrFallback( | ||
| t, | ||
| "builderDescription", | ||
| "builderStepsDescription", | ||
| "Build each combo step in sequence: provider, model, then account. This allows repeating the same provider and model with different accounts." | ||
| )} | ||
| </p> | ||
|
|
@@ -2797,7 +2839,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| <option value={COMBO_BUILDER_AUTO_CONNECTION}> | ||
| {getI18nOrFallback( | ||
| t, | ||
| "builderDynamicAccount", | ||
| "autoSelectAccount", | ||
| "Auto-select account at runtime" | ||
| )} | ||
| </option> | ||
|
|
@@ -2820,7 +2862,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| ? formatModelDisplay(builderCandidateStep) | ||
| : getI18nOrFallback( | ||
| t, | ||
| "builderPreviewEmpty", | ||
| "previewNextStep", | ||
| "Choose provider and model to preview the next step." | ||
| )} | ||
| </p> | ||
|
|
@@ -2858,7 +2900,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| <option value=""> | ||
| {getI18nOrFallback( | ||
| t, | ||
| "builderSelectComboRef", | ||
| "selectComboToReference", | ||
| "Select an existing combo to reference" | ||
| )} | ||
| </option> | ||
|
|
@@ -3113,7 +3155,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| className="w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1" | ||
| > | ||
| <span className="material-symbols-outlined text-[16px]">travel_explore</span> | ||
| {getI18nOrFallback(t, "builderOpenLegacyCatalog", "Browse legacy model catalog")} | ||
| {getI18nOrFallback(t, "browseLegacyCatalog", "Browse legacy model catalog")} | ||
| </button> | ||
| </div> | ||
| )} | ||
|
|
@@ -3388,34 +3430,31 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| <span className="material-symbols-outlined text-[14px] text-primary"> | ||
| smart_toy | ||
| </span> | ||
| <p className="text-xs font-medium">Agent Features</p> | ||
| <span className="text-[10px] text-text-muted"> | ||
| — optional, for agent/tool workflows | ||
| </span> | ||
| <p className="text-xs font-medium">{t("agentFeaturesTitle")}</p> | ||
| <span className="text-[10px] text-text-muted">{t("agentFeaturesDescription")}</span> | ||
| </div> | ||
|
|
||
| {/* System Message Override */} | ||
| <div> | ||
| <label className="text-[11px] font-medium text-text-muted block mb-0.5"> | ||
| System Message Override | ||
| {t("agentFeaturesSystemMessageOverride")} | ||
| </label> | ||
| <textarea | ||
| rows={2} | ||
| value={agentSystemMessage} | ||
| onChange={(e) => setAgentSystemMessage(e.target.value)} | ||
| placeholder="Override the system prompt for all requests routed through this combo…" | ||
| placeholder={t("agentFeaturesSystemMessagePlaceholder")} | ||
| className="w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none resize-none" | ||
| /> | ||
| <p className="text-[10px] text-text-muted mt-0.5"> | ||
| Replaces any system message sent by the client. Leave empty to pass through client | ||
| system messages. | ||
| {t("agentFeaturesSystemMessageHint")} | ||
| </p> | ||
| </div> | ||
|
|
||
| {/* Tool Filter Regex */} | ||
| <div> | ||
| <label className="text-[11px] font-medium text-text-muted block mb-0.5"> | ||
| Tool Filter Regex | ||
| {t("agentFeaturesToolFilterRegex")} | ||
| </label> | ||
| <input | ||
| type="text" | ||
|
|
@@ -3425,20 +3464,18 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| className="w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none font-mono" | ||
| /> | ||
| <p className="text-[10px] text-text-muted mt-0.5"> | ||
| Only tools whose name matches this regex are forwarded to the provider. Leave | ||
| empty to forward all tools. | ||
| {t("agentFeaturesToolFilterHint")} | ||
| </p> | ||
| </div> | ||
|
|
||
| {/* Context Cache Protection */} | ||
| <div className="flex items-center justify-between gap-2"> | ||
| <div> | ||
| <label className="text-[11px] font-medium text-text-muted block"> | ||
| Context Cache Protection | ||
| {t("agentFeaturesContextCacheProtection")} | ||
| </label> | ||
| <p className="text-[10px] text-text-muted"> | ||
| Pins the provider/model across turns to preserve cache sessions. Internal tags | ||
| are stripped before forwarding to the provider. | ||
| {t("agentFeaturesContextCacheHint")} | ||
| </p> | ||
| </div> | ||
| <input | ||
|
|
@@ -3673,7 +3710,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) { | |
| ) | ||
| : getI18nOrFallback( | ||
| t, | ||
| "builderNeedSteps", | ||
| "addStepBeforeContinue", | ||
| "Add at least one step before continuing to the next stage." | ||
| )} | ||
| </div> | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The guidance text for
auto,lkgp, andcontext-optimizedstrategies is identical to theprioritystrategy. These strategies have distinct behaviors (e.g.,autouses multi-factor scoring,lkgpuses historical success). Providing the same guidance for all three is inaccurate and may mislead users. Please provide specific guidance for each strategy.