langgraph-api 0.4.35__py3-none-any.whl → 0.4.36__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.35"
1
+ __version__ = "0.4.36"
@@ -1,6 +1,7 @@
1
1
  from typing import Any
2
2
  from uuid import uuid4
3
3
 
4
+ import jsonschema_rs
4
5
  import structlog
5
6
 
6
7
  # TODO: Remove dependency on langchain-core here.
@@ -33,6 +34,7 @@ from langgraph_api.validation import (
33
34
  AssistantSearchRequest,
34
35
  AssistantVersionChange,
35
36
  AssistantVersionsSearchRequest,
37
+ ConfigValidator,
36
38
  )
37
39
  from langgraph_runtime.checkpoint import Checkpointer
38
40
  from langgraph_runtime.database import connect
@@ -165,6 +167,12 @@ async def create_assistant(request: ApiRequest) -> ApiResponse:
165
167
  payload = await request.json(AssistantCreate)
166
168
  if assistant_id := payload.get("assistant_id"):
167
169
  validate_uuid(assistant_id, "Invalid assistant ID: must be a UUID")
170
+ config = payload.get("config")
171
+ if config:
172
+ try:
173
+ ConfigValidator.validate(config)
174
+ except jsonschema_rs.ValidationError as e:
175
+ raise HTTPException(status_code=422, detail=str(e)) from e
168
176
  async with connect() as conn:
