jackwener/OpenCLI · warning · EmptyResultError

Bilibili has not generated an AI summary for ${bvid}.

Error message

Bilibili has not generated an AI summary for ${bvid}.

What it means

readModelResult() throws this EmptyResultError when the conclusion endpoint reports data.code !== 0 for the requested video — Bilibili's signal that no AI summary has been generated for that video (not all videos have one; generation depends on duration, content, and availability). It is an expected empty result, not a crash: the library surfaces it so callers can fall back to another summarization method.

Source

Thrown at clis/bilibili/summary.js:77

    if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {
        throw new CommandExecutionError(`Bilibili ${label} API returned a malformed payload`);
    }
    if (payload.code !== 0) {
        const message = payload.message ?? 'unknown error';
        if (payload.code === -101 || payload.code === -403 || /登录|权限|forbidden|permission|login/i.test(String(message))) {
            throw new AuthRequiredError('bilibili.com', `Bilibili ${label} API requires login or permission: ${message} (${payload.code})`);
        }
        throw new CommandExecutionError(`Bilibili ${label} API failed: ${message} (${payload.code})`);
    }
    return payload.data;
}

function readModelResult(data, bvid) {
    if (!data || typeof data !== 'object' || Array.isArray(data)) {
        throw new CommandExecutionError('Bilibili conclusion API returned malformed data');
    }
    if (data.code !== 0) {
        throw new EmptyResultError('bilibili summary', `Bilibili has not generated an AI summary for ${bvid}.`);
    }
    let modelResult = data.model_result;
    if (typeof modelResult === 'string') {
        try {
            modelResult = JSON.parse(modelResult);
        } catch {
            throw new CommandExecutionError('Bilibili conclusion API returned malformed model_result JSON');
        }
    }
    if (!modelResult || typeof modelResult !== 'object' || Array.isArray(modelResult)) {
        throw new CommandExecutionError('Bilibili conclusion API returned malformed model_result');
    }
    const summary = String(modelResult.summary ?? '').trim();
    if (!summary) {
        throw new EmptyResultError('bilibili summary', `Bilibili has not generated an AI summary for ${bvid}.`);
    }
    const outline = modelResult.outline ?? [];
    if (!Array.isArray(outline)) {

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Handle EmptyResultError as an expected outcome — skip the video or fall back to your own summarization (e.g. fetch subtitles and summarize locally).
  2. Retry later: summaries are generated asynchronously and may appear after a delay for new uploads.
  3. Check the video page in a browser to confirm whether an AI summary exists.
  4. If running batch jobs, pre-filter videos known to lack summaries to reduce noise.

Example fix

// before
const summary = await runSummaryCommand(bvid); // throws EmptyResultError
// after
try {
  const summary = await runSummaryCommand(bvid);
} catch (e) {
  if (isEmptyResult(e)) return fallbackLocalSummary(bvid);
  throw e;
}
Defensive patterns

Strategy: fallback

Try / catch

try {
  return await summaryCommand(bvid);
} catch (e) {
  if (e.name === 'EmptyResultError' || /has not generated an AI summary/.test(e.message)) {
    return localFallbackSummary(bvid); // e.g. fetch subtitles and summarize
  }
  throw e;
}

Prevention

When it happens

Trigger: Querying the conclusion API for a short video, a newly uploaded video, an audio/管理-type submission, or any video for which Bilibili has not produced the AI 总结 — the payload carries data.code non-zero (e.g. -400 request OK but no summary) and readModelResult at summary.js:76-78 converts it to EmptyResultError.

Common situations: Batch-summarizing videos where some simply lack AI summaries; summarizing very fresh uploads minutes after publish; videos where the AI summary feature was disabled; users expecting every video to have a summary.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/cae47361bb06a5da. Report an issue: GitHub.