diegosouzapw/OmniRoute · error · Error

Volcano console cookie or csrfToken is missing — re-bind…

Error message

Volcano console cookie or csrfToken is missing — re-bind the plan

What it means

Pre-flight guard in fetchVolcPlanModels: the connection's stored providerSpecificData no longer contains a usable console cookie header or csrfToken, so live model discovery for the Volcano Ark plan cannot authenticate. It instructs re-binding because these values only come from the plan-bind flow; the stored session has been cleared or was never captured.

Solutions

  1. Re-run the Volcano plan binding (bindVolcenginePlansFromConsoleCredentials) with fresh console cookies to repopulate providerSpecificData.
  2. Verify the cookie/csrf fields were persisted on the connection after the last edit and not wiped by a settings save.
  3. If cookies expire regularly, document the re-bind cadence for operators.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/providers/volcenginePlanModelDiscovery.ts:353 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/24db50e055b6659c. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/providers/volcenginePlanModelDiscovery.ts:353

  }
  return out;
}

/**
 * Fetch the live model list for a Volcano Ark plan subscription using the
 * console cookie + csrf token stored on the connection's providerSpecificData.
 *
 * Verifies the plan subscription is still active (detectPlan) before listing,
 * so an expired/disabled plan returns a clear error instead of a stale/empty
 * catalog that would erase the user's synced models.
 */
export async function fetchVolcPlanModels(
  kind: VolcPlanKind,
  cookieHeader: string,
  csrfToken: string
): Promise<SyncedAvailableModelInput[]> {
  if (!cookieHeader || !csrfToken) {
    throw new Error("Volcano console cookie or csrfToken is missing — re-bind the plan");
  }

  // Validate the subscription/credentials are still live.
  const detected = await detectPlan(kind, cookieHeader, csrfToken);
  if (!detected.available) {
    throw new Error(
      `Volcano ${kind} plan unavailable${detected.error ? `: ${detected.error}` : ""} — re-bind the plan`
    );
  }

  const cfg = PLAN_DISCOVERY_CONFIG[kind];
  const payload: JsonRecord = { ...cfg.payload };
  if (cfg.requiresAccountId) {
    const accountId = extractAccountId(cookieHeader);
    if (accountId === null) {
      throw new Error(
        `Volcano ${kind} plan discovery requires AccountId, but none found in console cookie — re-bind the plan`
      );

View on GitHub (pinned to a179ffed5b)