โš ๏ธ Agent failed before reply: Cannot read properties of undefined (reading 'trim'). Check gateway lo

I'm on version 2026.1.16-2, so the issue described in https://github.com/clawdbot/clawdbot/issues/946 should have been fixed. However, when I try to use locally hosted models via LM Studio, with a valid config (only difference from https://docs.clawd.bot/gateway/local-models is the API endpoint address and the model names), I get the same error reply from the agent: "โš ๏ธ Agent failed before reply: Cannot read properties of undefined (reading 'trim'). Check gateway logs for details."
Was this page helpful?