crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[FEATURE] GPT-5 model incompatibility issue with CrewAI's tool calling format

Open Mukhsin0508 opened this issue 3 months ago • 1 comments

Feature Area

Agent capabilities

Is your feature request related to a an existing bug? Please link it here.

The GPT-5 model is generating tool calls in the WRONG FORMAT. It should be:

{ "responsible_employee_id": null, "include_inactive": false }

But it's generating: [ { "responsible_employee_id": null, "include_inactive": false }, [] ]

This is a GPT-5 model incompatibility issue with CrewAI's tool calling format. The "Repaired JSON" message suggests CrewAI is trying to fix it but failing.

The issue is that GPT-5 has a different function calling format than GPT-4. Let me check if there's a way to fix this in the tool description or if we need to adjust something:

⏺ The "Repaired JSON" is coming from CrewAI itself. This is a known issue with GPT-5 and CrewAI tool calling. The problem is:

  1. GPT-5 uses a different function calling format than GPT-4
  2. CrewAI expects GPT-4's format (flat dictionary)
  3. GPT-5 is wrapping arguments in an array

Describe the solution you'd like

Make the Crews compatible with GPT-5 function calling format.

Describe alternatives you've considered

No response

Additional context

No response

Willingness to Contribute

Yes, I'd be happy to submit a pull request

Mukhsin0508 avatar Nov 11 '25 12:11 Mukhsin0508

I think this is extensively discussed in here : https://github.com/crewAIInc/crewAI/issues/3154#issuecomment-3386718475

Vidit-Ostwal avatar Nov 11 '25 12:11 Vidit-Ostwal