diegosouzapw/OmniRoute · error · Error

Hailuo Web requires a non-empty user message

Error message

Hailuo Web requires a non-empty user message

What it means

Error "Hailuo Web requires a non-empty user message" thrown in diegosouzapw/OmniRoute.

Source

Thrown at open-sse/executors/hailuo-web.ts:333

    }
  }

  /** Validate tool/function-call fields and fold messages into a single msgContent string. */
  private prepareMsgContent(bodyObj: JsonRecord): { msgContent: string } | { error: string } {
    const tools = bodyObj.tools;
    const functions = bodyObj.functions;
    if (tools != null && (!Array.isArray(tools) || tools.length > 0)) {
      return { error: "Hailuo Web does not support OpenAI function tools" };
    }
    if (functions != null && (!Array.isArray(functions) || functions.length > 0)) {
      return { error: "Hailuo Web does not support legacy function tools" };
    }
    try {
      const messages = Array.isArray(bodyObj.messages)
        ? (bodyObj.messages as HailuoInputMessage[])
        : [];
      const msgContent = foldHailuoMessages(messages);
      if (!msgContent) throw new Error("Hailuo Web requires a non-empty user message");
      return { msgContent };
    } catch (error) {
      return { error: error instanceof Error ? error.message : "Invalid Hailuo Web request" };
    }
  }

  /** Build the signed request: URL, headers, and the multipart form body. */
  private buildSignedRequest(
    token: string,
    providerSpecificData: unknown,
    msgContent: string
  ): { url: string; headers: Record<string, string>; form: FormData } {
    const now = Date.now();
    const pathAndQuery = buildHailuoPathAndQuery(token, providerSpecificData, now);
    const psd = asRecord(providerSpecificData);
    const characterID = toStringOrEmpty(psd.characterID) || DEFAULT_CHARACTER_ID;
    const chatID = toStringOrEmpty(psd.chatID) || DEFAULT_CHAT_ID;
    const bodyToYy = getBodyToYy(characterID, msgContent, chatID);

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at open-sse/executors/hailuo-web.ts:333 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/6340e5da700e1bf6. Report an issue: GitHub.