bytedance/deer-flow · error

Failed to submit feedback: ${res.status}

Error message

Failed to submit feedback: ${res.status}

What it means

Raised when default_peer_id fails is_safe_peer_id: it must start with a lowercase letter or digit, be at most 64 characters, and contain only lowercase letters, digits, '_' or '-'. Peer ids become actor identifiers inside OpenViking, so the charset is restricted to keep them canonical and safe.

Source

Thrown at frontend/src/core/api/feedback.ts:26

  comment: string | null;
}

export async function upsertFeedback(
  threadId: string,
  runId: string,
  rating: number,
  comment?: string,
): Promise<FeedbackData> {
  const res = await fetch(
    `${getBackendBaseURL()}/api/threads/${encodeURIComponent(threadId)}/runs/${encodeURIComponent(runId)}/feedback`,
    {
      method: "PUT",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ rating, comment: comment ?? null }),
    },
  );
  if (!res.ok) {
    throw new Error(`Failed to submit feedback: ${res.status}`);
  }
  return res.json();
}

export async function deleteFeedback(
  threadId: string,
  runId: string,
): Promise<void> {
  const res = await fetch(
    `${getBackendBaseURL()}/api/threads/${encodeURIComponent(threadId)}/runs/${encodeURIComponent(runId)}/feedback`,
    { method: "DELETE" },
  );
  if (!res.ok && res.status !== 404) {
    throw new Error(`Failed to delete feedback: ${res.status}`);
  }
}

View on GitHub (pinned to 1dd6ba1acb)

Solutions

  1. Rewrite the id to the allowed charset: lowercase letters, digits, '_', '-'; start with a letter or digit; max 64 chars, e.g. deerflow, agent-main, worker_2.
  2. If the id is generated, normalize first: value.lower() or uuid4().hex.
  3. Check for invisible whitespace or unicode with repr(value).

Example fix

# before
backend_config:
  default_peer_id: DeerFlow Agent

# after
backend_config:
  default_peer_id: deerflow-agent
Defensive patterns

Strategy: type-guard

Validate before calling

import re

SAFE_PEER_ID_RE = re.compile(r'^[a-z0-9][a-z0-9_-]{0,63}$')


def normalize_peer_id(value: str) -> str:
    slug = re.sub(r'[^a-z0-9_-]+', '-', value.lower()).strip('-')
    return slug[:64] or 'peer'

Type guard

def is_safe_peer_id(value: str) -> bool:
    import re
    return bool(re.fullmatch(r'[a-z0-9][a-z0-9_-]{0,63}', value))

Prevention

When it happens

Trigger: Setting default_peer_id to a value with uppercase letters, spaces, dots, or other disallowed characters, one longer than 64 chars, or one starting with '_' or '-'. Accidental forms include 'DeerFlow', 'deer flow', 'deer.flow', 'agent#1'.

Common situations: Using a display name or email as the peer id; migrating from a system with wider identifier rules; generated ids containing uppercase UUID hex; copy-paste adding a trailing space or unicode lookalike.

Related errors


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