Hello. I’m experimenting with Traditional function calling and it seems to only work with one of the

Hello. I’m experimenting with Traditional function calling and it seems to only work with one of the 4 models that should support it:
@hf/nousresearch/hermes-2-pro-mistral-7b


For the other models I get the response:

{
  "errors": [
    {
      "message": "AiError: AiError: Invalid input",
      "code": 8001
    }
  ],
  "success": false,
  "result": {},
  "messages": []
}


To stop receiving this message I need to give a type: “function” to my tools and wrap them in a function:

tools: [
    {
      type: “function”,
      function: { 
        name: "getWeather",
        description: "Return the weather for a latitude and longitude",
        parameters: {
          // ....
        },
      },
    }],


But this way none of the other 3 models (
@cf/meta/llama-3.3-70b-instruct-fp8-fast
,
@cf/mistralai/mistral-small-3.1-24b-instruct
,
@cf/meta/llama-4-scout-17b-16e-instruct)
can use function calling at all (the reply is always text).

Anyone else with the same issue?
Was this page helpful?