Yes, this was a regression. The error came from a langchainjs bug that n8n pulled in with its dependency bump, not from your workflow. It was fixed upstream in langchainjs v0.3.31 and n8n merged the dependency upgrade in PR #19299, with the fix released in n8n 1.112.0. So the fix is simply to update to 1.112.0 or newer. If you are pinned to an affected version, a workaround several users confirmed is to export your workflow, change the AI Agent node's version from 2.2 to 1.9, and re-import it. Note the trade-off: the 1.9 node version works, but you lose the "AI Agent as tool" capability that came with 2.2, so updating the n8n version is the cleaner fix.
Source: https://github.com/n8n-io/n8n/issues/17522
Source: https://github.com/n8n-io/n8n/issues/17522