langgraph-api 0.2.120__py3-none-any.whl → 0.2.123__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.2.120"
1
+ __version__ = "0.2.123"
langgraph_api/api/runs.py CHANGED
@@ -93,7 +93,6 @@ async def stream_run(
93
93
  payload = await request.json(RunCreateStateful)
94
94
  on_disconnect = payload.get("on_disconnect", "continue")
95
95
  run_id = uuid6()
96
- stream_mode = payload.get("stream_mode", [])
97
96
  sub = asyncio.create_task(Runs.Stream.subscribe(run_id))
98
97
 
99
98
  try:
@@ -118,7 +117,6 @@ async def stream_run(
118
117
  thread_id=thread_id,
119
118
  cancel_on_disconnect=on_disconnect == "cancel",
120
119
  stream_channel=await sub,
121
- stream_mode=stream_mode,
122
120
  last_event_id=None,
123
121
  ),
124
122
  headers={
@@ -135,7 +133,6 @@ async def stream_run_stateless(
135
133
  payload = await request.json(RunCreateStateless)
136
134
  on_disconnect = payload.get("on_disconnect", "continue")
137
135
  run_id = uuid6()
138
- stream_mode = payload.get("stream_mode", [])
139
136
  sub = asyncio.create_task(Runs.Stream.subscribe(run_id))
140
137
 
141
138
  try:
@@ -161,7 +158,6 @@ async def stream_run_stateless(
161
158
  ignore_404=True,
162
159
  cancel_on_disconnect=on_disconnect == "cancel",
163
160
  stream_channel=await sub,
164
- stream_mode=stream_mode,
165
161
  last_event_id=None,
166
162
  ),
167
163
  headers={
@@ -205,7 +201,6 @@ async def wait_run(request: ApiRequest):
205
201
  run["run_id"],
206
202
  thread_id=run["thread_id"],
207
203
  stream_channel=await sub,
208
- stream_mode=["updates", "values", "error"],
209
204
  cancel_on_disconnect=on_disconnect == "cancel",
210
205
  )
211
206
  ) as stream:
@@ -288,7 +283,6 @@ async def wait_run_stateless(request: ApiRequest):
288
283
  run["run_id"],
289
284
  thread_id=run["thread_id"],
290
285
  stream_channel=await sub,
291
- stream_mode=["updates", "values", "error"],
292
286
  ignore_404=True,
293
287
  cancel_on_disconnect=on_disconnect == "cancel",
294
288
  )
@@ -17,6 +17,7 @@ import logging.config
17
17
  import os
18
18
  import pathlib
19
19
  import signal
20
+ from contextlib import asynccontextmanager
20
21
 
21
22
  import structlog
22
23
  import uvloop
@@ -94,11 +95,26 @@ async def health_and_metrics_server():
94
95
 
95
96
  async def entrypoint():
96
97
  from langgraph_api import logging as lg_logging
98
+ from langgraph_api.api import user_router
97
99
 
98
100
  lg_logging.set_logging_context({"entrypoint": "python-queue"})
99
101
  tasks: set[asyncio.Task] = set()
100
102
  tasks.add(asyncio.create_task(health_and_metrics_server()))
101
- async with lifespan(None, with_cron_scheduler=False, taskset=tasks):
103
+
104
+ original_lifespan = user_router.router.lifespan_context if user_router else None
105
+
106
+ @asynccontextmanager
107
+ async def combined_lifespan(app, with_cron_scheduler=False, taskset=None):
108
+ async with lifespan(
109
+ app, with_cron_scheduler=with_cron_scheduler, taskset=taskset
110
+ ):
111
+ if original_lifespan:
112
+ async with original_lifespan(app):
113
+ yield
114
+ else:
115
+ yield
116
+
117
+ async with combined_lifespan(None, with_cron_scheduler=False, taskset=tasks):
102
118
  await asyncio.gather(*tasks)
103
119
 
104
120
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-api
3
- Version: 0.2.120
3
+ Version: 0.2.123
4
4
  Author-email: Nuno Campos <nuno@langchain.dev>, Will Fu-Hinthorn <will@langchain.dev>
5
5
  License: Elastic-2.0
6
6
  License-File: LICENSE
@@ -11,7 +11,7 @@ Requires-Dist: httpx>=0.25.0
11
11
  Requires-Dist: jsonschema-rs<0.30,>=0.20.0
12
12
  Requires-Dist: langchain-core>=0.3.64
13
13
  Requires-Dist: langgraph-checkpoint>=2.0.23
14
- Requires-Dist: langgraph-runtime-inmem<0.7,>=0.6.8
14
+ Requires-Dist: langgraph-runtime-inmem<0.7,>=0.6.9
15
15
  Requires-Dist: langgraph-sdk>=0.2.0
16
16
  Requires-Dist: langgraph>=0.4.0
17
17
  Requires-Dist: langsmith>=0.3.45
@@ -1,4 +1,4 @@
1
- langgraph_api/__init__.py,sha256=NPbiQUuQv5qG-lMY2A17R8G0t9UC2DCgiLLTdyVo0pk,24
1
+ langgraph_api/__init__.py,sha256=f4FopOnqGxy-qyI7u1_dkZJcG5GR_5MHGN7UuHB_BOU,24
2
2
  langgraph_api/asgi_transport.py,sha256=eqifhHxNnxvI7jJqrY1_8RjL4Fp9NdN4prEub2FWBt8,5091
3
3
  langgraph_api/asyncio.py,sha256=Wv4Rwm-a-Cf6JpfgJmVuVlXQ7SlwrjbTn0eq1ux8I2Q,9652
4
4
  langgraph_api/cli.py,sha256=xQojITwmmKSJw48Lr2regcnRPRq2FJqWlPpeyr5TgbU,16158
@@ -13,7 +13,7 @@ langgraph_api/http_metrics.py,sha256=VgM45yU1FkXuI9CIOE_astxAAu2G-OJ42BRbkcos_CQ
13
13
  langgraph_api/logging.py,sha256=4K1Fnq8rrGC9CqJubZtP34Y9P2zh7VXf_41q7bH3OXU,4849
14
14
  langgraph_api/metadata.py,sha256=fVsbwxVitAj4LGVYpCcadYeIFANEaNtcx6LBxQLcTqg,6949
15
15
  langgraph_api/patch.py,sha256=Dgs0PXHytekX4SUL6KsjjN0hHcOtGLvv1GRGbh6PswU,1408
16
- langgraph_api/queue_entrypoint.py,sha256=hC8j-A4cUxibusiiPJBlK0mkmChNZxNcXn5GVwL0yic,4889
16
+ langgraph_api/queue_entrypoint.py,sha256=JzJCB3iYvep-GoAHQ_-H2ZxXVgmzYfvjQsmdBRxgdwM,5444
17
17
  langgraph_api/route.py,sha256=4VBkJMeusfiZtLzyUaKm1HwLHTq0g15y2CRiRhM6xyA,4773
18
18
  langgraph_api/schema.py,sha256=1L7g4TUJjmsaBUCSThycH11-hrdPLxB6mtc3tIHmpbM,6371
19
19
  langgraph_api/serde.py,sha256=0ALETUn582vNF-m0l_WOZGF_scL1VPA39fDkwMJQPrg,5187
@@ -33,7 +33,7 @@ langgraph_api/api/assistants.py,sha256=ecHaID71ReTAZF4qsJzDe5L-2T5iOL2v8p6kQVHLK
33
33
  langgraph_api/api/mcp.py,sha256=qe10ZRMN3f-Hli-9TI8nbQyWvMeBb72YB1PZVbyqBQw,14418
34
34
  langgraph_api/api/meta.py,sha256=fmc7btbtl5KVlU_vQ3Bj4J861IjlqmjBKNtnxSV-S-Q,4198
35
35
  langgraph_api/api/openapi.py,sha256=KToI2glOEsvrhDpwdScdBnL9xoLOqkTxx5zKq2pMuKQ,11957
36
- langgraph_api/api/runs.py,sha256=kV2TpqBpjzvS_9DOHK0jDVtqCRJV_i5G6-XZHeMoA_E,20890
36
+ langgraph_api/api/runs.py,sha256=15AzAIRZfW6VhQiJVzzHRnjfaQJDMF2diPMPJQlJRZc,20598
37
37
  langgraph_api/api/store.py,sha256=TSeMiuMfrifmEnEbL0aObC2DPeseLlmZvAMaMzPgG3Y,5535
38
38
  langgraph_api/api/threads.py,sha256=Cpw1LIWRAF3YBq65OMVXNu9K86WCITaJ5fGWZlzmnUE,9724
39
39
  langgraph_api/api/ui.py,sha256=SPnOxILvbINzp5ObUFaPXCpZeC6Aicqsr3WnW7rLggw,2568
@@ -94,8 +94,8 @@ langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,11
94
94
  LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
95
95
  logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
96
96
  openapi.json,sha256=SPCrzYpta2xTl-WE2W6qwosYdQqLeB8qpzaYEbcK44k,150725
97
- langgraph_api-0.2.120.dist-info/METADATA,sha256=U7soH68I42TpDdER1bIfUXBv9ylPIDdk0IYxLx_iYIE,3890
98
- langgraph_api-0.2.120.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
99
- langgraph_api-0.2.120.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
100
- langgraph_api-0.2.120.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
101
- langgraph_api-0.2.120.dist-info/RECORD,,
97
+ langgraph_api-0.2.123.dist-info/METADATA,sha256=tl7hfGhazVzncvIFdLQci3N8dS_lhVYsMBjUwlSTlTo,3890
98
+ langgraph_api-0.2.123.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
99
+ langgraph_api-0.2.123.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
100
+ langgraph_api-0.2.123.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
101
+ langgraph_api-0.2.123.dist-info/RECORD,,