{"record":{"id":"55aa454f0995d12c","repo":"bytedance/deer-flow","slug":"request-failed","errorCode":"request_failed","errorMessage":"Failed to check agent name: ${res.statusText}","messagePattern":"Failed to check agent name: (.+?)","errorType":"exception","errorClass":"AgentNameCheckError","httpStatus":null,"severity":"error","filePath":"frontend/src/core/agents/api.ts","lineNumber":118,"sourceCode":"    throw new AgentNameCheckError(\n      \"Could not reach the DeerFlow backend.\",\n      \"backend_unreachable\",\n    );\n  }\n\n  if (!res.ok) {\n    const err = (await res.json().catch(() => ({}))) as { detail?: string };\n    if (isAgentsApiDisabledDetail(err.detail)) {\n      throw new AgentsApiDisabledError(err.detail!);\n    }\n    if (BACKEND_UNAVAILABLE_STATUSES.has(res.status)) {\n      throw new AgentNameCheckError(\n        \"Could not reach the DeerFlow backend.\",\n        \"backend_unreachable\",\n      );\n    }\n    const backendDetail = typeof err.detail === \"string\" ? err.detail : null;\n    throw new AgentNameCheckError(\n      backendDetail ?? `Failed to check agent name: ${res.statusText}`,\n      \"request_failed\",\n      backendDetail,\n    );\n  }\n  return res.json() as Promise<{ available: boolean; name: string }>;\n}\n","sourceCodeStart":100,"sourceCodeEnd":126,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/frontend/src/core/agents/api.ts#L100-L126","documentation":"Raised when base_url uses plain http://, allow_insecure_http is false, and the URL hostname is not 127.0.0.1, localhost, or openviking. The USER API key travels on every request, so non-local plaintext HTTP is blocked by default; loopback and the service name 'openviking' are whitelisted as inherently private.","triggerScenarios":"Setting base_url to http://<non-local-host> (an IP like 10.0.0.5, a LAN hostname, or a k8s service name other than 'openviking') without allow_insecure_http: true. The hostname check uses parsed.hostname, so ports do not matter.","commonSituations":"Self-hosted OpenViking on another machine without TLS; k8s service URL on plain http with a custom service name; using a private-IP address for a LAN deployment.","solutions":["Use an https:// base_url (TLS at the service or a proxy).","If the network is trusted and internal, set allow_insecure_http: true explicitly.","Or point at a whitelisted hostname: http://openviking:1933, http://127.0.0.1:1933, or http://localhost:1933."],"exampleFix":"# before\nbackend_config:\n  base_url: http://10.0.0.5:1933\n\n# after\nbackend_config:\n  base_url: http://10.0.0.5:1933\n  allow_insecure_http: true  # trusted internal network only","handlingStrategy":"validation","validationCode":"from urllib.parse import urlparse\n\nLOCAL_HOSTS = {'127.0.0.1', 'localhost', 'openviking'}\n\n\ndef check_http_exposure(base_url: str, allow_insecure: bool) -> None:\n    p = urlparse(base_url)\n    if p.scheme == 'http' and not allow_insecure:\n        assert p.hostname in LOCAL_HOSTS, (\n            'plain-http base_url to a non-local host requires '\n            'allow_insecure_http: true on a trusted network; prefer https://'\n        )","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Terminate TLS at a proxy for any non-localhost OpenViking deployment.","Restrict allow_insecure_http: true to dev/lab config overlays that never reach production.","For local plain-http setups use the whitelisted names openviking, 127.0.0.1, or localhost."],"tags":["openviking","configuration","security","tls","validation"],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}