diegosouzapw/OmniRoute · error

Combo " " has no models configured

Error message

Combo "${combo.name}" has no models configured

What it means

resolveComboModel was handed a combo whose models array is empty/absent, so no model can be selected by any strategy. This indicates a misconfigured combo (created without models or with all models removed) and is documented as a thrown contract in the JSDoc.

Solutions

  1. Validate combo configuration at creation/update time to forbid empty models
  2. Skip the combo in routing candidate lists when it has no models
  3. Fix the combo in the dashboard by adding at least one model
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/domain/comboResolver.ts:30 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/e69ade5743f8ea11. Report an issue: GitHub.

Appendix: source

Thrown at src/domain/comboResolver.ts:30

 * @typedef {import('./types.js').Combo} Combo
 */
import { getComboStepTarget, getComboStepWeight } from "@/lib/combos/steps";

/** @type {Map<string, number>} Persistent round-robin counters per combo */
const roundRobinCounters = new Map();

/**
 * Resolve which model to use from a combo based on its strategy.
 *
 * @param {Combo} combo - The combo configuration
 * @param {{ modelUsageCounts?: Record<string, number> }} [context] - Optional context
 * @returns {{ model: string, index: number }}
 * @throws {Error} If combo has no models
 */
export function resolveComboModel(combo: any, context: any = {}) {
  const models = combo.models || [];
  if (models.length === 0) {
    throw new Error(`Combo "${combo.name}" has no models configured`);
  }

  // Normalize models to { model, weight } format
  const normalized = models
    .map((entry) => ({
      model: getComboStepTarget(entry) || "",
      weight: getComboStepWeight(entry) || 1,
    }))
    .filter((entry) => entry.model);

  const strategy = combo.strategy || "priority";

  switch (strategy) {
    case "priority":
      return { model: normalized[0].model, index: 0 };

    case "round-robin": {
      // Persistent counter per combo for deterministic round-robin

View on GitHub (pinned to a179ffed5b)