GPT-4.1 mini function calls using strict=true are incredibly slow

Hey,

I’ve been trying to build a simple “ai agent” that can call functions and while it’s working quite well, the responses for each function call take an incredibly long time, even with the mini model.

Each model response that leads to a function call takes 15-25 seconds, which is unusably long. I can reduce that time to 2-3 seconds when turning off strict mode, but then the model struggles with filling out the function arguments correctly (i.e. it constantly sends enum cases that are not mentioned in the function schema).

How do you deal with this? Letting the user wait for minutes, just for a single request that results in a few function calls is not really practical. And this is still just the mini model :thinking:

Or should I turn off strict mode and try to work around the occasional wrong arguments?

Thanks for any help or ideas

Cheers,
Dennis

I also created an agent to perform simple tasks (locate the Word icon on the desktop, click on it, launch a new page and write, change the color, etc.). It’s very time-consuming (image analysis and the fact that it also follows a security protocol adds to the complexity).
To get something usable, a compromise will be required: coding everything that can be done in Python and calling the AI ​​agent only when strictly necessary.

Yeah, that’s what I fear as well. It’s going to be tricky, but I’ll have to reduce the complexity of function calls. Which is a pity, because 4.1 mini is actually really great at this, even in rather complex scenarios. It’s amazing. But way too slow to be useable. And I’m not even using any images. It’s pure text :confused:

Yeah i’ve got the exact same problem. The response time is super slow when strict mode is on. Has anyone solved this problem ? Im wondering what happened in the backend with this mode.

Same here. Using GPT 4.1 for an agent, function calls are sometimes super slow. It may take minutes instead of seconds.

It is becoming a blocker for our release.

1 Like