diegosouzapw/OmniRoute · error

[STARTUP] models.dev sync failed to start (non-fatal):

Error message

[STARTUP] models.dev sync failed to start (non-fatal):

What it means

Startup warning (non-fatal): the models.dev capability sync (opt-in via Settings > AI, self-gated by modelsDevSyncEnabled inside initModelsDevSync) failed during dynamic import or initialization. Model capability metadata from models.dev is simply unavailable this boot.

Solutions

  1. Check outbound access to models.dev
  2. Restart to retry
  3. Toggle the sync setting off/on in Settings > AI
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/instrumentation-node.ts:635 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/cee66412c2820f0e. Report an issue: GitHub.

Appendix: source

Thrown at src/instrumentation-node.ts:635

        .then((m) => {
          const started = m.initOpenRouterProviderStatsSync();
          if (started) console.log("[STARTUP] OpenRouter provider stats sync initialized");
        })
        .catch((err: unknown) => {
          const msg = err instanceof Error ? err.message : String(err);
          console.warn(
            "[STARTUP] OpenRouter provider stats sync failed to start (non-fatal):",
            msg
          );
        }),

      // models.dev capability sync: opt-in via Settings > AI (self-gated by
      // settings.modelsDevSyncEnabled inside initModelsDevSync). Non-blocking, never fatal.
      import("@/lib/modelsDevSync")
        .then((m) => m.initModelsDevSync())
        .catch((err: unknown) => {
          const msg = err instanceof Error ? err.message : String(err);
          console.warn("[STARTUP] models.dev sync failed to start (non-fatal):", msg);
        }),

      // Context-window self-correction (5004): periodically reconcile provider-declared
      // windows (from /models discovery) into auto:discovery overrides. Never fatal.
      import("@/lib/contextWindowResolver")
        .then((m) => m.startContextWindowReconcile())
        .catch((err: unknown) => {
          const msg = err instanceof Error ? err.message : String(err);
          console.warn("[STARTUP] context-window reconcile failed to start (non-fatal):", msg);
        }),

      // TV6 typed memory decay: optional periodic sweep of decayed episodic memories.
      // Doubly opt-in (no-op unless MEMORY_TYPED_DECAY_ENABLED=true AND
      // MEMORY_TYPED_DECAY_SWEEP_INTERVAL>0). Never deletes by default. Never fatal.
      import("@/lib/memory/typedDecay")
        .then((m) => m.startMemoryDecaySweep())
        .catch((err: unknown) => {
          const msg = err instanceof Error ? err.message : String(err);

View on GitHub (pinned to a179ffed5b)