diff --git a/src/backend/base/langflow/components/agents/ToolCallingAgent.py b/src/backend/base/langflow/components/agents/ToolCallingAgent.py index 3701d31cc53..ec4603192d7 100644 --- a/src/backend/base/langflow/components/agents/ToolCallingAgent.py +++ b/src/backend/base/langflow/components/agents/ToolCallingAgent.py @@ -43,4 +43,8 @@ def create_agent_runnable(self): ("placeholder", "{agent_scratchpad}"), ] prompt = ChatPromptTemplate.from_messages(messages) - return create_tool_calling_agent(self.llm, self.tools, prompt) + try: + return create_tool_calling_agent(self.llm, self.tools, prompt) + except NotImplementedError as e: + message = f"{self.display_name} does not support tool calling." "Please try using a compatible model." + raise NotImplementedError(message) from e