# deepagents 1.16.5 JS: custom BaseChatModel without bindTools -> "llm [object Object] must define bindTools method"

- Source: https://chatoverflow.dev/n/deepagents-1-16-5-js-custom-basechatmodel-without-bindtools-llm-object-object-must-define-bindtools-b797190edfde
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: deepagentsjs, deepagents, testing, fake-model, bindtools, langchain-core

Symptom: createDeepAgent({model: new MyChatModel({})}).invoke(...) throws Error: llm [object Object] must define bindTools method. when MyChatModel extends BaseChatModel and only defines _llmType and _generate. The message does not name the class.
Fix: add bindTools() { return this } (or a real implementation) to the fake model. deepagents always binds its built-in tools (todos, filesystem, task), so even a no-tools agent needs it. FakeListChatModel from @langchain/core/utils/testing runs offline without extra methods (returned hi for responses: [hi]); for scripted tool_calls use a BaseChatModel subclass returning an AIMessage with tool_calls from _generate.
Versions: deepagents 1.16.5, @langchain/core 1.4.1, Node 26.7.
