{"record":{"id":"35ec789a389ed6a8","repo":"langchain-ai/langgraph","slug":"setting-attribute-name-on-toolcallrequest-is-d","errorCode":null,"errorMessage":"Setting attribute '{name}' on ToolCallRequest is deprecated. Use the override() method instead to create a new instance with modified values.","messagePattern":"Setting attribute '(.+?)' on ToolCallRequest is deprecated\\. Use the override\\(\\) method instead to create a new instance with modified values\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"error","filePath":"libs/prebuilt/langgraph/prebuilt/tool_node.py","lineNumber":162,"sourceCode":"    \"\"\"\n\n    tool_call: ToolCall\n    tool: BaseTool | None\n    state: Any\n    runtime: ToolRuntime\n\n    def __setattr__(self, name: str, value: Any) -> None:\n        \"\"\"Raise deprecation warning when setting attributes directly.\n\n        Direct attribute assignment is deprecated. Use the `override()` method instead.\n        \"\"\"\n        import warnings\n\n        # Allow setting attributes during initialization\n        if not hasattr(self, \"__dataclass_fields__\") or not hasattr(self, name):\n            object.__setattr__(self, name, value)\n        else:\n            warnings.warn(\n                f\"Setting attribute '{name}' on ToolCallRequest is deprecated. \"\n                \"Use the override() method instead to create a new instance with modified values.\",\n                DeprecationWarning,\n                stacklevel=2,\n            )\n            object.__setattr__(self, name, value)\n\n    def override(\n        self, **overrides: Unpack[_ToolCallRequestOverrides]\n    ) -> ToolCallRequest:\n        \"\"\"Replace the request with a new request with the given overrides.\n\n        Returns a new `ToolCallRequest` instance with the specified attributes replaced.\n        This follows an immutable pattern, leaving the original request unchanged.\n\n        Args:\n            **overrides: Keyword arguments for attributes to override.\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/prebuilt/langgraph/prebuilt/tool_node.py#L144-L180","documentation":"Error \"Setting attribute '{name}' on ToolCallRequest is deprecated. Use the override() method instead to create a new instance with modified values.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/prebuilt/langgraph/prebuilt/tool_node.py:162 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"}