{"record":{"id":"b75db1d5bdf0461b","repo":"bytedance/deer-flow","slug":"failed-to-update-agent-res-statustext","errorCode":null,"errorMessage":"Failed to update agent: ${res.statusText}","messagePattern":"Failed to update agent: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/core/agents/api.ts","lineNumber":79,"sourceCode":"      throw new AgentsApiDisabledError(err.detail!);\n    }\n    throw new Error(err.detail ?? `Failed to create agent: ${res.statusText}`);\n  }\n  return res.json() as Promise<Agent>;\n}\n\nexport async function updateAgent(\n  name: string,\n  request: UpdateAgentRequest,\n): Promise<Agent> {\n  const res = await fetch(`${getBackendBaseURL()}/api/agents/${name}`, {\n    method: \"PUT\",\n    headers: { \"Content-Type\": \"application/json\" },\n    body: JSON.stringify(request),\n  });\n  if (!res.ok) {\n    const err = (await res.json().catch(() => ({}))) as { detail?: string };\n    throw new Error(err.detail ?? `Failed to update agent: ${res.statusText}`);\n  }\n  return res.json() as Promise<Agent>;\n}\n\nexport async function deleteAgent(name: string): Promise<void> {\n  const res = await fetch(`${getBackendBaseURL()}/api/agents/${name}`, {\n    method: \"DELETE\",\n  });\n  if (!res.ok) throw new Error(`Failed to delete agent: ${res.statusText}`);\n}\n\nexport async function checkAgentName(\n  name: string,\n): Promise<{ available: boolean; name: string }> {\n  let res: Response;\n  try {\n    res = await fetch(\n      `${getBackendBaseURL()}/api/agents/check?name=${encodeURIComponent(name)}`,","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/frontend/src/core/agents/api.ts#L61-L97","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Delete auth_mode and account from the openviking backend_config block.","Set api_key_env (default OPENVIKING_API_KEY) and export that variable with a USER API key issued by the OpenViking server.","Set owner_user_id to the user the memories belong to.","Sweep config templates and deploy scripts for leftover auth_mode/account keys."],"exampleFix":"# before\nbackend_config:\n  auth_mode: trusted\n  account:\n    id: acct-1\n\n# after\nbackend_config:\n  api_key_env: OPENVIKING_API_KEY\n  owner_user_id: user-42\n# environment: export OPENVIKING_API_KEY=<user key>","handlingStrategy":"validation","validationCode":"REMOVED_TOP_KEYS = {'auth_mode', 'account'}\n\n\ndef lint_openviking_config(cfg: dict) -> None:\n    hits = REMOVED_TOP_KEYS.intersection(cfg)\n    assert not hits, (\n        f'OpenViking trusted mode removed; delete {sorted(hits)} and set '\n        'a USER API key (api_key_env) plus owner_user_id'\n    )","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When upgrading the backend, diff config.example.yaml against your config.yaml and migrate auth fields first.","Keep auth keys out of shared snippets; store per-user API keys in env vars referenced by api_key_env.","Add a config-lint step to CI that rejects auth_mode/account in openviking blocks."],"tags":["openviking","configuration","migration","breaking-change","auth"],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}