diegosouzapw/OmniRoute · error · Error

Reasoning routing target combo does not exist

Error message

Reasoning routing target combo does not exist

What it means

Thrown in resolveTarget(): a reasoning routing rule points at targetKind 'combo' with a targetComboId, but getComboById() returned null — the referenced combo was deleted or the id is stale. The rule is configured against a target that no longer exists.

Solutions

  1. Edit or recreate the routing rule and point it at an existing combo id.
  2. Recreate the deleted combo, or switch the rule's targetKind to 'model' with a targetModel.
  3. Remove rules referencing deleted combos from the routing policy table.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/lib/reasoningRouting/policy.ts:342 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/9b40d77d67245a00. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/reasoningRouting/policy.ts:342

    a.createdAt.localeCompare(b.createdAt) ||
    a.id.localeCompare(b.id);
}

function resolveTargetModel(
  rule: ReasoningRoutingRule,
  sourceModel: string,
  combo: JsonRecord | null
) {
  if (combo) return typeof combo.name === "string" ? combo.name : rule.targetComboId;
  return rule.targetKind === "model" && rule.targetModel ? rule.targetModel : sourceModel;
}

async function resolveTarget(rule: ReasoningRoutingRule, sourceModel: string) {
  if (rule.targetKind !== "combo" || !rule.targetComboId) {
    return { targetCombo: null, targetModel: resolveTargetModel(rule, sourceModel, null) };
  }
  const targetCombo = (await getComboById(rule.targetComboId)) as JsonRecord | null;
  if (!targetCombo) throw new Error("Reasoning routing target combo does not exist");
  return { targetCombo, targetModel: resolveTargetModel(rule, sourceModel, targetCombo) };
}

function resolveTargetEffort(
  rule: ReasoningRoutingRule,
  input: RoutingInput
): ReasoningEffort | null {
  const inherits =
    rule.effortMode === "inherit" || (rule.effortMode === "default" && input.hasReasoningSignal);
  if (!inherits) return rule.targetEffort;
  return input.sourceEffort === "missing" || input.sourceEffort === "signal"
    ? null
    : input.sourceEffort;
}

function resolveCapability(
  targetCombo: JsonRecord | null,
  targetModel: string,

View on GitHub (pinned to a179ffed5b)