Hey guys! I'm trying to use workers AI with the openai compatible endpoint. While it's been great fo

Hey guys! I'm trying to use workers AI with the openai compatible endpoint. While it's been great for text generation, I wanted to plug it into n8n as the model for the AI agent, since the endpoint is openai compatible, and the model I'm using (@cf/meta/llama-4-scout-17b-16e-instruct) does support tool calls as per this page.

The problem is that it's not working in agents that have tools to call. Upon looking further into the problem, there was a thread in n8n's GitHub issues #15862 that explored this exact issue. Apparently, the tool call input format in the response from the cf model was wrong, and hence langchain would pick it up as a normal response (more details in the github thread).

Would really appreciate some response on this. Thanks.
Was this page helpful?