bytedance/deer-flow · error · LarkIntegrationRequestError

HTTP ${response.status}: ${response.statusText}

Error message

HTTP ${response.status}: ${response.statusText}

What it means

Raised when retrieval.top_k (search_top_k) falls outside [1, 100]. top_k bounds how many memory results are requested per search; zero would return nothing and values above 100 would strain both the service and the injection budget, so the range is enforced at config load.

Source

Thrown at frontend/src/core/integrations/lark/api.ts:47

  }
}

async function readErrorDetail(response: Response): Promise<string> {
  const data = (await response.json().catch(() => ({}))) as {
    detail?: string;
  };
  return data.detail ?? `HTTP ${response.status}: ${response.statusText}`;
}

export async function loadLarkIntegrationStatus(
  signal?: AbortSignal,
): Promise<LarkIntegrationStatus> {
  const response = await fetch(
    `${getBackendBaseURL()}/api/integrations/lark/status`,
    { signal },
  );
  if (!response.ok) {
    throw new LarkIntegrationRequestError(
      response.status,
      await readErrorDetail(response),
    );
  }
  return response.json();
}

export async function installLarkIntegration(): Promise<LarkInstallResponse> {
  const response = await fetch(
    `${getBackendBaseURL()}/api/integrations/lark/install`,
    {
      method: "POST",
    },
  );
  if (!response.ok) {
    throw new LarkIntegrationRequestError(
      response.status,
      await readErrorDetail(response),

View on GitHub (pinned to 1dd6ba1acb)

Solutions

  1. Set retrieval.top_k between 1 and 100 (default 8).
  2. To reduce context usage, lower top_k or tighten score_threshold rather than zeroing it.
  3. Confirm the key sits under retrieval: with correct indentation.

Example fix

# before
retrieval:
  top_k: 200

# after
retrieval:
  top_k: 50
Defensive patterns

Strategy: validation

Validate before calling

def check_top_k(value: int) -> None:
    assert isinstance(value, int) and 1 <= value <= 100, 'retrieval.top_k must be in [1, 100]'

Prevention

When it happens

Trigger: Setting retrieval.top_k: 0, a negative number, or a value above 100 under the openviking backend_config; also triggered by int() coercion of a malformed YAML scalar.

Common situations: Tuning recall up and overshooting (top_k: 200); trying to disable retrieval by setting 0 instead of switching the memory backend; misindented YAML nesting top_k at the wrong level so the default applies and the stray key trips the unknown-field error too.

Related errors


AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14). Data as JSON: /api/errors/32c2a9191d714b48. Report an issue: GitHub.