diegosouzapw/OmniRoute · error

[OpenRouterProviderStats] Periodic sync error:

Error message

[OpenRouterProviderStats] Periodic sync error:

What it means

Error "[OpenRouterProviderStats] Periodic sync error:" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/lib/catalog/openrouterProviderStats.ts:325

    .then((result) => {
      if (result.ok) {
        console.log(
          `[OpenRouterProviderStats] Initial sync complete: ${result.data.length} providers`
        );
      } else {
        console.warn(`[OpenRouterProviderStats] Initial sync failed: ${result.error}`);
      }
    })
    .catch((err) => {
      console.warn(
        "[OpenRouterProviderStats] Initial sync error:",
        err instanceof Error ? err.message : err
      );
    });

  syncTimer = setInterval(() => {
    refreshOpenRouterProviderStats().catch((err) => {
      console.warn(
        "[OpenRouterProviderStats] Periodic sync error:",
        err instanceof Error ? err.message : err
      );
    });
  }, interval);
  syncTimer.unref();
}

/**
 * Boot entry point — called once from instrumentation-node.ts.
 * On by default; opt out via OPENROUTER_PROVIDER_STATS_ENABLED=false.
 */
export function initOpenRouterProviderStatsSync(): boolean {
  if (!getEffectiveOpenRouterProviderStatsEnabled()) {
    console.log("[OpenRouterProviderStats] Disabled via OPENROUTER_PROVIDER_STATS_ENABLED=false.");
    return false;
  }
  startPeriodicSync();

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/lib/catalog/openrouterProviderStats.ts:325 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/b8377a13819066fc. Report an issue: GitHub.