{"record":{"id":"4ecd4c2e79b84eb2","repo":"langchain-ai/langgraph","slug":"no-message-found-in-input-4ecd4c","errorCode":null,"errorMessage":"No message found in input","messagePattern":"No message found in input","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/prebuilt/langgraph/prebuilt/tool_validator.py","lineNumber":178,"sourceCode":"            elif callable(schema):\n                base_model = create_schema_from_function(\"Validation\", schema)\n                self.schemas_by_name[schema.__name__] = base_model\n            else:\n                raise ValueError(\n                    f\"Unsupported input to ValidationNode. Expected BaseModel, tool or function. Got: {type(schema)}.\"\n                )\n\n    def _get_message(\n        self, input: list[AnyMessage] | dict[str, Any]\n    ) -> tuple[str, AIMessage]:\n        \"\"\"Extract the last AIMessage from the input.\"\"\"\n        if isinstance(input, list):\n            output_type = \"list\"\n            messages: list = input\n        elif messages := input.get(\"messages\", []):\n            output_type = \"dict\"\n        else:\n            raise ValueError(\"No message found in input\")\n        message: AnyMessage = messages[-1]\n        if not isinstance(message, AIMessage):\n            raise ValueError(\"Last message is not an AIMessage\")\n        return output_type, message\n\n    def _func(\n        self, input: list[AnyMessage] | dict[str, Any], config: RunnableConfig\n    ) -> Any:\n        \"\"\"Validate and run tool calls synchronously.\"\"\"\n        output_type, message = self._get_message(input)\n\n        def run_one(call: ToolCall) -> ToolMessage:\n            schema = self.schemas_by_name[call[\"name\"]]\n            try:\n                if issubclass(schema, BaseModel):\n                    output = schema.model_validate(call[\"args\"])\n                    content = output.model_dump_json()\n                elif issubclass(schema, BaseModelV1):","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/prebuilt/langgraph/prebuilt/tool_validator.py#L160-L196","documentation":"Error \"No message found in input\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/prebuilt/langgraph/prebuilt/tool_validator.py:178 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":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}