langgraph-api 0.2.8__py3-none-any.whl → 0.2.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of langgraph-api might be problematic. Click here for more details.
- langgraph_api/__init__.py +1 -1
- langgraph_api/js/tests/api.test.mts +4 -4
- langgraph_api/worker.py +21 -0
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.9.dist-info}/METADATA +1 -1
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.9.dist-info}/RECORD +8 -8
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.9.dist-info}/LICENSE +0 -0
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.9.dist-info}/WHEEL +0 -0
- {langgraph_api-0.2.8.dist-info → langgraph_api-0.2.9.dist-info}/entry_points.txt +0 -0
langgraph_api/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.9"
|
|
@@ -303,7 +303,7 @@ describe("threads crud", () => {
|
|
|
303
303
|
});
|
|
304
304
|
|
|
305
305
|
describe("threads copy", () => {
|
|
306
|
-
it.concurrent("copy", async () => {
|
|
306
|
+
it.concurrent("copy", { retry: 3 }, async () => {
|
|
307
307
|
const assistantId = "agent";
|
|
308
308
|
const thread = await client.threads.create();
|
|
309
309
|
const input = { messages: [{ type: "human", content: "foo" }] };
|
|
@@ -377,7 +377,7 @@ describe("threads copy", () => {
|
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
379
|
|
|
380
|
-
it.concurrent("copy runs", async () => {
|
|
380
|
+
it.concurrent("copy runs", { retry: 3 }, async () => {
|
|
381
381
|
const assistantId = "agent";
|
|
382
382
|
const thread = await client.threads.create();
|
|
383
383
|
|
|
@@ -423,7 +423,7 @@ describe("threads copy", () => {
|
|
|
423
423
|
expect(currentOriginalThreadState).toEqual(originalThreadState);
|
|
424
424
|
});
|
|
425
425
|
|
|
426
|
-
it.concurrent("get thread history", async () => {
|
|
426
|
+
it.concurrent("get thread history", { retry: 3 }, async () => {
|
|
427
427
|
const assistant = await client.assistants.create({ graphId: "agent" });
|
|
428
428
|
const thread = await client.threads.create();
|
|
429
429
|
const input = { messages: [{ type: "human", content: "foo" }] };
|
|
@@ -467,7 +467,7 @@ describe("threads copy", () => {
|
|
|
467
467
|
expect(filteredHistory.at(-1)?.values.messages.length).toBe(4);
|
|
468
468
|
});
|
|
469
469
|
|
|
470
|
-
it.concurrent("copy update", async () => {
|
|
470
|
+
it.concurrent("copy update", { retry: 3 }, async () => {
|
|
471
471
|
const assistantId = "agent";
|
|
472
472
|
const thread = await client.threads.create();
|
|
473
473
|
const input = {
|
langgraph_api/worker.py
CHANGED
|
@@ -275,6 +275,27 @@ async def worker(
|
|
|
275
275
|
# let it bubble up and rollback db transaction, thus marking the run
|
|
276
276
|
# as available to be picked up by another worker
|
|
277
277
|
|
|
278
|
+
# If a stateful run succeeded but no checkoint was returned, it's likely because
|
|
279
|
+
# there was a retriable exception that resumed right at the end
|
|
280
|
+
if checkpoint is None and (not temporary) and webhook and status == "success":
|
|
281
|
+
await logger.ainfo(
|
|
282
|
+
"Fetching missing checkpoint for webhook",
|
|
283
|
+
run_id=str(run_id),
|
|
284
|
+
run_attempt=attempt,
|
|
285
|
+
)
|
|
286
|
+
try:
|
|
287
|
+
state_snapshot = await Threads.State.get(
|
|
288
|
+
conn, run["kwargs"]["config"], subgraphs=True
|
|
289
|
+
)
|
|
290
|
+
checkpoint = {"values": state_snapshot.values}
|
|
291
|
+
except Exception:
|
|
292
|
+
await logger.aerror(
|
|
293
|
+
"Failed to fetch missing checkpoint for webhook. Continuing...",
|
|
294
|
+
exc_info=True,
|
|
295
|
+
run_id=str(run_id),
|
|
296
|
+
run_attempt=attempt,
|
|
297
|
+
)
|
|
298
|
+
|
|
278
299
|
return WorkerResult(
|
|
279
300
|
checkpoint=checkpoint,
|
|
280
301
|
status=status,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
2
|
-
langgraph_api/__init__.py,sha256=
|
|
2
|
+
langgraph_api/__init__.py,sha256=F8OVhAhMXSkvvXYgZtbPn2SG1AQC3joK4yu-FrHt81Y,22
|
|
3
3
|
langgraph_api/api/__init__.py,sha256=YVzpbn5IQotvuuLG9fhS9QMrxXfP4s4EpEMG0n4q3Nw,5625
|
|
4
4
|
langgraph_api/api/assistants.py,sha256=mcKaVeNG8hQAV4IQDhaukS7FgVqTIVQNTyti3GfK2KI,14649
|
|
5
5
|
langgraph_api/api/mcp.py,sha256=RvRYgANqRzNQzSmgjNkq4RlKTtoEJYil04ot9lsmEtE,14352
|
|
@@ -49,7 +49,7 @@ langgraph_api/js/src/utils/importMap.mts,sha256=pX4TGOyUpuuWF82kXcxcv3-8mgusRezO
|
|
|
49
49
|
langgraph_api/js/src/utils/pythonSchemas.mts,sha256=98IW7Z_VP7L_CHNRMb3_MsiV3BgLE2JsWQY_PQcRR3o,685
|
|
50
50
|
langgraph_api/js/src/utils/serde.mts,sha256=D9o6MwTgwPezC_DEmsWS5NnLPnjPMVWIb1I1D4QPEPo,743
|
|
51
51
|
langgraph_api/js/sse.py,sha256=lsfp4nyJyA1COmlKG9e2gJnTttf_HGCB5wyH8OZBER8,4105
|
|
52
|
-
langgraph_api/js/tests/api.test.mts,sha256=
|
|
52
|
+
langgraph_api/js/tests/api.test.mts,sha256=LSWDHTar-AtyazqR8EbnS17MrMr3IvKWysGDZ13p-GM,69432
|
|
53
53
|
langgraph_api/js/tests/auth.test.mts,sha256=mMhKe9ggJw4BgUqzSVwqYY3HLMXXEBZ23iiKK8Yq1mM,21678
|
|
54
54
|
langgraph_api/js/tests/compose-postgres.auth.yml,sha256=iPfJbCeYZdV6GiRLiDn_f7qgpG4TyyGaQ4lV-ZXr6Qk,1768
|
|
55
55
|
langgraph_api/js/tests/compose-postgres.yml,sha256=w4B3YRS0QEnTcZH2-MY0DYvR_c5GcER0uDa1Ga_knf8,1960
|
|
@@ -95,14 +95,14 @@ langgraph_api/tunneling/cloudflare.py,sha256=iKb6tj-VWPlDchHFjuQyep2Dpb-w2NGfJKt
|
|
|
95
95
|
langgraph_api/utils.py,sha256=92mSti9GfGdMRRWyESKQW5yV-75Z9icGHnIrBYvdypU,3619
|
|
96
96
|
langgraph_api/validation.py,sha256=zMuKmwUEBjBgFMwAaeLZmatwGVijKv2sOYtYg7gfRtc,4950
|
|
97
97
|
langgraph_api/webhook.py,sha256=1ncwO0rIZcj-Df9sxSnFEzd1gP1bfS4okeZQS8NSRoE,1382
|
|
98
|
-
langgraph_api/worker.py,sha256=
|
|
98
|
+
langgraph_api/worker.py,sha256=lLrTBfUdUzhPU9W6YQ6sCO3HOaWTfGxfLjlaVPQuOVs,12136
|
|
99
99
|
langgraph_license/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
100
|
langgraph_license/validation.py,sha256=ZKraAVJArAABKqrmHN-EN18ncoNUmRm500Yt1Sc7tUA,537
|
|
101
101
|
langgraph_runtime/__init__.py,sha256=O4GgSmu33c-Pr8Xzxj_brcK5vkm70iNTcyxEjICFZxA,1075
|
|
102
102
|
logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
|
|
103
103
|
openapi.json,sha256=GefWJwBrbrN_jNDAEFlwNEXx1ottRtvjOmKBi965KLU,133756
|
|
104
|
-
langgraph_api-0.2.
|
|
105
|
-
langgraph_api-0.2.
|
|
106
|
-
langgraph_api-0.2.
|
|
107
|
-
langgraph_api-0.2.
|
|
108
|
-
langgraph_api-0.2.
|
|
104
|
+
langgraph_api-0.2.9.dist-info/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
105
|
+
langgraph_api-0.2.9.dist-info/METADATA,sha256=-USWsNozeKkqmxeoMi3Aj_SkdoTp_s2p3AEwtnHq1F4,4240
|
|
106
|
+
langgraph_api-0.2.9.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
107
|
+
langgraph_api-0.2.9.dist-info/entry_points.txt,sha256=3EYLgj89DfzqJHHYGxPH4A_fEtClvlRbWRUHaXO7hj4,77
|
|
108
|
+
langgraph_api-0.2.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|