chore: update oss API spec to match python (#1726)

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
This commit is contained in:
Isaac Francisco
2025-10-15 18:24:34 -07:00
committed by GitHub
parent b7b0e050cf
commit f5865ac3b8
4 changed files with 18 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@langchain/langgraph-api": patch
---
Update API spec to match python api
+7 -1
View File
@@ -68,7 +68,13 @@ api.post(
total = item.total;
}
}
c.res.headers.set("X-Pagination-Total", total.toString());
const nextOffset = (payload.offset ?? 0) + total;
if (total === payload.limit) {
c.res.headers.set("X-Pagination-Next", nextOffset.toString());
c.res.headers.set("X-Pagination-Total", (nextOffset + 1).toString());
} else {
c.res.headers.set("X-Pagination-Total", nextOffset.toString());
}
return jsonExtra(c, result);
}
);
+2 -2
View File
@@ -367,7 +367,7 @@ export class FileSystemAssistants implements AssistantsRepo {
graph_id: options.graph_id,
metadata: mutable.metadata ?? ({} as Metadata),
name: options.name || options.graph_id,
description: options.description,
description: options.description ?? null,
};
STORE.assistant_versions.push({
@@ -379,7 +379,7 @@ export class FileSystemAssistants implements AssistantsRepo {
metadata: mutable.metadata ?? ({} as Metadata),
created_at: now,
name: options.name || options.graph_id,
description: options.description,
description: options.description ?? null,
});
return STORE.assistants[assistant_id];
+4 -4
View File
@@ -82,8 +82,8 @@ export interface RunnableConfig {
}
export interface Assistant {
name: string | undefined;
description: string | undefined;
name: string;
description: string | null;
assistant_id: string;
graph_id: string;
created_at: Date;
@@ -102,8 +102,8 @@ export interface AssistantVersion {
context: unknown;
metadata: Metadata;
created_at: Date;
name: string | undefined;
description: string | undefined;
name: string;
description: string | null;
}
export interface RunKwargs {