Assistant runs can only last for 10 minutes?

If a run takes more than 10 minutes, OpenAI seems to automatically cancel the run. Anyone run into this? Any way to fix? How can we handle complex requests?

More details: I have a loop that constantly retrieves the run (openai.beta.threads.runs.retrieve), and:

  • If the run’s status is ‘queued’ or ‘in_progress’: sleep 1 second
  • If the run’s status is ‘requires_action’: handle the tool outputs
  • If the run’s status is ‘completed’: we’re good to go! (It usually completes within a few minutes.)

Whenever this loop takes longer than 10 mins, the run’s status goes to ‘canceled.’

Any way to handle more complicated runs?

1 Like

Yes it is mentioned in the documentation.

1 Like

https://platform.openai.com/docs/assistants/how-it-works/run-lifecycle

Thank you! Any suggestion for how to handle more complex runs?

Maybe we should just use normal gpt-4-turbo with function calling? Not sure why assistants is even needed

What kind of execution are you doing to make it pass more than 10mins? :thinking:

Just lots of API calls on hundreds of different objects at a time…for customers that have lots of data…and the whole benefit to them is they can do things en masse. So it’s kind of the point :slight_smile:

Hmm, I’m doing something similar with my service! Merch Masters Bot Do the all API calls are necessary? like wouldn’t be great we you filter out only the needed once?