Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ export default function BuilderIntelligentStep({
>
{MODE_PACK_OPTIONS.map((modePack) => (
<option key={modePack.id} value={modePack.id}>
{modePack.label}
{getI18nOrFallback(
t,
`modePack${modePack.id[0].toUpperCase()}${modePack.id.slice(1)}`,
modePack.label
)}
</option>
))}
</select>
Expand Down
79 changes: 58 additions & 21 deletions src/app/(dashboard)/dashboard/combos/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
},
Comment on lines +123 to +137

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The guidance text for auto, lkgp, and context-optimized strategies is identical to the priority strategy. These strategies have distinct behaviors (e.g., auto uses multi-factor scoring, lkgp uses historical success). Providing the same guidance for all three is inaccurate and may mislead users. Please provide specific guidance for each strategy.

};

const ADVANCED_FIELD_HELP_FALLBACK = {
Expand Down Expand Up @@ -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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the guidance fallback, the recommendations for auto, lkgp, and context-optimized are identical. These strategies should have tailored tips that reflect their specific routing logic (e.g., lkgp should mention history persistence, auto should mention scoring factors).

};

const COMBO_USAGE_GUIDE_STORAGE_KEY = "omniroute:combos:hide-usage-guide";
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -2858,7 +2900,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) {
<option value="">
{getI18nOrFallback(
t,
"builderSelectComboRef",
"selectComboToReference",
"Select an existing combo to reference"
)}
</option>
Expand Down Expand Up @@ -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>
)}
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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>
Expand Down
Loading