List of Threads is missing from the API

When we create a thread, we have to maintain a handle to its ID - as there is no way in the API to discover this later on (you can get lists of assistants, assistant files, files, messages, runs).

This adds a layer of complexity to (particularly async) solutions which could be saved by implementing the endpoint GET: /v1/threads/

33 Likes

+1 to this, I would love to push even more of the state management into the api, but unfortunately because i cant list threads right now i still need to store the threads on my side.

4 Likes

Agree, I have same issue. Also, the Threads log in the playground just disappeared after the downtime!

3 Likes

Yep! Same for me, threads are missing, it makes it hard to research and develop with the new Assistants API.

3 Likes

Agreed! Also being able to filter the list by metadata params would be nice. For example, we store the userId in metadata and we just fetch the threads for that particular user. I think this will be a very common usecase.

2 Likes

+1 , I find it very strange that I can use all other Assistant calls but not this one…

1 Like

Agree. We also need the size in tokens of a specified thread!

5 Likes

Also, no way to list Threads in Playground either. I probably have about 5 orphaned threads before I started tracking them.

Not so lucky here, I can’t create a new thread because I didn’t record the ids of the existing ones and I can’t do a cleanup…

1 Like

+đź’Ż the threads/list endpoint will be super useful!

@maszat how many threads you’ve created ±? I was under impression there is no limit on threads amount?

@antoniov9 hard to tell because I was focusing on my cookie and session management troubles at that time, maybe 10-15? I will try tonight, maybe the throttling is removed by then?

1 Like

If you’ve used playground to create a thread, what worked for me was to look for browsing history LOL. Once you know the assistant ID from the URL of any thread (including new ones) eg: “?assistant=asst_xxxx” searching that in your browsing history reveals all the past URLs which should include the thread ID as well eg: “&thread=thread_xxxx”. If you visit the same URL or call it via API it retrieves.

3 Likes

I’d also love to list threads that match a specific value in the metadata I defined. This would be very useful for accessing threads for a specific user. Obviously I can list them all and filter myself (well, once listing them is a thing!), but being able to filter them would be great.

2 Likes

I’m looking for this functionality too.

1 Like

I’m looking for this functionality too.

We also need list of threads with possibility filter by metadata. It was very useful to see list of threads in playground

1 Like

As long as this is available on the API, it’s simple to get this data with any filter needed.

+1 I was assuming that the entire point of the metadata here was for filtering.

Yes, While doing experiment in the Jupyter notebook, I have created many threads and also added message to the thread and created runs. But i didn’t store the thread ids. So now i have lost track all previous threads. Openai wont be able to delete my threads because they don’t know if i have stored the thread ids for future. so now they are dangling? it can neither be accessed nor it can be deleted, there must be solution for this

2 Likes

Looks like the endpoint is not available anymore via API. I get the following error:

Your request to GET /v1/threads must be made with a session key (that is, it can only be made from the browser). You made it with the following key type: secret.