{"record":{"id":"6352584b48269197","repo":"HKUDS/nanobot","slug":"authlevel-must-be-0-or-1","errorCode":null,"errorMessage":"authLevel must be 0 or 1","messagePattern":"authLevel must be 0 or 1","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"nanobot/agent/tools/web.py","lineNumber":336,"sourceCode":"        return None\n    time_range = str(value).strip()\n    if not time_range:\n        return None\n    if time_range in _VOLCENGINE_TIME_RANGES or _VOLCENGINE_DATE_RANGE_RE.fullmatch(time_range):\n        return time_range\n    raise ValueError(\n        \"timeRange must be OneDay, OneWeek, OneMonth, OneYear, \"\n        \"or YYYY-MM-DD..YYYY-MM-DD\"\n    )\n\n\ndef _normalize_volcengine_auth_level(value: Any) -> int | None:\n    if value is None:\n        return None\n    try:\n        auth_level = int(value)\n    except (TypeError, ValueError) as exc:\n        raise ValueError(\"authLevel must be 0 or 1\") from exc\n    if auth_level not in {0, 1}:\n        raise ValueError(\"authLevel must be 0 or 1\")\n    return auth_level\n\n\n@tool_parameters(\n    tool_parameters_schema(\n        query=StringSchema(\"Search query\"),\n        count=IntegerSchema(description=\"Results (1-10)\", minimum=1, maximum=10),\n        timeRange=StringSchema(\n            \"Optional time filter for providers that support it: \"\n            \"OneDay, OneWeek, OneMonth, OneYear, or YYYY-MM-DD..YYYY-MM-DD\",\n        ),\n        authLevel=IntegerSchema(\n            description=\"Optional authority filter for providers that support it: 0=all, 1=authoritative\",\n            minimum=0,\n            maximum=1,\n        ),","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/agent/tools/web.py#L318-L354","documentation":"Error \"authLevel must be 0 or 1\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/agent/tools/web.py:336 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}