I add extra timeout check for those run cost more than 30 seconds, and …
Most of the time, it stuck in “cancelling” status , and expect it to be cancelled in several seconds.
But, most of the time the cancelling status is not changed and after several minutes(sometimes it’s more than 10) it became expierd.
Is there any problem with thread run cancel operation?
Or we cannot cancel a long long waiting run?
Have this problem too. Using assistant API i can not cancel thread run because it is already on status ‘cancelling’ and can not create new ‘run’ because of error “Can’t add messages to [thread_id] while a run [run_id] is active”. It happens sometimes. What should we do with this issue? @logankilpatrick@rohancalum Tech team please help us.
Same happens to me. I solved it by detecting the run is in cancelling status and creating a new thread and executing the pipe on this new thread.
And praise for that if it’s in cancelling status, someday it will be cancelled.
Idk if that’s a good approach but I haven’t found another way.
Having the same problem here as well. Cancelling a run out-of-band seems to sometimes result in that run getting stuck in a “cancelling” state until it eventually becomes “expired”. Until this happens, my users are blocked from adding additional messages.
Seeing this as well. Used to be occasional but seems very common now. Most times cancelling a run doesn’t work and ends up getting stuck and eventually timing out. Causing a lot of headaches for our users.
I encountered the same issue. One thing I observed is that the expires_at field in the run object contains a timestamp, which is ideally set to 10 minutes ahead of the current time. After this time, the run object transitions to an end state, at which point we are allowed to create a new run. My idea is to display a pop-up with relevant information, while in the background, an event listener checks the status of the run.