ruvnet/ruflo · error · QERoutingError

Task routing failed

Error message

Task routing failed

What it means

routeQETask() hit an unexpected failure while classifying the task and selecting tier/model/agents — the routing pipeline itself threw (not the underlying model call). The catch surfaces a uniform 'Task routing failed' error; no QERouteResult is produced.

Source

Thrown at v3/plugins/agentic-qe/src/bridges/QEModelRoutingAdapter.ts:215

      const costEstimate = this.estimateCost(task, tier);

      const result: QERouteResult = {
        tier: agentBooster.available ? 1 : tier,
        model: agentBooster.available ? 'haiku' : model,
        qeCategory: task.category,
        qeComplexity: complexity,
        recommendedAgents,
        costEstimate: agentBooster.available ? 0 : costEstimate,
        agentBoosterAvailable: agentBooster.available,
        agentBoosterIntent: agentBooster.intent,
        explanation: this.buildExplanation(task, tier, agentBooster, v3Result),
      };

      this.logger.info(`Routed task "${task.category}" -> Tier ${result.tier} (${result.model})`);
      return result;
    } catch (error) {
      this.logger.error('Task routing failed', error);
      throw new QERoutingError('Task routing failed', error as Error);
    }
  }

  /**
   * Get complexity score for a category
   */
  getCategoryComplexity(category: string): number {
    // Check exact match
    if (CATEGORY_COMPLEXITY[category] !== undefined) {
      return CATEGORY_COMPLEXITY[category];
    }

    // Check partial matches
    for (const [key, value] of Object.entries(CATEGORY_COMPLEXITY)) {
      if (category.includes(key) || key.includes(category)) {
        return value;
      }
    }

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Verify the routing model/adapter is initialized and the task payload matches the routing schema; retry with a valid model id.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at v3/plugins/agentic-qe/src/bridges/QEModelRoutingAdapter.ts:215 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/ad1823446a9527f8. Report an issue: GitHub.