{"record":{"id":"864589a90a3324f6","repo":"HKUDS/DeepTutor","slug":"invalid-deep-research-config-details","errorCode":null,"errorMessage":"Invalid deep research config: {details}","messagePattern":"Invalid deep research config: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"deeptutor/agents/research/request_config.py","lineNumber":63,"sourceCode":"    def validate_manual_max_iterations(cls, value: int | None) -> int | None:\n        if value is not None:\n            return max(1, min(value, 10))\n        return value\n\n\ndef validate_research_request_config(\n    raw_config: dict[str, Any] | None,\n) -> DeepResearchRequestConfig:\n    if not isinstance(raw_config, dict):\n        raise ValueError(\"Deep research requires an explicit config object.\")\n    try:\n        return DeepResearchRequestConfig.model_validate(raw_config)\n    except ValidationError as exc:\n        details = \"; \".join(\n            f\"{'.'.join(str(part) for part in error['loc'])}: {error['msg']}\"\n            for error in exc.errors()\n        )\n        raise ValueError(f\"Invalid deep research config: {details}\") from exc\n\n\ndef build_research_execution_policy(\n    *,\n    request_config: DeepResearchRequestConfig,\n) -> dict[str, Any]:\n    depth_policy = _build_depth_policy(\n        request_config.depth,\n        manual_max_iterations=request_config.manual_max_iterations,\n        manual_subtopics=request_config.manual_subtopics,\n    )\n    mode_policy = _build_mode_policy(request_config.mode, request_config.depth)\n\n    if request_config.depth == \"manual\" and request_config.manual_subtopics is not None:\n        n = request_config.manual_subtopics\n        if mode_policy.get(\"decompose_mode\") == \"auto\":\n            mode_policy[\"auto_max_subtopics\"] = n\n        else:","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/agents/research/request_config.py#L45-L81","documentation":"Raised when DeepResearchRequestConfig.model_validate rejects the supplied dict; the original pydantic ValidationError is flattened into a '; '-joined list of field-path/detail pairs appended to the message. Means one or more config fields failed type or constraint validation (e.g. out-of-range iteration/subtopic counts).","triggerScenarios":"Thrown at deeptutor/agents/research/request_config.py:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the {details} segment to identify the offending field paths","Clamp manual_max_iterations / manual_subtopics to 1–10 before submitting","Validate the payload client-side against the DeepResearchRequestConfig schema","Catch ValueError in the caller and surface a structured field-error response"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","contentChangedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}