bytedance/deer-flow · error

Failed to update agent: ${res.statusText}

Error message

Failed to update agent: ${res.statusText}

What it means

Raised by OpenVikingConfig.from_backend_config when backend_config still contains auth_mode or account keys. OpenViking server-side 'trusted mode' auth was removed from this backend; it now authenticates only with a per-user USER API key plus an explicit owner_user_id, and this guard stops old configs from silently authenticating the wrong way.

Source

Thrown at frontend/src/core/agents/api.ts:79

      throw new AgentsApiDisabledError(err.detail!);
    }
    throw new Error(err.detail ?? `Failed to create agent: ${res.statusText}`);
  }
  return res.json() as Promise<Agent>;
}

export async function updateAgent(
  name: string,
  request: UpdateAgentRequest,
): Promise<Agent> {
  const res = await fetch(`${getBackendBaseURL()}/api/agents/${name}`, {
    method: "PUT",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(request),
  });
  if (!res.ok) {
    const err = (await res.json().catch(() => ({}))) as { detail?: string };
    throw new Error(err.detail ?? `Failed to update agent: ${res.statusText}`);
  }
  return res.json() as Promise<Agent>;
}

export async function deleteAgent(name: string): Promise<void> {
  const res = await fetch(`${getBackendBaseURL()}/api/agents/${name}`, {
    method: "DELETE",
  });
  if (!res.ok) throw new Error(`Failed to delete agent: ${res.statusText}`);
}

export async function checkAgentName(
  name: string,
): Promise<{ available: boolean; name: string }> {
  let res: Response;
  try {
    res = await fetch(
      `${getBackendBaseURL()}/api/agents/check?name=${encodeURIComponent(name)}`,

View on GitHub (pinned to 1dd6ba1acb)

Solutions

  1. Delete auth_mode and account from the openviking backend_config block.
  2. Set api_key_env (default OPENVIKING_API_KEY) and export that variable with a USER API key issued by the OpenViking server.
  3. Set owner_user_id to the user the memories belong to.
  4. Sweep config templates and deploy scripts for leftover auth_mode/account keys.

Example fix

# before
backend_config:
  auth_mode: trusted
  account:
    id: acct-1

# after
backend_config:
  api_key_env: OPENVIKING_API_KEY
  owner_user_id: user-42
# environment: export OPENVIKING_API_KEY=<user key>
Defensive patterns

Strategy: validation

Validate before calling

REMOVED_TOP_KEYS = {'auth_mode', 'account'}


def lint_openviking_config(cfg: dict) -> None:
    hits = REMOVED_TOP_KEYS.intersection(cfg)
    assert not hits, (
        f'OpenViking trusted mode removed; delete {sorted(hits)} and set '
        'a USER API key (api_key_env) plus owner_user_id'
    )

Prevention

When it happens

Trigger: Upgrading to a backend version that dropped trusted mode while config.yaml still has memory.backend_config.auth_mode or an account: {...} block for the openviking backend. Config load raises before any client is constructed.

Common situations: Pulling a newer DeerFlow release after the openviking auth migration; copying an old example config or README snippet that predates the removal; environment templates kept in provisioning repos that were never migrated.

Related errors


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