diff --git a/libs/sdk-js/package.json b/libs/sdk-js/package.json index bb5ebea53..ddc0c3b0d 100644 --- a/libs/sdk-js/package.json +++ b/libs/sdk-js/package.json @@ -1,6 +1,6 @@ { "name": "@langchain/langgraph-sdk", - "version": "0.0.69", + "version": "0.0.70", "description": "Client library for interacting with the LangGraph API", "type": "module", "packageManager": "yarn@1.22.19", diff --git a/libs/sdk-js/src/client.ts b/libs/sdk-js/src/client.ts index 7ce6a9e19..0f804b6a8 100644 --- a/libs/sdk-js/src/client.ts +++ b/libs/sdk-js/src/client.ts @@ -621,7 +621,7 @@ export class ThreadsClient< /** * Sort by. */ - sortBy?: "id" | "status" | "created_at" | "updated_at"; + sortBy?: "thread_id" | "status" | "created_at" | "updated_at"; /** * Sort order. * Must be one of 'asc' or 'desc'. diff --git a/libs/sdk-py/langgraph_sdk/client.py b/libs/sdk-py/langgraph_sdk/client.py index e802b5658..85193c398 100644 --- a/libs/sdk-py/langgraph_sdk/client.py +++ b/libs/sdk-py/langgraph_sdk/client.py @@ -1043,8 +1043,10 @@ class ThreadsClient: status: Optional[ThreadStatus] = None, limit: int = 10, offset: int = 0, - sort_by: Literal["id", "status", "created_at", "updated_at"] = "created_at", - sort_order: Literal["asc", "desc"] = "asc", + sort_by: Optional[ + Literal["thread_id", "status", "created_at", "updated_at"] + ] = None, + sort_order: Optional[Literal["asc", "desc"]] = None, headers: Optional[dict[str, str]] = None, ) -> list[Thread]: """Search for threads. @@ -1056,6 +1058,8 @@ class ThreadsClient: Must be one of 'idle', 'busy', 'interrupted' or 'error'. limit: Limit on number of threads to return. offset: Offset in threads table to start search from. + sort_by: Sort by field. + sort_order: Sort order. headers: Optional custom headers to include with the request. Returns: diff --git a/libs/sdk-py/pyproject.toml b/libs/sdk-py/pyproject.toml index c762f33df..f6db9a68b 100644 --- a/libs/sdk-py/pyproject.toml +++ b/libs/sdk-py/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-sdk" -version = "0.1.62" +version = "0.1.63" description = "SDK for interacting with LangGraph API" authors = [] license = "MIT"