langgraph-api 0.4.1__py3-none-any.whl → 0.4.7__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.4.1"
1
+ __version__ = "0.4.7"
langgraph_api/api/runs.py CHANGED
@@ -4,11 +4,12 @@ from typing import Literal, cast
4
4
  from uuid import uuid4
5
5
 
6
6
  import orjson
7
+ import structlog
7
8
  from starlette.exceptions import HTTPException
8
9
  from starlette.responses import Response, StreamingResponse
9
10
 
10
11
  from langgraph_api import config
11
- from langgraph_api.asyncio import ValueEvent, aclosing
12
+ from langgraph_api.asyncio import ValueEvent
12
13
  from langgraph_api.models.run import create_valid_run
13
14
  from langgraph_api.route import ApiRequest, ApiResponse, ApiRoute
14
15
  from langgraph_api.schema import CRON_FIELDS, RUN_FIELDS
@@ -34,6 +35,8 @@ from langgraph_runtime.database import connect
34
35
  from langgraph_runtime.ops import Crons, Runs, Threads
35
36
  from langgraph_runtime.retry import retry_db
36
37
 
38
+ logger = structlog.stdlib.get_logger(__name__)
39
+
37
40
 
38
41
  @retry_db
39
42
  async def create_run(request: ApiRequest):