169
177
  assistant = await CrudAssistants.put(
170
178
  conn,
@@ -189,6 +197,12 @@ async def search_assistants(
189
197
  payload = await request.json(AssistantSearchRequest)
190
198
  select = validate_select_columns(payload.get("select") or None, ASSISTANT_FIELDS)
191
199
  offset = int(payload.get("offset") or 0)
200
+ config = payload.get("config")
201
+ if config:
202
+ try:
203
+ ConfigValidator.validate(config)
204
+ except jsonschema_rs.ValidationError as e:
205
+ raise HTTPException(status_code=422, detail=str(e)) from e
192
206
  async with connect() as conn:
193
207
  assistants_iter, next_offset = await CrudAssistants.search(
194
208
  conn,
@@ -388,6 +402,12 @@ async def patch_assistant(
388
402
  assistant_id = request.path_params["assistant_id"]
389
403
  validate_uuid(assistant_id, "Invalid assistant ID: must be a UUID")
390
404
  payload = await request.json(AssistantPatch)
405
+ config = payload.get("config")
406
+ if config:
407
+ try:
408
+ ConfigValidator.validate(config)
409
+ except jsonschema_rs.ValidationError as e:
410
+ raise HTTPException(status_code=422, detail=str(e)) from e
391
411
  async with connect() as conn:
392
412
  assistant = await CrudAssistants.patch(
393
413
  conn,
@@ -8,6 +8,9 @@ with open(pathlib.Path(__file__).parent.parent / "openapi.json") as f:
8
8
 
9
9
  openapi = orjson.loads(openapi_str)
10
10
 
11
+ ConfigValidator = jsonschema_rs.validator_for(
12
+ openapi["components"]["schemas"]["Config"]
13
+ )
11
14
  AssistantVersionsSearchRequest = jsonschema_rs.validator_for(
12
15
  openapi["components"]["schemas"]["AssistantVersionsSearchRequest"]
13
16
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-api
3
- Version: 0.4.35
3
+ Version: 0.4.36
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,4 +1,4 @@
1
- langgraph_api/__init__.py,sha256=FEgXfNl5unGEmH5buNZAXb9QxKMPrxW7EBQw1Tzh0A8,23
1
+ langgraph_api/__init__.py,sha256=h8aRxmAAKfL5Jkrm7_IsujcDDHiKRo8DdMgCBl8-aWg,23
2
2
  langgraph_api/asgi_transport.py,sha256=XtiLOu4WWsd-xizagBLzT5xUkxc9ZG9YqwvETBPjBFE,5161
3
3
  langgraph_api/asyncio.py,sha256=FEEkLm_N-15cbElo4vQ309MkDKBZuRqAYV8VJ1DocNw,9860
4
4
  langgraph_api/cli.py,sha256=o_zD2vkky06dzW87HQgkIR1_h3ZCSZ8tgNvFCK9rKVo,19669
@@ -27,12 +27,12 @@ langgraph_api/store.py,sha256=NIoNZojs6NbtG3VLBPQEFNttvp7XPkHAfjbQ3gY7aLY,4701
27
27
  langgraph_api/stream.py,sha256=VA1CvR3kN6d03KAkSJgTVum4zfkI42cEGRqoGeEufeI,21167
28
28
  langgraph_api/thread_ttl.py,sha256=KyHnvD0e1p1cV4Z_ZvKNVzDztuI2RBCUsUO2V7GlOSw,1951
29
29
  langgraph_api/traceblock.py,sha256=Qq5CUdefnMDaRDnyvBSWGBClEj-f3oO7NbH6fedxOSE,630
30
- langgraph_api/validation.py,sha256=86jftgOsMa7tkeshBw6imYe7zyUXPoVuf5Voh6dFiR8,5285
30
+ langgraph_api/validation.py,sha256=-ZJy-HY3Qs6dJ4J67m1eDhIF0oA-P57VrsUXl0Vy-Bc,5381
31
31
  langgraph_api/webhook.py,sha256=SvSM1rdnNtiH4q3JQYmAqJUk2Sable5xAcwOLuRhtlo,1723
32
32
  langgraph_api/worker.py,sha256=HHgf590xElF7v02lgn0lG0iK2v2sENMjdx7TVFCvYXY,15399
33
33
  langgraph_api/api/__init__.py,sha256=wrnxz_204b2Vhv4-N0WpiPf-ZpDDlmIQkbh-TiXPnOo,5997
34
34
  langgraph_api/api/a2a.py,sha256=HIHZkLnIcM1u1FJti-L2NH-h1I9BZ_d-QW9z3gFonn8,53995
35
- langgraph_api/api/assistants.py,sha256=VxndCdWSWnLY-A5C7nMGdVaDsHDi7SpKREwx5vbWPG8,17445
35
+ langgraph_api/api/assistants.py,sha256=tRJse7Gr2BTeTZPljL05UvGkFiULpA-6hy03nBx9PF4,18177
36
36
  langgraph_api/api/mcp.py,sha256=qe10ZRMN3f-Hli-9TI8nbQyWvMeBb72YB1PZVbyqBQw,14418
37
37
  langgraph_api/api/meta.py,sha256=464nRdZPCPG-T1rouypReI8SPLHZlEec8dIj22H1Vvo,4787
38
38
  langgraph_api/api/openapi.py,sha256=If-z1ckXt-Yu5bwQytK1LWyX_T7G46UtLfixgEP8hwc,11959
@@ -109,8 +109,8 @@ langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,11
109
109
  LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
110
110
  logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
111
111
  openapi.json,sha256=21wu-NxdxyTQwZctNcEfRkLMnSBi0QhGAfwq5kg8XNU,172618
112
- langgraph_api-0.4.35.dist-info/METADATA,sha256=dSrZQMcNAkuHOLC5SVZ2J-cAJECyEnqzbpjyfsNamRs,4156
113
- langgraph_api-0.4.35.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
114
- langgraph_api-0.4.35.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
115
- langgraph_api-0.4.35.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
116
- langgraph_api-0.4.35.dist-info/RECORD,,
112
+ langgraph_api-0.4.36.dist-info/METADATA,sha256=HAidcwwtUaW07SG49fGJwggSl1U27apyxgnVBQ30M9k,4156
113
+ langgraph_api-0.4.36.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
114
+ langgraph_api-0.4.36.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
115
+ langgraph_api-0.4.36.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
116
+ langgraph_api-0.4.36.dist-info/RECORD,,