diegosouzapw/OmniRoute · error

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

Error message

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

What it means

Error "Combo "${combo.name}" has no models configured" thrown in diegosouzapw/OmniRoute.

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)

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.