@@ -101,9 +104,7 @@ async def stream_run(
101
104
  payload = await request.json(RunCreateStateful)
102
105
  on_disconnect = payload.get("on_disconnect", "continue")
103
106
  run_id = uuid7()
104
- sub = asyncio.create_task(Runs.Stream.subscribe(run_id, thread_id))
105
-
106
- try:
107
+ async with await Runs.Stream.subscribe(run_id, thread_id) as sub:
107
108
  async with connect() as conn:
108
109
  run = await create_valid_run(
109
110
  conn,
@@ -113,25 +114,20 @@ async def stream_run(
113
114
  run_id=run_id,
114
115
  request_start_time=request.scope.get("request_start_time_ms"),
115
116
  )
116
- except Exception:
117
- if not sub.cancelled():
118
- handle = await sub
119
- await handle.__aexit__(None, None, None)
120
- raise
121
117
 
122
- return EventSourceResponse(
123
- Runs.Stream.join(
124
- run["run_id"],
125
- thread_id=thread_id,
126
- cancel_on_disconnect=on_disconnect == "cancel",
127
- stream_channel=await sub,
128
- last_event_id=None,
129
- ),
130
- headers={
131
- "Location": f"/threads/{thread_id}/runs/{run['run_id']}/stream",
132
- "Content-Location": f"/threads/{thread_id}/runs/{run['run_id']}",
133
- },
134
- )
118
+ return EventSourceResponse(
119
+ Runs.Stream.join(
120
+ run["run_id"],
121
+ thread_id=thread_id,
122
+ cancel_on_disconnect=on_disconnect == "cancel",
123
+ stream_channel=sub,
124
+ last_event_id=None,
125
+ ),
126
+ headers={
127
+ "Location": f"/threads/{thread_id}/runs/{run['run_id']}/stream",
128
+ "Content-Location": f"/threads/{thread_id}/runs/{run['run_id']}",
129
+ },
130
+ )
135
131
 
136
132
 
137
133
  async def stream_run_stateless(
@@ -143,8 +139,7 @@ async def stream_run_stateless(
143
139
  on_disconnect = payload.get("on_disconnect", "continue")
144
140
  run_id = uuid7()
145
141
  thread_id = uuid4()
146
- sub = asyncio.create_task(Runs.Stream.subscribe(run_id, thread_id))
147
- try:
142
+ async with await Runs.Stream.subscribe(run_id, thread_id) as sub:
148
143
  async with connect() as conn:
149
144
  run = await create_valid_run(
150
145
  conn,
@@ -155,26 +150,21 @@ async def stream_run_stateless(
155
150
  request_start_time=request.scope.get("request_start_time_ms"),
156
151
  temporary=True,
157
152
  )
158
- except Exception:
159
- if not sub.cancelled():
160
- handle = await sub
161
- await handle.__aexit__(None, None, None)
162
- raise
163
153
 
164
- return EventSourceResponse(
165
- Runs.Stream.join(
166
- run["run_id"],
167
- thread_id=run["thread_id"],
168
- ignore_404=True,
169
- cancel_on_disconnect=on_disconnect == "cancel",
170
- stream_channel=await sub,
171
- last_event_id=None,
172
- ),
173
- headers={
174
- "Location": f"/runs/{run['run_id']}/stream",
175
- "Content-Location": f"/runs/{run['run_id']}",
176
- },
177
- )
154
+ return EventSourceResponse(
155
+ Runs.Stream.join(
156
+ run["run_id"],
157
+ thread_id=run["thread_id"],
158
+ ignore_404=True,
159
+ cancel_on_disconnect=on_disconnect == "cancel",
160
+ stream_channel=sub,
161
+ last_event_id=None,
162
+ ),
163
+ headers={
164
+ "Location": f"/runs/{run['run_id']}/stream",
165
+ "Content-Location": f"/runs/{run['run_id']}",
166
+ },
167
+ )
178
168
 
179
169
 
180
170
  @retry_db
@@ -184,9 +174,7 @@ async def wait_run(request: ApiRequest):
184
174
  payload = await request.json(RunCreateStateful)
185
175
  on_disconnect = payload.get("on_disconnect", "continue")
186
176
  run_id = uuid7()
187
- sub = asyncio.create_task(Runs.Stream.subscribe(run_id, thread_id))
188
-
189
- try:
177
+ async with await Runs.Stream.subscribe(run_id, thread_id) as sub:
190
178
  async with connect() as conn:
191
179
  run = await create_valid_run(
192
180
  conn,
@@ -196,25 +184,17 @@ async def wait_run(request: ApiRequest):
196
184
  run_id=run_id,
197
185
  request_start_time=request.scope.get("request_start_time_ms"),
198
186
  )
199
- except Exception:
200
- if not sub.cancelled():
201
- handle = await sub
202
- await handle.__aexit__(None, None, None)
203
- raise
204
187
 
205
- last_chunk = ValueEvent()
188
+ last_chunk = ValueEvent()
206
189
 
207
- async def consume():
208
- vchunk: bytes | None = None
209
- async with aclosing(
210
- Runs.Stream.join(
190
+ async def consume():
191
+ vchunk: bytes | None = None
192
+ async for mode, chunk, _ in Runs.Stream.join(
211
193
  run["run_id"],
212
194
  thread_id=run["thread_id"],
213
- stream_channel=await sub,
195
+ stream_channel=sub,
214
196
  cancel_on_disconnect=on_disconnect == "cancel",
215
- )
216
- ) as stream:
217
- async for mode, chunk, _ in stream:
197
+ ):
218
198
  if (
219
199
  mode == b"values"
220
200
  or mode == b"updates"
@@ -223,43 +203,47 @@ async def wait_run(request: ApiRequest):
223
203
  vchunk = chunk
224
204
  elif mode == b"error":
225
205
  vchunk = orjson.dumps({"__error__": orjson.Fragment(chunk)})
226
- if vchunk is not None:
227
- last_chunk.set(vchunk)
228
- else:
229
- async with connect() as conn:
230
- thread_iter = await Threads.get(conn, thread_id)
206
+ if vchunk is not None:
207
+ last_chunk.set(vchunk)
208
+ else:
209
+ async with connect() as conn:
210
+ thread_iter = await Threads.get(conn, thread_id)
211
+ try:
212
+ thread = await anext(thread_iter)
213
+ last_chunk.set(thread["values"])
214
+ except StopAsyncIteration:
215
+ await logger.awarning(
216
+ f"No checkpoint found for thread {thread_id}",
217
+ thread_id=thread_id,
218
+ )
219
+ last_chunk.set(b"{}")
220
+
221
+ # keep the connection open by sending whitespace every 5 seconds
222
+ # leading whitespace will be ignored by json parsers
223
+ async def body() -> AsyncIterator[bytes]:
224
+ stream = asyncio.create_task(consume())
225
+ while True:
231
226
  try:
232
- thread = await anext(thread_iter)
233
- last_chunk.set(thread["values"])
234
- except StopAsyncIteration:
235
- last_chunk.set(b"{}")
236
-
237
- # keep the connection open by sending whitespace every 5 seconds
238
- # leading whitespace will be ignored by json parsers
239
- async def body() -> AsyncIterator[bytes]:
240
- stream = asyncio.create_task(consume())
241
- while True:
242
- try:
243
- if stream.done():
244
- # raise stream exception if any
245
- stream.result()
246
- yield await asyncio.wait_for(last_chunk.wait(), timeout=5)
247
- break
248
- except TimeoutError:
249
- yield b"\n"
250
- except asyncio.CancelledError:
251
- stream.cancel()
252
- await stream
253
- raise
254
-
255
- return StreamingResponse(
256
- body(),
257
- media_type="application/json",
258
- headers={
259
- "Location": f"/threads/{thread_id}/runs/{run['run_id']}/join",
260
- "Content-Location": f"/threads/{thread_id}/runs/{run['run_id']}",
261
- },
262
- )
227
+ if stream.done():
228
+ # raise stream exception if any
229
+ stream.result()
230
+ yield await asyncio.wait_for(last_chunk.wait(), timeout=5)
231
+ break
232
+ except TimeoutError:
233
+ yield b"\n"
234
+ except asyncio.CancelledError:
235
+ stream.cancel()
236
+ await stream
237
+ raise
238
+
239
+ return StreamingResponse(
240
+ body(),
241
+ media_type="application/json",
242
+ headers={
243
+ "Location": f"/threads/{thread_id}/runs/{run['run_id']}/join",
244
+ "Content-Location": f"/threads/{thread_id}/runs/{run['run_id']}",
245
+ },
246
+ )
263
247
 
264
248
 
265
249
  @retry_db
@@ -270,9 +254,7 @@ async def wait_run_stateless(request: ApiRequest):
270
254
  on_disconnect = payload.get("on_disconnect", "continue")
271
255
  run_id = uuid7()
272
256
  thread_id = uuid4()
273
- sub = asyncio.create_task(Runs.Stream.subscribe(run_id, thread_id))
274
-
275
- try:
257
+ async with await Runs.Stream.subscribe(run_id, thread_id) as sub:
276
258
  async with connect() as conn:
277
259
  run = await create_valid_run(
278
260
  conn,
@@ -283,25 +265,18 @@ async def wait_run_stateless(request: ApiRequest):
283
265
  request_start_time=request.scope.get("request_start_time_ms"),
284
266
  temporary=True,
285
267
  )
286
- except Exception:
287
- if not sub.cancelled():
288
- handle = await sub
289
- await handle.__aexit__(None, None, None)
290
- raise
291
- last_chunk = ValueEvent()
292
-
293
- async def consume():
294
- vchunk: bytes | None = None
295
- async with aclosing(
296
- Runs.Stream.join(
268
+
269
+ last_chunk = ValueEvent()
270
+
271
+ async def consume():
272
+ vchunk: bytes | None = None
273
+ async for mode, chunk, _ in Runs.Stream.join(
297
274
  run["run_id"],
298
275
  thread_id=run["thread_id"],
299
- stream_channel=await sub,
276
+ stream_channel=sub,
300
277
  ignore_404=True,
301
278
  cancel_on_disconnect=on_disconnect == "cancel",
302
- )
303
- ) as stream:
304
- async for mode, chunk, _ in stream:
279
+ ):
305
280
  if (
306
281
  mode == b"values"
307
282
  or mode == b"updates"
@@ -310,38 +285,43 @@ async def wait_run_stateless(request: ApiRequest):
310
285
  vchunk = chunk
311
286
  elif mode == b"error":
312
287
  vchunk = orjson.dumps({"__error__": orjson.Fragment(chunk)})
313
- if vchunk is not None:
314
- last_chunk.set(vchunk)
315
- else:
316
- # we can't fetch the thread (it was deleted), so just return empty values
317
- last_chunk.set(b"{}")
318
-
319
- # keep the connection open by sending whitespace every 5 seconds
320
- # leading whitespace will be ignored by json parsers
321
- async def body() -> AsyncIterator[bytes]:
322
- stream = asyncio.create_task(consume())
323
- while True:
324
- try:
325
- if stream.done():
326
- # raise stream exception if any
327
- stream.result()
328
- yield await asyncio.wait_for(last_chunk.wait(), timeout=5)
329
- break
330
- except TimeoutError:
331
- yield b"\n"
332
- except asyncio.CancelledError:
333
- stream.cancel("Run stream cancelled")
334
- await stream
335
- raise
336
-
337
- return StreamingResponse(
338
- body(),
339
- media_type="application/json",
340
- headers={
341
- "Location": f"/threads/{run['thread_id']}/runs/{run['run_id']}/join",
342
- "Content-Location": f"/threads/{run['thread_id']}/runs/{run['run_id']}",
343
- },
344
- )
288
+ if vchunk is not None:
289
+ last_chunk.set(vchunk)
290
+ else:
291
+ # we can't fetch the thread (it was deleted), so just return empty values
292
+ await logger.awarning(
293
+ "No checkpoint emitted for stateless run",
294
+ run_id=run["run_id"],
295
+ thread_id=run["thread_id"],
296
+ )
297
+ last_chunk.set(b"{}")
298
+
299
+ # keep the connection open by sending whitespace every 5 seconds
300
+ # leading whitespace will be ignored by json parsers
301
+ async def body() -> AsyncIterator[bytes]:
302
+ stream = asyncio.create_task(consume())
303
+ while True:
304
+ try:
305
+ if stream.done():
306
+ # raise stream exception if any
307
+ stream.result()
308
+ yield await asyncio.wait_for(last_chunk.wait(), timeout=5)
309
+ break
310
+ except TimeoutError:
311
+ yield b"\n"
312
+ except asyncio.CancelledError:
313
+ stream.cancel("Run stream cancelled")
314
+ await stream
315
+ raise
316
+
317
+ return StreamingResponse(
318
+ body(),
319
+ media_type="application/json",
320
+ headers={
321
+ "Location": f"/threads/{run['thread_id']}/runs/{run['run_id']}/join",
322
+ "Content-Location": f"/threads/{run['thread_id']}/runs/{run['run_id']}",
323
+ },
324
+ )
345
325
 
346
326
 
347
327
  @retry_db
@@ -1,3 +1,4 @@
1
+ from typing import get_args
1
2
  from uuid import uuid4
2
3
 
3
4
  from starlette.exceptions import HTTPException
@@ -5,7 +6,7 @@ from starlette.responses import Response
5
6
  from starlette.routing import BaseRoute
6
7
 
7
8
  from langgraph_api.route import ApiRequest, ApiResponse, ApiRoute
8
- from langgraph_api.schema import THREAD_FIELDS
9
+ from langgraph_api.schema import THREAD_FIELDS, ThreadStreamMode
9
10
  from langgraph_api.sse import EventSourceResponse
10
11
  from langgraph_api.state import state_snapshot_to_thread_state
11
12
  from langgraph_api.utils import (
@@ -293,10 +294,31 @@ async def join_thread_stream(request: ApiRequest):
293
294
  validate_stream_id(
294
295
  last_event_id, "Invalid last-event-id: must be a valid Redis stream ID"
295
296
  )
297
+
298
+ # Parse stream_modes parameter - can be single string or comma-separated list
299
+ stream_modes_param = request.query_params.get("stream_modes")
300
+ if stream_modes_param:
301
+ if "," in stream_modes_param:
302
+ # Handle comma-separated list
303
+ stream_modes = [mode.strip() for mode in stream_modes_param.split(",")]
304
+ else:
305
+ # Handle single value
306
+ stream_modes = [stream_modes_param]
307
+ # Validate each mode
308
+ for mode in stream_modes:
309
+ if mode not in get_args(ThreadStreamMode):
310
+ raise HTTPException(
311
+ status_code=422, detail=f"Invalid stream mode: {mode}"
312
+ )
313
+ else:
314
+ # Default to run_modes
315
+ stream_modes = ["run_modes"]
316
+
296
317
  return EventSourceResponse(
297
318
  Threads.Stream.join(
298
319
  thread_id,
299
320
  last_event_id=last_event_id,
321
+ stream_modes=stream_modes,
300
322
  ),
301
323
  )
302
324
 
langgraph_api/asyncio.py CHANGED
@@ -162,7 +162,8 @@ class SimpleTaskGroup(AbstractAsyncContextManager["SimpleTaskGroup"]):
162
162
  taskset: set[asyncio.Task] | None = None,
163
163
  taskgroup_name: str | None = None,
164
164
  ) -> None:
165
- self.tasks = taskset if taskset is not None else set()
165
+ # Copy the taskset to avoid modifying the original set unintentionally (like in lifespan)
166
+ self.tasks = taskset.copy() if taskset is not None else set()
166
167
  self.cancel = cancel
167
168
  self.wait = wait
168
169
  if taskset:
@@ -6,3 +6,4 @@ LANGGRAPH_PY_MINOR = tuple(map(int, __version__.split(".")[:2]))
6
6
  OMIT_PENDING_SENDS = LANGGRAPH_PY_MINOR >= (0, 5)
7
7
  USE_RUNTIME_CONTEXT_API = LANGGRAPH_PY_MINOR >= (0, 6)
8
8
  USE_NEW_INTERRUPTS = LANGGRAPH_PY_MINOR >= (0, 6)
9
+ USE_DURABILITY = LANGGRAPH_PY_MINOR >= (0, 6)
langgraph_api/logging.py CHANGED
@@ -69,9 +69,12 @@ class AddApiVersion:
69
69
  def __call__(
70
70
  self, logger: logging.Logger, method_name: str, event_dict: EventDict
71
71
  ) -> EventDict:
72
- from langgraph_api import __version__
72
+ try:
73
+ from langgraph_api import __version__
73
74
 
74
- event_dict["langgraph_api_version"] = __version__
75
+ event_dict["langgraph_api_version"] = __version__
76
+ except ImportError:
77
+ pass
75
78
  return event_dict
76
79
 
77
80
 
@@ -106,6 +106,8 @@ class RunCreateDict(TypedDict):
106
106
  """Create the thread if it doesn't exist. If False, reply with 404."""
107
107
  langsmith_tracer: LangSmithTracer | None
108
108
  """Configuration for additional tracing with LangSmith."""
109
+ durability: str | None
110
+ """Durability level for the run. Must be one of 'sync', 'async', or 'exit'."""
109
111
 
110
112
 
111
113
  def ensure_ids(
@@ -322,6 +324,11 @@ async def create_valid_run(
322
324
  put_time_start = time.time()
323
325
  if_not_exists = payload.get("if_not_exists", "reject")
324
326
 
327
+ durability = payload.get("durability")
328
+ if durability is None:
329
+ checkpoint_during = payload.get("checkpoint_during")
330
+ durability = "async" if checkpoint_during in (None, True) else "exit"
331
+
325
332
  run_coro = Runs.put(
326
333
  conn,
327
334
  assistant_id,
@@ -339,6 +346,7 @@ async def create_valid_run(
339
346
  "subgraphs": payload.get("stream_subgraphs", False),
340
347
  "resumable": stream_resumable,
341
348
  "checkpoint_during": payload.get("checkpoint_during", True),
349
+ "durability": durability,
342
350
  },
343
351
  metadata=payload.get("metadata"),
344
352
  status="pending",
langgraph_api/schema.py CHANGED
@@ -19,6 +19,8 @@ StreamMode = Literal[
19
19
  "values", "messages", "updates", "events", "debug", "tasks", "checkpoints", "custom"
20
20
  ]
21
21
 
22
+ ThreadStreamMode = Literal["lifecycle", "run_modes", "state_update"]
23
+
22
24
  MultitaskStrategy = Literal["reject", "rollback", "interrupt", "enqueue"]
23
25
 
24
26
  OnConflictBehavior = Literal["raise", "do_nothing"]
langgraph_api/stream.py CHANGED
@@ -30,7 +30,7 @@ from langgraph_api import __version__
30
30
  from langgraph_api import store as api_store
31
31
  from langgraph_api.asyncio import ValueEvent, wait_if_not_done
32
32
  from langgraph_api.command import map_cmd
33
- from langgraph_api.feature_flags import USE_RUNTIME_CONTEXT_API
33
+ from langgraph_api.feature_flags import USE_DURABILITY, USE_RUNTIME_CONTEXT_API
34
34
  from langgraph_api.graph import get_graph
35
35
  from langgraph_api.js.base import BaseRemotePregel
36
36
  from langgraph_api.metadata import HOST, PLAN, USER_API_URL, incr_nodes
@@ -134,6 +134,14 @@ async def astream_state(
134
134
  kwargs = run["kwargs"].copy()
135
135
  kwargs.pop("webhook", None)
136
136
  kwargs.pop("resumable", False)
137
+ if USE_DURABILITY:
138
+ checkpoint_during = kwargs.pop("checkpoint_during")
139
+ if not kwargs.get("durability") and checkpoint_during:
140
+ kwargs["durability"] = "async" if checkpoint_during else "exit"
141
+ else:
142
+ durability = kwargs.pop("durability")
143
+ if not kwargs.get("checkpoint_during") and durability in ("async", "exit"):
144
+ kwargs["checkpoint_during"] = durability == "async"
137
145
  subgraphs = kwargs.get("subgraphs", False)
138
146
  temporary = kwargs.pop("temporary", False)
139
147
  context = kwargs.pop("context", None)
@@ -59,6 +59,14 @@ def should_include_header(key: str) -> bool:
59
59
  Returns:
60
60
  True if the header should be included, False otherwise
61
61
  """
62
+ if (
63
+ key == "x-api-key"
64
+ or key == "x-service-key"
65
+ or key == "x-tenant-id"
66
+ or key == "authorization"
67
+ ):
68
+ return False
69
+
62
70
  include_patterns, exclude_patterns = get_header_patterns("configurable_headers")
63
71
 
64
72
  return pattern_matches(key, include_patterns, exclude_patterns)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-api
3
- Version: 0.4.1
3
+ Version: 0.4.7
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
@@ -1,28 +1,28 @@
1
- langgraph_api/__init__.py,sha256=pMtTmSUht-XtbR_7Doz6bsQqopJJd8rZ8I8zy2HwwoA,22
1
+ langgraph_api/__init__.py,sha256=MHGyAIWXVeovtteWUUSzLq9UGWJLLooUZCXB9KGpNK8,22
2
2
  langgraph_api/asgi_transport.py,sha256=XtiLOu4WWsd-xizagBLzT5xUkxc9ZG9YqwvETBPjBFE,5161
3
- langgraph_api/asyncio.py,sha256=mZ7G32JjrGxrlH4OMy7AKlBQo5bZt4Sm2rlrBcU-Vj8,9483
3
+ langgraph_api/asyncio.py,sha256=NjHFvZStKryAAfGOrl3-efHtCzibvpDx-dl8PnrE1Tk,9588
4
4
  langgraph_api/cli.py,sha256=-ruIeKi1imvS6GriOfRDZY-waV4SbWiJ0BEFAciPVYI,16330
5
5
  langgraph_api/command.py,sha256=3O9v3i0OPa96ARyJ_oJbLXkfO8rPgDhLCswgO9koTFA,768
6
6
  langgraph_api/config.py,sha256=r9mmbyZlhBuJLpnTkaOLcNH6ufFNqm_2eCiuOmhqRl0,12241
7
7
  langgraph_api/cron_scheduler.py,sha256=25wYzEQrhPEivZrAPYOmzLPDOQa-aFogU37mTXc9TJk,2566
8
8
  langgraph_api/errors.py,sha256=zlnl3xXIwVG0oGNKKpXf1an9Rn_SBDHSyhe53hU6aLw,1858
9
9
  langgraph_api/executor_entrypoint.py,sha256=CaX813ygtf9CpOaBkfkQXJAHjFtmlScCkrOvTDmu4Aw,750
10
- langgraph_api/feature_flags.py,sha256=GjwmNjfg0Jhs3OzR2VbK2WgrRy3o5l8ibIYiUtQkDPA,363
10
+ langgraph_api/feature_flags.py,sha256=x28NwFJXdfuGW2uUmon6lBSh0pGBo27bw_Se72TO4sM,409
11
11
  langgraph_api/graph.py,sha256=HTjJNQadrdi1tzJYNJ_iPIR6-zqC4-hj6YTD6zGQHYA,25072
12
12
  langgraph_api/http.py,sha256=fyK-H-0UfNy_BzuVW3aWWGvhRavmGAVMkDwDArryJ_4,5659
13
13
  langgraph_api/http_metrics.py,sha256=MU9ccXt7aBb0AJ2SWEjwtbtbJEWmeqSdx7-CI51e32o,5594
14
- langgraph_api/logging.py,sha256=ZZ95dDdWDayIbH1bgwNfn0U3CQ8kDoAvDFBDACna4-A,5150
14
+ langgraph_api/logging.py,sha256=qB6q_cUba31edE4_D6dBGhdiUTpW7sXAOepUjYb_R50,5216
15
15
  langgraph_api/metadata.py,sha256=fVsbwxVitAj4LGVYpCcadYeIFANEaNtcx6LBxQLcTqg,6949
16
16
  langgraph_api/patch.py,sha256=iLwSd9ZWoVj6MxozMyGyMvWWbE9RIP5eZX1dpCBSlSU,1480
17
17
  langgraph_api/queue_entrypoint.py,sha256=yFzVX3_YKTq4w1A5h5nRpVfiWuSOeJ9acHMPAcTIrKY,5282
18
18
  langgraph_api/route.py,sha256=EBhELuJ1He-ZYcAnR5YTImcIeDtWthDae5CHELBxPkM,5056
19
- langgraph_api/schema.py,sha256=6gabS4_1IeRWV5lyuDV-2i__8brXl89elAlmD5BmEII,8370
19
+ langgraph_api/schema.py,sha256=AsgF0dIjBvDd_PDy20mGqB_IkBLgVvSj8qRKG_lPlec,8440
20
20
  langgraph_api/serde.py,sha256=3GvelKhySjlXaNqpg2GyUxU6-NEkvif7WlMF9if_EgU,6029
21
21
  langgraph_api/server.py,sha256=uCAqPgCLJ6ckslLs0i_dacSR8mzuR0Y6PkkJYk0O3bE,7196
22
22
  langgraph_api/sse.py,sha256=SLdtZmTdh5D8fbWrQjuY9HYLd2dg8Rmi6ZMmFMVc2iE,4204
23
23
  langgraph_api/state.py,sha256=5RTOShiFVnkx-o6t99_x63CGwXw_8Eb-dSTpYirP8ro,4683
24
24
  langgraph_api/store.py,sha256=NIoNZojs6NbtG3VLBPQEFNttvp7XPkHAfjbQ3gY7aLY,4701
25
- langgraph_api/stream.py,sha256=IpGW9vpknI_wWteEmZfQKqCYqbaJAzOpq0FgdFJP60s,18528
25
+ langgraph_api/stream.py,sha256=V8jWwA3wBRenMk3WIFkt0OLXm_LhPwg_Yj_tP4Dc6iI,18970
26
26
  langgraph_api/thread_ttl.py,sha256=7H3gFlWcUiODPoaEzcwB0LR61uvcuyjD0ew_4BztB7k,1902
27
27
  langgraph_api/traceblock.py,sha256=Qq5CUdefnMDaRDnyvBSWGBClEj-f3oO7NbH6fedxOSE,630
28
28
  langgraph_api/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -34,9 +34,9 @@ langgraph_api/api/assistants.py,sha256=5gVvU58Y1-EftBhCHGbEaOi_7cqGMKWhOt_GVfBC0
34
34
  langgraph_api/api/mcp.py,sha256=qe10ZRMN3f-Hli-9TI8nbQyWvMeBb72YB1PZVbyqBQw,14418
35
35
  langgraph_api/api/meta.py,sha256=dFD9ZgykbKARLdVSaJD9vO3CShvEyBmGpkjE8tqii0c,4448
36
36
  langgraph_api/api/openapi.py,sha256=If-z1ckXt-Yu5bwQytK1LWyX_T7G46UtLfixgEP8hwc,11959
37
- langgraph_api/api/runs.py,sha256=1RlD4WA8auCNugFjJSgaM9WPnwEHeWsJLEuKpwSRqcU,22089
37
+ langgraph_api/api/runs.py,sha256=Dzqg3Klnp_7QVHl26J51DpSlMvBhgUdwcKeeMQdqa4Y,22127
38
38
  langgraph_api/api/store.py,sha256=xGcPFx4v-VxlK6HRU9uCjzCQ0v66cvc3o_PB5_g7n0Q,5550
39
- langgraph_api/api/threads.py,sha256=xjeA6eUp4r19YYvqkfe8c3b_u4yIg6jvjq-EmlGu1kI,11150
39
+ langgraph_api/api/threads.py,sha256=dw176K8gFh0BIxADmkyZw68brzlOqUZbtpFBNQPxvow,11998
40
40
  langgraph_api/api/ui.py,sha256=_genglTUy5BMHlL0lkQypX524yFv6Z5fraIvnrxp7yE,2639
41
41
  langgraph_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  langgraph_api/auth/custom.py,sha256=psETw_GpLWClBbd_ESVPRLUz9GLQ0_XNsuUDSVbtZy0,22522
@@ -78,13 +78,13 @@ langgraph_api/middleware/http_logger.py,sha256=2LABfhzTAUtqT8nf1ACy8cYXteatkwraB
78
78
  langgraph_api/middleware/private_network.py,sha256=eYgdyU8AzU2XJu362i1L8aSFoQRiV7_aLBPw7_EgeqI,2111
79
79
  langgraph_api/middleware/request_id.py,sha256=SDj3Yi3WvTbFQ2ewrPQBjAV8sYReOJGeIiuoHeZpR9g,1242
80
80
  langgraph_api/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
- langgraph_api/models/run.py,sha256=jPGWcW9fd1KFoXZTSXMMvc0IiXDXk3yoZ5kjdqxZ1mg,15536
81
+ langgraph_api/models/run.py,sha256=21VmE9R1GeHEgshDYGm462ADFo7tkBx-JJGDOAdrDcA,15894
82
82
  langgraph_api/tunneling/cloudflare.py,sha256=iKb6tj-VWPlDchHFjuQyep2Dpb-w2NGfJKt-WJG9LH0,3650
83
83
  langgraph_api/utils/__init__.py,sha256=yCMq7pOMlmeNmi2Fh8U7KLiljBdOMcF0L2SfpobnKKE,5703
84
84
  langgraph_api/utils/cache.py,sha256=SrtIWYibbrNeZzLXLUGBFhJPkMVNQnVxR5giiYGHEfI,1810
85
85
  langgraph_api/utils/config.py,sha256=Tbp4tKDSLKXQJ44EKr885wAQupY-9VWNJ6rgUU2oLOY,4162
86
86
  langgraph_api/utils/future.py,sha256=lXsRQPhJwY7JUbFFZrK-94JjgsToLu-EWU896hvbUxE,7289
87
- langgraph_api/utils/headers.py,sha256=Mfh8NEbb0leaTDQPZNUwQBlBmG8snKFftvPzJ5qSgC4,2777
87
+ langgraph_api/utils/headers.py,sha256=eN7CXh7X7iFtLicKFdKX0jhhmWWyxAAfrths7mKNtO4,2942
88
88
  langgraph_api/utils/uuids.py,sha256=AW_9-1iFqK2K5hljmi-jtaNzUIoBshk5QPt8LbpbD2g,2975
89
89
  langgraph_license/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
90
  langgraph_license/validation.py,sha256=CU38RUZ5xhP1S8F_y8TNeV6OmtO-tIGjCXbXTwJjJO4,612
@@ -99,9 +99,9 @@ langgraph_runtime/retry.py,sha256=V0duD01fO7GUQ_btQkp1aoXcEOFhXooGVP6q4yMfuyY,11
99
99
  langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,114
100
100
  LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
101
101
  logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
102
- openapi.json,sha256=kT_Xi6PAI64jLUalbdh0TtIRy1PfqQBxSu-rbyo_ZyA,162474
103
- langgraph_api-0.4.1.dist-info/METADATA,sha256=v2nNOyHqw8ReH5uNs_tQQeMgnMk969MloE1rsY9P_ow,3891
104
- langgraph_api-0.4.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
105
- langgraph_api-0.4.1.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
106
- langgraph_api-0.4.1.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
107
- langgraph_api-0.4.1.dist-info/RECORD,,
102
+ openapi.json,sha256=FC4L4qGt6Twl933Z78v2y99WA_sNk74-TTQdG9MzFgE,164038
103
+ langgraph_api-0.4.7.dist-info/METADATA,sha256=kmNYIc3yTunNik1q9Fcd_ArzoV-aB65cF1ksp0YWvF4,3891
104
+ langgraph_api-0.4.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
105
+ langgraph_api-0.4.7.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
106
+ langgraph_api-0.4.7.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
107
+ langgraph_api-0.4.7.dist-info/RECORD,,
openapi.json CHANGED
@@ -1550,6 +1550,29 @@
1550
1550
  },
1551
1551
  "name": "Last-Event-ID",
1552
1552
  "in": "header"
1553
+ },
1554
+ {
1555
+ "required": false,
1556
+ "schema": {
1557
+ "anyOf": [
1558
+ {
1559
+ "type": "string",
1560
+ "enum": ["lifecycle", "run_modes", "state_update"]
1561
+ },
1562
+ {
1563
+ "type": "array",
1564
+ "items": {
1565
+ "type": "string",
1566
+ "enum": ["lifecycle", "run_modes", "state_update"]
1567
+ }
1568
+ }
1569
+ ],
1570
+ "default": ["run_modes"],
1571
+ "title": "Stream Modes",
1572
+ "description": "Stream modes to control which events are returned. 'lifecycle' returns only run start/end events, 'run_modes' returns all run events (default behavior), 'state_update' returns only state update events."
1573
+ },
1574
+ "name": "stream_modes",
1575
+ "in": "query"
1553
1576
  }
1554
1577
  ],
1555
1578
  "responses": {
@@ -4413,6 +4436,17 @@
4413
4436
  "title": "Checkpoint During",
4414
4437
  "description": "Whether to checkpoint during the run.",
4415
4438
  "default": false
4439
+ },
4440
+ "durability": {
4441
+ "type": "string",
4442
+ "enum": [
4443
+ "sync",
4444
+ "async",
4445
+ "exit"
4446
+ ],
4447
+ "title": "Durability",
4448
+ "description": "Durability level for the run. Must be one of 'sync', 'async', or 'exit'.",
4449
+ "default": "async"
4416
4450
  }
4417
4451
  },
4418
4452
  "type": "object",
@@ -4649,6 +4683,17 @@
4649
4683
  "title": "Checkpoint During",
4650
4684
  "description": "Whether to checkpoint during the run.",
4651
4685
  "default": false
4686
+ },
4687
+ "durability": {
4688
+ "type": "string",
4689
+ "enum": [
4690
+ "sync",
4691
+ "async",
4692
+ "exit"
4693
+ ],
4694
+ "title": "Durability",
4695
+ "description": "Durability level for the run. Must be one of 'sync', 'async', or 'exit'.",
4696
+ "default": "async"
4652
4697
  }
4653
4698
  },
4654
4699
  "type": "object",