diegosouzapw/OmniRoute · error · Error

failedImportModels

Error message

failedImportModels

What it means

Error "failedImportModels" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/app/(dashboard)/dashboard/providers/[id]/hooks/useModelImportHandlers.ts:306

      logs: [],
      error: "",
      importedCount: 0,
    });

    try {
      // mode "import" merges/appends; "sync" replaces the available list (used when
      // re-syncing after toggling "import only free models").
      const syncUrl =
        mode === "sync"
          ? `/api/providers/${connectionId}/sync-models`
          : `/api/providers/${connectionId}/sync-models?mode=import`;
      const response = await fetch(syncUrl, {
        method: "POST",
        signal: AbortSignal.timeout(60_000),
      });
      const data = await response.json();
      if (!response.ok) {
        throw new Error(data.error || t("failedImportModels"));
      }

      if (data.freeFilterEmpty) {
        setImportProgress((prev) => ({
          ...prev,
          phase: "done",
          status: t("noFreeModelsFound"),
          logs: [t("noFreeModelsFound")],
          total: 0,
          current: 0,
          importedCount: 0,
        }));
        return;
      }

      const importedModels = Array.isArray(data.importedModels) ? data.importedModels : [];
      const importedCount =
        typeof data.importedCount === "number" ? data.importedCount : importedModels.length;

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/providers/[id]/hooks/useModelImportHandlers.ts:306 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/827539680a873ed4. Report an issue: GitHub.