{"record":{"id":"445826fe9c550d57","repo":"langchain-ai/langgraph","slug":"invalid-keep-pkg-tools-keep-pkg-tools-must-b","errorCode":null,"errorMessage":"Invalid keep_pkg_tools: '{keep_pkg_tools}'. Must be bool or list[str] (with values 'pip', 'setuptools', and/or 'wheel').","messagePattern":"Invalid keep_pkg_tools: '(.+?)'\\. Must be bool or list\\[str\\] \\(with values 'pip', 'setuptools', and/or 'wheel'\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/cli/langgraph_cli/config.py","lineNumber":555,"sourceCode":"    if http_conf := config.get(\"http\"):\n        if \"app\" in http_conf:\n            if \":\" not in http_conf[\"app\"]:\n                raise ValueError(\n                    f\"Invalid http.app format: '{http_conf['app']}'. \"\n                    \"Must be in format './path/to/file.py:attribute_name'\"\n                )\n    if keep_pkg_tools := config.get(\"keep_pkg_tools\"):\n        if isinstance(keep_pkg_tools, list):\n            for tool in keep_pkg_tools:\n                if tool not in _BUILD_TOOLS:\n                    raise ValueError(\n                        f\"Invalid keep_pkg_tools: '{tool}'. \"\n                        \"Must be one of 'pip', 'setuptools', 'wheel'.\"\n                    )\n        elif keep_pkg_tools is True:\n            pass\n        else:\n            raise ValueError(\n                f\"Invalid keep_pkg_tools: '{keep_pkg_tools}'. \"\n                \"Must be bool or list[str] (with values\"\n                \" 'pip', 'setuptools', and/or 'wheel').\"\n            )\n    return config\n\n\n# Keys recognized by validate_config (used to detect unknown fields).\n_KNOWN_CONFIG_KEYS = {\n    \"python_version\",\n    \"node_version\",\n    \"api_version\",\n    \"base_image\",\n    \"image_distro\",\n    \"pip_config_file\",\n    \"pip_installer\",\n    \"source\",\n    \"dependencies\",","sourceCodeStart":537,"sourceCodeEnd":573,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/cli/langgraph_cli/config.py#L537-L573","documentation":"Type-level validation of keep_pkg_tools in the CLI config validator: the value is neither a boolean nor a list — keep_pkg_tools must be true/false or a list whose entries are 'pip', 'setuptools', 'wheel'. A string like 'pip', an int, or null-like truthy scalar of another type reaches this raise after the list branch is skipped.","triggerScenarios":"Thrown at libs/cli/langgraph_cli/config.py:555 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a boolean: \"keep_pkg_tools\": true (or false)","Or a list of allowed tools: \"keep_pkg_tools\": [\"pip\", \"wheel\"]","Remove the key entirely for default behavior"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","contentChangedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}