{"record":{"id":"9b40d77d67245a00","repo":"diegosouzapw/OmniRoute","slug":"reasoning-routing-target-combo-does-not-exist","errorCode":null,"errorMessage":"Reasoning routing target combo does not exist","messagePattern":"Reasoning routing target combo does not exist","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/reasoningRouting/policy.ts","lineNumber":342,"sourceCode":"    a.createdAt.localeCompare(b.createdAt) ||\n    a.id.localeCompare(b.id);\n}\n\nfunction resolveTargetModel(\n  rule: ReasoningRoutingRule,\n  sourceModel: string,\n  combo: JsonRecord | null\n) {\n  if (combo) return typeof combo.name === \"string\" ? combo.name : rule.targetComboId;\n  return rule.targetKind === \"model\" && rule.targetModel ? rule.targetModel : sourceModel;\n}\n\nasync function resolveTarget(rule: ReasoningRoutingRule, sourceModel: string) {\n  if (rule.targetKind !== \"combo\" || !rule.targetComboId) {\n    return { targetCombo: null, targetModel: resolveTargetModel(rule, sourceModel, null) };\n  }\n  const targetCombo = (await getComboById(rule.targetComboId)) as JsonRecord | null;\n  if (!targetCombo) throw new Error(\"Reasoning routing target combo does not exist\");\n  return { targetCombo, targetModel: resolveTargetModel(rule, sourceModel, targetCombo) };\n}\n\nfunction resolveTargetEffort(\n  rule: ReasoningRoutingRule,\n  input: RoutingInput\n): ReasoningEffort | null {\n  const inherits =\n    rule.effortMode === \"inherit\" || (rule.effortMode === \"default\" && input.hasReasoningSignal);\n  if (!inherits) return rule.targetEffort;\n  return input.sourceEffort === \"missing\" || input.sourceEffort === \"signal\"\n    ? null\n    : input.sourceEffort;\n}\n\nfunction resolveCapability(\n  targetCombo: JsonRecord | null,\n  targetModel: string,","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/reasoningRouting/policy.ts#L324-L360","documentation":"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.","triggerScenarios":"Thrown at src/lib/reasoningRouting/policy.ts:342 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Edit or recreate the routing rule and point it at an existing combo id.","Recreate the deleted combo, or switch the rule's targetKind to 'model' with a targetModel.","Remove rules referencing deleted combos from the routing policy table."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}