{"record":{"id":"47f34590c9509b68","repo":"langchain-ai/langgraph","slug":"invalid-keep-pkg-tools-tool-must-be-one-of","errorCode":null,"errorMessage":"Invalid keep_pkg_tools: '{tool}'. Must be one of 'pip', 'setuptools', 'wheel'.","messagePattern":"Invalid keep_pkg_tools: '(.+?)'\\. Must be one of 'pip', 'setuptools', 'wheel'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/cli/langgraph_cli/config.py","lineNumber":548,"sourceCode":"    if encryption_conf := config.get(\"encryption\"):\n        if \"path\" in encryption_conf:\n            if \":\" not in encryption_conf[\"path\"]:\n                raise ValueError(\n                    f\"Invalid encryption.path format: '{encryption_conf['path']}'. \"\n                    \"Must be in format './path/to/file.py:attribute_name'\"\n                )\n    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\",","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/cli/langgraph_cli/config.py#L530-L566","documentation":"Item-level validation of the keep_pkg_tools array in the CLI config validator: keep_pkg_tools was given as a list, but one of its elements is not in _BUILD_TOOLS ('pip', 'setuptools', 'wheel'). Allowing arbitrary names would inject untrusted strings into RUN pip ... cleanup lines of the generated Dockerfile, so each entry is checked against the fixed set.","triggerScenarios":"Thrown at libs/cli/langgraph_cli/config.py:548 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep only 'pip', 'setuptools', and/or 'wheel' in the keep_pkg_tools list","Replace the list with `true` to keep all supported packaging tools","Drop the keep_pkg_tools key to use the default (tools removed)"],"exampleFix":null,"handlingStrategy":"validation","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"}